AP(Average Precision)、mAP(mean Average Precision)

前言

假如一个盒子中A个红球,B个绿球
一个人由于喝醉了在缤纷的光影下去识别红色的球
1.把 a 个红球从 A 中识别出来了,则 a = TP;
2.把 (A - a)个红球识别成绿球了,则(A - a)= TN;
3.把 b 个绿球从 B 中识别出来了,则 b = FP ;
4.把 (B - b)个绿球识别成红球了,则(B - b)= FN;

TP(True Positives)
TN(True Negtives)
FP(False Positives)
FN(False Negtives)

一、Precision

precision=TP / (TP + FP)

二、Recall

recall = TP / (TP + FP)

AP(Average Precision)

画出 Precision - Recall 图(纵轴 Precision ,横轴 Recall )
对应的面积即为 AP

mAP(mean Average Precision)

1.识别绿球得到 AP_green
2.识别红球得到 AP_red
mAP = (AP_green + AP_red) / 2

相关知识

准确率Precision
召回率Recall
其实这个翻译不是很准确

recall最合理的翻译应该是 查全率
而Precision的最合理的翻译应该是查准率

这样就很容易理解了,假设一个班级有10个学生,5男5女
你用机器找女生,机器返回了一下结果:
| 男 | 女 | 女 | 男 | 女 | 男 |

那么查准率为:3/6 = 0.5(返回的6个结果只有3个正确)
查全率为: 3/5 = 0.6 (所有女生有5个,但只找到3个)

然后就是mAP的解释了,一张图可以说明:
图片名称
在这里插入图片描述

在多个类别的检测中,算出召回率从0到1时的准确率(同一召回率取最高的准确率),计算准确率的平均值。然后对所有类别求平均就可以得到mAP了。
在这里插入图片描述

实际的detection比赛中,有多个benchmark。下图是COCO比赛的截图,截止到2017年10月5号:

COCO

AveragePrecision(AP):
AP     % AP at IoU=0.50:0.05:0.95 (primary challenge metric)
AP50    % AP at IoU=0.50 (PASCAL VOC metric)
AP75    % AP at IoU=0.75 (strict metric)

APAcrossScales:
APS    % AP for small objects: area < 322
APM    % AP for medium objects: 322 < area < 962
APL    % AP for large objects: area > 962
AverageRecall(AR):
AR1    % AR given 1 detection per image
AR10    % AR given 10 detections per image
AR100    % AR given 100 detections per image

ARAcrossScales:
ARS    % AR for small objects: area < 322
ARM    % AR for medium objects: 322 < area < 962
ARL    % AR for large objects: area > 962

猜你喜欢

转载自blog.csdn.net/qq_41081593/article/details/112176347
今日推荐