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 |
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.
useCoordinates | Toggles 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.
|
inline |
Default constructor required to satisfy the Metric policy.
Definition at line 43 of file iou_metric.hpp.
References IoU< UseCoordinates >::Evaluate().
|
static |
Computes the Intersection over Union metric between of two bounding boxes having pattern bx, by, h, w.
VecTypeA | Type of first vector. |
VecTypeB | Type of second vector. |
a | First vector. |
b | Second vector. |
Referenced by IoU< UseCoordinates >::IoU().
void serialize | ( | Archive & | ar, |
const uint32_t | |||
) |
Serialize the metric.
|
static |
Definition at line 62 of file iou_metric.hpp.