open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
29.14k stars 9.39k forks source link

KeyError: 'CoDETR is not in the mmdet::model registry while running CoDETR training in dev-3.x branch #11895

Open vedrusss opened 1 month ago

vedrusss commented 1 month ago

Hi! I'm trying to run CoDETR training within branch dev-3.x (which has been merged with corresponded code supporting CoDETR). But I'm facing following error: KeyError: 'CoDETR is not in the mmdet::model registry. Here is a bit more extended log:

18:46:44  File "/usr/local/lib/python3.8/dist-packages/mmengine/runner/runner.py", line 462, in from_cfg
18:46:44  runner = cls(
18:46:44  File "/usr/local/lib/python3.8/dist-packages/mmengine/runner/runner.py", line 429, in __init__
18:46:44  self.model = self.build_model(model)
18:46:44  File "/usr/local/lib/python3.8/dist-packages/mmengine/runner/runner.py", line 836, in build_model
18:46:44  model = MODELS.build(model)
18:46:44  File "/usr/local/lib/python3.8/dist-packages/mmengine/registry/registry.py", line 570, in build
18:46:44  return self.build_func(cfg, *args, **kwargs, registry=self)
18:46:44  File "/usr/local/lib/python3.8/dist-packages/mmengine/registry/build_functions.py", line 232, in build_model_from_cfg
18:46:44  return build_from_cfg(cfg, registry, default_args)
18:46:44  File "/usr/local/lib/python3.8/dist-packages/mmengine/registry/build_functions.py", line 100, in build_from_cfg
18:46:44  raise KeyError(
18:46:44  KeyError: 'CoDETR is not in the mmdet::model registry. Please check whether the value of `CoDETR` 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'

Is there a way to fix that error?

wl654655902 commented 1 month ago

我也遇到同样的问题

wl654655902 commented 1 month ago

我也遇到同样的问题

我换到main分支上,run Co-DETR就没有这个问题了