You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KeyError: 'dataset_type is not in the mmseg::dataset registry. Please check whether the value of dataset_type is correct or it was registered as expected.
#3652
Open
STRIVESS opened this issue
Apr 25, 2024
· 0 comments
Traceback (most recent call last):
File "tools/train.py", line 106, in
main()
File "tools/train.py", line 102, in main
runner.train()
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1728, in train
self._train_loop = self.build_train_loop(
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1520, in build_train_loop
loop = LOOPS.build(
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/runner/loops.py", line 219, in init
super().init(runner, dataloader)
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/runner/base_loop.py", line 26, in init
self.dataloader = runner.build_dataloader(
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1370, in build_dataloader
dataset = DATASETS.build(dataset_cfg)
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 100, in build_from_cfg
raise KeyError(
KeyError: 'dataset_type is not in the mmseg::dataset registry. Please check whether the value of dataset_type is correct or it was registered as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#import-the-custom-module
Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!
The text was updated successfully, but these errors were encountered:
Thanks for your error report and we appreciate it a lot.
Checklist
Describe the bug
Recently, I have followed the instructions by Add New Datasets , Tutorial 4: Train and test with existing models and MMSegmentation_Tutorials to train my custom data, I check every steps and each codes carefully, however some errors still occurred, how can I solve it?
Reproduction
What command or script did you run?
Did you make any modifications on the code or config? Did you understand what you have modified?
I made some modifications on four below files:
and I put four files codes below:
mmsegmentation/mmseg/datasets/lawn_dataset.py
mmsegmentation/mmseg/datasets/init.py
mmsegmentation/configs/base/datasets/lawn_segmentation_pipeline.py
mmsegmentation/configs/pspnet/pspnet_r50-d8_4xb2-40k_lawn_segmen-512x1024.py
My custom data download from Watermelon87_Semantic_Seg_Mask.zip and I put on my diretory /home/kevin/deep_learning_collection/mmsegmentation/data
Environment
04/25 16:56:34 - mmengine - INFO -
System environment:
sys.platform: linux
Python: 3.8.19 (default, Mar 20 2024, 19:58:24) [GCC 11.2.0]
CUDA available: True
MUSA available: False
numpy_random_seed: 244288476
GPU 0: NVIDIA GeForce RTX 3060 Laptop GPU
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 12.1, V12.1.66
GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
PyTorch: 2.2.2+cu121
PyTorch compiling details: PyTorch built with:
TorchVision: 0.17.2+cu121
OpenCV: 4.9.0
MMEngine: 0.10.3
Runtime environment:
cudnn_benchmark: True
mp_cfg: {'mp_start_method': 'fork', 'opencv_num_threads': 0}
dist_cfg: {'backend': 'nccl'}
seed: 244288476
Distributed launcher: none
Distributed training: False
GPU number: 1
04/25 16:56:34 - mmengine - INFO - Config:
Error traceback
Traceback (most recent call last):
File "tools/train.py", line 106, in
main()
File "tools/train.py", line 102, in main
runner.train()
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1728, in train
self._train_loop = self.build_train_loop(
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1520, in build_train_loop
loop = LOOPS.build(
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/runner/loops.py", line 219, in init
super().init(runner, dataloader)
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/runner/base_loop.py", line 26, in init
self.dataloader = runner.build_dataloader(
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1370, in build_dataloader
dataset = DATASETS.build(dataset_cfg)
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/home/kevin/anaconda3/envs/segmentation/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 100, in build_from_cfg
raise KeyError(
KeyError: 'dataset_type is not in the mmseg::dataset registry. Please check whether the value of
dataset_type
is correct or it was registered as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#import-the-custom-moduleBug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!
The text was updated successfully, but these errors were encountered: