Turi Create
4.0
|
#include <toolkits/object_detection/od_evaluation.hpp>
Public Member Functions | |
average_precision_calculator (flex_list class_labels, std::vector< float > iou_thresholds) | |
void | add_row (const std::vector< neural_net::image_annotation > &predictions, const std::vector< neural_net::image_annotation > &ground_truth) |
variant_map_type | evaluate () |
Helper class for computing AP and mAP metrics.
Definition at line 34 of file od_evaluation.hpp.
turi::object_detection::average_precision_calculator::average_precision_calculator | ( | flex_list | class_labels, |
std::vector< float > | iou_thresholds | ||
) |
class_labels | Each prediction and ground truth annotation must have a nonnegative identifier indexing into this list. |
iou_thresholds | The IOU (intersection over union) thresholds at which to compute the average precisions. This threshold determines whether a predicted bounding box and a ground truth bounding box are considered to match. |
void turi::object_detection::average_precision_calculator::add_row | ( | const std::vector< neural_net::image_annotation > & | predictions, |
const std::vector< neural_net::image_annotation > & | ground_truth | ||
) |
Registers the predictions and ground truth annotations for one image.
variant_map_type turi::object_detection::average_precision_calculator::evaluate | ( | ) |
Computes the average precision for each combination of class and requested IOU threshold.
The average precision can be interpreted as the area under the precision-recall curve.
average_precision_50 is a dictionary mapping class label to the average precision for that class label at 50% IOU.
average_precision is a dictionary mapping class label to the average precision for that class label, average across IOU thresholds from 50% to 95%.
mean_average_precision_50 is the mean across class labels of the average_precision_50 values.
mean_average_precision is the mean across class labels of the average_precision values.