Skip to main content
QUICK REVIEW

[论文解读] Efficient Graph-Friendly COCO Metric Computation for Train-Time Model Evaluation

Luke Wood, François Chollet|arXiv (Cornell University)|Jul 21, 2022
Advanced Neural Network Applications被引用 6
一句话总结

本文提出了一种图友好、可微分的算法,可直接在深度学习计算图中计算 COCO 平均平均精度(mAP)和召回率,实现训练时的实时评估。该方法与 pycocotools 的结果几乎完全一致(mAP 的平均误差 <0.016),同时支持分布式训练和小批量处理,显著提升了模型迭代效率与训练曲线的可视化效果。

ABSTRACT

Evaluating the COCO mean average precision (MaP) and COCO recall metrics as part of the static computation graph of modern deep learning frameworks poses a unique set of challenges. These challenges include the need for maintaining a dynamic-sized state to compute mean average precision, reliance on global dataset-level statistics to compute the metrics, and managing differing numbers of bounding boxes between images in a batch. As a consequence, it is common practice for researchers and practitioners to evaluate COCO metrics as a post training evaluation step. With a graph-friendly algorithm to compute COCO Mean Average Precision and recall, these metrics could be evaluated at training time, improving visibility into the evolution of the metrics through training curve plots, and decreasing iteration time when prototyping new model versions. Our contributions include an accurate approximation algorithm for Mean Average Precision, an open source implementation of both COCO mean average precision and COCO recall, extensive numerical benchmarks to verify the accuracy of our implementations, and an open-source training loop that include train-time evaluation of mean average precision and recall.

研究动机与目标

  • 在 TensorFlow 和 JAX 等框架的静态计算图中,实现实时、训练时的 COCO mAP 和召回率指标评估。
  • 解决使用 pycocotools 进行训练后评估所存在的局限性,后者会阻碍模型比较并减慢原型开发速度。
  • 开发一种可微分、支持小批量处理的实现,支持分布式训练,并在整个训练过程中实现准确的指标追踪。
  • 提供一种数值鲁棒的 mAP 近似方法,使其与标准 pycocotools 实现高度一致。
  • 发布一个开源、KerasCV 原生的实现,可无缝集成到现代训练流水线中。

提出的方法

  • 提出一种可微分、图兼容的 COCO mAP 和召回率算法,避免使用动态状态和全局统计量,支持图内计算。
  • 通过排序的置信度分数和基于 IoU 的匹配,实现 mAP 的可微分近似,并进行图像内与全局聚合。
  • 应用 IoU 阈值处理和类别特定匹配,以在多个 IoU 阈值(例如 0.5–0.95)下识别真正例和假正例。
  • 使用边界框本身的尺寸对边界框进行面积过滤,而非使用分割图面积,以提升实用性并保持与边界框检测工作流的一致性。
  • 通过可微分操作和基于张量的状态管理,在多个设备间聚合指标,实现分布式评估。
  • 将指标集成到完整的 KerasCV 训练循环中,实现端到端训练,并支持实时指标日志记录。

实验结果

研究问题

  • RQ1COCO mAP 和召回率是否可以在训练期间的静态计算图中被准确且高效地计算?
  • RQ2一种可微分、图友好的 mAP 近似方法,与标准 pycocotools 实现相比,其接近程度如何?
  • RQ3使用边界框面积而非分割图面积进行过滤,会引入多大的数值差异?
  • RQ4训练时对 mAP 和召回率的评估是否能通过学习曲线可视化,显著提升模型开发速度与洞察力?
  • RQ5该实现如何在具有不同边界框数量的小批量设置下,实现分布式训练环境中的可扩展性?

主要发现

  • 所提出的 mAP 近似方法在所有标准 COCO 指标配置下,与 pycocotools 的平均绝对误差为 0.015 ± 0.011。
  • 在非面积过滤配置下,所有运行中的最大误差低于 0.046,中位数误差低于 0.015,表明具有极高的数值保真度。
  • 最大误差增加(最高达 0.202)出现在面积过滤设置中,主要原因是面积计算方法不同:KerasCV 使用边界框面积,而 pycocotools 使用分割图面积。
  • 该实现支持分布式训练和小批量处理,可实现可扩展的、训练期间的实时指标日志记录。
  • 该方法支持 mAP 和召回率的完整训练曲线可视化,显著缩短迭代时间并提升模型比较效率。
  • 作者得出结论:与 pycocotools 基于分割图的面积过滤相比,该方法在实际应用中更具实用性,且对用户更友好,尤其适用于无分割图的用户。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。