File size: 717 Bytes
d2ff88f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# ------------------------------------------------------------------------------
# CLIP-DINOiser
# author: Monika Wysoczanska
# ------------------------------------------------------------------------------
# Modified from GroupViT (https://github.com/NVlabs/GroupViT)
# Copyright (c) 2021-22, NVIDIA Corporation & affiliates. All Rights Reserved.
# ------------------------------------------------------------------------------
from mmcv.utils import Registry
MODELS = Registry('models')
from omegaconf import OmegaConf


def build_model(config, class_names):
    model = MODELS.build(OmegaConf.to_container(config, resolve=True),
                         default_args={'class_names': class_names})
    return model