Reference
Common Types
Point
class Point:
x: int
y: int
Polygon
class Polygon:
points: Sequence[Point]
Classification
class Classification:
index: int
label: Optional[str]
score: Optional[float]
Detection
class Detection:
boundary: Polygon
classification: Optional[Classification]
mask: Optional[BinaryMask]
DetectionSet
class DetectionSet:
detections: Sequence[Detection]
Keypoint
class Keypoint:
x: int
y: int
index: int
label: Optional[str]
score: Optional[float]
Pose
class Pose:
keypoints: Sequence[Keypoint]
PoseSet
class PoseSet:
poses: Sequence[Pose]
TextDetection
class TextDetection:
boundary: Polygon
text: Optional[str]
score: Optional[float]
TextDetectionSet
class TextDetectionSet:
detections: Sequence[Detection]
Abstract Types
ClassificationModel
class ClassificationModel:
def get_labels(self) -> Sequence[str]:
raise NotImplementedError
def __call__(self, x: Image) -> Classification:
raise NotImplementedError
DetectionModel
class DetectionModel:
def get_labels(self) -> Sequence[str]:
raise NotImplementedError
def __call__(self, x: Image) -> DetectionSet:
raise NotImplementedError
PoseModel
class PoseModel:
def get_keypoints(self) -> Sequence[str]:
raise NotImplementedError
def get_skeleton(self) -> Sequence[Tuple[int, int]]:
raise NotImplementedError
def __call__(self, x: Image) -> PoseSet:
raise NotImplementedError
TextDetectionModel
class TextDetectionModel:
def __call__(self, x: Image) -> TextDetectionSet:
raise NotImplementedError
ImageDataset
class ImageDataset:
def __len__(self) -> int:
raise NotImplementedError
def __getitem__(self, index: int) -> Image:
raise NotImplementedError