#ifndef ANSOPENVINOOD_H
#define ANSOPENVINOOD_H
#pragma once
#include "ANSEngineCommon.h"
#include<openvino/openvino.hpp>
namespace ANSCENTER {
    class ANSENGINE_API OPENVINOOD :public ANSODBase {
    public:
        virtual bool Initialize(std::string licenseKey, ModelConfig modelConfig, const std::string& modelZipFilePath, const std::string& modelZipPassword, std::string& labelMap) override;
        virtual bool LoadModel(const std::string& modelZipFilePath, const std::string& modelZipPassword)override;
        virtual bool LoadModelFromFolder(std::string licenseKey, ModelConfig modelConfig, std::string modelName, std::string className, const std::string& modelFolder, std::string& labelMap)override;
        virtual bool OptimizeModel(bool fp16, std::string& optimizedModelFolder);
        std::vector<Object> RunInference(const cv::Mat& input);
        std::vector<Object> RunInference(const cv::Mat& input, const std::string& camera_id);  

        bool Destroy();
        ~OPENVINOOD();
    private:
        std::string     _modelFilePath;
    private:  
        void InitialModel();
		cv::Mat PreProcessing(const cv::Mat& source);
        cv::Mat resized_frame_;
        cv::Point2f factor_;
        cv::Size2f model_input_shape_;
        cv::Size model_output_shape_;
        ov::Tensor input_tensor_;
        ov::InferRequest inference_request_;
        ov::CompiledModel compiled_model_;  
    };
}
#endif
