dingjiansw101 / AerialDetection

Apache License 2.0
786 stars 183 forks source link

ImportError: cannot import name 'deform_conv_cuda' from 'mmdet.ops.dcn' (/content/drive/MyDrive/AerialDetection/mmdet/ops/dcn/__init__.py) #97

Open Nirkan opened 2 years ago

Nirkan commented 2 years ago

Hi,

I am getting an error on running the following lines on google colab. May be someone else faced this issue before.

  1. !python tools/test.py configs/DOTA/faster_rcnn_RoITrans_r50_fpn_1x_dota.py work_dirs/faster_rcnn_RoITrans_r50_fpn_1x_dota/epoch_12.pth --out work_dirs/faster_rcnn_RoITrans_r50_fpn_1x_dota/results.pkl

  2. !python tools/train.py configs/DOTA/faster_rcnn_h-obb_r50_fpn_1x_dota.py --work_dir work_dirs/

    Error :

ImportError: cannot import name 'deform_conv_cuda' from 'mmdet.ops.dcn' (/content/drive/MyDrive/AerialDetection/mmdet/ops/dcn/init.py)

I am using :

python : 3.7.12 pytorch : 1.10.0+cu111 cuda : 11.2 gcc : 7.5.0 nccl : 2.10.3 mmcv : 1.4.4

I guess I followed the instructions based on the Github repository.

prayagpawar commented 1 year ago

deform_conv_cuda files are compiled by this step compile.sh probably compilation is failing because cuda and gcc and nccl .Your cuda version is very high 11.2. To fix this use you can try this pytorch 1.2.0, py3.7,cuda10.0.130,cudnn7.6.2 ,cudatoolkit 10.0.130 libgcc-ng 7.3.0 ,nccl 2.8.3.1 ,mmcv 0.4.3 ,mmdet 0.6.0+fbb7726