# Resolving Class Imbalance in Object Detection with Weighted Cross Entropy Losses

arXiv: https://arxiv.org/abs/2006.01413 · HTML: https://mlsanity.com/paper/2006.01413/

## Key facts

- Cited by 21 papers in the map (data through 7 Oct 2026).
- First posted on arXiv 2 Jun 2020.

## Built on by (most cited first, 21 of 21)

- [Performance Evaluation of Deep Transfer Learning on Multiclass Identification of Common Weed Species in Cotton Production Systems](https://mlsanity.com/paper/2110.04960/) (2021)
- [TaskMet: Task-Driven Metric Learning for Model Learning](https://mlsanity.com/paper/2312.05250/) (2023)
- [A Comparative Review of Recent Few-Shot Object Detection Algorithms](https://mlsanity.com/paper/2111.00201/) (2021)
- [Positive-unlabeled Learning for Cell Detection in Histopathology Images with Incomplete Annotations](https://mlsanity.com/paper/2106.15918/) (2021)
- [Understanding the Tricks of Deep Learning in Medical Image Segmentation: Challenges and Future Directions](https://mlsanity.com/paper/2209.10307/) (2022)
- [Caption supervision enables robust learners](https://mlsanity.com/paper/2210.07396/) (2022)
- [Defending Against Physical Adversarial Patch Attacks on Infrared Human Detection](https://mlsanity.com/paper/2309.15519/) (2023)
- [Distributionally Robust Classification on a Data Budget](https://mlsanity.com/paper/2308.03821/) (2023)
- [A Novel real-time arrhythmia detection model using YOLOv8](https://mlsanity.com/paper/2305.16727/) (2023)
- [Lexical Squad@Multimodal Hate Speech Event Detection 2023: Multimodal Hate Speech Detection using Fused Ensemble Approach](https://mlsanity.com/paper/2309.13354/) (2023)
- [Quantification of pulmonary involvement in COVID-19 pneumonia by means of a cascade oftwo U-nets: training and assessment on multipledatasets using different annotation criteria](https://mlsanity.com/paper/2105.02566/) (2021)
- [Target Aware Network Architecture Search and Compression for Efficient Knowledge Transfer](https://mlsanity.com/paper/2205.05967/) (2022)
- [On Data Imbalance in Molecular Property Prediction with Pre-training](https://mlsanity.com/paper/2308.08934/) (2023)
- [Augmentation is AUtO-Net: Augmentation-Driven Contrastive Multiview Learning for Medical Image Segmentation](https://mlsanity.com/paper/2311.01023/) (2023)
- [Detection of Small Targets in Sea Clutter Based on RepVGG and Continuous Wavelet Transform](https://mlsanity.com/paper/2311.07912/) (2023)
- [HSONet:A Siamese foreground association-driven hard case sample optimization network for high-resolution remote sensing image change detection](https://mlsanity.com/paper/2402.16242/) (2024)
- [ATAC-Net: Zoomed view works better for Anomaly Detection](https://mlsanity.com/paper/2406.14398/) (2024)
- [Cardi-GPT: An Expert ECG-Record Processing Chatbot](https://mlsanity.com/paper/2510.24737/) (2025)
- [Detection and Classification of (Pre)Cancerous Cells in Pap Smears: An Ensemble Strategy for the RIVA Cervical Cytology Challenge](https://mlsanity.com/paper/2603.23742/) (2026)
- [A Two-Stage Deep Learning Framework for Segmentation of Ten Gastrointestinal Organs from Coronal MR Enterography](https://mlsanity.com/paper/2604.17118/) (2026)
- [It's All in the Way You Say It: The Role of Information Representation in LLM-Based Glycemic-Event Prediction](https://mlsanity.com/paper/2609.08772/) (2026)

## Abstract (arXiv)

Object detection is an important task in computer vision which serves a lot of real-world applications such as autonomous driving, surveillance and robotics. Along with the rapid thrive of large-scale data, numerous state-of-the-art generalized object detectors (e.g. Faster R-CNN, YOLO, SSD) were developed in the past decade. Despite continual efforts in model modification and improvement in training strategies to boost detection accuracy, there are still limitations in performance of detectors when it comes to specialized datasets with uneven object class distributions. This originates from the common usage of Cross Entropy loss function for object classification sub-task that simply ignores the frequency of appearance of object class during training, and thus results in lower accuracies for object classes with fewer number of samples. Class-imbalance in general machine learning has been widely studied, however, little attention has been paid on the subject of object detection. In this paper, we propose to explore and overcome such problem by application of several weighted variants of Cross Entropy loss, for examples Balanced Cross Entropy, Focal Loss and Class-Balanced Loss Based on Effective Number of Samples to our object detector. Experiments with BDD100K (a highly class-imbalanced driving database acquired from on-vehicle cameras capturing mostly Car-class objects and other minority object classes such as Bus, Person and Motor) have proven better class-wise performances of detector trained with the afore-mentioned loss functions.
