Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lihanlin99 opened this issue Aug 27, 2021 · 0 comments

Comments

@lihanlin99
Copy link

lihanlin99 commented Aug 27, 2021

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.

@lihanlin99 lihanlin99 changed the title Using pytorch >=1.5.0, how shoud I patch maskrcnn-benchmark in order for it to compile? Using pytorch >=1.5.0, I have compiled maskrcnn-benchmark. But when running siam-mot, it can't import DFConv2d Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant