Expand description
§Deep Neural Network module
This module contains: - API for new layers creation, layers are building bricks of neural networks; - set of built-in most-useful Layers; - API to construct and modify comprehensive neural networks from layers; - functionality for loading serialized networks models from different frameworks.
Functionality of this module is designed only for forward pass computations (i.e. network testing). A network training is in principle not supported.
Modules§
Structs§
- ArgMax/ArgMin layer
- Derivatives of this class encapsulates functions of certain backends.
- Derivatives of this class wraps cv::Mat for different backends and targets.
- Partial List of Implemented Layers
- This class represents high-level API for classification models.
- Constant layer produces the same data blob at an every forward pass.
- This class represents high-level API for object detection networks.
- Detection output layer.
- This class implements name-value dictionary, values are instances of DictValue.
- This struct stores the scalar value (or array) of one of the following type: double, cv::String or int64. @todo Maybe int64 is useless because double type exactly stores at least 2^52 integers.
- This function performs array summation based on the Einstein summation convention. The function allows for concise expressions of various mathematical operations using subscripts.
- Element wise operation on inputs
- GRU recurrent one-layer
- GatherElements layer GatherElements takes two inputs data and indices of the same rank r >= 1 and an optional attribute axis and works such that: output[i][j][k] = data[index[i][j][k]][j][k] if axis = 0 and r = 3 output[i][j][k] = data[i][index[i][j][k]][k] if axis = 1 and r = 3 output[i][j][k] = data[i][j][index[i][j][k]] if axis = 2 and r = 3
- Gather layer
- Processing params of image to blob.
InnerProduct
,MatMul
andGemm
operations are all implemented by Fully Connected Layer. Parameteris_matmul
is used to distinguishMatMul
andGemm
fromInnerProduct
.- Bilinear resize layer from https://github.com/cdmh/deeplab-public-ver2
- This class represents high-level API for keypoints models
- LSTM recurrent layer
- This interface class allows to build new Layers - are building blocks of networks.
- %Layer factory allows to create instances of registered layers.
- This class provides all data needed to initialize layer.
- This class is presented high-level API for neural networks.
- This class allows to create and manipulate comprehensive artificial neural networks.
- inline formula - normalization layer.
- Adds extra values for specific axes.
- Classical recurrent layer
- Resize input 4-dimensional blob by nearest neighbor or bilinear strategy.
- This class represents high-level API for segmentation models
- Permute channels of 4-dimensional input blob.
- Slice layer has several modes:
- Base class for text detection networks
- This class represents high-level API for text detection DL networks compatible with DB model.
- This class represents high-level API for text detection DL networks compatible with EAST model.
- This class represents high-level API for text recognition networks.
Enums§
- Enum of computation backends supported by layers.
- Enum of data layout for model inference.
- Enum of image processing mode. To facilitate the specialization pre-processing requirements of the dnn model. For example, the
letter box
often used in the Yolo series of models. - Enum of Soft NMS methods.
- Enum of target devices for computations.
Constants§
- DNN_BACKEND_DEFAULT equals to OPENCV_DNN_BACKEND_DEFAULT, which can be defined using CMake or a configuration parameter
- DNN_BACKEND_DEFAULT equals to OPENCV_DNN_BACKEND_DEFAULT, which can be defined using CMake or a configuration parameter
- Intel OpenVINO computational backend
- OpenCV data layout for 5D data.
- OpenCV data layout for 4D data.
- OpenCV data layout for 2D data.
- Tensorflow-like data layout for 5D data.
- Tensorflow-like data layout for 4D data.
- Tensorflow-like data layout, it should only be used at tf or tflite model parsing.
- FPGA device with CPU fallbacks using Inference Engine’s Heterogeneous plugin.
Traits§
- Mutable methods for crate::dnn::AbsLayer
- Constant methods for crate::dnn::AbsLayer
- Mutable methods for crate::dnn::AccumLayer
- Constant methods for crate::dnn::AccumLayer
- Mutable methods for crate::dnn::AcosLayer
- Constant methods for crate::dnn::AcosLayer
- Mutable methods for crate::dnn::AcoshLayer
- Constant methods for crate::dnn::AcoshLayer
- Mutable methods for crate::dnn::ActivationLayerInt8
- Constant methods for crate::dnn::ActivationLayerInt8
- Mutable methods for crate::dnn::ActivationLayer
- Constant methods for crate::dnn::ActivationLayer
- Mutable methods for crate::dnn::ArgLayer
- Constant methods for crate::dnn::ArgLayer
- Mutable methods for crate::dnn::AsinLayer
- Constant methods for crate::dnn::AsinLayer
- Mutable methods for crate::dnn::AsinhLayer
- Constant methods for crate::dnn::AsinhLayer
- Mutable methods for crate::dnn::AtanLayer
- Constant methods for crate::dnn::AtanLayer
- Mutable methods for crate::dnn::AtanhLayer
- Constant methods for crate::dnn::AtanhLayer
- Mutable methods for crate::dnn::AttentionLayer
- Constant methods for crate::dnn::AttentionLayer
- Mutable methods for crate::dnn::BNLLLayer
- Constant methods for crate::dnn::BNLLLayer
- Mutable methods for crate::dnn::BackendNode
- Constant methods for crate::dnn::BackendNode
- Mutable methods for crate::dnn::BackendWrapper
- Constant methods for crate::dnn::BackendWrapper
- Mutable methods for crate::dnn::BaseConvolutionLayer
- Constant methods for crate::dnn::BaseConvolutionLayer
- Mutable methods for crate::dnn::BatchNormLayerInt8
- Constant methods for crate::dnn::BatchNormLayerInt8
- Mutable methods for crate::dnn::BatchNormLayer
- Constant methods for crate::dnn::BatchNormLayer
- Mutable methods for crate::dnn::BlankLayer
- Constant methods for crate::dnn::BlankLayer
- Mutable methods for crate::dnn::CeilLayer
- Constant methods for crate::dnn::CeilLayer
- Mutable methods for crate::dnn::CeluLayer
- Constant methods for crate::dnn::CeluLayer
- Mutable methods for crate::dnn::ChannelsPReLULayer
- Constant methods for crate::dnn::ChannelsPReLULayer
- Mutable methods for crate::dnn::ClassificationModel
- Constant methods for crate::dnn::ClassificationModel
- Mutable methods for crate::dnn::CompareLayer
- Constant methods for crate::dnn::CompareLayer
- Mutable methods for crate::dnn::ConcatLayer
- Constant methods for crate::dnn::ConcatLayer
- Mutable methods for crate::dnn::ConstLayer
- Constant methods for crate::dnn::ConstLayer
- Mutable methods for crate::dnn::ConvolutionLayerInt8
- Constant methods for crate::dnn::ConvolutionLayerInt8
- Mutable methods for crate::dnn::ConvolutionLayer
- Constant methods for crate::dnn::ConvolutionLayer
- Mutable methods for crate::dnn::CorrelationLayer
- Constant methods for crate::dnn::CorrelationLayer
- Mutable methods for crate::dnn::CosLayer
- Constant methods for crate::dnn::CosLayer
- Mutable methods for crate::dnn::CoshLayer
- Constant methods for crate::dnn::CoshLayer
- Mutable methods for crate::dnn::CropAndResizeLayer
- Constant methods for crate::dnn::CropAndResizeLayer
- Mutable methods for crate::dnn::CropLayer
- Constant methods for crate::dnn::CropLayer
- Mutable methods for crate::dnn::CumSumLayer
- Constant methods for crate::dnn::CumSumLayer
- Mutable methods for crate::dnn::DataAugmentationLayer
- Constant methods for crate::dnn::DataAugmentationLayer
- Mutable methods for crate::dnn::DeconvolutionLayer
- Constant methods for crate::dnn::DeconvolutionLayer
- Mutable methods for crate::dnn::DequantizeLayer
- Constant methods for crate::dnn::DequantizeLayer
- Mutable methods for crate::dnn::DetectionModel
- Constant methods for crate::dnn::DetectionModel
- Mutable methods for crate::dnn::DetectionOutputLayer
- Constant methods for crate::dnn::DetectionOutputLayer
- Mutable methods for crate::dnn::Dict
- Constant methods for crate::dnn::Dict
- Mutable methods for crate::dnn::DictValue
- Constant methods for crate::dnn::DictValue
- Mutable methods for crate::dnn::ELULayer
- Constant methods for crate::dnn::ELULayer
- Mutable methods for crate::dnn::EinsumLayer
- Constant methods for crate::dnn::EinsumLayer
- Mutable methods for crate::dnn::EltwiseLayerInt8
- Constant methods for crate::dnn::EltwiseLayerInt8
- Mutable methods for crate::dnn::EltwiseLayer
- Constant methods for crate::dnn::EltwiseLayer
- Mutable methods for crate::dnn::ErfLayer
- Constant methods for crate::dnn::ErfLayer
- Mutable methods for crate::dnn::ExpLayer
- Constant methods for crate::dnn::ExpLayer
- Mutable methods for crate::dnn::ExpandLayer
- Constant methods for crate::dnn::ExpandLayer
- Mutable methods for crate::dnn::FlattenLayer
- Constant methods for crate::dnn::FlattenLayer
- Mutable methods for crate::dnn::FloorLayer
- Constant methods for crate::dnn::FloorLayer
- Mutable methods for crate::dnn::FlowWarpLayer
- Constant methods for crate::dnn::FlowWarpLayer
- Mutable methods for crate::dnn::GRULayer
- Constant methods for crate::dnn::GRULayer
- Mutable methods for crate::dnn::GatherElementsLayer
- Constant methods for crate::dnn::GatherElementsLayer
- Mutable methods for crate::dnn::GatherLayer
- Constant methods for crate::dnn::GatherLayer
- Mutable methods for crate::dnn::GeluApproximationLayer
- Constant methods for crate::dnn::GeluApproximationLayer
- Mutable methods for crate::dnn::GeluLayer
- Constant methods for crate::dnn::GeluLayer
- Mutable methods for crate::dnn::GemmLayer
- Constant methods for crate::dnn::GemmLayer
- Mutable methods for crate::dnn::HardSigmoidLayer
- Constant methods for crate::dnn::HardSigmoidLayer
- Mutable methods for crate::dnn::HardSwishLayer
- Constant methods for crate::dnn::HardSwishLayer
- Mutable methods for crate::dnn::InnerProductLayerInt8
- Constant methods for crate::dnn::InnerProductLayerInt8
- Mutable methods for crate::dnn::InnerProductLayer
- Constant methods for crate::dnn::InnerProductLayer
- Mutable methods for crate::dnn::InstanceNormLayer
- Constant methods for crate::dnn::InstanceNormLayer
- Mutable methods for crate::dnn::InterpLayer
- Constant methods for crate::dnn::InterpLayer
- Mutable methods for crate::dnn::KeypointsModel
- Constant methods for crate::dnn::KeypointsModel
- Mutable methods for crate::dnn::LRNLayer
- Constant methods for crate::dnn::LRNLayer
- Mutable methods for crate::dnn::LSTMLayer
- Constant methods for crate::dnn::LSTMLayer
- Mutable methods for crate::dnn::LayerFactory
- Constant methods for crate::dnn::LayerFactory
- Mutable methods for crate::dnn::LayerNormLayer
- Constant methods for crate::dnn::LayerNormLayer
- Mutable methods for crate::dnn::LayerParams
- Constant methods for crate::dnn::LayerParams
- Mutable methods for crate::dnn::Layer
- Constant methods for crate::dnn::Layer
- Mutable methods for crate::dnn::LogLayer
- Constant methods for crate::dnn::LogLayer
- Mutable methods for crate::dnn::MVNLayer
- Constant methods for crate::dnn::MVNLayer
- Mutable methods for crate::dnn::MatMulLayer
- Constant methods for crate::dnn::MatMulLayer
- Mutable methods for crate::dnn::MaxUnpoolLayer
- Constant methods for crate::dnn::MaxUnpoolLayer
- Mutable methods for crate::dnn::MishLayer
- Constant methods for crate::dnn::MishLayer
- Mutable methods for crate::dnn::Model
- Constant methods for crate::dnn::Model
- Mutable methods for crate::dnn::NaryEltwiseLayer
- Constant methods for crate::dnn::NaryEltwiseLayer
- Mutable methods for crate::dnn::Net
- Constant methods for crate::dnn::Net
- Mutable methods for crate::dnn::NormalizeBBoxLayer
- Constant methods for crate::dnn::NormalizeBBoxLayer
- Mutable methods for crate::dnn::NotLayer
- Constant methods for crate::dnn::NotLayer
- Mutable methods for crate::dnn::PaddingLayer
- Constant methods for crate::dnn::PaddingLayer
- Mutable methods for crate::dnn::PermuteLayer
- Constant methods for crate::dnn::PermuteLayer
- Mutable methods for crate::dnn::PoolingLayerInt8
- Constant methods for crate::dnn::PoolingLayerInt8
- Mutable methods for crate::dnn::PoolingLayer
- Constant methods for crate::dnn::PoolingLayer
- Mutable methods for crate::dnn::PowerLayer
- Constant methods for crate::dnn::PowerLayer
- Mutable methods for crate::dnn::PriorBoxLayer
- Constant methods for crate::dnn::PriorBoxLayer
- Mutable methods for crate::dnn::ProposalLayer
- Constant methods for crate::dnn::ProposalLayer
- Mutable methods for crate::dnn::QuantizeLayer
- Constant methods for crate::dnn::QuantizeLayer
- Mutable methods for crate::dnn::RNNLayer
- Constant methods for crate::dnn::RNNLayer
- Mutable methods for crate::dnn::ReLU6Layer
- Constant methods for crate::dnn::ReLU6Layer
- Mutable methods for crate::dnn::ReLULayer
- Constant methods for crate::dnn::ReLULayer
- Mutable methods for crate::dnn::ReciprocalLayer
- Constant methods for crate::dnn::ReciprocalLayer
- Mutable methods for crate::dnn::ReduceLayer
- Constant methods for crate::dnn::ReduceLayer
- Mutable methods for crate::dnn::RegionLayer
- Constant methods for crate::dnn::RegionLayer
- Mutable methods for crate::dnn::ReorgLayer
- Constant methods for crate::dnn::ReorgLayer
- Mutable methods for crate::dnn::RequantizeLayer
- Constant methods for crate::dnn::RequantizeLayer
- Mutable methods for crate::dnn::ReshapeLayer
- Constant methods for crate::dnn::ReshapeLayer
- Mutable methods for crate::dnn::ResizeLayer
- Constant methods for crate::dnn::ResizeLayer
- Mutable methods for crate::dnn::RoundLayer
- Constant methods for crate::dnn::RoundLayer
- Mutable methods for crate::dnn::ScaleLayerInt8
- Constant methods for crate::dnn::ScaleLayerInt8
- Mutable methods for crate::dnn::ScaleLayer
- Constant methods for crate::dnn::ScaleLayer
- Mutable methods for crate::dnn::ScatterLayer
- Constant methods for crate::dnn::ScatterLayer
- Mutable methods for crate::dnn::ScatterNDLayer
- Constant methods for crate::dnn::ScatterNDLayer
- Mutable methods for crate::dnn::SegmentationModel
- Constant methods for crate::dnn::SegmentationModel
- Mutable methods for crate::dnn::SeluLayer
- Constant methods for crate::dnn::SeluLayer
- Mutable methods for crate::dnn::ShiftLayerInt8
- Constant methods for crate::dnn::ShiftLayerInt8
- Mutable methods for crate::dnn::ShiftLayer
- Constant methods for crate::dnn::ShiftLayer
- Mutable methods for crate::dnn::ShrinkLayer
- Constant methods for crate::dnn::ShrinkLayer
- Mutable methods for crate::dnn::ShuffleChannelLayer
- Constant methods for crate::dnn::ShuffleChannelLayer
- Mutable methods for crate::dnn::SigmoidLayer
- Constant methods for crate::dnn::SigmoidLayer
- Mutable methods for crate::dnn::SignLayer
- Constant methods for crate::dnn::SignLayer
- Mutable methods for crate::dnn::SinLayer
- Constant methods for crate::dnn::SinLayer
- Mutable methods for crate::dnn::SinhLayer
- Constant methods for crate::dnn::SinhLayer
- Mutable methods for crate::dnn::SliceLayer
- Constant methods for crate::dnn::SliceLayer
- Mutable methods for crate::dnn::SoftmaxLayerInt8
- Constant methods for crate::dnn::SoftmaxLayerInt8
- Mutable methods for crate::dnn::SoftmaxLayer
- Constant methods for crate::dnn::SoftmaxLayer
- Mutable methods for crate::dnn::SoftplusLayer
- Constant methods for crate::dnn::SoftplusLayer
- Mutable methods for crate::dnn::SoftsignLayer
- Constant methods for crate::dnn::SoftsignLayer
- Mutable methods for crate::dnn::SplitLayer
- Constant methods for crate::dnn::SplitLayer
- Mutable methods for crate::dnn::SqrtLayer
- Constant methods for crate::dnn::SqrtLayer
- Mutable methods for crate::dnn::SwishLayer
- Constant methods for crate::dnn::SwishLayer
- Mutable methods for crate::dnn::TanHLayer
- Constant methods for crate::dnn::TanHLayer
- Mutable methods for crate::dnn::TanLayer
- Constant methods for crate::dnn::TanLayer
- Mutable methods for crate::dnn::TextDetectionModel
- Constant methods for crate::dnn::TextDetectionModel
- Mutable methods for crate::dnn::TextDetectionModel_DB
- Constant methods for crate::dnn::TextDetectionModel_DB
- Mutable methods for crate::dnn::TextDetectionModel_EAST
- Constant methods for crate::dnn::TextDetectionModel_EAST
- Mutable methods for crate::dnn::TextRecognitionModel
- Constant methods for crate::dnn::TextRecognitionModel
- Mutable methods for crate::dnn::ThresholdedReluLayer
- Constant methods for crate::dnn::ThresholdedReluLayer
- Mutable methods for crate::dnn::TileLayer
- Constant methods for crate::dnn::TileLayer
- Mutable methods for crate::dnn::_Range
- Constant methods for crate::dnn::_Range
Functions§
- Creates 4-dimensional blob from image. Optionally resizes and crops @p image from center, subtract @p mean values, scales values by @p scalefactor, swap Blue and Red channels.
- Creates 4-dimensional blob from image. Optionally resizes and crops @p image from center, subtract @p mean values, scales values by @p scalefactor, swap Blue and Red channels.
- Creates 4-dimensional blob from image. @details This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Creates 4-dimensional blob from image. @details This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Creates 4-dimensional blob from image with given params.
- Creates 4-dimensional blob from image with given params.
- @overload
- Creates 4-dimensional blob from image with given params.
- Creates 4-dimensional blob from series of images. Optionally resizes and crops @p images from center, subtract @p mean values, scales values by @p scalefactor, swap Blue and Red channels.
- Creates 4-dimensional blob from series of images. Optionally resizes and crops @p images from center, subtract @p mean values, scales values by @p scalefactor, swap Blue and Red channels.
- Creates 4-dimensional blob from series of images. @details This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Creates 4-dimensional blob from series of images. @details This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Creates 4-dimensional blob from series of images with given params.
- Creates 4-dimensional blob from series of images with given params.
- @overload
- Creates 4-dimensional blob from series of images with given params.
- Enables detailed logging of the DNN model loading with CV DNN API.
- Returns Inference Engine internal backend API.
- Returns Inference Engine CPU type.
- Returns Inference Engine VPU type.
- Parse a 4D blob and output the images it contains as 2D arrays through a simpler data structure (std::vectorcv::Mat).
- Performs non maximum suppression given boxes and corresponding scores.
- Performs batched non maximum suppression on given boxes and corresponding scores across different classes.
- C++ default parameters
- Note
- Performs batched non maximum suppression on given boxes and corresponding scores across different classes.
- Performs non maximum suppression given boxes and corresponding scores.
- C++ default parameters
- Note
- C++ default parameters
- Note
- Read deep learning network represented in one of the supported formats.
- Read deep learning network represented in one of the supported formats. @details This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Read deep learning network represented in one of the supported formats. @details This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Read deep learning network represented in one of the supported formats.
- Reads a network model stored in Caffe framework’s format.
- Reads a network model stored in Caffe model in memory.
- Reads a network model stored in Caffe model in memory.
- Reads a network model stored in Caffe framework’s format.
- Reads a network model stored in Caffe model in memory. @details This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Reads a network model stored in Caffe model in memory. @details This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Reads a network model stored in Darknet model files.
- Reads a network model stored in Darknet model files.
- Reads a network model stored in Darknet model files.
- Reads a network model stored in Darknet model files.
- Reads a network model stored in Darknet model files.
- Reads a network model stored in Darknet model files.
- Load a network from Intel’s Model Optimizer intermediate representation.
- Load a network from Intel’s Model Optimizer intermediate representation.
- Load a network from Intel’s Model Optimizer intermediate representation.
- Load a network from Intel’s Model Optimizer intermediate representation.
- Reads a network model ONNX.
- Reads a network model from ONNX in-memory buffer.
- Reads a network model from ONNX in-memory buffer.
- Reads a network model stored in TensorFlow framework’s format.
- Reads a network model stored in TensorFlow framework’s format.
- Reads a network model stored in TensorFlow framework’s format.
- Reads a network model stored in TensorFlow framework’s format.
- Reads a network model stored in TensorFlow framework’s format. @details This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Reads a network model stored in TensorFlow framework’s format. @details This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Reads a network model stored in TFLite framework’s format.
- Reads a network model stored in TFLite framework’s format.
- Reads a network model stored in TFLite framework’s format. @details This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Reads a network model stored in Torch7 framework’s format.
- Reads a network model stored in Torch7 framework’s format.
- Creates blob from .pb file.
- Loads blob which was serialized as torch.Tensor object of Torch7 framework. @warning This function has the same limitations as readNetFromTorch().
- Loads blob which was serialized as torch.Tensor object of Torch7 framework. @warning This function has the same limitations as readNetFromTorch().
- Release a HDDL plugin.
- Release a Myriad device (binded by OpenCV).
- Specify Inference Engine internal backend API.
- C++ default parameters
- Note
- Convert all weights of Caffe network to half precision floating point.
- Convert all weights of Caffe network to half precision floating point.
- Performs soft non maximum suppression given boxes and corresponding scores. Reference: https://arxiv.org/abs/1704.04503
- Performs soft non maximum suppression given boxes and corresponding scores. Reference: https://arxiv.org/abs/1704.04503
- C++ default parameters
- C++ default parameters
- Note
- Note
- Create a text representation for a binary network stored in protocol buffer format.
Type Aliases§
- Each Layer class must provide this function to the factory
- Net_LayerIdDeprecatedContainer for strings and integers.