base.py 269 B

12345678910111213
  1. from abc import ABC, abstractmethod
  2. from typing import List
  3. import numpy as np
  4. from core.predictor import LayoutBox
  5. class LayoutDetectorBase(ABC):
  6. @classmethod
  7. @abstractmethod
  8. def predict(cls, img: np.ndarray, **kwargs) -> List[LayoutBox]:
  9. pass