amazon-science / siam-mot

SiamMOT: Siamese Multi-Object Tracking
Apache License 2.0
477 stars 61 forks source link

Using pytorch >=1.5.0, I have compiled maskrcnn-benchmark. But when running siam-mot, it can't import DFConv2d #21

Open lihanlin99 opened 3 years ago

lihanlin99 commented 3 years ago

I have solved the problem, thank you!

I am using python3.6, pytorch 1.7.0 and cuda 11.1.

According to the INSTALL.md, I have run the commands below to change the two files, "/deform_conv_cuda.cu" and "/deform_pool_cuda.cu".

cuda_dir="maskrcnn_benchmark/csrc/cuda" perl -i -pe 's/AT_CHECK/TORCH_CHECK/' $cuda_dir/deform_pool_cuda.cu $cuda_dir/deform_conv_cuda.cu

Then, the maskrcnn_benchmark can be compiled without any error. But when running siam-mot, it reports the error following: Traceback (most recent call last): File "tools/test_net.py", line 13, in from siammot.modelling.rcnn import build_siammot File "/root/siam-mot/siammot/modelling/rcnn.py", line 12, in from .backbone.backbone_ext import build_backbone File "/root/siam-mot/siammot/modelling/backbone/backbone_ext.py", line 8, in from .dla import dla File "/root/siam-mot/siammot/modelling/backbone/dla.py", line 8, in from maskrcnn_benchmark.layers import DFConv2d ImportError: cannot import name 'DFConv2d'

I have checked the code of the maskrcnn-benchmark package that has been installed in /opt/conda/lib/python3.6/site-pakages. These is no DFConv2d.