mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge pull request #20856 from TolyaTalamanov:at/cfg-batch-size
G-API: Extend ie::Params to specify batch size * Add cfgBatchSize to ie::Params * Fix comments to review
This commit is contained in:
committed by
GitHub
parent
0cf79155d4
commit
b5a9a6793b
@@ -49,3 +49,9 @@ cv::gapi::ie::PyParams& cv::gapi::ie::PyParams::cfgNumRequests(size_t nireq) {
|
||||
m_priv->cfgNumRequests(nireq);
|
||||
return *this;
|
||||
}
|
||||
|
||||
cv::gapi::ie::PyParams&
|
||||
cv::gapi::ie::PyParams::cfgBatchSize(const size_t size) {
|
||||
m_priv->cfgBatchSize(size);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -237,6 +237,7 @@ struct IEUnit {
|
||||
|
||||
if (params.kind == cv::gapi::ie::detail::ParamDesc::Kind::Load) {
|
||||
net = cv::gimpl::ie::wrap::readNetwork(params);
|
||||
net.setBatchSize(params.batch_size);
|
||||
inputs = net.getInputsInfo();
|
||||
outputs = net.getOutputsInfo();
|
||||
} else if (params.kind == cv::gapi::ie::detail::ParamDesc::Kind::Import) {
|
||||
@@ -1412,11 +1413,11 @@ std::vector<int> cv::gapi::ie::util::to_ocv(const IE::SizeVector &dims) {
|
||||
return toCV(dims);
|
||||
}
|
||||
|
||||
IE::Blob::Ptr cv::gapi::ie::util::to_ie(cv::Mat &blob) {
|
||||
IE::Blob::Ptr cv::gapi::ie::util::to_ie(const cv::Mat &blob) {
|
||||
return wrapIE(blob, cv::gapi::ie::TraitAs::IMAGE);
|
||||
}
|
||||
|
||||
IE::Blob::Ptr cv::gapi::ie::util::to_ie(cv::Mat &y_plane, cv::Mat &uv_plane) {
|
||||
IE::Blob::Ptr cv::gapi::ie::util::to_ie(const cv::Mat &y_plane, const cv::Mat &uv_plane) {
|
||||
auto y_blob = wrapIE(y_plane, cv::gapi::ie::TraitAs::IMAGE);
|
||||
auto uv_blob = wrapIE(uv_plane, cv::gapi::ie::TraitAs::IMAGE);
|
||||
#if INF_ENGINE_RELEASE >= 2021010000
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace util {
|
||||
// test suite only.
|
||||
GAPI_EXPORTS std::vector<int> to_ocv(const InferenceEngine::SizeVector &dims);
|
||||
GAPI_EXPORTS cv::Mat to_ocv(InferenceEngine::Blob::Ptr blob);
|
||||
GAPI_EXPORTS InferenceEngine::Blob::Ptr to_ie(cv::Mat &blob);
|
||||
GAPI_EXPORTS InferenceEngine::Blob::Ptr to_ie(cv::Mat &y_plane, cv::Mat &uv_plane);
|
||||
GAPI_EXPORTS InferenceEngine::Blob::Ptr to_ie(const cv::Mat &blob);
|
||||
GAPI_EXPORTS InferenceEngine::Blob::Ptr to_ie(const cv::Mat &y_plane, const cv::Mat &uv_plane);
|
||||
|
||||
}}}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user