VDIGPKU / M2Det

M2Det: A Single-Shot Object Detector based on Multi-Level Feature Pyramid Network
MIT License
1.46k stars 318 forks source link

dynamic module does not define module export function (PyInit_cpu_nms) #41

Closed haha1958 closed 5 years ago

haha1958 commented 5 years ago

File "/home/vidana/OurCode/M2Det/utils/nms_wrapper.py", line 9, in from .nms.cpu_nms import cpu_nms, cpu_soft_nms ImportError: dynamic module does not define module export function (PyInit_cpu_nms)

when i run the code , i got an error ,could anyone tell me how to solve it? thank you very much

door5719 commented 5 years ago

Rewrite the cpu_soft_nms fuction and cpu_nms.pyx as cpu_nms.py then modify nms nms_wrapper.py,it will run will. Or build build.py, it will also run will. I try these two methods both ok ,I run this code on WIN10 pytorch1.0.1.

haha1958 commented 5 years ago

Rewrite the cpu_soft_nms fuction and cpu_nms.pyx as cpu_nms.py then modify nms nms_wrapper.py,it will run will. Or build build.py, it will also run will. I try these two methods both ok ,I run this code on WIN10 pytorch1.0.1.

sorry for bother you ,could you tell me more detail about the code ,such as how to change build.py? or can you share me the .py file? I try to rename .pyx to .py and do some change,but it cause error

haha1958 commented 5 years ago

hello ,i solved my problem . make.sh used python2.7 to produce .so ,but i use python3.5 to run demo.py ,change one version can help