1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #18491 from TolyaTalamanov:at/wrap-inference

[G-API] Wrap cv::gapi::infer<Generic> into python

* Introduce generic infer

* Move Generic to infer.hpp

* Removew num_outs

* Fix windows warnings

* Fix comments to review

* Fix doxygen

* Add comment

* Fix comments to review

* Wrap inference to python

* Add default ctor to Params

* Add test

* Fix clang build

* Implement GInferInputs/GInferOutputs as Pimpl

* Add checkIEtarget to infer test

* Fix path

* Supress warning

* Use getAvailableDevices insted of checkIETarget

* Move PyParams to bindings_ie

* Add namespace

* Update CMakeLists.txt
This commit is contained in:
Anatoliy Talamanov
2020-10-26 22:02:03 +03:00
committed by GitHub
parent 36598677cf
commit 93c3775927
9 changed files with 224 additions and 28 deletions
@@ -0,0 +1,39 @@
#include <opencv2/gapi/infer/bindings_ie.hpp>
cv::gapi::ie::PyParams::PyParams(const std::string &tag,
const std::string &model,
const std::string &weights,
const std::string &device)
: m_priv(std::make_shared<Params<cv::gapi::Generic>>(tag, model, weights, device)) {
}
cv::gapi::ie::PyParams::PyParams(const std::string &tag,
const std::string &model,
const std::string &device)
: m_priv(std::make_shared<Params<cv::gapi::Generic>>(tag, model, device)) {
}
cv::gapi::GBackend cv::gapi::ie::PyParams::backend() const {
return m_priv->backend();
}
std::string cv::gapi::ie::PyParams::tag() const {
return m_priv->tag();
}
cv::util::any cv::gapi::ie::PyParams::params() const {
return m_priv->params();
}
cv::gapi::ie::PyParams cv::gapi::ie::params(const std::string &tag,
const std::string &model,
const std::string &weights,
const std::string &device) {
return {tag, model, weights, device};
}
cv::gapi::ie::PyParams cv::gapi::ie::params(const std::string &tag,
const std::string &model,
const std::string &device) {
return {tag, model, device};
}