You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
768 B

#include "opencv2/opencv.hpp"
#include "GCycleQueue.h"
#include "API_AIDetect.h"
typedef enum{
IR = 1,
VIS = 2
}MODE;
class YOLO:public API_AI_Detector
{
public:
YOLO(int nFrameCnt, bool do_classify, GD_PIXEL_FORMAT_E pixcelFormat, GLB_SCEN_MODE sceneType);
~YOLO();
// 异步调用接口
void run_detect(GD_VIDEO_FRAME_S img);
// 同步调用接口
int detect(GD_VIDEO_FRAME_S img, bool do_classify = false);
// 获取目标列表
std::vector<AI_Target>& getTargetVec(bool do_classify = false);
private:
YOLO_ONNX_Detector* m_pYoloModule;
std::vector<AI_Target> m_targetArray;
YoloParam m_para;
MODE ImageType; // 图像类型
Frame* m_Frame;
private:
void ThreadFuncDetect();
GCycleQueue m_DataQueue;
std::mutex m_mutex;
};