R2CNN_FPN_Tensorflow icon indicating copy to clipboard operation
R2CNN_FPN_Tensorflow copied to clipboard

No module named rotate_polygon_nms

Open UpCoder opened this issue 7 years ago • 6 comments

Hi, I run the code but there are some error happened. When i run the inference.py, there is no mistake, and get the correct result. but when i run the inerence1.py, there are some mistake, the message as follow.

Traceback (most recent call last): File "/home/give/Game/OCR/Papers-code/R2CNN_FPN_Tensorflow-master/tools/inference1.py", line 17, in <module> from libs.fast_rcnn import build_fast_rcnn1 File "/home/give/Game/OCR/Papers-code/R2CNN_FPN_Tensorflow-master/libs/fast_rcnn/build_fast_rcnn1.py", line 14, in <module> from libs.box_utils import nms_rotate File "/home/give/Game/OCR/Papers-code/R2CNN_FPN_Tensorflow-master/libs/box_utils/nms_rotate.py", line 12, in <module> from libs.box_utils.rotate_polygon_nms import rotate_gpu_nms ImportError: No module named rotate_polygon_nms

the file not found, but the file do exists. I guess there is a make operation, but i don't find any makefile. do you known the reason? thanks.

UpCoder avatar Mar 21 '18 02:03 UpCoder

Some updates were made just now, please clone the code again.

yangxue0827 avatar Mar 21 '18 03:03 yangxue0827

Thank you for replying, I download the new .so file, the error solved, but there is a new error as followed Traceback (most recent call last): File "inference1.py", line 17, in <module> from libs.fast_rcnn import build_fast_rcnn1 File "../libs/fast_rcnn/build_fast_rcnn1.py", line 14, in <module> from libs.box_utils import nms_rotate File "../libs/box_utils/nms_rotate.py", line 12, in <module> from libs.box_utils.rotate_polygon_nms import rotate_gpu_nms ImportError: dynamic module does not define module export function (PyInit_rotate_polygon_nms) I google it, it maybe caused by the version of python, my python version is 3.6. What’s your version? Or do you know the reason? Thank you very much!

UpCoder avatar Mar 21 '18 12:03 UpCoder

Environment: python2 + tensorflow1.2 + cv2 + cuda8.0 + GeForce GTX 1080

yangxue0827 avatar Mar 21 '18 13:03 yangxue0827

Thank you for replying. What’s the version of opencv? I switch to python2.7, but there is also error...

AttributeError: 'module' object has no attribute 'boxPoints'

UpCoder avatar Mar 21 '18 13:03 UpCoder

You need download the opencv from here, choose (opencv_python-3.4.0.12-cp27-cp27m-manylinux1_x86_64.whl (md5)) or (opencv_python-3.4.0.12-cp27-cp27mu-manylinux1_x86_64.whl (md5)).

yangxue0827 avatar Mar 21 '18 13:03 yangxue0827

Yeah! It works, Thank you very much!

UpCoder avatar Mar 21 '18 15:03 UpCoder