Adapters#

class InferenceAdapter#

Subclassed by OpenVINOInferenceAdapter

Public Functions

virtual ~InferenceAdapter() = default#
virtual InferenceOutput infer(const InferenceInput &input) = 0#
virtual void infer(const InferenceInput &input, InferenceOutput &output) = 0#
virtual void setCallback(std::function<void(ov::InferRequest, CallbackData)> callback) = 0#
virtual void inferAsync(const InferenceInput &input, CallbackData callback_args) = 0#
virtual bool isReady() = 0#
virtual void awaitAll() = 0#
virtual void awaitAny() = 0#
virtual size_t getNumAsyncExecutors() const = 0#
virtual void loadModel(const std::shared_ptr<const ov::Model> &model, ov::Core &core, const std::string &device = "", const ov::AnyMap &compilationConfig = {}, size_t max_num_requests = 0) = 0#
virtual ov::PartialShape getInputShape(const std::string &inputName) const = 0#
virtual ov::PartialShape getOutputShape(const std::string &inputName) const = 0#
virtual ov::element::Type_t getInputDatatype(const std::string &inputName) const = 0#
virtual ov::element::Type_t getOutputDatatype(const std::string &outputName) const = 0#
virtual std::vector<std::string> getInputNames() const = 0#
virtual std::vector<std::string> getOutputNames() const = 0#
virtual const ov::AnyMap &getModelConfig() const = 0#
class OpenVINOInferenceAdapter : public InferenceAdapter#

Public Functions

OpenVINOInferenceAdapter() = default#
virtual InferenceOutput infer(const InferenceInput &input) override#
virtual void infer(const InferenceInput &input, InferenceOutput &output) override#
virtual void inferAsync(const InferenceInput &input, const CallbackData callback_args) override#
virtual void setCallback(std::function<void(ov::InferRequest, const CallbackData)> callback)#
virtual bool isReady()#
virtual void awaitAll()#
virtual void awaitAny()#
virtual void loadModel(const std::shared_ptr<const ov::Model> &model, ov::Core &core, const std::string &device = "", const ov::AnyMap &compilationConfig = {}, size_t max_num_requests = 1) override#
virtual size_t getNumAsyncExecutors() const#
virtual ov::PartialShape getInputShape(const std::string &inputName) const override#
virtual ov::PartialShape getOutputShape(const std::string &outputName) const override#
virtual ov::element::Type_t getInputDatatype(const std::string &inputName) const override#
virtual ov::element::Type_t getOutputDatatype(const std::string &outputName) const override#
virtual std::vector<std::string> getInputNames() const override#
virtual std::vector<std::string> getOutputNames() const override#
virtual const ov::AnyMap &getModelConfig() const override#