mmsegmentation icon indicating copy to clipboard operation
mmsegmentation copied to clipboard

ModuleNotFoundError: No module named 'mmseg.datasets.builder'

Open MOURACH-K opened this issue 2 years ago • 9 comments

Description: I encountered an issue while trying to use the mmseg.datasets.builder module in the mmsegmentation project. When attempting to import DATASETS from mmseg.datasets.builder, I received the following error message: "ModuleNotFoundError: No module named 'mmseg.datasets.builder'".

Steps to reproduce:

Install mmsegmentation using the command !pip install mmsegmentation. Execute the following code snippet in a Python environment: python Copy code from mmseg.datasets.builder import DATASETS Expected behavior: The import statement should successfully import the DATASETS module from mmseg.datasets.builder without any errors.

Actual behavior: Instead, I received a "ModuleNotFoundError" indicating that the module 'mmseg.datasets.builder' was not found.

Additional information:

I have verified that the mmsegmentation package is installed correctly, and I have checked the version (mmseg.version) to confirm the installation. I have tried reinstalling mmsegmentation using the commands !pip uninstall mmsegmentation followed by !pip install mmsegmentation, but the issue persists. I have also attempted to update mmsegmentation using the command !pip install --upgrade mmsegmentation, but the problem remains. I have checked the official documentation and GitHub repository for mmsegmentation, but I couldn't find any specific information or known issues related to this error. Please investigate this issue as it prevents me from utilizing the mmseg.datasets.builder module properly. Let me know if any additional information or logs are required to assist in resolving this problem.

I also tried the official demo from the official GitHub publication page of MMSegmentation ( https://github.com/openseg-group/mmsegmentation-release/blob/master/demo/MMSegmentation_Tutorial.ipynb ), It renders the same error.

Thank you for your support.

MOURACH-K avatar Jun 15 '23 17:06 MOURACH-K

Same. Anyone found a solution for this?

ShahinNamin avatar Oct 20 '23 06:10 ShahinNamin

Same problem here still cant find the solution.

agraham9966 avatar Oct 23 '23 23:10 agraham9966

I am struggling with the same problem.

TheMakiran avatar Apr 30 '24 11:04 TheMakiran

same here.

aroeypi avatar May 07 '24 11:05 aroeypi

ModuleNotFoundError: No module named 'mmseg.datasets.builder'

Recolourlink avatar Jun 29 '24 13:06 Recolourlink

No module named 'mmseg.datasets.builder', till now still exists this bug

bulebarry avatar Aug 06 '24 14:08 bulebarry

Did anyone find solution for this? I am having the same error while using custom dataset

Madhuri-Chada-108 avatar Oct 26 '24 04:10 Madhuri-Chada-108

我也遇到了这个问题,起因是复制了一个ade.py到mmseg/datasets下,但是官网https://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation/blob/main/mmseg/datasets/下的文件中都用的:

from .builder import DATASETS 会报错,我又找到mmsegmentation下的mmseg/datasets/ from mmseg.registry import DATASETS,遂修改,就不会报错了

a1oneee avatar Dec 02 '24 13:12 a1oneee

我也遇到了这个问题,起因是复制了一个ade.py到mmseg/datasets下,但是官网https://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation/blob/main/mmseg/datasets/下的文件中都用的:

from .builder import DATASETS 会报错,我又找到mmsegmentation下的mmseg/datasets/ from mmseg.registry import DATASETS,遂修改,就不会报错了

Thank you for your reply! I haven't tried your solution yet. But I will translate it and hope if someone tries it an it work they can tell us so I can close this case. Translation of a1oneee's solution:

"I also encountered this problem. The issue arose because I copied an ade.py file into the mmseg/datasets directory. However, in the official files on the GitHub page (https://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation/blob/main/mmseg/datasets/), they all use:

from .builder import DATASETS

This caused an error. I then looked in the mmseg/datasets/ directory under mmsegmentation and found that they use:

from mmseg.registry import DATASETS

So I made the modification, and the error went away." END OF TRANSLATION.

MOURACH-K avatar Dec 03 '24 08:12 MOURACH-K