OpenCV 4.12.0
開源計算機視覺
載入中...
搜尋中...
無匹配項
cv::gapi::onnx::ep::OpenVINO 結構體參考

此結構體提供用於填充 ONNX OpenVINO 執行提供程式的推理選項的函式。請遵循 https://onnxruntime.llms.tw/docs/execution-providers/OpenVINO-ExecutionProvider.html#summary-of-options更多...

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

cv::gapi::onnx::ep::OpenVINO 的協作圖

公共成員函式

GAPI_WRAP OpenVINO (const std::map< std::string, std::string > &params)
 類建構函式。
 
GAPI_WRAP OpenVINO (const std::string &dev_type)
 類建構函式。
 
GAPI_WRAP OpenVINOcfgCacheDir (const std::string &dir)
 指定 OpenVINO 執行提供程式快取目錄。
 
GAPI_WRAP OpenVINOcfgEnableDynamicShapes ()
 啟用 OpenVINO 執行提供程式的動態形狀。
 
GAPI_WRAP OpenVINOcfgEnableOpenCLThrottling ()
 啟用 OpenVINO 執行提供程式的 OpenCL 節流。
 
GAPI_WRAP OpenVINOcfgNumThreads (size_t nthreads)
 指定 OpenVINO 執行提供程式的執行緒數。
 

公共屬性

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
 

詳細描述

此結構體提供用於填充 ONNX OpenVINO 執行提供程式的推理選項的函式。請遵循 https://onnxruntime.llms.tw/docs/execution-providers/OpenVINO-ExecutionProvider.html#summary-of-options

建構函式 & 解構函式文件

◆ OpenVINO() [1/2]

GAPI_WRAP cv::gapi::onnx::ep::OpenVINO::OpenVINO ( const std::string & dev_type)
inlineexplicit

類建構函式。

基於裝置型別資訊構造 OpenVINO 引數。

引數
dev_type要使用的目標裝置型別。(“CPU”、“GPU”、“GPU.0”等)

◆ OpenVINO() [2/2]

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

類建構函式。

基於傳遞的選項對映構造 OpenVINO 引數。

引數
params引數名稱及其相應字串值的對映。

成員函式文件

◆ cfgCacheDir()

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

指定 OpenVINO 執行提供程式快取目錄。

此函式用於顯式指定儲存和載入 blob 的路徑,從而啟用模型快取功能。

引數
dir將用作快取的目錄的路徑。
返回
對此引數結構的引用。
此函式的呼叫圖如下

◆ cfgEnableDynamicShapes()

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

啟用 OpenVINO 執行提供程式的動態形狀。

此函式用於為 GPU 裝置啟用 OpenCL 佇列節流(減少使用 GPU 時的 CPU 利用率)。此函式用於啟用與動態形狀模型的工作,該模型的形狀將基於執行時 CPU 中推斷輸入影像/資料的形狀動態設定。

返回
對此引數結構的引用。
此函式的呼叫圖如下

◆ cfgEnableOpenCLThrottling()

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

啟用 OpenVINO 執行提供程式的 OpenCL 節流。

此函式用於為 GPU 裝置啟用 OpenCL 佇列節流(減少使用 GPU 時的 CPU 利用率)。

返回
對此引數結構的引用。
此函式的呼叫圖如下

◆ cfgNumThreads()

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

指定 OpenVINO 執行提供程式的執行緒數。

此函式用於在執行時使用此值覆蓋加速器預設執行緒數。

引數
nthreads執行緒數。
返回
對此引數結構的引用。
此函式的呼叫圖如下

成員資料文件

◆ 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

此結構體的文件由以下檔案生成