#pragma once #ifdef ORTTOOLKIT #define ORTTOOLKIT __declspec(dllexport) #else #define ORTTOOLKIT __declspec(dllimport) #endif #include #include namespace OrtToolkit { namespace Type { //基本数据类型 typedef std::array Base_Type_fPoint; typedef std::array Base_Type_iPoint; typedef std::array Base_Type_Box; typedef float Base_Type_Score; //高级数据类型 typedef std::vector Type_Boxs; typedef std::vector Type_Scores; typedef std::vector Type_fVec; //为IOU服务的数据类型 ORTTOOLKIT struct Base_Type_Iou { float x1; float y1; float x2; float y2; float score; }; ORTTOOLKIT struct Type_Iou_YOLOV7FACE { float x1; float y1; float x2; float y2; float score; std::array LandmarksPointSet; std::array LandmarksScores; }; //目标检测数据类型基类 ORTTOOLKIT struct ResDetection { Type_Boxs boxes; Type_Scores scores; void clear() { boxes.clear(); scores.clear(); }; }; //目标检测子类 ORTTOOLKIT struct Res_PP_YOLOE :ResDetection {}; ORTTOOLKIT struct Res_YOLOV7_FACE :ResDetection { std::vector> LandmarksPoints; std::vector> LandmarksScores; void clear() { boxes.clear(); scores.clear(); LandmarksPoints.clear(); LandmarksScores.clear(); } }; //人脸特征向量 typedef Type_fVec Res_Arcface; //Iou跟踪器类型 struct ORTTOOLKIT track { Base_Type_Box bbox; Base_Type_Score score; std::array LandmarksPoint; std::array LandmarksScore; int life; int id; int disappear; }; } }