![]() |
Direct Graphical Models
v.1.7.0
|
Sub-module containing classes and methods for evaluation the classification results. More...
![]() |
Classes | |
class | DirectGraphicalModels::CCMat |
Confusion matrix class. More... | |
Functions | |
float | DirectGraphicalModels::getAveragePrecision (const vec_byte_t &predictions, const vec_float_t &potentials, const vec_byte_t >, byte state) |
Returns Average Precision for the selected state (class) state. More... | |
Sub-module containing classes and methods for evaluation the classification results.
float DirectGraphicalModels::getAveragePrecision | ( | const vec_byte_t & | predictions, |
const vec_float_t & | potentials, | ||
const vec_byte_t & | gt, | ||
byte | state | ||
) |
Returns Average Precision for the selected state (class) state.
This function analyses 3 values of every image pixel, namely the predicted state, the groundtruth state and the potential of the pixel to be the class state, passed to the function via the arguments: predictions, gt and potentials, respectively. First, the pixels are sorted by the potentials in descending order. After that, the following algorithm is applied:
where AP stays for Average Precision.
predictions | The most probable configuration, returned by the CDecode::decode() function |
potentials | The potential values for each node of the graph, returned by the CInfer::getPotentials(state) function |
gt | The groundtruth values for each node of the graph. May be converted from a groundtruth image as follows: vec_byte_t gt(gtImg.data, gtImg.data + gtImg.cols * gtImg.rows); |
state | The state (class) for which the Average Precision is calculated |
Definition at line 6 of file AveragePrecision.cpp.