Skip to main content
Version: Next

Interface: Detection<L>

Defined in: types/objectDetection.ts:31

Represents a detected object within an image, including its bounding box, label, and confidence score.

Type Parameters

L

L extends LabelEnum = typeof CocoLabel

The label enum type for the detected object. Defaults to CocoLabel.

Properties

bbox

bbox: Bbox

Defined in: types/objectDetection.ts:32

The bounding box of the detected object, defined by its top-left (x1, y1) and bottom-right (x2, y2) coordinates.


label

label: keyof L

Defined in: types/objectDetection.ts:33

The class label of the detected object.


score

score: number

Defined in: types/objectDetection.ts:34

The confidence score of the detection, typically ranging from 0 to 1.