Open Huleyun opened 2 years ago
Convert whatever your parameters are to Integer type
It is most likely that the opencv version is not suitable。 I've had similar problems,The solution is as follows: in draw_box_3d function or other similar error codes,add int(), like this:
cv2.line(image, (int(corners[f[j], 0]), int(corners[f[j], 1])), ...
Convert whatever your parameters are to Integer type
Yeah I works for me. Thank you
Convert whatever your parameters are to Integer type
Hi, i'm already convert to integer but it still fail
Coud youu help me pls!
i am having the same error, did you solve it ?
Hello, thanks for this wonderful work. I met a tough problem when I try to use CenterNet in 3D object detection. I run the following command:
python demo.py ddd --demo ../images/000003.png --load_model ../models/ddd_3dop.pth
but there interrupt a strange error:
(Python36) wei@wei:~/PycharmProjects/CenterNet/src$ python demo.py ddd --demo ../images/000003.png --load_model ../models/ddd_3dop.pth NMS not imported! If you need it, do cd $CenterNet_ROOT/src/lib/external make NMS not imported! If you need it, do cd $CenterNet_ROOT/src/lib/external make Fix size testing. training chunk_sizes: [32] The output will be saved to /home/wei/PycharmProjects/CenterNet/src/lib/../../exp/ddd/default heads {'hm': 3, 'dep': 1, 'rot': 8, 'dim': 3, 'wh': 2, 'reg': 2} Creating model... loaded ../models/ddd_3dop.pth, epoch 70 THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1535491974311/work/aten/src/THC/THCGeneral.cpp line=663 error=11 : invalid argument Traceback (most recent call last): File "demo.py", line 59, in
demo(opt)
File "demo.py", line 52, in demo
ret = detector.run(image_name)
File "/home/wei/PycharmProjects/CenterNet/src/lib/detectors/base_detector.py", line 140, in run
self.show_results(debugger, image, results)
File "/home/wei/PycharmProjects/CenterNet/src/lib/detectors/ddd.py", line 103, in show_results
center_thresh=self.opt.vis_thresh, img_id='add_pred')
File "/home/wei/PycharmProjects/CenterNet/src/lib/utils/debugger.py", line 330, in add_3d_detection
self.imgs[img_id] = draw_box_3d(self.imgs[img_id], box_2d, cl)
File "/home/wei/PycharmProjects/CenterNet/src/lib/utils/ddd_utils.py", line 58, in draw_box_3d
(corners[f[(j+1)%4], 0], corners[f[(j+1)%4], 1]), c, 2, lineType=cv2.LINE_AA)
cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'line'
what should I do? do I need to change image to mp4 like issue#397(https://github.com/xingyizhou/CenterNet/issues/397)?