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

ModuleNotFoundError: No module named 'deeplearning' when running evaluation on cityscapes dataset #5436

Open
mudit-soni opened this issue Feb 18, 2025 · 3 comments

Comments

@mudit-soni
Copy link

I am trying to evaluate a pretrained mask2former model on cityscapes using the mask2former repository here https://github.com/facebookresearch/Mask2Former. It uses detectron2 for evaluation, and I have made no changes to either of the repositories from my side.

Traceback (most recent call last):
File "train_net.py", line 321, in <module>
    launch(
File "/raid/scripts/mudit/detectron2/detectron2/engine/launch.py", line 84, in launch
    main_func(*args)
File "train_net.py", line 306, in main
    res = Trainer.test(cfg, model)
File "/raid/scripts/mudit/detectron2/detectron2/engine/defaults.py", line 653, in test
   results_i = inference_on_dataset(model, data_loader, evaluator)
File "/raid/scripts/mudit/detectron2/detectron2/evaluation/evaluator.py", line 172, in inference_on_dataset
   evaluator.process(inputs, outputs)
File "/raid/scripts/mudit/detectron2/detectron2/evaluation/cityscapes_evaluation.py", line 143, in process
    from deeplearning.projects.cityscapesApi.cityscapesscripts.helpers.labels import trainId2label
ModuleNotFoundError: No module named 'deeplearning'
Copy link

You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template.
The following information is missing: "Instructions To Reproduce the Issue and Full Logs"; "Your Environment";

@github-actions github-actions bot added the needs-more-info More info is needed to complete the issue label Feb 18, 2025
@mudit-soni
Copy link
Author

I don't think additional details are required as the error is due to a missing module "deeplearning". It doesn't seem to be included in the detectron2 repository and I can't find any other instructions to install it.

@github-actions github-actions bot removed the needs-more-info More info is needed to complete the issue label Feb 19, 2025
@Sta8is
Copy link

Sta8is commented Feb 21, 2025

I have also encountered this issue. Seems that a recent commit changed some lines at detectron/data/datasets/cityscapes.py and detectron2/evaluation/cityscapes_evaluation.py as you can see here 4823082. Removing the "deeplearning.projects.cityscapesApi" prefix seems to work for me. For example change

from deeplearning.projects.cityscapesApi.cityscapesscripts.helpers.labels import labels

to

from cityscapesscripts.helpers.labels import labels

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