MVIG-SJTU / AlphaPose

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

ImportError: cannot import 'roi_align_cuda' from partially initialized module 'alphapose.utils.roi_align' (most likely due to a circular import) #1061

Open marcocst opened 2 years ago

marcocst commented 2 years ago

Look forward to your reply!

Fang-Haoshu commented 2 years ago

Hi, what command are you running?

halodigi commented 2 years ago

I experienced same error when running this program on Ubuntu20.04,but the same program runs fine on Windows.

AntoineVandame commented 2 years ago

Hi, when running demo_inference.py, I get the same problem (ImportError: cannot import name 'roi_align_cuda' from 'alphapose.utils.roi_align'). I don't know if it is a problem from the installation of cuda or something else. Anyone have an idea please ?

nistring commented 1 year ago

I comfronted the same problem, and I managed to solve this abiding by the requirement: pytorch > 1.11.0. Why don't you try this one. conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch

loganHollett commented 1 year ago

I install with pip and no cuda, when I run demo_inference at mac then I got this problem, Does anyone have any suggestions?

ZifengLiu98 commented 1 year ago

I comfronted the same problem, and I managed to solve this abiding by the requirement: pytorch > 1.11.0. Why don't you try this one. conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch

I have tried this but it still doesn't work for me.

ZifengLiu98 commented 1 year ago

I install with pip and no cuda, when I run demo_inference at mac then I got this problem, Does anyone have any suggestions?

Hi, 你解决这个问题了嘛?可以交流一下嘛?I tried both pip and conda, I haven't solve it yet.

nistring commented 1 year ago

I comfronted the same problem, and I managed to solve this abiding by the requirement: pytorch > 1.11.0. Why don't you try this one. conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch

I have tried this but it still doesn't work for me.

What was the python version? Have you tried with python==3.7 or 3.8?

loganHollett commented 1 year ago

I install with pip and no cuda, when I run demo_inference at mac then I got this problem, Does anyone have any suggestions?

Hi, 你解决这个问题了嘛?可以交流一下嘛?I tried both pip and conda, I haven't solve it yet.

I solve it with import *, maby you can try this, or use python3.7

ZifengLiu98 commented 1 year ago

I install with pip and no cuda, when I run demo_inference at mac then I got this problem, Does anyone have any suggestions?

Hi, 你解决这个问题了嘛?可以交流一下嘛?I tried both pip and conda, I haven't solve it yet.

I solve it with import *, maby you can try this, or use python3.7

thank u. I have tried with import * and it didn't work out. Could you please tell me your cuda version and torch version with python 3.7 ?

ZifengLiu98 commented 1 year ago

I have tried python 3.7.16 with torch 0.10.1 and it did not work for me. Could you please tell me your cuda version and torch version?

good-epic commented 3 months ago

I had to use importlib to lazy load at time of calling all of roi_align_cuda, nms_cuda, nms_cpu, and soft_nms_cpu (all the cpython libraries?) I used global indicator variables to only actually load each once but I did have to insert an extra function call at every point those libraries are used. Doesn't seem crippling performance-wise.

Would folks be interested in a PR? Don't really want to contribute one with potential performance hits just to enable one Linux variant.

I'm on Pop OS (an Ubuntu derivative).