Result
app.domain.detection.resultDetection result — output from YOLO object detection model.
See Also
Box— base bounding-detection domain dataclassBBoxViewModel— view model for UI display of bounding boxes
Layer: Domain. Context: Defines application concepts independently of UI and infrastructure implementations.
DetectionResult
dataclass
Bases: Box
Single object detection result from YOLO model inference.
All bounding-detection fields (item_id, label, bbox_xyxy, confidence,
color_hex) are inherited from BaseBox. See that class for field
documentation.
Note
Created from raw YOLO output, stored in Layer A as immutable machine
data, then filtered into Layer B for user review and export. Use
to_frame_box_view_model() to convert the detection into a
BBoxViewModel for UI display.
Example
detection = DetectionResult(
item_id="yolo-42",
label="person",
bbox_xyxy=(100, 200, 300, 400), # (x1, y1, x2, y2)
confidence=0.95,
color_hex="#808080"
)
box_view = detection.to_frame_box_view_model()
Layer: Domain. Context: Represents application concepts without UI or infrastructure dependencies.
__init__(item_id: str, label: str, bbox_xyxy: BBoxXYXYTuple, confidence: float, color_hex: str = '#808080') -> None
to_frame_box_view_model() -> BBoxViewModel
Convert this detection result into a frame-box view model.
| RETURNS | DESCRIPTION |
|---|---|
BBoxViewModel
|
View model preserving the detection's identity, geometry, label, |
BBoxViewModel
|
confidence, and display color. |