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 'DATASETS' from 'mmdet.datasets' #25

Open
marcsava opened this issue Sep 1, 2023 · 2 comments
Open

Comments

@marcsava
Copy link

marcsava commented Sep 1, 2023

In order to make inference with the bdd100k detection models, I launched the test.py script as indicated in the guide (after having installed everything necessary):

python ./test.py "/user/msavarese/bdd100k-models/det/configs/det/atss_r101_fpn_3x_det_bdd100k.py" --format-only --format-dir "/user/msavarese/det.json" [--cfg -options]

I get the following error:

Traceback (most recent call last):
File "./test.py", line 6, in
import datasets # pylint: disable=unused-import
File "/user/msavarese/bdd100k-models/det/datasets/init.py", line 3, in
from .bdd100k import BDD100KDetDataset
File "/user/msavarese/bdd100k-models/det/datasets/bdd100k.py", line 8, in
from mmdet.datasets import DATASETS, CocoDataset
ImportError: cannot import name 'DATASETS' from 'mmdet.datasets' (/user/msavarese/miniconda3/envs/bdd100k-mmdet/lib/python3.8/site-packages/mmdet/datasets/init.py)

@thomasehuang
Copy link
Collaborator

This is probably due to your version of MMDetection. We are currently using mmdet<3.0. If your version is 3.0 or above you may need to downgrade it by doing pip install 'mmdet<3.0'.

@shanhx2000
Copy link

Hi Thomas, I'm trying to use this repo. However, during installation, I noticed mmdet<3.0 requires mmcv<=1.8.0, which is not compatible with most mmcv-based applications.

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