mirror of
https://github.com/alibaba/EasyCV.git
synced 2025-06-03 14:49:00 +08:00
14 lines
363 B
Python
14 lines
363 B
Python
# Borrowed from https://github.com/open-mmlab/mmsegmentation/blob/master/mmseg
|
|
from abc import ABCMeta, abstractmethod
|
|
|
|
|
|
class BasePixelSampler(metaclass=ABCMeta):
|
|
"""Base class of pixel sampler."""
|
|
|
|
def __init__(self, **kwargs):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def sample(self, seg_logit, seg_label):
|
|
"""Placeholder for sample function."""
|