xingyizhou / CenterTrack

Simultaneous object detection and tracking using center points.
MIT License
2.39k stars 526 forks source link

meet problem when running demo for video #211

Closed Xulei-Zhai closed 3 years ago

Xulei-Zhai commented 3 years ago

when i run the commend as follows:

python demo.py tracking,ddd --load_model ../models/nuScenes_3Dtracking.pth --dataset nuscenes --pre_hm --track_thresh 0.1 --demo ../videos/nuscenes_mini.mp4 --test_focal_length 633

i met this problem:

python demo.py tracking,ddd --load_model ../models/nuScenes_3Dtracking.pth --dataset nuscenes --pre_hm --track_thresh 0.1 --demo ../videos/nuscenes_mini.mp4 --test_focal_length 633
/home/xulei/anaconda3/envs/CenterTrack/lib/python3.6/site-packages/sklearn/utils/linear_assignment_.py:22: FutureWarning: The linear_assignment_ module is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead.
  FutureWarning)
Running tracking
Using tracking threshold for out threshold! 0.1
Fix size testing.
training chunk_sizes: [32]
input h w: 448 800
heads {'hm': 10, 'reg': 2, 'wh': 2, 'tracking': 2, 'dep': 1, 'rot': 8, 'dim': 3, 'amodel_offset': 2}
weights {'hm': 1, 'reg': 1, 'wh': 0.1, 'tracking': 1, 'dep': 1, 'rot': 1, 'dim': 1, 'amodel_offset': 1}
head conv {'hm': [256], 'reg': [256], 'wh': [256], 'tracking': [256], 'dep': [256], 'rot': [256], 'dim': [256], 'amodel_offset': [256]}
Creating model...
Using node type: (<class 'model.networks.dla.DeformConv'>, <class 'model.networks.dla.DeformConv'>)
Warning: No ImageNet pretrain!!
loaded ../models/nuScenes_3Dtracking.pth, epoch 70
out_name nuscenes_mini.mp4
Initialize tracking!
Traceback (most recent call last):
  File "demo.py", line 128, in <module>
    demo(opt)
  File "demo.py", line 83, in demo
    ret = detector.run(img)
  File "/media/xulei/Samsung/detection/CenterTrack-master/src/lib/detector.py", line 155, in run
    self.show_results(self.debugger, image, results)
  File "/media/xulei/Samsung/detection/CenterTrack-master/src/lib/detector.py", line 444, in show_results
    img_id='bird_pred', cnt=self.cnt)
  File "/media/xulei/Samsung/detection/CenterTrack-master/src/lib/utils/debugger.py", line 381, in add_bird_view
    lineType=cv2.LINE_AA)
cv2.error: OpenCV(4.5.2) :-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
koenvellenga commented 3 years ago

Encountered the same, have you solved it already? Thanks in advance :)

Tord-Zhang commented 3 years ago

@Xulei-Zhai hi, have you solved this problem? met the same problem. Thanks

morrolinux commented 3 years ago

That's due to the wrong version of OpenCV being installed. I solved with pip install opencv-python==3.3.1.11 (do this from inside the conda environment)

Xulei-Zhai commented 3 years ago

@morrolinux I solved the problem through your method, thank you very much.