OpenCV 4.12.0
Open Source Computer Vision
Loading...
Searching...
No Matches
cv::gapi::ie::Params< cv::gapi::Generic > Class Reference

#include <opencv2/gapi/infer/ie.hpp>

Collaboration diagram for cv::gapi::ie::Params< cv::gapi::Generic >:

Public Member Functions

 Params (const std::string &tag, const std::string &model, const std::string &device)
 Params (const std::string &tag, const std::string &model, const std::string &weights, const std::string &device)
 Class constructor.
GBackend backend () const
ParamscfgBatchSize (const size_t size)
ParamscfgContextParams (const cv::util::any &ctx_cfg)
 Specifies configuration for RemoteContext in InferenceEngine.
ParamscfgInferMode (InferMode mode)
Params< cv::gapi::Generic > & cfgInputLayers (const typename PortCfg< cv::gapi::Generic >::In &layer_names)
 Specifies sequence of network input layers names for inference.
ParamscfgInputLayout (detail::AttrMap< std::string > layout_map)
ParamscfgInputLayout (std::string layout)
ParamscfgInputReshape (const std::map< std::string, std::vector< std::size_t > > &reshape_table)
ParamscfgInputReshape (const std::string &layer_name, const std::vector< size_t > &layer_dims)
ParamscfgInputReshape (const std::unordered_set< std::string > &layer_names)
ParamscfgInputReshape (std::map< std::string, std::vector< std::size_t > > &&reshape_table)
ParamscfgInputReshape (std::string &&layer_name, std::vector< size_t > &&layer_dims)
ParamscfgInputReshape (std::unordered_set< std::string > &&layer_names)
ParamscfgNumRequests (size_t nireq)
Params< cv::gapi::Generic > & cfgOutputLayers (const typename PortCfg< cv::gapi::Generic >::Out &layer_names)
 Specifies sequence of network output layers names for inference.
ParamscfgOutputLayout (detail::AttrMap< std::string > layout_map)
ParamscfgOutputLayout (std::string layout)
ParamscfgOutputPrecision (detail::ParamDesc::PrecisionMapT precision_map)
ParamscfgOutputPrecision (detail::ParamDesc::PrecisionT precision)
Params< cv::gapi::Generic > & cfgPreprocessingParams (const cv::gapi::wip::onevpl::Device &device, const cv::gapi::wip::onevpl::Context &ctx)
ParamscfgResize (detail::AttrMap< int > interpolation)
ParamscfgResize (int interpolation)
ParamsconstInput (const std::string &layer_name, const cv::Mat &data, TraitAs hint=TraitAs::TENSOR)
cv::util::any params () const
ParamspluginConfig (const IEConfig &cfg)
ParamspluginConfig (IEConfig &&cfg)
std::string tag () const

Protected Attributes

detail::ParamDesc desc
std::string m_tag

Constructor & Destructor Documentation

◆ Params() [1/2]

cv::gapi::ie::Params< cv::gapi::Generic >::Params ( const std::string & tag,
const std::string & model,
const std::string & weights,
const std::string & device )
inline

Class constructor.

Constructs Params based on model information and sets default values for other inference description parameters. Model is loaded and compiled using OpenVINO Toolkit.

Parameters
tagstring tag of the network for which these parameters are intended.
modelpath to topology IR (.xml file).
weightspath to weights (.bin file).
devicetarget device to use.
Here is the call graph for this function:

◆ Params() [2/2]

cv::gapi::ie::Params< cv::gapi::Generic >::Params ( const std::string & tag,
const std::string & model,
const std::string & device )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

This constructor for pre-compiled networks. Model is imported from pre-compiled blob.

Parameters
tagstring tag of the network for which these parameters are intended.
modelpath to model.
devicetarget device to use.
Here is the call graph for this function:

Member Function Documentation

◆ backend()

GBackend cv::gapi::ie::Params< cv::gapi::Generic >::backend ( ) const
inline
Here is the call graph for this function:

◆ cfgBatchSize()

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgBatchSize ( const size_t size)
inline
See also
ie::Params::cfgBatchSize
Here is the call graph for this function:

