Base
app.infrastructure.detection.model.baseModule for base; implements concrete processing and I/O behind application-facing contracts.
See Also
DetectionEngine— invokes the model interfaceYoloDetectionModel— one implementation of the model contract
Layer: Infrastructure. Context: Implements concrete processing and i/o behind application-facing contracts at this architectural boundary.
BaseDetectionModel
Bases: ABC
Abstract base class for all detection model implementations (Torch, YOLO, Dummy).
Layer: Infrastructure. Context: Implements concrete processing or I/O behind application-facing contracts.
detect(frame: np.ndarray, chosen_labels: list[str] | None = None) -> list[DetectionResult]
abstractmethod
Run inference on frame, optionally filtering to chosen_labels.
| PARAMETER | DESCRIPTION |
|---|---|
frame
|
RGB image array to process.
TYPE:
|
chosen_labels
|
Optional labels to retain in the returned detections.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[DetectionResult]
|
Detection results for the frame, restricted to |