DetectionResult
class¶
DetectionResult
¶
Detection result model for YOLOv8 card and color patches detection.
A data model that encapsulates YOLOv8 detection results for a standardized color card and its color patches. The model handles two distinct classes: patches (label 0) and card (label 1). In a typical detection scenario, the model captures one card and 24 color patches inside/outside the card.
Notes
The detection typically yields 25 objects:
- 1 color checker card 24 Patches (class_id: 1)
- 24 color patches (class_id: 0)
Attributes:
Name | Type | Description |
---|---|---|
boxes |
list[tuple[int, int, int, int]]
|
List of bounding boxes as (x1, y1, x2, y2). Representing the top-left and bottom-right corners of the detection. Class identifiers for each detected object where:
|
scores |
list[float]
|
List of confidence scores for each detection. |
class_ids |
list[int]
|
List of class IDs corresponding to each detection. |
Source code in color_correction/schemas/det_yv8.py
Functions¶
draw_detections
¶
Draw detection boxes on the provided image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
image
|
numpy.ndarray
|
The image on which the detection boxes will be drawn. |
required |
Returns:
Type | Description |
---|---|
numpy.ndarray
|
The image with the drawn detection boxes. |