dnn_readNetFromONNX
import { dnn_readNetFromONNX } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Reads a network model <a href="https://onnx.ai/">ONNX</a>.
dnn_readNetFromONNX(onnxFile: EmbindString, engine: number): dnn_Net;2 available overloads
dnn_readNetFromONNX(onnxFile: EmbindString): dnn_Net;dnn_readNetFromONNX(onnxFile: EmbindString, engine: number): dnn_Net;onnxFilepath to the .onnx file with text description of the network architecture.
engineselect DNN engine to be used. With auto selection the new engine is used first and falls back to classic. Please pay attention that the new DNN does not support non-CPU back-ends for now.
Returns
Network object that ready to do forward, throw an exception in failure cases.
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.