Refactor project structure
This commit is contained in:
32
modules/ANSODEngine/ANSOPENVINOCL.h
Normal file
32
modules/ANSODEngine/ANSOPENVINOCL.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef ANSOPENVINOCL_H
|
||||
#define ANSOPENVINOCL_H
|
||||
#pragma once
|
||||
#include "ANSEngineCommon.h"
|
||||
#include<openvino/openvino.hpp>
|
||||
namespace ANSCENTER {
|
||||
class ANSENGINE_API OPENVINOCL :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();
|
||||
~OPENVINOCL();
|
||||
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
|
||||
Reference in New Issue
Block a user