Class: SegmentationOptions
Defined in: src/world/segmentation/SegmentationOptions.ts:8
Configuration options for the semantic segmentation system. Mirrors the
other world/* perception options (humans, faces, objects).
Constructors
Constructor
new SegmentationOptions(
options?):SegmentationOptions
Defined in: src/world/segmentation/SegmentationOptions.ts:40
Parameters
options?
backendConfig?
{ activeBackend?: string; mediapipe?: { modelAssetPath?: string; outputCategoryMask?: boolean; wasmFilesUrl?: string; }; } = ...
Configuration options for the active segmentation backend.
backendConfig.activeBackend?
string = 'mediapipe'
backendConfig.mediapipe?
{ modelAssetPath?: string; outputCategoryMask?: boolean; wasmFilesUrl?: string; } = ...
backendConfig.mediapipe.modelAssetPath?
string = ...
backendConfig.mediapipe.outputCategoryMask?
boolean = true
Output the per-pixel category mask. Required to produce a SegmentationMask.
backendConfig.mediapipe.wasmFilesUrl?
string = 'https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm'
enable?
() => SegmentationOptions
enabled?
boolean = false
pollingIntervalMs?
number = 66
Minimum delay in milliseconds between continuous segmentation runs. A value of 0 runs again as soon as the previous inference finishes. Defaults to 66 (~15 fps), the rate the magic_window grab loop used before segmentation moved onto its own polling loop.
Returns
SegmentationOptions
Properties
backendConfig
backendConfig:
object
Defined in: src/world/segmentation/SegmentationOptions.ts:22
Configuration options for the active segmentation backend.
activeBackend
activeBackend:
string='mediapipe'
mediapipe
mediapipe:
object
mediapipe.modelAssetPath
modelAssetPath:
string
mediapipe.outputCategoryMask
outputCategoryMask:
boolean=true
Output the per-pixel category mask. Required to produce a SegmentationMask.
mediapipe.wasmFilesUrl
wasmFilesUrl:
string='https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm'
enabled
enabled:
boolean=false
Defined in: src/world/segmentation/SegmentationOptions.ts:9
pollingIntervalMs
pollingIntervalMs:
number=66
Defined in: src/world/segmentation/SegmentationOptions.ts:17
Minimum delay in milliseconds between continuous segmentation runs. A value of 0 runs again as soon as the previous inference finishes. Defaults to 66 (~15 fps), the rate the magic_window grab loop used before segmentation moved onto its own polling loop.
Methods
enable()
enable():
SegmentationOptions
Defined in: src/world/segmentation/SegmentationOptions.ts:46
Returns
SegmentationOptions