ImageSegmenterOptions
Properties
| Property | Type | Description |
|---|---|---|
canvas? | OffscreenCanvas | The canvas element to bind textures to. This has to be set for GPU processing. The task will initialize a WebGL or WebGPU context and throw an error if this fails (e.g. if you have already initialized a different type of context). |
delegate? | Delegate | Overrides the default backend to use for the provided model. |
modelAsset? | SegmentationModelAsset | - |
segmenterCanvas? | OffscreenCanvas | The Google TaskVision segmentation model only works with WebGl so we need a separate canvas for this. |