Method ReadNet
- Namespace
- OpenCvSharp.Dnn
- Assembly
- OpenCvSharp.dll
ReadNet(string, string, string, EngineType)
Read deep learning network represented in one of the supported formats.
This function automatically detects an origin framework of trained model and calls an appropriate function such @ref readNetFromTensorflow, @ref readNetFromONNX, or @ref readNetFromModelOptimizer. The Caffe, Darknet and Torch parsers were removed in OpenCV 5.
public static Net ReadNet(string model, string config = "", string framework = "", EngineType engine = EngineType.Auto)
Parameters
modelstringBinary file contains trained weights. The following file * extensions are expected for models from different frameworks: * *
*.pb(TensorFlow, https://www.tensorflow.org/) * **.onnx(ONNX, https://onnx.ai/) * **.bin(OpenVINO, https://software.intel.com/openvino-toolkit)configstringText file contains network configuration. It could be a * file with the following extensions: * *
*.pbtxt(TensorFlow, https://www.tensorflow.org/) * **.xml(OpenVINO, https://software.intel.com/openvino-toolkit)frameworkstringExplicit framework name tag to determine a format.
engineEngineTypeDNN engine to use. Auto tries the new engine first and falls back to the classic one.