mmsegmentation
mmsegmentation copied to clipboard
KeyError: "EncoderDecoder: 'XX is not in the models registry'"
Hi!
I'm trying to train my segmentation model with my own model. I model code I add
@BACKBONES.register_module() class FastViT(nn.Module):
But I still have the same error
KeyError: "EncoderDecoder: 'FastViT is not in the models registry'".
Traceback (most recent call last): File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg return obj_cls(**args) File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmseg/models/segmentors/encoder_decoder.py", line 36, in init self.backbone = builder.build_backbone(backbone) File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmseg/models/builder.py", line 20, in build_backbone return BACKBONES.build(cfg) File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmcv/utils/registry.py", line 215, in build return self.build_func(*args, **kwargs, registry=self) File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmcv/utils/registry.py", line 45, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'FastViT is not in the models registry'
Hi!
I'm trying to train my segmentation model with my own model. I model code I add
@BACKBONES.register_module() class FastViT(nn.Module):
But I still have the same error
KeyError: "EncoderDecoder: 'FastViT is not in the models registry'".
Traceback (most recent call last): File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg return obj_cls(**args) File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmseg/models/segmentors/encoder_decoder.py", line 36, in init self.backbone = builder.build_backbone(backbone) File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmseg/models/builder.py", line 20, in build_backbone return BACKBONES.build(cfg) File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmcv/utils/registry.py", line 215, in build return self.build_func(*args, **kwargs, registry=self) File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/home/paperspace/miniconda3/envs/mmcv_env/lib/python3.7/site-packages/mmcv/utils/registry.py", line 45, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'FastViT is not in the models registry'
- install form source
- add decorator
- add model in init.py
you can try this
Hey I have the same problem and I installed it from the source. Here is the error traceback.
what is the mmengine version
Hey I have the same problem and I installed it from the source. Here is the error traceback.
what is the mmengine version?