Table of Contents

Method ReadNetFromONNX

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ReadNetFromONNX(string, EngineType)

Reads a network model ONNX https://onnx.ai/ from memory

public static Net? ReadNetFromONNX(string onnxFile, EngineType engine = EngineType.Auto)

Parameters

onnxFile string
engine EngineType

DNN engine to use. Auto tries the new engine first and falls back to the classic one.

Returns

Net

ReadNetFromONNX(byte[], EngineType)

Reads a network model ONNX https://onnx.ai/ from memory

public static Net? ReadNetFromONNX(byte[] onnxFileData, EngineType engine = EngineType.Auto)

Parameters

onnxFileData byte[]

memory of the first byte of the buffer.

engine EngineType

DNN engine to use. Auto tries the new engine first and falls back to the classic one.

Returns

Net

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

onnxFileData ReadOnlySpan<byte>

memory of the first byte of the buffer.

engine EngineType

DNN engine to use. Auto tries the new engine first and falls back to the classic one.

Returns

Net

ReadNetFromONNX(Stream, EngineType)

Reads a network model ONNX https://onnx.ai/ from stream.

public static Net? ReadNetFromONNX(Stream onnxFileStream, EngineType engine = EngineType.Auto)

Parameters

onnxFileStream Stream

memory of the first byte of the buffer.

engine EngineType

DNN engine to use. Auto tries the new engine first and falls back to the classic one.

Returns

Net