Precision, 查全率, 也叫准确率, 指的是预测结果中的, 正确的结果True Positive占所有预测为正确的结果的百分比(Predicted Positive = True Positive + False Positive) , 即以下公式:
Precision = True Positive / (True Positive + False Positive)
Recall, 查准率, 也叫召回率. 指的是预测结果中, 实际上正确的结果(True Positive), 占所有实际上正确结果的百分比(All Positive = True Positive + False Negative), 即以下公式:
Recall = True Positive / (True Positive + False Negative)
在Map Challenge的图像分割比赛中, 计算Precison 和Recall的方法如下:
-
计算预测结果(proposed region)与实际结果(true region)的IoU (Intersection over Union), 选取IoU大于一定阈值的结果.
这里预测结果, 实际结果并不是指整张图片, 而是一片区域. 如下图:
Map Challenge 图像与标注示意图
每一个被标注的房屋, 都是一个实际的region.
-
选取所有IoU大于某一阈值的Annotation, 计算它们的平均Precision和Recall.
以上的文章和代码, 比起Pycocotools的源代码要容易读得多.