Scalsol / mega.pytorch

Memory Enhanced Global-Local Aggregation for Video Object Detection, CVPR2020
Other
565 stars 115 forks source link

ImportError: can't import name '_C' #34

Closed humble-king closed 4 years ago

humble-king commented 4 years ago

On running the demo.py code, I am getting an import error

from mega_core import _C ImportError: cannot import name '_C'

This error was coming from ./mega_core/layers/nms.py and some other files in the same directory

so I commented it and changed it as

#from mega_core import _C from ._utils import _C

After making the changes the code worked and I was able to get my predictions. Are the two things same? I want to know whether I did the correct thing or not. It would be great if someone could give help in this regard.

Skydddoogg commented 4 years ago

ImportError: cannot import name '_C' was raised because you did not build MEGA (mega.pytorch) or the building process is failed.

Please check this below step in INSTALL.md carefully.

Screen Shot 2563-07-05 at 01 59 22
humble-king commented 4 years ago

Thanks a lot @Skydddoogg . It is working now