◆ cfgContextParams()

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgContextParams ( const cv::util::any & ctx_cfg)
inline

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_cfgcv::util::any value which holds InferenceEngine::ParamMap.
Returns
reference to this parameter structure.

◆ cfgInferMode()

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgInferMode ( InferMode mode)
inline
See also
ie::Params::cfgInferAPI
Here is the call graph for this function:

◆ cfgInputLayers()

Params< cv::gapi::Generic > & cv::gapi::ie::Params< cv::gapi::Generic >::cfgInputLayers ( const typename PortCfg< cv::gapi::Generic >::In & layer_names)
inline

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_namesstd::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.

◆ cfgInputLayout() [1/2]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgInputLayout ( detail::AttrMap< std::string > layout_map)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ cfgInputLayout() [2/2]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgInputLayout ( std::string layout)
inline
See also
ie::Params::cfgInputLayout
Here is the call graph for this function:

◆ cfgInputReshape() [1/6]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgInputReshape ( const std::map< std::string, std::vector< std::size_t > > & reshape_table)
inline
See also
ie::Params::cfgInputReshape
Here is the call graph for this function:

◆ cfgInputReshape() [2/6]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::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.

Here is the call graph for this function:

◆ cfgInputReshape() [3/6]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgInputReshape ( const std::unordered_set< std::string > & layer_names)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Here is the call graph for this function:

◆ cfgInputReshape() [4/6]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgInputReshape ( std::map< std::string, std::vector< std::size_t > > && reshape_table)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Here is the call graph for this function:

◆ cfgInputReshape() [5/6]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgInputReshape ( std::string && layer_name,
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.

Here is the call graph for this function:

◆ cfgInputReshape() [6/6]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgInputReshape ( std::unordered_set< std::string > && layer_names)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Here is the call graph for this function:

◆ cfgNumRequests()

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgNumRequests ( size_t nireq)
inline
See also
ie::Params::cfgNumRequests.
Here is the call graph for this function:

◆ cfgOutputLayers()

Params< cv::gapi::Generic > & cv::gapi::ie::Params< cv::gapi::Generic >::cfgOutputLayers ( const typename PortCfg< cv::gapi::Generic >::Out & layer_names)
inline

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_namesstd::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.

◆ cfgOutputLayout() [1/2]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgOutputLayout ( detail::AttrMap< std::string > layout_map)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ cfgOutputLayout() [2/2]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgOutputLayout ( std::string layout)
inline
See also
ie::Params::cfgOutputLayout
Here is the call graph for this function:

◆ cfgOutputPrecision() [1/2]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgOutputPrecision ( detail::ParamDesc::PrecisionMapT precision_map)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ cfgOutputPrecision() [2/2]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgOutputPrecision ( detail::ParamDesc::PrecisionT precision)
inline
See also
ie::Params::cfgOutputPrecision
Here is the call graph for this function:

◆ cfgPreprocessingParams()

◆ cfgResize() [1/2]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgResize ( detail::AttrMap< int > interpolation)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Here is the call graph for this function:

◆ cfgResize() [2/2]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::cfgResize ( int interpolation)
inline
See also
ie::Params::cfgResize
Here is the call graph for this function:

◆ constInput()

Params & cv::gapi::ie::Params< cv::gapi::Generic >::constInput ( const std::string & layer_name,
const cv::Mat & data,
TraitAs hint = TraitAs::TENSOR )
inline
See also
ie::Params::constInput.
Here is the call graph for this function:

◆ params()

◆ pluginConfig() [1/2]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::pluginConfig ( const IEConfig & cfg)
inline
See also
ie::Params::pluginConfig.
Here is the call graph for this function:

◆ pluginConfig() [2/2]

Params & cv::gapi::ie::Params< cv::gapi::Generic >::pluginConfig ( IEConfig && cfg)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Here is the call graph for this function:

◆ tag()

std::string cv::gapi::ie::Params< cv::gapi::Generic >::tag ( ) const
inline

Member Data Documentation

◆ desc

◆ m_tag

std::string cv::gapi::ie::Params< cv::gapi::Generic >::m_tag
protected

The documentation for this class was generated from the following file: