Skip to content

dnn_Target

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

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

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

Enum of target devices for computations. See: Net::setPreferableTarget

Constructors and members

static DNN_TARGET_CPU

dnn target cpu constant (0), defined by OpenCV for cv::dnn.

DNN_TARGET_CPU: dnn_TargetValue<0>,

static DNN_TARGET_OPENCL

dnn target opencl constant (0+1), defined by OpenCV for cv::dnn.

DNN_TARGET_OPENCL: dnn_TargetValue<1>,

static DNN_TARGET_OPENCL_FP16

dnn target opencl fp16 constant (0+2), defined by OpenCV for cv::dnn.

DNN_TARGET_OPENCL_FP16: dnn_TargetValue<2>,

static DNN_TARGET_MYRIAD

dnn target myriad constant (0+3), defined by OpenCV for cv::dnn.

DNN_TARGET_MYRIAD: dnn_TargetValue<3>,

static DNN_TARGET_VULKAN

dnn target vulkan constant (0+4), defined by OpenCV for cv::dnn.

DNN_TARGET_VULKAN: dnn_TargetValue<4>,

static DNN_TARGET_FPGA

FPGA device with CPU fallbacks using Inference Engine's Heterogeneous plugin.

DNN_TARGET_FPGA: dnn_TargetValue<5>,

static DNN_TARGET_CUDA

FPGA device with CPU fallbacks using Inference Engine's Heterogeneous plugin.

DNN_TARGET_CUDA: dnn_TargetValue<6>,

static DNN_TARGET_CUDA_FP16

dnn target cuda fp16 constant (0+7), defined by OpenCV for cv::dnn.

DNN_TARGET_CUDA_FP16: dnn_TargetValue<7>,

static DNN_TARGET_HDDL

dnn target hddl constant (0+8), defined by OpenCV for cv::dnn.

DNN_TARGET_HDDL: dnn_TargetValue<8>,

static DNN_TARGET_NPU

dnn target npu constant (0+9), defined by OpenCV for cv::dnn.

DNN_TARGET_NPU: dnn_TargetValue<9>,

static DNN_TARGET_CPU_FP16

Only the ARM platform is supported. Low precision computing, accelerate model inference.

DNN_TARGET_CPU_FP16: dnn_TargetValue<10>

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.