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()
readonlydispose: () =>void
Defined in: extensions/cv/tasks/instanceSegmentation.ts:120
Releases all allocated native resources.
Returns
void
segmentInstances()
readonlysegmentInstances: (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
The input image buffer.
options?
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()
readonlysegmentInstancesWorklet: (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
options?
Returns
InstanceSegmentationResult<F, L>[]