def build_base_anchor(cfg): return build_from_cfg(cfg, registry, 'base_anchor')
def __init__(self, pipeline): self.pipeline = [ build_from_cfg(cfg, registry, 'postprocess') for cfg in pipeline ]
def build_model(cfg): return build_from_cfg(cfg, registry, 'inference')
def build_preprocess(cfg): return build_from_cfg(cfg, registry, 'preprocess')
def build_meshgrid(cfg): return build_from_cfg(cfg, registry, 'meshgrid')
def build_converter(cfg): return build_from_cfg(cfg, registry, 'converter')
def build_bbox_coder(cfg, **default_args): bbox_coder = build_from_cfg(cfg, registry, 'bbox_coder', default_args) return bbox_coder
def build_assigner(cfg, **default_args): """Builder of box assigner.""" return build_from_cfg(cfg, registry, 'bbox_assigner', default_args)
def build_iou_calculator(cfg, default_args=None): """Builder of IoU calculator.""" return build_from_cfg(cfg, registry, 'iou_calculator', default_args)