[−][src]Function opencv::dnn::read_net
pub fn read_net(model: &str, config: &str, framework: &str) -> Result<Net>
Read deep learning network represented in one of the supported formats.
Parameters
- model: Binary file contains trained weights. The following file
extensions are expected for models from different frameworks:
*
*.caffemodel
(Caffe, http://caffe.berkeleyvision.org/) **.pb
(TensorFlow, https://www.tensorflow.org/) **.t7
|*.net
(Torch, http://torch.ch/) **.weights
(Darknet, https://pjreddie.com/darknet/) **.bin
(DLDT, https://software.intel.com/openvino-toolkit) **.onnx
(ONNX, https://onnx.ai/) - config: Text file contains network configuration. It could be a
file with the following extensions:
*
*.prototxt
(Caffe, http://caffe.berkeleyvision.org/) **.pbtxt
(TensorFlow, https://www.tensorflow.org/) **.cfg
(Darknet, https://pjreddie.com/darknet/) **.xml
(DLDT, https://software.intel.com/openvino-toolkit) - framework: Explicit framework name tag to determine a format.
Returns
Net object.
This function automatically detects an origin framework of trained model and calls an appropriate function such @ref readNetFromCaffe, @ref readNetFromTensorflow, @ref readNetFromTorch or @ref readNetFromDarknet. An order of @p model and @p config arguments does not matter.
C++ default parameters
- config: ""
- framework: ""