Skip to main content
Version: 0.10.0

Type Alias: InstanceSegmenter<F, L>

InstanceSegmenter<F, L> = object

Defined in: extensions/cv/tasks/instanceSegmentation.ts:116

Instance segmentation task runner.

Type Parameters

F

F extends BoxFormat

The format type of the bounding box.

L

L

The label type.

Properties

dispose()

readonly dispose: () => void

Defined in: extensions/cv/tasks/instanceSegmentation.ts:120

Releases all allocated native resources.

Returns

void


segmentInstances()

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

Defined in: extensions/cv/tasks/instanceSegmentation.ts:132

Performs asynchronous instance segmentation on the given input image.

Parameters

input

ImageBuffer

The input image buffer.

options?

SegmentInstancesOptions

Execution override options. See SegmentInstancesOptions.

Returns

Promise<InstanceSegmentationResult<F, L>[]>

A promise resolving to a list of detected instances.

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.


segmentInstancesWorklet()

readonly segmentInstancesWorklet: (input, options?) => InstanceSegmentationResult<F, L>[]

Defined in: extensions/cv/tasks/instanceSegmentation.ts:141

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

Parameters

input

ImageBuffer

options?

SegmentInstancesOptions

Returns

InstanceSegmentationResult<F, L>[]