MVIG-SJTU / AlphaPose

Real-Time and Accurate Full-Body Multi-Person Pose Estimation&Tracking System
http://mvig.org/research/alphapose.html
Other
8.01k stars 1.97k forks source link

ImportError: cannot import name 'deform_conv_cuda' #751

Open lofyol opened 3 years ago

ToxicFyre commented 3 years ago

https://github.com/MVIG-SJTU/AlphaPose/issues/492 Found this same error in this thread, but personally haven't gotten it to work yet. Have had more luck with tensorflow branch.

wawaa commented 3 years ago

@CCxiaoLL You need to run setup.py when installing the Alphapose. When you run the setup.py script, a function named 'get_ext_modules' will install some packages like 'deform_conv_cuda'.

cmc370 commented 3 years ago

@wawaa I successfully run 'python setup.py develop', and everything is installed, but when I use from . import deform_conv_cuda, it still shows ImportError: cannot import name 'deform_conv_cuda' .

ChiaChianChan commented 3 years ago

I also have the same question

SCP-KAKA commented 2 years ago

My pc don't have Nvidia, I deleted setup.py line 211: ext_modules=get_ext_modules(), and success run "python setup.py build develop", but the problem still exists.

koalaaaaaaaaa commented 2 years ago

@wawaa could you please kindly tell me which environment you run this project..(which version of python, cuda, pytorch).. I've tried a whole day and end with no compatible environment...I'm totally confused...

wawaa commented 2 years ago

@wawaa could you please kindly tell me which environment you run this project..(which version of python, cuda, pytorch).. I've tried a whole day and end with no compatible environment...I'm totally confused...

In my impression, I should have installed the configuration recommended by the author. If you have no special requirements, maybe you can also try this.

leoliu616 commented 2 years ago

On Windows, set force_compile = True on line 124 def get_ext_modules(): ext_modules = []

only windows visual studio 2013+ support compile c/cuda extensions

# If you force to compile extension on Windows and ensure appropriate visual studio
# is intalled, you can try to use these ext_modules.
force_compile = True

if platform.system() != 'Windows' or force_compile: