Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'dcn_v2' #777

Closed
Veronica1997 opened this issue Jul 16, 2020 · 1 comment
Closed

ImportError: cannot import name 'dcn_v2' #777

Veronica1997 opened this issue Jul 16, 2020 · 1 comment

Comments

@Veronica1997
Copy link

(CenterTrack) eini@eini:~/RY/CenterNet/src$ python demo.py ctdet --demo /home/eini/RY/191204_16_cqupt_wu_0120200612181721.mp4 --load_model /home/eini/RY/CenterNet/models/ctdet_coco_dla_2x.pth
Traceback (most recent call last):
File "demo.py", line 11, in
from detectors.detector_factory import detector_factory
File "/home/eini/RY/CenterNet/src/lib/detectors/detector_factory.py", line 5, in
from .exdet import ExdetDetector
File "/home/eini/RY/CenterNet/src/lib/detectors/exdet.py", line 21, in
from .base_detector import BaseDetector
File "/home/eini/RY/CenterNet/src/lib/detectors/base_detector.py", line 11, in
from models.model import create_model, load_model
File "/home/eini/RY/CenterNet/src/lib/models/model.py", line 12, in
from .networks.pose_dla_dcn import get_pose_net as get_dla_dcn
File "/home/eini/RY/CenterNet/src/lib/models/networks/pose_dla_dcn.py", line 16, in
from .DCNv2.dcn_v2 import DCN
File "/home/eini/RY/CenterNet/src/lib/models/networks/DCNv2/dcn_v2.py", line 11, in
from .dcn_v2_func import DCNv2Function
File "/home/eini/RY/CenterNet/src/lib/models/networks/DCNv2/dcn_v2_func.py", line 9, in
from ._ext import dcn_v2 as _backend
ImportError: cannot import name 'dcn_v2'

When I run demo.py, i Met this problem, have anyone met the same problem?How can I solve it?
Thanks a lot!

@zengjie617789
Copy link

check the version your pytorch, or download the version compact with higher version of pytorch : https://github.com/jinfagang/DCNv2_latest.git
Furthermore, you shold put the DCNv2 code under right location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants