Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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
2 tasks done
ChengBeiXuGong123 opened this issue Apr 10, 2024 · 2 comments
Assignees

Comments

@ChengBeiXuGong123
Copy link

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
Copy link

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

@FrankXu1
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants