This structure provides functions that fill inference parameters for "OpenVINO Toolkit" model.
More...
#include <opencv2/gapi/infer/ie.hpp>
template<typename Net>
class cv::gapi::ie::Params< Net >
This structure provides functions that fill inference parameters for "OpenVINO Toolkit" model.
◆ Params() [1/2]
Class constructor.
Constructs Params based on model information and specifies default values for other inference description parameters. Model is loaded and compiled using "OpenVINO Toolkit".
- Parameters
-
model | Path to topology IR (.xml file). |
weights | Path to weights (.bin file). |
device | target device to use. |
◆ Params() [2/2]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Use this constructor to work with pre-compiled network. Model is imported from a pre-compiled blob.
- Parameters
-
model | Path to model. |
device | target device to use. |
◆ backend()
◆ cfgBatchSize()
◆ cfgContextParams() [1/2]
Specifies configuration for RemoteContext in InferenceEngine.
When RemoteContext is configured the backend imports the networks using the context. It also expects cv::MediaFrames to be actually remote, to operate with blobs via the context.
- Parameters
-
ctx_cfg | cv::util::any value which holds InferenceEngine::ParamMap. |
- Returns
- reference to this parameter structure.
◆ cfgContextParams() [2/2]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Function with an rvalue parameter.
- Parameters
-
ctx_cfg | cv::util::any value which holds InferenceEngine::ParamMap. |
- Returns
- reference to this parameter structure.
◆ cfgInputLayers()
Specifies sequence of network input layers names for inference.
The function is used to associate cv::gapi::infer<> inputs with the model inputs. Number of names has to match the number of network inputs as defined in G_API_NET(). In case a network has only single input layer, there is no need to specify name manually.
- Parameters
-
layer_names | std::array<std::string, N> where N is the number of inputs as defined in the G_API_NET. Contains names of input layers. |
- Returns
- reference to this parameter structure.
◆ cfgInputReshape() [1/6]
template<typename Net >
Params<Net>& cv::gapi::ie::Params< Net >::cfgInputReshape |
( |
const std::map< std::string, std::vector< std::size_t >> & |
reshape_table | ) |
|
|
inline |
◆ cfgInputReshape() [2/6]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ cfgInputReshape() [3/6]
template<typename Net >
Params<Net>& cv::gapi::ie::Params< Net >::cfgInputReshape |
( |
const std::string & |
layer_name, |
|
|
const std::vector< size_t > & |
layer_dims |
|
) |
| |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
layer_name | Name of layer. |
layer_dims | New dimensions for this layer. |
- Returns
- reference to this parameter structure.
◆ cfgInputReshape() [4/6]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ cfgInputReshape() [5/6]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
layer_names | set of names of network layers that will be used for network reshape. |
- Returns
- reference to this parameter structure.
◆ cfgInputReshape() [6/6]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
layer_names | rvalue set of the selected layers will be reshaped automatically its input image size. |
- Returns
- reference to this parameter structure.
◆ cfgNumRequests()
Specifies number of asynchronous inference requests.
- Parameters
-
nireq | Number of inference asynchronous requests. |
- Returns
- reference to this parameter structure.
◆ cfgOutputLayers()
Specifies sequence of network output layers names for inference.
The function is used to associate cv::gapi::infer<> outputs with the model outputs. Number of names has to match the number of network outputs as defined in G_API_NET(). In case a network has only single output layer, there is no need to specify name manually.
- Parameters
-
layer_names | std::array<std::string, N> where N is the number of outputs as defined in the G_API_NET. Contains names of output layers. |
- Returns
- reference to this parameter structure.
◆ constInput()
Specifies a constant input.
The function is used to set a constant input. This input has to be a preprocessed tensor if its type is TENSOR. Need to provide name of the network layer which will receive provided data.
- Parameters
-
layer_name | Name of network layer. |
data | cv::Mat that contains data which will be associated with network layer. |
hint | Input type |
- See also
- cv::gapi::ie::TraitAs.
- Returns
- reference to this parameter structure.
◆ params()
◆ pluginConfig() [1/2]
Specifies OpenVINO plugin configuration.
The function is used to set configuration for OpenVINO plugin. Some parameters can be different for each plugin. Please follow https://docs.openvinotoolkit.org/latest/index.html to check information about specific plugin.
- Parameters
-
cfg | Map of pairs: (config parameter name, config parameter value). |
- Returns
- reference to this parameter structure.
◆ pluginConfig() [2/2]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Function with a rvalue parameter.
- Parameters
-
cfg | rvalue map of pairs: (config parameter name, config parameter value). |
- Returns
- reference to this parameter structure.
◆ tag()
◆ desc
The documentation for this class was generated from the following file: