mjq11302010044 / RRPN_pytorch

RRPN in pytorch 1.0 ----- Arbitrary-Oriented Scene Text Detection via Rotation Proposals
MIT License
262 stars 56 forks source link

ModuleNotFoundError: No module named 'rotation.rotate_polygon_nms' #40

Open Adnan-annan opened 4 years ago

Adnan-annan commented 4 years ago

when i run the training command in terminal of ubuntu, it starts training successfuly. But when i run the same file through pycharm it gives me this error. i AM ALMOST GETTING MAD TRYING TO SOLVE THIS WITHOUT ANY SUCCESS. what could be the problem ? do you have any idea ? i have to use pycharm because i wish to debug the code.

mjq11302010044 commented 4 years ago

Make sure you have successfully compile the polygon_nms lib in .so and move it to the ./rotation folder. And be sure you can successfully import rotation.rotate_polygon_nms in your pycharm.

Adnan-annan commented 4 years ago

How to compile the polygon_nms lib in .so ? Can you elaborate?? I can run training in terminal, but importing rotation.rotate_polygon_nms is causing problem in pycharm. I have spent a lot of time on it but without success. Thanks for your reply. Kindly guide me

tiny-cold-hands commented 4 years ago

i meet this problem too. did you solve it

tjmannn commented 3 years ago

@Adnan-annan @tiny-cold-hands Hi bros, I just faced this problem and I fixed it! I use pycharm&anaconda to run the code, I think it's because your compile fail or you didn't compile. This is how I fixed it:

  1. cd to the code's root path
  2. python rotation_setup.py install
  3. then you'll get a 'build' folder, and go into 'lib.xxx' folder and copy the .so file to the /rotation/ and change these .so files' name to the name without '.cpythonXXXX' then you will run the code
  4. and make sure your environment's cuda version is the same to your system cuda version, and you run the code in the same environment you compile
tjmannn commented 3 years ago

@Adnan-annan @tiny-cold-hands sry. I didn't change the .so files's name, it still work, just run without changing name first.