Skip to content

base

MetaAlgo

Base class for an algorithm

Source code in changedet/algos/base.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
class MetaAlgo(metaclass=ABCMeta):
    """Base class for an algorithm"""

    @classmethod
    @abstractmethod
    def run(cls, im1: np.ndarray, im2: np.ndarray, **kwargs: Any) -> np.ndarray:
        """
        Abstract method to run change detection

        Every algorithm will have at least one keyword argument - the global logger
        """
        assert "logger" in kwargs

run(im1, im2, **kwargs) abstractmethod classmethod

Abstract method to run change detection

Every algorithm will have at least one keyword argument - the global logger

Source code in changedet/algos/base.py
10
11
12
13
14
15
16
17
18
@classmethod
@abstractmethod
def run(cls, im1: np.ndarray, im2: np.ndarray, **kwargs: Any) -> np.ndarray:
    """
    Abstract method to run change detection

    Every algorithm will have at least one keyword argument - the global logger
    """
    assert "logger" in kwargs