Skip to main content
QUICK REVIEW

[论文解读] Class Imbalance in Object Detection: An Experimental Diagnosis and Study of Mitigation Strategies

Nieves Crasto|arXiv (Cornell University)|Mar 11, 2024
Advanced Statistical Methods and ModelsMathematics被引用 3
一句话总结

本文提出了一种基准测试框架,使用自定义的10类长尾数据集(COCO-ZIPF)来研究YOLOv5这一单阶段目标检测器中的前景-前景类别不平衡问题。该研究评估了采样、损失重加权和数据增强策略,发现马赛克(mosaic)和混合(mixup)增强显著提升了平均平均精度(mAP),而采样和损失重加权在该单阶段设置下反而降低了性能。

ABSTRACT

Object detection, a pivotal task in computer vision, is frequently hindered by dataset imbalances, particularly the under-explored issue of foreground-foreground class imbalance. This lack of attention to foreground-foreground class imbalance becomes even more pronounced in the context of single-stage detectors. This study introduces a benchmarking framework utilizing the YOLOv5 single-stage detector to address the problem of foreground-foreground class imbalance. We crafted a novel 10-class long-tailed dataset from the COCO dataset, termed COCO-ZIPF, tailored to reflect common real-world detection scenarios with a limited number of object classes. Against this backdrop, we scrutinized three established techniques: sampling, loss weighing, and data augmentation. Our comparative analysis reveals that sampling and loss reweighing methods, while shown to be beneficial in two-stage detector settings, do not translate as effectively in improving YOLOv5's performance on the COCO-ZIPF dataset. On the other hand, data augmentation methods, specifically mosaic and mixup, significantly enhance the model's mean Average Precision (mAP), by introducing more variability and complexity into the training data. (Code available: https://github.com/craston/object_detection_cib)

研究动机与目标

  • 为解决单阶段目标检测器(如YOLOv5)中前景-前景类别不平衡这一未被充分探索的问题。
  • 构建一个反映真实边缘部署场景(有限目标类别)的小规模、真实感基准数据集(COCO-ZIPF)。
  • 在可复现的基于PyTorch的框架中,评估采样、损失重加权和数据增强策略在缓解类别不平衡方面的有效性。
  • 提供一个模块化、开源的基准测试框架,支持YOLOv5和YOLOv5-nano用于边缘部署。

提出的方法

  • 构建了COCO-ZIPF,即COCO-2017的10类子集,采用齐夫分布(Zipfian distribution)以模拟真实世界的长尾数据,优先考虑常见类别(如'person')和稀有类别(如'truck')。
  • 开发了一个基于PyTorch的基准测试框架,用于YOLOv5s和YOLOv5-nano,以支持可复现的训练以及数据集和缓解技术的模块化集成。
  • 评估了三种缓解策略:类别感知采样(CAS)、重复因子采样(RFS),以及基于各类别频率倒数的类别特定权重进行损失重加权。
  • 应用了数据增强技术,特别是马赛克(mosaic)和混合(mixup),以0.3的概率应用,并探索了针对低频类别优先的改进版本。
  • 使用平均平均精度(mAP)以及损失组件(分类损失和置信度损失)作为主要评估指标,贯穿训练的各个阶段。
  • 将分类损失权重从0.5调整至0.05,以平衡分类损失与置信度损失的影响,尤其是在训练初期。

实验结果

研究问题

  • RQ1在单阶段检测器(如YOLOv5)中,面对前景-前景类别不平衡时,标准的类别不平衡缓解策略(采样、损失重加权、数据增强)表现如何?
  • RQ2这些策略在两阶段检测器与单阶段检测器之间,特别是在长尾检测场景下,其有效性是否存在显著差异?
  • RQ3通过有针对性的数据增强(优先处理低频类别)是否能提升稀有目标的检测性能,同时不损害整体mAP?
  • RQ4损失函数的选择及其组件权重的设定,如何影响长尾目标检测中的模型收敛性和mAP?
  • RQ5马赛克和混合等数据增强技术是否能均匀提升所有类别(包括频繁类和稀有类)的性能?

主要发现

  • 马赛克(mosaic)和混合(mixup)数据增强在YOLOv5s在COCO-ZIPF上训练时显著提升了mAP,采用两种技术的模型mAP超过了基线。
  • 未使用马赛克增强的模型mAP最低,表明在该设置下马赛克对性能至关重要。
  • 即使将分类损失权重从0.5调整至0.05,损失重加权也未能提升mAP,且始终低于基线,表明在单阶段检测器中该方法具有反效果。
  • 采样策略(CAS和RFS)相比基线仅带来mAP的微小下降,表明其在YOLOv5单阶段设置中无效或有害。
  • 增强技术在所有类别中均表现出一致的性能提升,同时改善了过量和欠量表示的类别,无需调整类别特定的采样策略。
  • 通过修改马赛克和混合以优先处理低频类别来增强稀有类别检测的尝试,仅带来微小收益,并导致高频类别性能轻微下降。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。