Detections¶
Detections
dataclass
¶
Detections(
boxes: Tensor,
scores: Tensor,
labels: Tensor,
image_size: tuple[int, int],
names: Mapping[int, str] | None = None,
)
Fused detections for one image. Tensors stay on the device they were computed on.
names
class-attribute
instance-attribute
¶
Optional class id → name map (filled by :func:easi.predict).
to_coco ¶
COCO-style results: {"image_id", "category_id", "bbox": [x, y, w, h], "score"}.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image_id
|
int
|
Value for every entry's |
0
|
category_ids
|
Mapping[int, int] | None
|
Optional map from detector label to COCO category id. |
None
|
to_supervision ¶
Convert to supervision.Detections (requires pip install supervision);
class_names defaults to :attr:names.