目标检测评估指标
1.对于目标检任务,分为单类别和多类别
单类别 AP:(average pression)
多类别 mAP:(mean average precision)
2.计算AP
已知:图片上有N个groundtruth,M个预测的bounding box,以及每个预测目标的confidence
-
step1: 先将bounding box 按照 confidence排序
-
step2:对每个bounding box遍历,若与任意groundtruth的IOU大于阈值,则该bounding box 视为 TP,反之为FP
-
step3: 对每个bounding box遍历,会得到recall和pre,其中
recall = TP/(TP+FN) = TP/(N)
、precession = TP/(TP+FP)
其中 TP+FN = N(N为总GT个数),最后得到M个recall,M个precession -
step4: 计算PR曲线下面积
若绘制PR曲线,横轴为Recall,纵轴为Precession
BB | confidence | GT
----------------------
BB1 | 0.9 | 1
----------------------
BB2 | 0.9 | 1
----------------------
BB1 | 0.8 | 1
----------------------
BB3 | 0.7 | 0
----------------------
BB4 | 0.7 | 0
----------------------
BB5 | 0.7 | 1
----------------------
BB6 | 0.7 | 0
----------------------
BB7 | 0.7 | 0
----------------------
BB8 | 0.7 | 1
----------------------
BB9 | 0.7 | 1
----------------------
共有7个GT,TP为(BB1,BB2,BB5,BB8,BB9)
rank=1 precision=1.00(1/1) and recall=0.14(1/1+6)
----------
rank=2 precision=1.00(2/2) and recall=0.29(2/2+5)
----------
rank=3 precision=0.66(2/2+1) and recall=0.29(2/2+5)
----------
rank=4 precision=0.50(2/2+1)and recall=0.29(2/2+5)
----------
rank=5 precision=0.40(2/2+3)and recall=0.29(2/2+5)
----------
rank=6 precision=0.50(3/3+3) and recall=0.43(3/3+4)
----------
rank=7 precision=0.43(3/3+4) and recall=0.43(3/3+4)
----------
rank&#