joe-siyuan-qiao / DetectoRS

DetectoRS: Detecting Objects with Recursive Feature Pyramid and Switchable Atrous Convolution
Apache License 2.0
1.14k stars 176 forks source link

TypeError: bbox_head={'num_classes': 1} in child config cannot inherit from base because bbox_head is a dict in the child config but is of type <class 'list'> in base config. You may set `_delete_=True` to ignore the base config #76

Open AngSoonKim opened 3 years ago

AngSoonKim commented 3 years ago

Hi wanted to ask if you met this error when training Detectors and how was it resolved in the end?

This error occurs when you try to train a Detectors model on a customized data-sets using mmdetection using similar process as other model.

Traceback (most recent call last):
  File "tools/Train_ForDetectors.py", line 142, in <module>
    main()
  File "tools/Train_ForDetectors.py", line 61, in main
    cfg = Config.fromfile(args.config)
  File "/home/adotesdotekdote/miniconda3/lib/python3.8/site-packages/mmcv/utils/config.py", line 215, in fromfile
    cfg_dict, cfg_text = Config._file2dict(filename,
  File "/home/adotesdotekdote/miniconda3/lib/python3.8/site-packages/mmcv/utils/config.py", line 183, in _file2dict
    base_cfg_dict = Config._merge_a_into_b(cfg_dict, base_cfg_dict)
  File "/home/adotesdotekdote/miniconda3/lib/python3.8/site-packages/mmcv/utils/config.py", line 206, in _merge_a_into_b
    b[k] = Config._merge_a_into_b(v, b[k])
  File "/home/adotesdotekdote/miniconda3/lib/python3.8/site-packages/mmcv/utils/config.py", line 206, in _merge_a_into_b
    b[k] = Config._merge_a_into_b(v, b[k])
  File "/home/adotesdotekdote/miniconda3/lib/python3.8/site-packages/mmcv/utils/config.py", line 201, in _merge_a_into_b
    raise TypeError(
TypeError: bbox_head={'num_classes': 1} in child config cannot inherit from base because bbox_head is a dict in the child config but is of type <class 'list'> in base config. You may set `_delete_=True` to ignore the base config