Closed WangHuancheng closed 3 years ago
this is the code where the issue occur first
img = cv2.copyMakeBorder(
img,
padding[1],
padding[3],
padding[0],
padding[2],
border_type[padding_mode],
value=pad_val)
return img
I print the shape of img(by the way its a numpy array) and the padding, below is the result
shape
(480, 544)
[[0 0 0 ... 0 0 0]
[0 0 0 ... 0 0 0]
[0 0 0 ... 0 0 0]
...
[0 0 0 ... 0 0 0]
[0 0 0 ... 0 0 0]
[0 0 0 ... 0 0 0]]
padding
(0, 0, -64, 64)
It turns out that when I generating the annotation, I got the 'width 'height' wrong, which leads to a issue annotation with false size of image.
It turns out that when I generating the annotation, I got the 'width 'height' wrong, which leads to a issue annotation with false size of image. have you generated the annotations again?
I met the same problem. After I updated the version of mmdet from 2.14.0 to 2.18.0, everything works well.
Describe the bug when trying to train my model with customized dataset, there is an Assertion failed,
cv2.error: OpenCV(4.1.2) /io/opencv/modules/core/src/copy.cpp:1170: error: (-215:Assertion failed) top >= 0 && bottom >= 0 && left >= 0 && right >= 0 && _src.dims() <= 2 in function 'copyMakeBorder'
It looks like there is a none have been send to opencv to generate border,However, It's really hard for me to track how and where the none comes from after all those call.Anyone have any idea about it? ReproductionWhat command or script did you run?
train.py
Did you make any modifications on the code or config? Did you understand what you have modified?
What dataset did you use?
Environment
python mmdet/utils/collect_env.py
to collect necessary environment information and paste it here.$PATH
,$LD_LIBRARY_PATH
,$PYTHONPATH
, etc.)Error traceback