Skip to content

gapi_onnx_ep_OpenVINO

gapiclassOpenCV 5.0.0
import { gapi_onnx_ep_OpenVINO } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSConstructor or factory
CLASSgapi_onnx_ep_OpenVINO
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods.

This structure provides functions that fill inference options for ONNX OpenVINO Execution Provider. Please follow https://onnxruntime.ai/docs/execution-providers/OpenVINO-ExecutionProvider.html#summary-of-options

Constructors and members

static new

Class constructor.

Constructs OpenVINO parameters based on device type information.
new(dev_type: EmbindString): gapi_onnx_ep_OpenVINO;
2 available overloads
new(): gapi_onnx_ep_OpenVINO;
new(dev_type: EmbindString): gapi_onnx_ep_OpenVINO;
dev_type

Target device type to use. ("CPU", "GPU", "GPU.0" etc)

Returns

The gapi_onnx_ep_OpenVINO result.

static from2

Create network parameter configuration. These parameter objects describe an optional OpenVINO or ONNX Runtime backend, which is not linked in this WASM build. Use gapi.dnn.Params for executable CPU inference.

from2(_0: map_string_and_string): gapi_onnx_ep_OpenVINO | null;
_0

0 argument (map_string_and_string).

Returns

The gapi_onnx_ep_OpenVINO | null result.

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

cfgCacheDir

Specifies OpenVINO Execution Provider cache dir.

This function is used to explicitly specify the path to save and load
the blobs enabling model caching feature.
cfgCacheDir(dir: EmbindString): gapi_onnx_ep_OpenVINO;
dir

Path to the directory what will be used as cache.

Returns

reference to this parameter structure.

cfgNumThreads

Specifies OpenVINO Execution Provider number of threads.

This function is used to override the accelerator default value
of number of threads with this value at runtime.
cfgNumThreads(nthreads: number): gapi_onnx_ep_OpenVINO;
nthreads

Number of threads.

Returns

reference to this parameter structure.

cfgEnableOpenCLThrottling

Enables OpenVINO Execution Provider opencl throttling.

This function is used to enable OpenCL queue throttling for GPU devices
(reduces CPU utilization when using GPU).
cfgEnableOpenCLThrottling(): gapi_onnx_ep_OpenVINO;
Returns

reference to this parameter structure.

cfgEnableDynamicShapes

Enables OpenVINO Execution Provider dynamic shapes.

This function is used to enable OpenCL queue throttling for GPU devices
(reduces CPU utilization when using GPU).
This function is used to enable work with dynamic shaped models
whose shape will be set dynamically based on the infer input
image/data shape at run time in CPU.
cfgEnableDynamicShapes(): gapi_onnx_ep_OpenVINO;
Returns

reference to this parameter structure.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.