#ifndef ANSODHUB_H
#define ANSODHUB_H
#pragma once
#include "ANSEngineCommon.h"
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <fstream>
#include <thread>
#include <future>
#include <atomic>
#include <mutex>                // std::mutex, std::unique_lock
#include <cmath>
#include "yolo_v2_class.hpp"    // imported functions from DLL
#include <yolo_v2cpu_class.hpp>
namespace ANSCENTER {
    class ANSENGINE_API ODHUBAPI :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();
        ~ODHUBAPI();
    private:
        bool            _useGPU;
        Detector         *_net =nullptr;
        CPUDetector      *_netCPU=nullptr;
        std::string     _modelFilePath;
        std::string     _modelCfgPath;
    };

}
#endif