Turi Create  4.0
turi::object_detection::average_precision_calculator Class Reference

#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 ()
 

Detailed Description

Helper class for computing AP and mAP metrics.

Definition at line 34 of file od_evaluation.hpp.

Constructor & Destructor Documentation

◆ average_precision_calculator()

turi::object_detection::average_precision_calculator::average_precision_calculator ( flex_list  class_labels,
std::vector< float >  iou_thresholds 
)
Parameters
class_labelsEach prediction and ground truth annotation must have a nonnegative identifier indexing into this list.
iou_thresholdsThe 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.

Member Function Documentation

◆ add_row()

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.

◆ evaluate()

variant_map_type turi::object_detection::average_precision_calculator::evaluate ( )

Computes the average precision for each combination of class and requested IOU threshold.

Returns
A map of evaluation results keyed by metric.

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.


The documentation for this class was generated from the following file: