Abstract
Semi-supervised object detection (SSOD) often struggles with real-world "long-tailed" data distributions, where majority classes dominate and minority classes suffer from confirmation bias and noise. This paper proposes a Gradient-based Sampling framework for Class Imbalanced SSOD (CI-SSOD). By dynamically reweighting losses, adapting pseudo-label thresholds, and resampling unlabeled data based on training gradients, the framework significantly improves minority class detection without compromising majority class performance.
Introduction: The Challenge of Class Imbalance in SSOD
Standard SSOD algorithms typically assume balanced datasets. However, real-world data is inherently long-tailed. When applied to such data, SSOD models exhibit confirmation bias. This manifests in two primary ways:
- Majority Bias: The model becomes overly proficient at identifying common classes, leading it to mislabel rare objects (e.g., "strollers") as common ones (e.g., "cars"), reinforcing these errors during self-training.
- Noise Overload: Due to the scarcity of minority class examples, even a small number of incorrect pseudo-labels can dominate the training signal, leading to "supervision collapse."
Proposed Framework: Gradient-based Sampling
To address these issues, the authors introduce a framework consisting of three integrated modules that utilize gradient information to balance the learning process.
1. Gradient-based Reweighting (GbR)
GbR monitors the positive and negative gradients produced during training for each class. By solving linear equations to balance these "push and pull" forces, it calculates class weights that prevent the model from drifting toward majority classes.
2. Gradient-based Thresholding (GbT)
Fixed confidence thresholds in SSOD often exclude valid minority class predictions because the model is rarely highly confident in rare categories. GbT adaptively lowers these thresholds for rare classes based on the weights derived from GbR, enabling the model to harvest more minority class pseudo-labels.
3. Class-rebalancing Sampling (CrS)
CrS cleans the training signal by prioritizing unlabeled images where the model shows high confidence in its minority class pseudo-labels, effectively mitigating the impact of noise from incorrect labels.
Experimental Results
The framework was evaluated on MS-COCO, a cross-domain MS-COCO → Object365 task, and the naturally long-tailed LVIS dataset containing over 1,200 categories.
The results demonstrate a substantial boost in performance for minority classes. On the MS-COCO split, minority class AP improved from 1.5% (baseline) to 13.9%—a nearly 10x improvement. Crucially, as shown in the figure above, the significant gain in minority recall is achieved while maintaining stable performance on majority classes. On the challenging LVIS dataset, the method achieved 8.9% mAP, outperforming specialized long-tailed detectors like DASO and Eqlv2.
Conclusion and Future Work
By using gradients as a real-time mirror of model bias, this framework provides a robust solution for CI-SSOD. While the current work focuses on the classification branch, future research could extend these gradient-based techniques to the localization (regression) branch to address imbalances in object scales and sizes.
Code Availability: https://github.com/nightkeepers/CI-SSOD
Summary updated