MVIG-SJTU / AlphaPose

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

ImportError: cannot import name 'deform_conv_cuda' from partially initialized module 'alphapose.models.layers.dcn' (most likely due to a circular import) (z:\alphapose-master\alphapose\models\layers\dcn\__init__.py) #1126

Open Qianmengs opened 1 year ago

Qianmengs commented 1 year ago

PS Z:\AlphaPose-master> python scripts/demo_inference.py --cfg configs/halpe_coco_wholebody_136/resnet/256x192_res50_lr1e-3_2x-dcn-combined.yaml --checkpoint pretrained_models/multi_domain_fast50_dcn_combined_256x192.pth --indir exa mples/demo/ --save_img Traceback (most recent call last): File "scripts/demo_inference.py", line 180, in pose_model = builder.build_sppe(cfg.MODEL, preset_cfg=cfg.DATA_PRESET) File "z:\alphapose-master\alphapose\models\builder.py", line 27, in build_sppe return build(cfg, SPPE, default_args=default_args) File "z:\alphapose-master\alphapose\models\builder.py", line 18, in build return build_from_cfg(cfg, registry, default_args) File "z:\alphapose-master\alphapose\utils\registry.py", line 75, in build_from_cfg return obj_cls(**args) File "z:\alphapose-master\alphapose\models\fastpose.py", line 26, in init self.preact = SEResnet( File "z:\alphapose-master\alphapose\models\layers\SE_Resnet.py", line 174, in init self.layer2 = self.make_layer( File "z:\alphapose-master\alphapose\models\layers\SE_Resnet.py", line 204, in make_layer layers.append(block(self.inplanes, planes, File "z:\alphapose-master\alphapose\models\layers\SE_Resnet.py", line 79, in init from .dcn import DeformConv, ModulatedDeformConv File "z:\alphapose-master\alphapose\models\layers\dcn__init.py", line 1, in from .deform_conv import (DeformConv, DeformConvPack, ModulatedDeformConv, File "z:\alphapose-master\alphapose\models\layers\dcn\deform_conv.py", line 9, in from . import deform_conv_cuda ImportError: cannot import name 'deform_conv_cuda' from partially initialized module 'alphapose.models.layers.dcn' (most likely due to a circular import) (z:\alphapose-master\alphapose\models\layers\dcn\init__.py) Loading YOLO model..

Mp991004 commented 5 months ago

你好,请问解决这个问题了吗

zhu-0504 commented 3 months ago

我也出现了这个问题,请问解决了吗

BetterForerunner commented 1 day ago

考虑您的cuda版本是否一致。我是list出了各项cuda工具版本,发现有不一致的部分。remove了 torch 以及cuda相关部分 重新下载,解决了这个问题。并且setup.py中124行修改:force_compile = True