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.

34 lines
632 B

#include "opencv2/opencv.hpp"
#include "GCycleQueue.h"
#include "API_AIDetect.h"
class YOLO:public API_AI_Detector
{
public:
YOLO(int nFrameCnt, bool do_classify);
~YOLO();
// 异步调用接口
void run_detect(GD_VIDEO_FRAME_S img);
// 同步调用接口
int detect(GD_VIDEO_FRAME_S img, bool do_classify = false);
// 获取目标列表
std::vector<AIGO::objinfo>& getTargetVec(bool do_classify = false);
private:
YOLO_ONNX_Detector* m_pYoloModule;
std::vector<AIGO::objinfo> m_targetArray;
YoloParam m_para;
Frame* m_Frame;
private:
void ThreadFuncDetect();
GCycleQueue m_DataQueue;
std::mutex m_mutex;
};