def _to_container(cfg):
    """
    mmdet will assert the type of dict/list.
    So convert omegaconf objects to dict/list.
    """
    if isinstance(cfg, DictConfig):
        cfg = OmegaConf.to_container(cfg, resolve=True)
    from mmcv.utils import ConfigDict

    return ConfigDict(cfg)

    mmdet will assert the type of dict/list.
    So convert omegaconf objects to dict/list.
    
video_chat_with_StableLM/models/grit_src/third_party/CenterNet2/detectron2/modeling/mmdet_wrapper.py