#ifndef SCRFDOVFaceDetector_H
#define SCRFDOVFaceDetector_H
#pragma once
#include <string.h>
#include <vector>
#include <iostream>
#include <typeinfo>
#include "ANSEngineCommon.h"
namespace ANSCENTER {
    class ANSENGINE_API ANSOVSCRFDFD :public ANSFDBase {
    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;
        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) {
            // Not implemented for future use
            return RunInference(input);
        }
        bool Destroy();
        ~ANSOVSCRFDFD();
    private:
        ModelConfig         _modelConfig;
        std::string        _modelFilePath;
        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_;
        cv::Rect GetBoundingBox(const cv::Rect& src);
        void PreprocessImage(cv::Mat& frame);
        std::vector<Object> PostProcessing();
        InputTransform inputTransform = InputTransform();
        std::vector<std::string> inputsNames;
        std::vector<std::string> outputsNames;

        size_t netInputHeight = 0;
        size_t netInputWidth = 0;
        size_t maxProposalsCount;


    };
}
#endif