Skip to content

dnn_EngineType

Deep neural networksclassOpenCV 5.0.0
import { dnn_EngineType } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSdnn_EngineType
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.

Native enum entries for dnn engine type. Pass an entry to enum-typed arguments or its .value to numeric arguments.

Constructors and members

static ENGINE_CLASSIC

Force use the old dnn engine similar to 4.x branch

ENGINE_CLASSIC: dnn_EngineTypeValue<1>,

static ENGINE_NEW

Force use the new dnn engine. The engine does not support non CPU back-ends for now.

ENGINE_NEW: dnn_EngineTypeValue<2>,

static ENGINE_AUTO

Try to use the new engine and then fall back to the classic version.

ENGINE_AUTO: dnn_EngineTypeValue<3>,

static ENGINE_ORT

Try to use ONNX Runtime wrapper (ONNX only, requires build with WITH_ONNXRUNTIME=ON).

ENGINE_ORT: dnn_EngineTypeValue<4>

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.