要计算mAP必须先绘出各类别PR曲线,计算出AP。而如何采样PR曲线,VOC采用过两种不同方法。
在VOC2010以前,只需要选取当Recall >= 0, 0.1, 0.2, …, 1共11个点时的Precision最大值,然后AP就是这11个Precision的平均值。
在VOC2010及以后,需要针对每一个不同的Recall值(包括0和1),选取其大于等于这些Recall值时的Precision最大值,然后计算PR曲线下面积作为AP值。
- AP&mAP
mAP:mean Average Precision,即各类别AP的平均值
AP:PR曲线下面积 - PR曲线
PR曲线:Precision-Recall曲线
Precision(查准率):TP / (TP + FP)
Recall(查全率):TP / (TP + FN)
- TP、FP、FN、TN
TP(True Positive):IoU > IoU t h r e s h o l d _{threshold} threshold(IoU t h r e s h o l d _{threshold} threshold一般取 0.5)的检测框数量(同一Ground Truth只计算一次)
FP(False Positive):IoU <= IoU t h r e s h o l d _{threshold} threshold的检测框,或者是检测到同一个GT的多余检测框的数量
FN(False Negative):没有检测到的GT的数量
TN(True Negative):在mAP评价指标中不会使用到
- 交并比(I