Method ReadNetFromTensorflow
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
ReadNetFromTensorflow(string, string?, EngineType)
Reads a network model stored in Tensorflow model file.
public static Net? ReadNetFromTensorflow(string model, string? config = null, EngineType engine = EngineType.Auto)
Parameters
modelstringpath to the .pb file with binary protobuf description of the network architecture
configstringpath to the .pbtxt file that contains text graph definition in protobuf format.
engineEngineTypeDNN engine to use. Auto tries the new engine first and falls back to the classic one.
Returns
- Net
Resulting Net object is built by text graph using weights from a binary one that let us make it more flexible.
Remarks
This is shortcut consisting from createTensorflowImporter and Net::populateNet calls.
ReadNetFromTensorflow(byte[], byte[]?, EngineType)
Reads a network model stored in Tensorflow model file from memory.
public static Net? ReadNetFromTensorflow(byte[] bufferModel, byte[]? bufferConfig = null, EngineType engine = EngineType.Auto)
Parameters
bufferModelbyte[]buffer containing the content of the pb file
bufferConfigbyte[]buffer containing the content of the pbtxt file (optional)
engineEngineTypeDNN engine to use. Auto tries the new engine first and falls back to the classic one.
Returns
Remarks
This is shortcut consisting from createTensorflowImporter and Net::populateNet calls.
ReadNetFromTensorflow(Stream, Stream?, EngineType)
Reads a network model stored in Tensorflow model file from stream.
public static Net? ReadNetFromTensorflow(Stream bufferModel, Stream? bufferConfig = null, EngineType engine = EngineType.Auto)
Parameters
bufferModelStreambuffer containing the content of the pb file
bufferConfigStreambuffer containing the content of the pbtxt file (optional)
engineEngineTypeDNN engine to use. Auto tries the new engine first and falls back to the classic one.
Returns
Remarks
This is shortcut consisting from createTensorflowImporter and Net::populateNet calls.