mousecpn/DMC-Domain-Generalization-for-Underwater-Object-Detection

KeyError: 'DGaugFasterRCNN is not in the models registry'

lukas-folkman opened this issue · 0 comments

Hello!

I read with interest your paper and now I am trying to use your neural network. After running:

python tools/train.py configs/suodac/dmc_faster_rcnn_r50_fpn_1x_suodac.py

I get the following error:

Traceback (most recent call last):
  File "tools/train.py", line 191, in <module>
    main()
  File "tools/train.py", line 162, in main
    test_cfg=cfg.get('test_cfg'))
  File "/export/home/s2785075/miniconda3/envs/DMCL/lib/python3.7/site-packages/mmdet/models/builder.py", line 59, in build_detector
    cfg, default_args=dict(train_cfg=train_cfg, test_cfg=test_cfg))
  File "/export/home/s2785075/miniconda3/envs/DMCL/lib/python3.7/site-packages/mmcv/utils/registry.py", line 210, in build
    return self.build_func(*args, **kwargs, registry=self)
  File "/export/home/s2785075/miniconda3/envs/DMCL/lib/python3.7/site-packages/mmcv/cnn/builder.py", line 26, in build_model_from_cfg
    return build_from_cfg(cfg, registry, default_args)
  File "/export/home/s2785075/miniconda3/envs/DMCL/lib/python3.7/site-packages/mmcv/utils/registry.py", line 44, in build_from_cfg
    f'{obj_type} is not in the {registry.name} registry')
KeyError: 'DGaugFasterRCNN is not in the models registry'

It seems to be related to the model that is to be used:

model = dict(
    type='DGaugFasterRCNN',
    st_path='/home/dailh/mmdetection_old/CBST5.pth',
    ...
)

Also the st_path is hard-coded as '/home/dailh/mmdetection_old/CBST5.pth'.

Could you help me reproduce your work?

Thank you very much!