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 'deform_conv_cuda' #13

Open
dzyjjpy opened this issue Nov 8, 2019 · 1 comment
Open

ImportError: cannot import name 'deform_conv_cuda' #13

dzyjjpy opened this issue Nov 8, 2019 · 1 comment

Comments

@dzyjjpy
Copy link

dzyjjpy commented Nov 8, 2019

When I run: python video.py, errors occured. ImportError: cannot import name 'deform_conv_cuda'
Someone suggest reinstall pytorch==1.0.1,
I try but it dosen't work. @lxy5513 Do you have any suggestion?
error displays as below:
/home/jiapy/virtualEnv/py3torch4HRNet/bin/python3.6 /home/jiapy/workspace/hrnet/pose_estimation/video.py -i ./right-2-out.mp4 -o /output/output.mp4 --display
/home/jiapy/virtualEnv/py3torch4HRNet/lib/python3.6/site-packages/IPython/core/interactiveshell.py:931: UserWarning: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
warn("Attempting to work in a virtualenv. If you encounter problems, please "
Traceback (most recent call last):
File "/home/jiapy/workspace/hrnet/pose_estimation/video.py", line 29, in
from lib.detector.mmdetection.high_api import human_boxes_get as mm_det
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/high_api.py", line 8, in
from mmdet.models import build_detector
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/models/init.py", line 1, in
from .backbones import * # noqa: F401,F403
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/models/backbones/init.py", line 1, in
from .resnet import ResNet, make_res_layer
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/models/backbones/resnet.py", line 9, in
from mmdet.ops import DeformConv, ModulatedDeformConv
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/ops/init.py", line 1, in
from .dcn import (DeformConv, DeformConvPack, ModulatedDeformConv,
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/ops/dcn/init.py", line 1, in
from .functions.deform_conv import deform_conv, modulated_deform_conv
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/ops/dcn/functions/deform_conv.py", line 5, in
from .. import deform_conv_cuda
ImportError: cannot import name 'deform_conv_cuda'

If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True

@YinXiaojieCSDN
Copy link

When I run: python video.py, errors occured. ImportError: cannot import name 'deform_conv_cuda'
Someone suggest reinstall pytorch==1.0.1,
I try but it dosen't work. @lxy5513 Do you have any suggestion?
error displays as below:
/home/jiapy/virtualEnv/py3torch4HRNet/bin/python3.6 /home/jiapy/workspace/hrnet/pose_estimation/video.py -i ./right-2-out.mp4 -o /output/output.mp4 --display
/home/jiapy/virtualEnv/py3torch4HRNet/lib/python3.6/site-packages/IPython/core/interactiveshell.py:931: UserWarning: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
warn("Attempting to work in a virtualenv. If you encounter problems, please "
Traceback (most recent call last):
File "/home/jiapy/workspace/hrnet/pose_estimation/video.py", line 29, in
from lib.detector.mmdetection.high_api import human_boxes_get as mm_det
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/high_api.py", line 8, in
from mmdet.models import build_detector
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/models/init.py", line 1, in
from .backbones import * # noqa: F401,F403
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/models/backbones/init.py", line 1, in
from .resnet import ResNet, make_res_layer
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/models/backbones/resnet.py", line 9, in
from mmdet.ops import DeformConv, ModulatedDeformConv
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/ops/init.py", line 1, in
from .dcn import (DeformConv, DeformConvPack, ModulatedDeformConv,
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/ops/dcn/init.py", line 1, in
from .functions.deform_conv import deform_conv, modulated_deform_conv
File "/home/jiapy/workspace/hrnet/lib/detector/mmdetection/mmd/mmdet/ops/dcn/functions/deform_conv.py", line 5, in from .. import deform_conv_cuda ImportError: cannot import name 'deform_conv_cuda'

If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True

you can reference http://blog.leanote.com/post/liuliu408/5.

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