#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& getTargetVec(bool do_classify = false); private: YOLO_ONNX_Detector* m_pYoloModule; std::vector m_targetArray; YoloParam m_para; Frame* m_Frame; private: void ThreadFuncDetect(); GCycleQueue m_DataQueue; std::mutex m_mutex; };