yangxue0827 / R2CNN_FPN_Tensorflow

R2CNN: Rotational Region CNN Based on FPN (Tensorflow)
419 stars 139 forks source link

No module named rotate_polygon_nms #15

Open UpCoder opened 6 years ago

UpCoder commented 6 years ago

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.

yangxue0827 commented 6 years ago

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

UpCoder commented 6 years ago

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!

yangxue0827 commented 6 years ago

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

UpCoder commented 6 years ago

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'

yangxue0827 commented 6 years ago

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)).

UpCoder commented 6 years ago

Yeah! It works, Thank you very much!