Skip to content

InstanceSegmenter

Defined in: packages/runntime/src/zoo/tasks/cv/instanceSegmentation.ts:85

readonly inputSize: number

Defined in: packages/runntime/src/zoo/tasks/cv/instanceSegmentation.ts:89

Width and height of the model input in pixels.


readonly labels: readonly string[]

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

The class names, by class index.


readonly schemas: object

Defined in: packages/runntime/src/zoo/tasks/cv/instanceSegmentation.ts:93

Buffer layouts for encodeSegmentInstances, 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) => InstanceSegmentationList

number

InstanceSegmentationList

dispose(): void

Defined in: packages/runntime/src/zoo/tasks/cv/instanceSegmentation.ts:110

Frees the weights and every GPU buffer the runner holds.

void


encodeSegmentInstances(options): void

Defined in: packages/runntime/src/zoo/tasks/cv/instanceSegmentation.ts:108

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 with their masks, decoded on the GPU. Work submitted after it sees the result.

EncodeSegmentInstancesOptions

void

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


segmentInstances(image, options?): Promise<InstanceSegmentation[]>

Defined in: packages/runntime/src/zoo/tasks/cv/instanceSegmentation.ts:98

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

ImageBuffer

SegmentInstancesOptions

Promise<InstanceSegmentation[]>