Problem in utils.py
MunthaliKG opened this issue · 1 comments
MunthaliKG commented
The following lines in lib/utils.py result in a 0 value for some images in my case:
input_width *= min_pixel / min_edge
input_height *= min_pixel / min_edge
AND
input_width *= max_pixel / max_edge
input_height *= max_pixel / max_edge
Which in turn causes "cv2.resize(img, (input_width, input_height))" to fail with an error. Changing these lines to something like "input_height *= max_pixel / (max_edge * 1.0)" fixes the problem for me
MunthaliKG commented
I discovered later that this does not happen with python 3. It has something to do with the way python 2.7 handles division