Mapper
app.infrastructure.detection.model.yolo.mapperMapper for converting Ultralytics YOLO model output to DetectionPayload.
See Also
DetectionResult— normalized detection record produced by the mapperYoloDetectionModel— runs the mapped model output
Layer: Infrastructure. Context: Implements concrete processing and I/O behind application-facing contracts.
YoloDetectionMapper
Maps raw YOLO detection results to DetectionPayload format.
Layer: Infrastructure. Context: Implements concrete processing or I/O behind application-facing contracts.
map(results: list, chosen_labels: list[str] | None = None) -> list[DetectionResult]
staticmethod
Map YOLO raw inference output to DetectionResult list.
| PARAMETER | DESCRIPTION |
|---|---|
results
|
Raw YOLO model output (list of Result objects).
TYPE:
|
chosen_labels
|
Optional filter to include only these labels.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[DetectionResult]
|
List of DetectionResult instances filtered by confidence and label. |