Method ReadNetFromONNX
- Namespace
- OpenCvSharp.Dnn
- Assembly
- OpenCvSharp.dll
ReadNetFromONNX(string, EngineType)
Reads a network model ONNX https://onnx.ai/
public static Net? ReadNetFromONNX(string onnxFile, EngineType engine = EngineType.Auto)
Parameters
onnxFilestringpath to the .onnx file with text description of the network architecture.
engineEngineTypeDNN engine to use. The default is Auto.
Returns
- Net
Network object that ready to do forward, throw an exception in failure cases.
ReadNetFromONNX(byte[], EngineType)
Reads a network model ONNX https://onnx.ai/ from memory
public static Net? ReadNetFromONNX(byte[] onnxFileData, EngineType engine = EngineType.Auto)
Parameters
onnxFileDatabyte[]memory of the first byte of the buffer.
engineEngineTypeDNN engine to use. The default is Auto.
Returns
- Net
Network object that ready to do forward, throw an exception in failure cases.
ReadNetFromONNX(ReadOnlySpan<byte>, EngineType)
Reads a network model ONNX https://onnx.ai/ from memory
public static Net? ReadNetFromONNX(ReadOnlySpan<byte> onnxFileData, EngineType engine = EngineType.Auto)
Parameters
onnxFileDataReadOnlySpan<byte>memory of the first byte of the buffer.
engineEngineTypeDNN engine to use. The default is Auto.
Returns
- Net
Network object that ready to do forward, throw an exception in failure cases.