mirror of
https://github.com/deepinsight/insightface.git
synced 2026-05-20 08:25:14 +00:00
21 lines
580 B
Python
21 lines
580 B
Python
|
|
from mmcv.utils import Registry, build_from_cfg
|
||
|
|
|
||
|
|
BBOX_ASSIGNERS = Registry('bbox_assigner')
|
||
|
|
BBOX_SAMPLERS = Registry('bbox_sampler')
|
||
|
|
BBOX_CODERS = Registry('bbox_coder')
|
||
|
|
|
||
|
|
|
||
|
|
def build_assigner(cfg, **default_args):
|
||
|
|
"""Builder of box assigner."""
|
||
|
|
return build_from_cfg(cfg, BBOX_ASSIGNERS, default_args)
|
||
|
|
|
||
|
|
|
||
|
|
def build_sampler(cfg, **default_args):
|
||
|
|
"""Builder of box sampler."""
|
||
|
|
return build_from_cfg(cfg, BBOX_SAMPLERS, default_args)
|
||
|
|
|
||
|
|
|
||
|
|
def build_bbox_coder(cfg, **default_args):
|
||
|
|
"""Builder of box coder."""
|
||
|
|
return build_from_cfg(cfg, BBOX_CODERS, default_args)
|