You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "C:\Users\mimos6997\miniconda3\envs\meterDetection\lib\site-packages\mmcv\transforms\processing.py", line 185, in _resize_img
File "C:\Users\mimos6997\miniconda3\envs\meterDetection\lib\site-packages\mmcv\image\geometric.py", line 126, in imresize
h_scale = size[1] / h
ZeroDivisionError: division by zero
Reproduces the problem - command or script
I try inference using svtr model and PanetCTW but got an error divide by zero in w
so I updated the code inside geometric.py from imresize function to change 0 to 1 from variable h. It resolve the problem, however I want to know is there any issues if I change this code.
##code added
h, w = img.shape[:2]
if h==0:
h=1
if w==0:
w=1
Reproduces the problem - error message
I tried referencing using this image
Additional information
No response
The text was updated successfully, but these errors were encountered:
Prerequisite
Task
I have modified the scripts/configs, or I'm working on my own tasks/models/datasets.
Branch
main branch https://github.com/open-mmlab/mmocr
Environment
no problem
Reproduces the problem - code sample
File "C:\Users\mimos6997\miniconda3\envs\meterDetection\lib\site-packages\mmcv\transforms\processing.py", line 185, in _resize_img
File "C:\Users\mimos6997\miniconda3\envs\meterDetection\lib\site-packages\mmcv\image\geometric.py", line 126, in imresize
h_scale = size[1] / h
ZeroDivisionError: division by zero
Reproduces the problem - command or script
I try inference using svtr model and PanetCTW but got an error divide by zero in w
so I updated the code inside geometric.py from imresize function to change 0 to 1 from variable h. It resolve the problem, however I want to know is there any issues if I change this code.
##code added
h, w = img.shape[:2]
if h==0:
h=1
if w==0:
w=1
Reproduces the problem - error message
I tried referencing using this image
Additional information
No response
The text was updated successfully, but these errors were encountered: