Skip to content

ObjectDetector

Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:74

readonly inputSize: number

Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:78

Width and height of the model input in pixels.


readonly labels: readonly string[]

Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:76

The class names, by class index.


readonly schemas: object

Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:82

Buffer layouts for encodeDetectObjects, at this runner’s size: the model input, and the list with room for maxDetections objects. Pass one to root.createBuffer to make a buffer of the right type and size.

readonly input: Yolo26Input

readonly output: (maxDetections) => ObjectDetectionList

number

ObjectDetectionList

detectObjects(image, options?): Promise<ObjectDetection[]>

Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:87

Image in, the objects in it out, best first.

ImageBuffer

DetectObjectsOptions

Promise<ObjectDetection[]>


dispose(): void

Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:96

Frees the weights and every GPU buffer the runner holds.

void


encodeDetectObjects(options): void

Defined in: packages/runntime/src/zoo/tasks/cv/objectDetection.ts:94

Records a detection from GPU memory into GPU memory, with no CPU copy. A texture source is fitted like an ImageBuffer; a buffer source is the model input as-is. The target gets the list of objects, decoded on the GPU. Work submitted after it sees the result.

EncodeDetectObjectsOptions

void

RunntimeError INVALID_ARGUMENT for a resource of the wrong format, usage or size, or an option out of range.