msracver / Deformable-ConvNets

Deformable Convolutional Networks
MIT License
4.03k stars 959 forks source link

ImportError: cannot import name bbox_overlaps_cython #213

Open lzh19961031 opened 6 years ago

lzh19961031 commented 6 years ago

iuzihao@liuzihao-All-Series:~/Deformable-ConvNets$ python experiments/rfcn/rfcn_end2end_train_test.py --cfg experiments/rfcn/cfgs/resnet_v1_101_coco_trainval_rfcn_dcn_end2end_ohem.yaml Traceback (most recent call last): File "experiments/rfcn/rfcn_end2end_train_test.py", line 15, in import train_end2end File "experiments/rfcn/../../rfcn/train_end2end.py", line 47, in from symbols import File "experiments/rfcn/../../rfcn/symbols/init.py", line 1, in import resnet_v1_101_rfcn File "experiments/rfcn/../../rfcn/symbols/resnet_v1_101_rfcn.py", line 11, in from operator_py.proposal import File "experiments/rfcn/../../rfcn/operator_py/proposal.py", line 19, in from bbox.bbox_transform import bbox_pred, clip_boxes File "experiments/rfcn/../../rfcn/../lib/bbox/bbox_transform.py", line 15, in from bbox import bbox_overlaps_cython ImportError: cannot import name bbox_overlaps_cython

shirishr commented 6 years ago

I am on python 3.6 mxnet 1.3.0 I have run init.sh I still run into error ImportError: cannot import name bbox_overlaps_cython when I run python ./rfcn/demo.py Somewhere else I have read that python3 is not supported. Can you please confirm?

shirishr commented 6 years ago

Update

A minor change required in lib/bbox/bbox_transform.py

change line 15 from

from bbox import bbox_overlaps_cython

to

from bbox.bbox import bbox_overlaps_cython

chaimaeelouardini commented 3 months ago

In case only changing bbox to bbox.bbox didn't work like my case, try changing bbox.pyx format into a bbox.py format this inlcudes few minor changes inside the file from cython to python ( import instead of cimport ..)