Box
app.domain.detection.boxBase bounding-detection domain dataclass — base core for detection and tracking results.
See Also
DetectionResult— specializes boxes for inference outputBBoxViewModel— presents box data to the UI
Layer: Domain. Context: Defines application concepts independently of UI and infrastructure implementations.
Box
dataclass
Shared bounding-detection base for detection and tracking domain results.
| ATTRIBUTE | DESCRIPTION |
|---|---|
item_id |
Unique identifier for this detection, e.g.
TYPE:
|
label |
Class name of the annotated object, such as
TYPE:
|
bbox_xyxy |
Bounding detection
TYPE:
|
confidence |
Confidence score from 0.0 to 1.0.
TYPE:
|
color_hex |
Display color in
TYPE:
|
Note
Common fields base by DetectionResult and any future tracking result
domain types. Introducing this base eliminates field duplication while
preserving clean domain → view boundaries.
Example
detection = Box(
item_id="yolo-1",
label="person",
bbox_xyxy=(10, 20, 100, 200),
confidence=0.9,
)
Layer: Domain. Context: Represents application concepts without UI or infrastructure dependencies.