xingyizhou / CenterTrack

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

'NoneType' object is not callable #86

Open Cram3r95 opened 4 years ago

Cram3r95 commented 4 years ago

When I try to run the code (the command included in this GitHub repo for 3D tracking):

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 import DCN failed Import DCN failed import DCN failed import DCN failed /home/robesafe/anaconda3/lib/python3.6/site-packages/sklearn/utils/linearassignment.py:22: FutureWarning: The linearassignment 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!! Traceback (most recent call last): File "demo.py", line 126, in demo(opt) File "demo.py", line 24, in demo detector = Detector(opt) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/detector.py", line 33, in init opt.arch, opt.heads, opt.head_conv, opt=opt) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/model/model.py", line 28, in create_model model = model_class(num_layers, heads=head, head_convs=head_conv, opt=opt) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/model/networks/dla.py", line 611, in init node_type=self.node_type) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/model/networks/dla.py", line 564, in init node_type=node_type)) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/model/networks/dla.py", line 526, in init proj = node_type[0](c, o) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/model/networks/dla.py", line 513, in init self.conv = DCN(chi, cho, kernel_size=(3,3), stride=1, padding=1, dilation=1, deformable_groups=1) TypeError: 'NoneType' object is not callable

How can I solve this error?

vneseresearcher commented 4 years ago

Please do the following guide:

cd $CenterTrack_ROOT/src/lib/model/networks/
# git clone https://github.com/CharlesShang/DCNv2/ # clone if it is not automatically downloaded by `--recursive`.
cd DCNv2
./make.sh
Cram3r95 commented 4 years ago

Incredibly, I have cloned in a Docker image, and it restarted it. However, the solution was rebooting the computer (I guess some HW was updated, cause I installed CUDA, CUDnn and Nvidia driver in this last Docker image commit).

I have now running the demo.py, thanks!

reccone commented 3 years ago

Incredibly, I have cloned in a Docker image, and it restarted it. However, the solution was rebooting the computer (I guess some HW was updated, cause I installed CUDA, CUDnn and Nvidia driver in this last Docker image commit).

I have now running the demo.py, thanks!

how to do that?

akhilasuraj commented 3 years ago

When I try to run the code (the command included in this GitHub repo for 3D tracking):

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 import DCN failed Import DCN failed import DCN failed import DCN failed /home/robesafe/anaconda3/lib/python3.6/site-packages/sklearn/utils/linearassignment.py:22: FutureWarning: The linearassignment 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!! Traceback (most recent call last): File "demo.py", line 126, in demo(opt) File "demo.py", line 24, in demo detector = Detector(opt) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/detector.py", line 33, in init opt.arch, opt.heads, opt.head_conv, opt=opt) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/model/model.py", line 28, in create_model model = model_class(num_layers, heads=head, head_convs=head_conv, opt=opt) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/model/networks/dla.py", line 611, in init node_type=self.node_type) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/model/networks/dla.py", line 564, in init node_type=node_type)) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/model/networks/dla.py", line 526, in init proj = node_type[0](c, o) File "/home/robesafe/t4ac_ws/src/CenterTrack/src/lib/model/networks/dla.py", line 513, in init self.conv = DCN(chi, cho, kernel_size=(3,3), stride=1, padding=1, dilation=1, deformable_groups=1) TypeError: 'NoneType' object is not callable

How can I solve this error?

I had the same error. I first thought I compiled DCNv2 correctly and in my case it was not. so I ran python setup.py build develop command manually inside my DCNv2 folder and it compiled DCNv2 successfully. It solved the problem and I got rid of the error. hope this helps.

HyeongChanHam commented 1 year ago

In my case, https://github.com/3846chs/DCNv2.git version solved the same problem