open-mmlab / mmpose

OpenMMLab Pose Estimation Toolbox and Benchmark.
https://mmpose.readthedocs.io/en/latest/
Apache License 2.0
5.91k stars 1.26k forks source link

[Bug] D:\Anaconda\envs\openmmlab\lib\site-packages\mmcv\cnn\bricks\transformer.py:33: UserWarning: Fail to import ``MultiScaleDeformableAttention`` from ``mmcv.ops.multi_scale_deform_attn``, You should install ``mmcv`` rather than ``mmcv-lite`` if you need this module. warnings.warn('Fail to import ``MultiScaleDeformableAttention`` from ' #3014

Open ChengBeiXuGong123 opened 7 months ago

ChengBeiXuGong123 commented 7 months ago

Prerequisite

Environment

from mmpose.apis import inference_topdown, init_model from mmpose.utils import register_all_modules

register_all_modules()

config_file = 'td-hm_hrnet-w48_8xb32-210e_coco-256x192.py' checkpoint_file = 'td-hm_hrnet-w48_8xb32-210e_coco-256x192-0e67c616_20220913.pth' model = init_model(config_file, checkpoint_file, device='cpu') # or device='cuda:0'

请准备好一张带有人体的图片

results = inference_topdown(model, 'demo.jpg')

Reproduces the problem - code sample

D:\Anaconda\envs\openmmlab\python.exe D:\rtmpose1\mmpose\test.py D:\Anaconda\envs\openmmlab\lib\site-packages\mmcv\cnn\bricks\transformer.py:33: UserWarning: Fail to import MultiScaleDeformableAttention from mmcv.ops.multi_scale_deform_attn, You should install mmcv rather than mmcv-lite if you need this module. warnings.warn('Fail to import MultiScaleDeformableAttention from ' Traceback (most recent call last): File "D:\rtmpose1\mmpose\test.py", line 1, in from mmpose.apis import inference_topdown, init_model File "D:\rtmpose1\mmpose\mmpose\apis__init.py", line 2, in from .inference import (collect_multi_frames, inference_bottomup, File "D:\rtmpose1\mmpose\mmpose\apis\inference.py", line 17, in from mmpose.models.builder import build_pose_estimator File "D:\rtmpose1\mmpose\mmpose\models__init.py", line 8, in from .heads import * # noqa File "D:\rtmpose1\mmpose\mmpose\models\heads\init.py", line 11, in from .transformer_heads import EDPoseHead File "D:\rtmpose1\mmpose\mmpose\models\heads\transformer_heads\init__.py", line 2, in from .edpose_head import EDPoseHead File "D:\rtmpose1\mmpose\mmpose\models\heads\transformer_heads\edpose_head.py", line 14, in from mmcv.ops import MultiScaleDeformableAttention File "D:\Anaconda\envs\openmmlab\lib\site-packages\mmcv\ops\init.py", line 3, in from .active_rotated_filter import active_rotated_filter File "D:\Anaconda\envs\openmmlab\lib\site-packages\mmcv\ops\active_rotated_filter.py", line 10, in ext_module = ext_loader.load_ext( File "D:\Anaconda\envs\openmmlab\lib\site-packages\mmcv\utils\ext_loader.py", line 13, in load_ext ext = importlib.import_module('mmcv.' + name) File "D:\Anaconda\envs\openmmlab\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: DLL load failed while importing _ext: 找不到指定的程序。

Process finished with exit code 1

Reproduces the problem - command or script

包已经装好了 在测试时还是出现这个问题

Reproduces the problem - error message

包已经装好了 在测试时还是出现这个问题

Additional information

官网的测试代码

FrankXu1 commented 7 months ago

same error it happened just in recent past few days never happened before

FrankXu1 commented 7 months ago

Oh i guess here is a solotuion: your pytorch version should not be 2.2.0 or higher version. When i downgrade the version of pytorch on colab, it works. !pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121 !pip install mmcv==2.1.0 -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.1/index.html

Rockfella commented 3 months ago

@FrankXu1 you just saved me