1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #pragma once
- #ifdef ORTTOOLKIT
- #define ORTTOOLKIT __declspec(dllexport)
- #else
- #define ORTTOOLKIT __declspec(dllimport)
- #endif
- #include <vector>
- #include <array>
- namespace OrtToolkit {
- namespace Type {
- //基本数据类型
- typedef std::array<float, 2> Base_Type_fPoint;
- typedef std::array<int, 2> Base_Type_iPoint;
- typedef std::array<float, 4> Base_Type_Box;
- typedef float Base_Type_Score;
- //高级数据类型
- typedef std::vector<Base_Type_Box> Type_Boxs;
- typedef std::vector<Base_Type_Score> Type_Scores;
- typedef std::vector<Base_Type_Score> 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<Base_Type_iPoint, 5> LandmarksPointSet;
- std::array<Base_Type_Score, 5> 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<std::array<Base_Type_iPoint, 5>> LandmarksPoints;
- std::vector<std::array<Base_Type_Score, 5>> 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<Base_Type_iPoint, 5> LandmarksPoint;
- std::array<Base_Type_Score, 5> LandmarksScore;
- int life;
- int id;
- int disappear;
- };
- }
- }
|