pixano_inference.schemas.detection
Detection I/O types.
DetectionInput(**data)
Bases: _BaseModel
Input for detection.
When classes is provided the model runs in open-vocabulary mode
(e.g. GroundingDINO, YOLOE with text prompt). When classes is
None the model uses its built-in class set (closed-vocabulary
mode, e.g. YOLO, prompt-free YOLOE).
Attributes:
| Name | Type | Description |
|---|---|---|
image |
str | Path | bytes
|
Image for detection (path, URL, base64, or raw bytes from the binary route). |
classes |
list[str] | str | None
|
Class names to detect. |
box_threshold |
float
|
Confidence threshold for boxes. |
text_threshold |
float
|
Confidence threshold for text matching (open-vocab only). |
Source code in pydantic/main.py
DetectionOutput(**data)
Bases: _BaseModel
Output for detection.
masks is populated when the model performs instance segmentation
(boxes + masks). For detection-only models it is None.
Attributes:
| Name | Type | Description |
|---|---|---|
boxes |
list[list[int]]
|
List of detected boxes. |
scores |
list[float]
|
List of confidence scores. |
classes |
list[str]
|
List of class names associated with each box. |
masks |
list[CompressedRLE] | None
|
Optional instance masks in compressed-RLE format. |