yhq 26cd12ab42
[features] Support stdc (#284)
* add stdc semantic segmentation algorithm
2023-02-16 14:00:59 +08:00

10 lines
332 B
Python

# Borrowed from https://github.com/open-mmlab/mmsegmentation/blob/master/mmseg
from mmcv.utils import Registry, build_from_cfg
PIXEL_SAMPLERS = Registry('pixel sampler')
def build_pixel_sampler(cfg, **default_args):
"""Build pixel sampler for segmentation map."""
return build_from_cfg(cfg, PIXEL_SAMPLERS, default_args)