Closed shartoo closed 4 years ago
I did check that there was no file named deform_conv_cuda
in that directory but file like deform_conv_cuda.cpp
in dcn/src
same problem
Hi, I guess it's a problem from here: https://github.com/MVIG-SJTU/AlphaPose/blob/master/setup.py#L124 You can try to remove the if command. We will update the setup.py later
I have the same error. Were you able to resolve it, @shartoo
(alphapose) C:\Users\mazat\Documents\Python\AlphaPose>python scripts/demo_inference.py --cfg ${cfg_file} --checkpoint ${trained_model} --outdir examples/res --vis --webcam 0
Traceback (most recent call last):
File "scripts/demo_inference.py", line 13, in <module>
from alphapose.models import builder
File "c:\users\mazat\documents\python\alphapose\alphapose\models\__init__.py", line 1, in <module>
from .fastpose import FastPose
File "c:\users\mazat\documents\python\alphapose\alphapose\models\fastpose.py", line 10, in <module>
from .layers.SE_Resnet import SEResnet
File "c:\users\mazat\documents\python\alphapose\alphapose\models\layers\SE_Resnet.py", line 9, in <module>
from .dcn import DeformConv, ModulatedDeformConv
File "c:\users\mazat\documents\python\alphapose\alphapose\models\layers\dcn\__init__.py", line 1, in <module>
from .deform_conv import (DeformConv, DeformConvPack, ModulatedDeformConv,
File "c:\users\mazat\documents\python\alphapose\alphapose\models\layers\dcn\deform_conv.py", line 9, in <module>
from . import deform_conv_cuda
ImportError: cannot import name 'deform_conv_cuda'
not yet,remove code as @Fang-Haoshu Fang-Haoshu could not help.
I had the problem and I've been able to solve it by doing what @Fang-Haoshu said. There is an if statement that makes setup.py skip some module installations if you're on Windows.
if platform.system() != 'Windows':
..........ext_modules = [...
After doing this, run setup.py again:
$ python setup.py build develop
This time, 'deform_conv_cuda' and other modules will be installed and you should stop seeing this error. It worked for me.
I had the problem and I've been able to solve it by doing what @Fang-Haoshu said. There is an if statement that makes setup.py skip some module installations if you're on Windows.
- Go to setup.py in your Alphapose folder.
- On line 124, comment out the "if" statement.
if platform.system() != 'Windows':
..........ext_modules = [...
- Ensure you adjust the code block under the if statement (since you have removed the "if"). Make them one indent instead of two.
After doing this, run setup.py again:
$ python setup.py build develop
This time, 'deform_conv_cuda' and other modules will be installed and you should stop seeing this error. It worked for me.
Thank you @timiderinola
But now I am getting cuda related error, dont know why even I installed cpu version of pytorch.
Hi @M-Younus, GPU version of PyTorch is necessary.
Hi @M-Younus, GPU version of PyTorch is necessary.
Right,Thanks for response. Please, can you look into this https://github.com/MVIG-SJTU/AlphaPose/issues/503
Hi @M-Younus, GPU version of PyTorch is necessary.
BTW just for confirmation, the master
branch is pytorch based,am I right?As mentioned here https://github.com/MVIG-SJTU/AlphaPose/tree/pytorch#notice
Yes, the master
branch is based on PyTorch.
setup.py line 124:if platform.system() != 'Windows': ---》if platform.system() == 'Windows': for me,win10+pytorch1.3.1+vs2019+cuda10.1,it's ok.
I followed @timiderinola and I got this error.
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.0\\bin\\nvcc.exe' failed with exit status 2
My version is window10+pytorch1.2.0+cuda10.0
@aFewThings Is VS 2019 installed? If not, I recommend using the pytorch branch, which does not require VS.
thx.
Solved. Close
I had the problem and I've been able to solve it by doing what @Fang-Haoshu said. There is an if statement that makes setup.py skip some module installations if you're on Windows.
- Go to setup.py in your Alphapose folder.
- On line 124, comment out the "if" statement.
if platform.system() != 'Windows':
..........ext_modules = [...
- Ensure you adjust the code block under the if statement (since you have removed the "if"). Make them one indent instead of two.
After doing this, run setup.py again:
$ python setup.py build develop
This time, 'deform_conv_cuda' and other modules will be installed and you should stop seeing this error. It worked for me.
Thx for solving the problem that had been bothering me for several days!
Hi,i'm working on Windows 10,python 3.6.7 and get error as below when runing
.scripts\demo_inference.py
with nessary parameters.