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

ImportError: Cannot import name 'Config' from 'mmcv' #26

Open
TreemanCHou opened this issue May 6, 2023 · 2 comments
Open

ImportError: Cannot import name 'Config' from 'mmcv' #26

TreemanCHou opened this issue May 6, 2023 · 2 comments

Comments

@TreemanCHou
Copy link

I am trying to run SeqTR with python=3.7, torch=1.13.1, torchvision=0.14.1 . While I run the training script :

python tools/train.py configs/seqtr/segmentation/seqtr_mask_[DATASET_NAME].py --cfg-options ema=True

I got the import error. After looking up into the mmcv's issues, they said mmcv>2.0.0 removes those training-related modules. I tried to downgrade mmcv's version to 1.x but got another error:

AssertionError: MMCV==1.7.1 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.1.0.

So could you tell me what exactly version of python/torch/torchvision/mmcv should I install to solve those problems?

@Yeon07
Copy link

Yeon07 commented May 10, 2023

I'm experiencing the same issue.
I would be very thankful if you could provide the version of mmcv to use.

@TreemanCHou
Copy link
Author

I'm experiencing the same issue. I would be very thankful if you could provide the version of mmcv to use.

I fixed it XD

The version of mmcv must correspond to that of mmdet. For mmcv==1.7.1, mmdet should be 2.26.0. So just run the following command :

pip install mmdet==2.26.0

It worked for me . -w-

( To provide more comprehensive information, my torch version is 1.11.0 with torchvision==0.12.0 and cuda=10.2 )

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

2 participants