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.
26 lines
971 B
26 lines
971 B
#ifndef _AIObjectDet__
|
|
#define _AIObjectDet__
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <opencv2/opencv.hpp>
|
|
|
|
class AIObjectDet
|
|
{
|
|
public:
|
|
AIObjectDet();
|
|
float eqprocess(cv::Mat *src, cv::Mat *dst, int width, int height);
|
|
int process(float *output, std::vector<float> &boxes, std::vector<float> &objProbs, std::vector<int> &classId, float *anchor, int grid_h, int grid_w, int stride, int imgsz);
|
|
int quick_sort_indice_inverse(std::vector<float> &input, int left, int right, std::vector<int> &indices);
|
|
float CalculateOverlap(float xmin0, float ymin0, float xmax0, float ymax0, float xmin1, float ymin1, float xmax1, float ymax1);
|
|
int nms(int validCount, std::vector<float> &outputLocations, std::vector<int> classIds, std::vector<int> &order, int filterId, float threshold);
|
|
~AIObjectDet();
|
|
int UpdateClassNum(int nClassNum);
|
|
|
|
public:
|
|
float BOX_THRESH;
|
|
float NMS_THRESH;
|
|
int m_ClassNum;
|
|
int m_PROP_BOX_SIZE;
|
|
};
|
|
#endif |