Definition of Intersection over Union metric. More...

Public Member Functions

 IoU ()
 Default constructor required to satisfy the Metric policy. More...

 
template
<
typename
Archive
>
void serialize (Archive &ar, const uint32_t)
 Serialize the metric. More...

 

Static Public Member Functions

template
<
typename
VecTypeA
,
typename
VecTypeB
>
static VecTypeA::elem_type Evaluate (const VecTypeA &a, const VecTypeB &b)
 Computes the Intersection over Union metric between of two bounding boxes having pattern bx, by, h, w. More...

 

Static Public Attributes

static const bool useCoordinates = UseCoordinates
 

Detailed Description


template<bool UseCoordinates = false>
class mlpack::metric::IoU< UseCoordinates >

Definition of Intersection over Union metric.

For bounding box representation there are two common representation either as coordinates i.e. each value in vector represents a coordinate in the format x0, y0, x1, y1 where x0, y0 represent the lower left coordinate and x1, y1, represent upper right coordinate.

Second representation follows the following representation : x0, y0, h, w. Where x0 and y0 are bottom left bounding box coordinates and h, w are height and width of the bounding box.

Template Parameters
useCoordinatesToggles between the two representation of bounding box. If true, each value in vector represents a coordinate in the formate x0, y0, x1, y1. Else the bounding box is represented as x0, y0, h, w.

Definition at line 39 of file iou_metric.hpp.

Constructor & Destructor Documentation

◆ IoU()

IoU ( )
inline

Default constructor required to satisfy the Metric policy.

Definition at line 43 of file iou_metric.hpp.

References IoU< UseCoordinates >::Evaluate().

Member Function Documentation

◆ Evaluate()

static VecTypeA::elem_type Evaluate ( const VecTypeA &  a,
const VecTypeB &  b 
)
static

Computes the Intersection over Union metric between of two bounding boxes having pattern bx, by, h, w.

Template Parameters
VecTypeAType of first vector.
VecTypeBType of second vector.
Parameters
aFirst vector.
bSecond vector.
Returns
IoU of vectors a and b.

Referenced by IoU< UseCoordinates >::IoU().

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)

Serialize the metric.

Member Data Documentation

◆ useCoordinates

const bool useCoordinates = UseCoordinates
static

Definition at line 62 of file iou_metric.hpp.


The documentation for this class was generated from the following file:
  • /home/ryan/src/mlpack.org/_src/mlpack-git/src/mlpack/core/metrics/iou_metric.hpp