The loss function for bounding box regression (BBR) is essential to object detection. Its good definition will bring significant performance improvement to the model. Most existing works assume that the examples in the training data are high-quality and focus on strengthening the fitting ability of BBR loss. If we blindly strengthen BBR on low-quality examples, it will jeopardize localization performance. Focal-EIoU v1 was proposed to solve this problem, but due to its static focusing mechanism (FM), the potential of non-monotonic FM was not fully exploited. Based on this idea, we propose an IoU-based loss with a dynamic non-monotonic FM named Wise-IoU (WIoU). The dynamic non-monotonic FM uses the outlier degree instead of IoU to evaluate the quality of anchor boxes and provides a wise gradient gain allocation strategy. This strategy reduces the competitiveness of high-quality anchor boxes while also reducing the harmful gradient generated by low-quality examples. This allows WIoU to focus on ordinary-quality anchor boxes and improve the detector's overall performance. When WIoU is applied to the state-of-the-art real-time detector YOLOv7, the AP-75 on the MS-COCO dataset is improved from 53.03% to 54.50%. Code is available at https://github.com/Instinct323/wiou.
翻译:边界框回归(BBR)的损失函数对于目标检测至关重要。其良好的定义将显著提升模型的性能。现有的大多数研究假设训练数据中的样本具有高质量,并致力于加强BBR损失的拟合能力。然而,若在低质量样本上盲目强化BBR,将损害定位性能。为解决此问题,Focal-EIoU v1被提出,但由于其静态聚焦机制(FM),非单调FM的潜力未能被充分挖掘。基于这一思路,我们提出了一种基于IoU且具有动态非单调FM的损失函数,命名为Wise-IoU(WIoU)。该动态非单调FM利用离群度而非IoU来评估锚框的质量,并提供一种智能的梯度增益分配策略。该策略在降低高质量锚框竞争力的同时,也减少了低质量样本产生的有害梯度,从而使WIoU能够聚焦于普通质量锚框,提升检测器的整体性能。将WIoU应用于最先进的实时检测器YOLOv7时,在MS-COCO数据集上AP-75从53.03%提升至54.50%。代码开源地址:https://github.com/Instinct323/wiou。