nndeploy C++ API  0.2.0
nndeploy C++ API
Classes | Functions
nndeploy::detect Namespace Reference

Classes

class  DetectBBoxResult
 Detect Result. More...
 
class  DetectResult
 
class  DrawBox
 
class  YoloMultiConvDrawBox
 

Functions

float computeIOU (const float *boxes, int i, int j)
 
float computeIOU (const std::array< float, 4 > &box0, const std::array< float, 4 > &box1)
 
float computeIOU (float xmin0, float ymin0, float xmax0, float ymax0, float xmin1, float ymin1, float xmax1, float ymax1)
 
base::Status computeNMS (const DetectResult &src, std::vector< int > &keep_idxs, const float iou_threshold)
 
base::Status fastNMS (const DetectResult &src, std::vector< int > &keep_idxs, const float iou_threshold)
 
std::array< float, 4 > getOriginBox (const std::array< float, 4 > &box, const float *scale_factor, float x_offset, float y_offset, int ori_width, int ori_height)
 Get the Origin Box object. More...
 
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. More...
 

Function Documentation

◆ computeIOU() [1/3]

float nndeploy::detect::computeIOU ( const float *  boxes,
int  i,
int  j 
)
Parameters
boxes[xmin0, ymin0, xmax0, ymax0, xmin1, ymin1, xmax1, ymax1]
i
j
Returns
float

◆ computeIOU() [2/3]

float nndeploy::detect::computeIOU ( const std::array< float, 4 > &  box0,
const std::array< float, 4 > &  box1 
)
Parameters
box0[xmin0, ymin0, xmax0, ymax0]
box1[xmin1, ymin1, xmax1, ymax1]
Returns
* float

◆ computeIOU() [3/3]

float nndeploy::detect::computeIOU ( float  xmin0,
float  ymin0,
float  xmax0,
float  ymax0,
float  xmin1,
float  ymin1,
float  xmax1,
float  ymax1 
)
Parameters
xmin0
ymin0
xmax0
ymax0
xmin1
ymin1
xmax1
ymax1
Returns
float

◆ computeNMS()

base::Status nndeploy::detect::computeNMS ( const DetectResult src,
std::vector< int > &  keep_idxs,
const float  iou_threshold 
)
Parameters
src
keep_idxs
iou_threshold
Returns
base::Status

◆ fastNMS()

base::Status nndeploy::detect::fastNMS ( const DetectResult src,
std::vector< int > &  keep_idxs,
const float  iou_threshold 
)

◆ getOriginBox() [1/2]

std::array<float, 4> nndeploy::detect::getOriginBox ( const std::array< float, 4 > &  box,
const float *  scale_factor,
float  x_offset,
float  y_offset,
int  ori_width,
int  ori_height 
)

Get the Origin Box object.

Parameters
box
scale_factor
x_offset
y_offset
ori_width
ori_height
Returns
* std::array<float, 4>

◆ getOriginBox() [2/2]

std::array<float, 4> nndeploy::detect::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.

Parameters
xmin
ymin
xmax
ymax
scale_factor
x_offset
y_offset
ori_width
ori_height
Returns
std::array<float, 4>