Can't parse 'pt1'. Sequence item with index 0 has a wrong type
See original GitHub issueBeen trying to get this to run, and jumping through a couple of hoops because I’m using a RTX 2070 Super - which requires at least CUDA 10. Setting up the conda environment with the following allowed me to build DCNv2 as well as iou3d, however when trying out the demo, I get the following error:
python ./src/faster.py --vis --demo ./demo_kitti_format/data/kitti/image --calib_dir ./demo_kitti_format/data/kitti/calib --load_model ./demo_kitti_format/exp/KM3D/model_res18_1.pth --gpus 0 --arch res_18
Fix size testing.
training chunk_sizes: [32]
The output will be saved to exp/default
heads {'hm': 3, 'wh': 2, 'hps': 18, 'rot': 8, 'dim': 3, 'prob': 1, 'reg': 2, 'hm_hp': 9, 'hp_offset': 2}
Creating model...
=> loading pretrained model https://download.pytorch.org/models/resnet18-5c106cde.pth
./demo_kitti_format/exp/KM3D/model_res18_1.pth
loaded ./demo_kitti_format/exp/KM3D/model_res18_1.pth, epoch 199
Drop parameter hm_hp.0.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter hm_hp.0.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter hm_hp.2.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter hm_hp.2.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter hp_offset.0.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter hp_offset.0.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter hp_offset.2.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter hp_offset.2.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter reg.0.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter reg.0.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter reg.2.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter reg.2.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter wh.0.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter wh.0.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter wh.2.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Drop parameter wh.2.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
corners:
[[506.05777 370.8125 ]
[346.08633 357.84247]
[512.6833 291.99506]
[620.54315 297.24396]
[506.05777 174.95726]
[346.08633 174.81946]
[512.6833 174.11986]
[620.54315 174.17561]
[510.1939 248.02145]]
Traceback (most recent call last):
File "./src/faster.py", line 55, in <module>
demo(opt)
File "./src/faster.py", line 46, in demo
ret = detector.run(image_name)
File "/home/leon/Desktop/avular/testing/RTM3D_KM3D/src/lib/detectors/base_detector.py", line 163, in run
self.show_results(debugger, image, results, calib_numpy)
File "/home/leon/Desktop/avular/testing/RTM3D_KM3D/src/lib/detectors/car_pose.py", line 110, in show_results
debugger.add_3d_detection(bbox, calib, img_id='car_pose')
File "/home/leon/Desktop/avular/testing/RTM3D_KM3D/src/lib/utils/debugger.py", line 472, in add_3d_detection
self.imgs[img_id] = draw_box_3d(self.imgs[img_id], box_2d, cl)
File "/home/leon/Desktop/avular/testing/RTM3D_KM3D/src/lib/utils/ddd_utils.py", line 110, 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.5.3) :-1: error: (-5:Bad argument) in function 'line'
> Overload resolution failed:
> - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
> - Can't parse 'pt1'. Sequence item with index 0 has a wrong type
Maybe this has to do with my version of OpenCV and changed API calls? If yes, what version of OpenCV was used originally?
I also added a print for the corners, maybe that helps to figure out the issue?
The error seems to be on this line: https://github.com/Banconxuan/RTM3D/blob/888c379e79d8a6d134f06a9b7d669118679e06dc/src/lib/utils/ddd_utils.py#L104
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top GitHub Comments
I solved it like this …
Convert
pt1
from float point type to intcv.line(img, pt1, pt2, color,thickness,lineType)
Thanks, that seemed to have fixed it for me.
For reference, here is my current conda environment: