INNER CODE UNIT · Python
Detector
GeekAlexis/FastMOT · fastmot/detector.py:26
class Detector(abc.ABC):
@abc.abstractmethod
def __init__(self, size):
self.size = size
def __call__(self, frame):
"""Detect objects synchronously."""
self.detect_async(frame)
return self.postprocess()
@abc.abstractmethod
def detect_async(self, frame):
raise NotImplementedError
@abc.abstractmethod
def postprocess(self):
raise NotImplementedError