question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mmcv incompatibility with mmdetection

See original GitHub issue

I could not find a compatible mmcv-full version that can import MultiScaleDeformableAttention (even if I tried your indicated version)

/cta/users/mehmet/.conda/envs/softteacher/lib/python3.6/site-packages/mmcv/cnn/bricks/transformer.py:27: UserWarning: Fail to import ``MultiScaleDeformableAttention`` from ``mmcv.ops.multi_scale_deform_attn``, You should install ``mmcv-full`` if you need this module.
  warnings.warn('Fail to import ``MultiScaleDeformableAttention`` from '
/cta/users/mehmet/SoftTeacher/thirdparty/mmdetection/mmdet/models/utils/transformer.py:27: UserWarning: `MultiScaleDeformableAttention` in MMCV has been moved to `mmcv.ops.multi_scale_deform_attn`, please update your MMCV
  '`MultiScaleDeformableAttention` in MMCV has been moved to '
Traceback (most recent call last):
  File "/cta/users/mehmet/SoftTeacher/thirdparty/mmdetection/mmdet/models/utils/transformer.py", line 23, in <module>
    from mmcv.ops.multi_scale_deform_attn import MultiScaleDeformableAttention
  File "/cta/users/mehmet/.conda/envs/softteacher/lib/python3.6/site-packages/mmcv/ops/__init__.py", line 1, in <module>
    from .bbox import bbox_overlaps
  File "/cta/users/mehmet/.conda/envs/softteacher/lib/python3.6/site-packages/mmcv/ops/bbox.py", line 3, in <module>
    ext_module = ext_loader.load_ext('_ext', ['bbox_overlaps'])
  File "/cta/users/mehmet/.conda/envs/softteacher/lib/python3.6/site-packages/mmcv/utils/ext_loader.py", line 12, in load_ext
    ext = importlib.import_module('mmcv.' + name)
  File "/cta/users/mehmet/.conda/envs/softteacher/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tools/train.py", line 15, in <module>
    from mmdet.models import build_detector
  File "/cta/users/mehmet/SoftTeacher/thirdparty/mmdetection/mmdet/models/__init__.py", line 2, in <module>
    from .backbones import *  # noqa: F401,F403
  File "/cta/users/mehmet/SoftTeacher/thirdparty/mmdetection/mmdet/models/backbones/__init__.py", line 2, in <module>
    from .csp_darknet import CSPDarknet
  File "/cta/users/mehmet/SoftTeacher/thirdparty/mmdetection/mmdet/models/backbones/csp_darknet.py", line 11, in <module>
    from ..utils import CSPLayer
  File "/cta/users/mehmet/SoftTeacher/thirdparty/mmdetection/mmdet/models/utils/__init__.py", line 14, in <module>
    from .transformer import (DetrTransformerDecoder, DetrTransformerDecoderLayer,
  File "/cta/users/mehmet/SoftTeacher/thirdparty/mmdetection/mmdet/models/utils/transformer.py", line 29, in <module>
    from mmcv.cnn.bricks.transformer import MultiScaleDeformableAttention
ImportError: cannot import name 'MultiScaleDeformableAttention'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
DaniloAlves1995commented, Nov 26, 2021

Hello @makifozkanoglu, I had the same incompatibility problem and I got fix it installing the follows versions: !pip install mmcv-full==1.3.16 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.10.0/index.html

0reactions
makifozkanoglucommented, Nov 27, 2021

Thank both of you I got fix it, installing mmcv-full from scratch is ok

Regards

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compatibility of MMDetection 2.x
In v2.12.0 MMDetection inevitably brings some BC-breakings, including the MMCV dependency, model initialization, model registry, and mask AP evaluation.
Read more >
mmdetection/faq.md at master · open-mmlab ... - GitHub
Compatibility issue between MMCV and MMDetection; "ConvWS is already registered in conv layer"; "AssertionError: MMCV==xxx is used but incompatible.
Read more >
MMDetection Tutorial - | notebook.community
This is the official colab tutorial for using MMDetection. ... CUDA operators !pip install mmcv-full # Install mmdetection !rm -rf mmdetection !git clone ......
Read more >
src/ndl_layout/mmdetection/docs/faq.md · tomofi/NDLOCR at ...
MMCV Installation - Compatibility issue between MMCV and MMDetection; "ConvWS is already registered ... "AssertionError: MMCV==xxx is used but incompatible.
Read more >
mmdet - PyPI
Apart from MMDetection, we also released a library mmcv for computer vision ... For compatibility changes between different versions of MMDetection, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found