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

[Neurocomputing 2023] An official implementation of Achieving Domain Generalization in Underwater Object Detection by Domain Mixup and Contrastive Learning
MIT License
26 stars 0 forks source link

KeyError: 'DGaugFasterRCNN is not in the models registry' #5

Open lukas-folkman opened 11 months ago

lukas-folkman commented 11 months ago

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!