BaseOptions interface

Options to configure MediaPipe model loading and processing.

Signature:

export declare interface BaseOptions 

Properties

Property Modifiers Type Description
modelAssetPath string | undefined The model path to the model asset file. Only one of modelAssetPath or modelAssetBuffer can be set.
modelAssetBuffer Uint8Array | ReadableStreamDefaultReader | undefined A buffer or stream reader containing the model asset. Only one of modelAssetPath or modelAssetBuffer can be set.
delegate "CPU" | "GPU" | undefined Overrides the default backend to use for the provided model.

BaseOptions.modelAssetPath

The model path to the model asset file. Only one of modelAssetPath or modelAssetBuffer can be set.

Signature:

modelAssetPath?: string | undefined;

BaseOptions.modelAssetBuffer

A buffer or stream reader containing the model asset. Only one of modelAssetPath or modelAssetBuffer can be set.

Signature:

modelAssetBuffer?: Uint8Array | ReadableStreamDefaultReader | undefined;

BaseOptions.delegate

Overrides the default backend to use for the provided model.

Signature:

delegate?: "CPU" | "GPU" | undefined;