论文标题

计算平均平均精度的平行实现

A Parallel Implementation of Computing Mean Average Precision

论文作者

Wang, Beinan

论文摘要

平均平均精度(MAP)已被广泛用于评估对象探测器的质量,但是仍然没有有效的实现。当前的实现只能计算一次真正的阳性(TP)和假阳性(FP),一次循环通过依次循环循环。这些方法不仅效率低下,而且它们在培训期间报告验证图的不便。我们提出了一种并行的替代方案,可以处理检测到的边界框(DTBB)和地面真相边界框(GTBB)的小批次,因为推断可以在推理完成后立即计算地图。顺序实现中的循环和控制语句被广播,掩蔽和索引的广泛使用所取代。所有涉及的运营商均得到流行的机器学习框架(例如Pytorch和Tensorflow)的支持。结果,我们的实施速度要快得多,并且很容易适应典型的培训例程。我们实施的Pytorch版本可在https://github.com/bwangca/fast-map上获得。

Mean Average Precision (mAP) has been widely used for evaluating the quality of object detectors, but an efficient implementation is still absent. Current implementations can only count true positives (TP's) and false positives (FP's) for one class at a time by looping through every detection of that class sequentially. Not only are these approaches inefficient, but they are also inconvenient for reporting validation mAP during training. We propose a parallelized alternative that can process mini-batches of detected bounding boxes (DTBB's) and ground truth bounding boxes (GTBB's) as inference goes such that mAP can be instantly calculated after inference is finished. Loops and control statements in sequential implementations are replaced with extensive uses of broadcasting, masking, and indexing. All operators involved are supported by popular machine learning frameworks such as PyTorch and TensorFlow. As a result, our implementation is much faster and can easily fit into typical training routines. A PyTorch version of our implementation is available at https://github.com/bwangca/fast-map.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源