mirror of
https://github.com/zebrajr/opencv.git
synced 2025-12-06 12:19:50 +01:00
Merge pull request #20508 from TolyaTalamanov:at/expand-python-pyparams
[G-API] Expand PyParams to support constInput * Wrap constInputs to python * Wrap cfgNumRequests * Fix alignment * Move macro to the line above
This commit is contained in:
parent
24de676a64
commit
ba539eb9aa
|
|
@ -22,17 +22,28 @@ namespace ie {
|
||||||
// This class can be marked as SIMPLE, because it's implemented as pimpl
|
// This class can be marked as SIMPLE, because it's implemented as pimpl
|
||||||
class GAPI_EXPORTS_W_SIMPLE PyParams {
|
class GAPI_EXPORTS_W_SIMPLE PyParams {
|
||||||
public:
|
public:
|
||||||
|
GAPI_WRAP
|
||||||
PyParams() = default;
|
PyParams() = default;
|
||||||
|
|
||||||
|
GAPI_WRAP
|
||||||
PyParams(const std::string &tag,
|
PyParams(const std::string &tag,
|
||||||
const std::string &model,
|
const std::string &model,
|
||||||
const std::string &weights,
|
const std::string &weights,
|
||||||
const std::string &device);
|
const std::string &device);
|
||||||
|
|
||||||
|
GAPI_WRAP
|
||||||
PyParams(const std::string &tag,
|
PyParams(const std::string &tag,
|
||||||
const std::string &model,
|
const std::string &model,
|
||||||
const std::string &device);
|
const std::string &device);
|
||||||
|
|
||||||
|
GAPI_WRAP
|
||||||
|
PyParams& constInput(const std::string &layer_name,
|
||||||
|
const cv::Mat &data,
|
||||||
|
TraitAs hint = TraitAs::TENSOR);
|
||||||
|
|
||||||
|
GAPI_WRAP
|
||||||
|
PyParams& cfgNumRequests(size_t nireq);
|
||||||
|
|
||||||
GBackend backend() const;
|
GBackend backend() const;
|
||||||
std::string tag() const;
|
std::string tag() const;
|
||||||
cv::util::any params() const;
|
cv::util::any params() const;
|
||||||
|
|
|
||||||
|
|
@ -37,3 +37,15 @@ cv::gapi::ie::PyParams cv::gapi::ie::params(const std::string &tag,
|
||||||
const std::string &device) {
|
const std::string &device) {
|
||||||
return {tag, model, device};
|
return {tag, model, device};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cv::gapi::ie::PyParams& cv::gapi::ie::PyParams::constInput(const std::string &layer_name,
|
||||||
|
const cv::Mat &data,
|
||||||
|
TraitAs hint) {
|
||||||
|
m_priv->constInput(layer_name, data, hint);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
cv::gapi::ie::PyParams& cv::gapi::ie::PyParams::cfgNumRequests(size_t nireq) {
|
||||||
|
m_priv->cfgNumRequests(nireq);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user