[论文解读] Optimized Loss Functions for Object detection: A Case Study on Nighttime Vehicle Detection
该论文提出了一种用于夜间车辆检测的双优化框架,引入Neg-IoU(用于难负样本分类)和MIoU(基于马氏距离的定位损失)以提升分类与定位之间的相关性。该方法在密集夜间数据集上实现了45.9%的AP和44.8%的AP75,相较于基线模型实现了7.6%的相对AP提升,通过联合优化两种损失函数实现。
Loss functions is a crucial factor that affecting the detection precision in object detection task. In this paper, we optimize both two loss functions for classification and localization simultaneously. Firstly, by multiplying an IoU-based coefficient by the standard cross entropy loss in classification loss function, the correlation between localization and classification is established. Compared to the existing studies, in which the correlation is only applied to improve the localization accuracy for positive samples, this paper utilizes the correlation to obtain the really hard negative samples and aims to decrease the misclassified rate for negative samples. Besides, a novel localization loss named MIoU is proposed by incorporating a Mahalanobis distance between predicted box and target box, which eliminate the gradients inconsistency problem in the DIoU loss, further improving the localization accuracy. Finally, sufficient experiments for nighttime vehicle detection have been done on two datasets. Our results show than when train with the proposed loss functions, the detection performance can be outstandingly improved. The source code and trained models are available at https://github.com/therebellll/NegIoU-PosIoU-Miou.
研究动机与目标
- 为解决夜间车辆检测中负样本误分类的问题,特别是街灯等背景结构被误认为车辆尾灯导致的假阳性问题。
- 解决DIoU损失中梯度不一致的问题,该问题会阻碍收敛与定位精度的提升。
- 通过IoU感知损失函数建立分类头与定位头之间的双向相关性,从而提升检测性能。
- 在具有复杂光照与遮挡条件的真实夜间数据集上验证所提损失函数的有效性。
提出的方法
- 通过将交叉熵损失与基于IoU的系数相乘,引入改进的分类损失,使正负样本的分类均具备定位感知能力。
- 提出MIoU损失,利用预测框与真实框之间的马氏距离,统一中心点距离与归一化距离的梯度方向,消除DIoU中的梯度不一致问题。
- 引入可学习参数γ,用于加权分类损失中的IoU系数,实现对难负样本的自适应强调。
- 采用可学习参数α的加权和形式组合分类损失与定位损失,以在训练过程中平衡两项目标。
- 通过消融实验在两个数据集上优化α与γ,确定实现最佳性能的超参数组合。
- 在两个具有不同光照条件与车辆密度的真实夜间车辆检测数据集上验证方法的有效性。
实验结果
研究问题
- RQ1将IoU信息引入负样本分类是否能减少由类似车辆的背景结构(如街灯)引起的假阳性?
- RQ2用基于马氏距离的损失(MIoU)替代DIoU是否能通过解决梯度不一致问题,提升定位收敛速度与精度?
- RQ3在夜间检测任务中,分类与定位损失项之间的最优平衡系数(α)以及分类头中IoU加权系数(γ)应如何设定?
- RQ4联合优化两种损失函数在真实夜间场景下对mAP与AP75的提升程度如何?
- RQ5所提方法是否能在更高车辆密度与复杂光照条件的数据集中实现良好泛化性能?
主要发现
- 所提方法在Dataset2上实现了45.9%的mAP与44.8%的AP75,相较于基线模型实现了7.6%的相对mAP提升。
- 仅使用Neg-IoU组件即带来2.3%的绝对mAP提升与3.9%的AP75提升,显著减少了由背景结构引起的假阳性检测。
- 在最优超参数设置(α=1.0,γ=1.75)下,该方法在Dataset1上实现了45.7%的mAP与44.0%的AP75,mAP相对提升达7.6%。
- 可视化结果证实,由周围照明引起的假检测显著减少,尤其体现在具有车辆状结构的负样本上。
- MIoU损失有效解决了DIoU中的梯度不一致问题,带来更快的收敛速度与更高的定位精度。
- 消融实验表明,联合优化两种损失函数可获得最高性能,最佳结果出现在α=1.0与γ=1.75时。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。