Table of Contents

Method ReadNetFromTFLite

Namespace
OpenCvSharp.Dnn
Assembly
OpenCvSharp.dll

ReadNetFromTFLite(string, EngineType)

Reads a network model stored in TFLite (https://www.tensorflow.org/lite) framework's format.

public static Net? ReadNetFromTFLite(string model, EngineType engine = EngineType.Auto)

Parameters

model string

path to the .tflite file with binary flatbuffers description of the network architecture.

engine EngineType

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

Returns

Net

Network object that ready to do forward, throw an exception in failure cases.

ReadNetFromTFLite(byte[], EngineType)

Reads a network model stored in TFLite framework's format from memory.

public static Net? ReadNetFromTFLite(byte[] bufferModel, EngineType engine = EngineType.Auto)

Parameters

bufferModel byte[]

buffer containing the content of the tflite file.

engine EngineType

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

Returns

Net

Network object that ready to do forward, throw an exception in failure cases.

ReadNetFromTFLite(ReadOnlySpan<byte>, EngineType)

Reads a network model stored in TFLite framework's format from memory.

public static Net? ReadNetFromTFLite(ReadOnlySpan<byte> bufferModel, EngineType engine = EngineType.Auto)

Parameters

bufferModel ReadOnlySpan<byte>

buffer containing the content of the tflite file.

engine EngineType

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

Returns

Net

Network object that ready to do forward, throw an exception in failure cases.