1234567891011121314151617181920212223242526272829303132 |
- #pragma once
- #include "IObjectDetector.h"
- #include <opencv2/opencv.hpp>
- class CNanoDetector :public IObjectDetector
- {
- public:
- CNanoDetector(const char* strModelPath, int iBatchSize = 1, int iInferMode = 0, int iDeviceIndex = 0);
- virtual ~CNanoDetector();
- //初始化对象
- virtual bool Init();
- //释放对象
- virtual bool UnInit();
- //获取对象名
- virtual const char* GetType();
- //执行infer
- virtual bool Execute(cv::Mat& inputImage);
- //获取结果
- virtual bool GetResults(std::vector<DetectorResult>& vecDetectorResults);
- private:
- bool m_bInit;
- int m_iBatchSize;
- int m_iInferMode;
- int m_iDeviceInedx;
- std::string m_strModelFile;
- void* m_pInfer;
- std::vector<DetectorResult> m_vecDetectResult;
- };
|