2 #ifndef _NNDEPLOY_DETECT_DETECT_UTIL_H_
3 #define _NNDEPLOY_DETECT_DETECT_UTIL_H_
39 float xmin,
float ymin,
float xmax,
float ymax,
const float *scale_factor,
40 float x_offset,
float y_offset,
int ori_width,
int ori_height);
54 const std::array<float, 4> &box,
const float *scale_factor,
float x_offset,
55 float y_offset,
int ori_width,
int ori_height);
70 float computeIOU(
float xmin0,
float ymin0,
float xmax0,
float ymax0,
71 float xmin1,
float ymin1,
float xmax1,
float ymax1);
81 const std::array<float, 4> &box1);
102 const float iou_threshold);
105 const float iou_threshold);
#define NNDEPLOY_CC_API
api
base::Status computeNMS(const DetectResult &src, std::vector< int > &keep_idxs, const float iou_threshold)
float computeIOU(float xmin0, float ymin0, float xmax0, float ymax0, float xmin1, float ymin1, float xmax1, float ymax1)
base::Status fastNMS(const DetectResult &src, std::vector< int > &keep_idxs, const float iou_threshold)
std::array< float, 4 > getOriginBox(float xmin, float ymin, float xmax, float ymax, const float *scale_factor, float x_offset, float y_offset, int ori_width, int ori_height)
Get the Origin Box object.