| OpenCV 5.0.0alpha Open Source Computer Vision

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
cv::gapi::onnx::ep::OpenVINO Struct Reference

This structure provides functions that fill inference options for ONNX OpenVINO Execution Provider. Please follow https://onnxruntime.ai/docs/execution-providers/OpenVINO-ExecutionProvider.html#summary-of-options. More...

`#include <opencv2/gapi/infer/onnx.hpp>`

Collaboration diagram for cv::gapi::onnx::ep::OpenVINO:

## Public Member Functions
GAPI_WRAP | OpenVINO (const std::map< std::string, std::string > &params)
| Class constructor.
GAPI_WRAP | OpenVINO (const std::string &dev_type)
| Class constructor.
GAPI_WRAP OpenVINO & | cfgCacheDir (const std::string &dir)
| Specifies OpenVINO Execution Provider cache dir.
GAPI_WRAP OpenVINO & | cfgEnableDynamicShapes ()
| Enables OpenVINO Execution Provider dynamic shapes.
GAPI_WRAP OpenVINO & | cfgEnableOpenCLThrottling ()
| Enables OpenVINO Execution Provider opencl throttling.
GAPI_WRAP OpenVINO & | cfgNumThreads (size_t nthreads)
| Specifies OpenVINO Execution Provider number of threads.

## Public Attributes
std::string | cache_dir
std::string | device_type
bool | enable_dynamic_shapes = false
bool | enable_opencl_throttling = false
size_t | num_of_threads = 0
std::map< std::string, std::string > | params_map

## Detailed Description

This structure provides functions that fill inference options for ONNX OpenVINO Execution Provider. Please follow https://onnxruntime.ai/docs/execution-providers/OpenVINO-ExecutionProvider.html#summary-of-options.

## Constructor & Destructor Documentation

## ◆ OpenVINO() [1/2]

GAPI_WRAP cv::gapi::onnx::ep::OpenVINO::OpenVINO | ( | const std::string & | dev_type | ) |
| inline explicit

Class constructor.

Constructs OpenVINO parameters based on device type information.

Parameters

  dev_type | Target device type to use. ("CPU", "GPU", "GPU.0" etc)

## ◆ OpenVINO() [2/2]

GAPI_WRAP cv::gapi::onnx::ep::OpenVINO::OpenVINO | ( | const std::map< std::string, std::string > & | params | ) |
| inline explicit

Class constructor.

Constructs OpenVINO parameters based on map of options passed.

Parameters

  params | A map of parameter names and their corresponding string values.

## Member Function Documentation

## ◆ cfgCacheDir()

GAPI_WRAP OpenVINO & cv::gapi::onnx::ep::OpenVINO::cfgCacheDir | ( | const std::string & | dir | ) |
| inline

Specifies OpenVINO Execution Provider cache dir.

This function is used to explicitly specify the path to save and load the blobs enabling model caching feature.

Parameters

  dir | Path to the directory what will be used as cache.

Returns
  reference to this parameter structure.

Here is the call graph for this function:

## ◆ cfgEnableDynamicShapes()

GAPI_WRAP OpenVINO & cv::gapi::onnx::ep::OpenVINO::cfgEnableDynamicShapes | ( |  | ) |
| inline

Enables OpenVINO Execution Provider dynamic shapes.

This function is used to enable OpenCL queue throttling for GPU devices (reduces CPU utilization when using GPU). This function is used to enable work with dynamic shaped models whose shape will be set dynamically based on the infer input image/data shape at run time in CPU.

Returns
  reference to this parameter structure.

Here is the call graph for this function:

## ◆ cfgEnableOpenCLThrottling()

GAPI_WRAP OpenVINO & cv::gapi::onnx::ep::OpenVINO::cfgEnableOpenCLThrottling | ( |  | ) |
| inline

Enables OpenVINO Execution Provider opencl throttling.

This function is used to enable OpenCL queue throttling for GPU devices (reduces CPU utilization when using GPU).

Returns
  reference to this parameter structure.

Here is the call graph for this function:

## ◆ cfgNumThreads()

GAPI_WRAP OpenVINO & cv::gapi::onnx::ep::OpenVINO::cfgNumThreads | ( | size_t | nthreads | ) |
| inline

Specifies OpenVINO Execution Provider number of threads.

This function is used to override the accelerator default value of number of threads with this value at runtime.

Parameters

  nthreads | Number of threads.

Returns
  reference to this parameter structure.

Here is the call graph for this function:

## Member Data Documentation

## ◆ cache_dir

std::string cv::gapi::onnx::ep::OpenVINO::cache_dir

## ◆ device_type

std::string cv::gapi::onnx::ep::OpenVINO::device_type

## ◆ enable_dynamic_shapes

bool cv::gapi::onnx::ep::OpenVINO::enable_dynamic_shapes = false

## ◆ enable_opencl_throttling

bool cv::gapi::onnx::ep::OpenVINO::enable_opencl_throttling = false

## ◆ num_of_threads

size_t cv::gapi::onnx::ep::OpenVINO::num_of_threads = 0

## ◆ params_map

std::map<std::string, std::string> cv::gapi::onnx::ep::OpenVINO::params_map

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

- opencv2/gapi/infer/onnx.hpp