Class Imbalance in Object Detection: An Experimental Diagnosis and Study
  of Mitigation Strategies
Nieves Crasto
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)