ModuleNotFoundError: No module named 'mmseg.datasets.builder'
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.
Same. Anyone found a solution for this?
Same problem here still cant find the solution.
I am struggling with the same problem.
same here.
ModuleNotFoundError: No module named 'mmseg.datasets.builder'
No module named 'mmseg.datasets.builder', till now still exists this bug
Did anyone find solution for this? I am having the same error while using custom dataset
我也遇到了这个问题,起因是复制了一个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,遂修改,就不会报错了
我也遇到了这个问题,起因是复制了一个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.