CenterNet2 icon indicating copy to clipboard operation
CenterNet2 copied to clipboard

Import add_centernet_config from config.py to __init__.py

Open SahilChachra opened this issue 4 years ago • 0 comments

While using CenterNet2 in Detectron2, if add_centernet_config is not imported to init.py, it gives - KeyError: 'Non-existent config key: MODEL.ROI_BOX_HEAD.MULT_PROPOSAL_SCORE'.

As per other projects under Detectron2 (for example - panoptic_deeplab), we can see that init.py imports add_panoptic_deeplab_config from its own config.py and then we call add_panoptic_deeplab_config and pass the YAML path to this function.

In the case of panoptic_deeplab,

from detectron2.projects import panoptic_deeplab
panoptic_deeplab.add_panoptic_deeplab_config (cfg_path)

Since 'add_centernet_config' was missing from centernet's init.py , I added it and the error was resolved.

SahilChachra avatar Jan 17 '22 17:01 SahilChachra