Skip to main content
Version: 0.10.0

Type Alias: ObjectDetector<F, L>

ObjectDetector<F, L> = object

Defined in: extensions/cv/tasks/objectDetection.ts:92

Object detection task runner.

Type Parameters​

F​

F extends BoxFormat

The bounding box format.

L​

L

The type representing the class labels.

Properties​

detectObjects()​

readonly detectObjects: (input, options?) => Promise<ObjectDetection<F, L>[]>

Defined in: extensions/cv/tasks/objectDetection.ts:108

Asynchronously performs object detection on the input image.

Parameters​

input​

ImageBuffer

The input image buffer.

options?​

DetectObjectsOptions

Configuration options for object detection. See DetectObjectsOptions.

Returns​

Promise<ObjectDetection<F, L>[]>

A promise resolving to the list of object detections.

Throws​

With code INVALID_ARGUMENT if predicted class index is out of bounds, RESOURCE_BUSY if the model is in use, or RESOURCE_DISPOSED if disposed.


detectObjectsWorklet()​

readonly detectObjectsWorklet: (input, options?) => ObjectDetection<F, L>[]

Defined in: extensions/cv/tasks/objectDetection.ts:117

Synchronous version of detectObjects to be executed directly on the caller or worklet thread.

Parameters​

input​

ImageBuffer

options?​

DetectObjectsOptions

Returns​

ObjectDetection<F, L>[]


dispose()​

readonly dispose: () => void

Defined in: extensions/cv/tasks/objectDetection.ts:96

Releases all allocated native resources.

Returns​

void