// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. // // Copyright (C) 2023 Intel Corporation #ifndef OPENCV_GAPI_INFER_BINDINGS_OV_HPP #define OPENCV_GAPI_INFER_BINDINGS_OV_HPP #include #include "opencv2/gapi/own/exports.hpp" // GAPI_EXPORTS #include // GKernelPackage #include // Params #include namespace cv { namespace gapi { namespace ov { // NB: Used by python wrapper // This class can be marked as SIMPLE, because it's implemented as pimpl class GAPI_EXPORTS_W_SIMPLE PyParams { public: GAPI_WRAP PyParams() = default; GAPI_WRAP PyParams(const std::string &tag, const std::string &model_path, const std::string &bin_path, const std::string &device); GAPI_WRAP PyParams(const std::string &tag, const std::string &blob_path, const std::string &device); GAPI_WRAP PyParams& cfgPluginConfig( const std::map &config); GAPI_WRAP PyParams& cfgInputTensorLayout(std::string tensor_layout); GAPI_WRAP PyParams& cfgInputTensorLayout( std::map layout_map); GAPI_WRAP PyParams& cfgInputModelLayout(std::string tensor_layout); GAPI_WRAP PyParams& cfgInputModelLayout( std::map layout_map); GAPI_WRAP PyParams& cfgOutputTensorLayout(std::string tensor_layout); GAPI_WRAP PyParams& cfgOutputTensorLayout( std::map layout_map); GAPI_WRAP PyParams& cfgOutputModelLayout(std::string tensor_layout); GAPI_WRAP PyParams& cfgOutputModelLayout( std::map layout_map); GAPI_WRAP PyParams& cfgOutputTensorPrecision(int precision); GAPI_WRAP PyParams& cfgOutputTensorPrecision( std::map precision_map); GAPI_WRAP PyParams& cfgReshape(std::vector new_shape); GAPI_WRAP PyParams& cfgReshape( std::map> new_shape_map); GAPI_WRAP PyParams& cfgNumRequests(const size_t nireq); GAPI_WRAP PyParams& cfgMean(std::vector mean_values); GAPI_WRAP PyParams& cfgMean( std::map> mean_map); GAPI_WRAP PyParams& cfgScale(std::vector scale_values); GAPI_WRAP PyParams& cfgScale( std::map> scale_map); GAPI_WRAP PyParams& cfgResize(int interpolation); GAPI_WRAP PyParams& cfgResize(std::map interpolation); GBackend backend() const; std::string tag() const; cv::util::any params() const; private: std::shared_ptr> m_priv; }; GAPI_EXPORTS_W PyParams params(const std::string &tag, const std::string &model_path, const std::string &weights, const std::string &device); GAPI_EXPORTS_W PyParams params(const std::string &tag, const std::string &bin_path, const std::string &device); } // namespace ov } // namespace gapi } // namespace cv #endif // OPENCV_GAPI_INFER_BINDINGS_OV_HPP