Abstract
This paper explores object detection in the small data regime, where only a limited number of annotated bounding boxes are available due to data rarity and annotation expense. This is a common challenge today with machine learning being applied to many new tasks where obtaining training data is more challenging, e.g. in medical images with rare diseases that doctors sometimes only see once in their life-time. In this work we explore this problem from a generative modeling perspective by learning to generate new images with associated bounding boxes, and using these for training an object detector. We show that simply training previously proposed generative models does not yield satisfactory performance due to them optimizing for image realism rather than object detection accuracy. To this end we develop a new model with a novel unrolling mechanism that jointly optimizes the generative model and a detector such that the generated images improve the performance of the detector. We show this method outperforms the state of the art on two challenging datasets, disease detection and small data pedestrian detection, improving the average precision on NIH Chest X-ray by a relative 20% and localization accuracy by a relative 50%.
Introduction
Deep learning-based object detectors are notoriously data-hungry, typically requiring thousands of annotated bounding boxes to perform reliably. In specialized fields like medical imaging, such data is often scarce because certain conditions are rare and expert annotation is prohibitively expensive. While Generative Adversarial Networks (GANs) can synthesize new training data, standard GANs suffer from a "feedback gap": they are designed to make images look "real" to a discriminator, but visual realism does not guarantee that the data will help a detector learn. Previous attempts at using GANs for data augmentation often lacked a direct mechanism to ensure synthetic images were useful for the detection task.
Methodology: DetectorGAN
We introduce DetectorGAN, a framework that adds a third player to the traditional Generator-Discriminator duo: a Detector. The core innovation is a novel unrolling mechanism designed to bridge the gap between the generator and the detector's performance on real images.
The Unrolling Mechanism
Since real images are not produced by the generator, there is no direct mathematical path (gradient) to link the generator's weights to the detector's performance on real data. To overcome this, we "unroll" one step of the detector's training:
- The detector is updated using a mixture of real and synthetic images.
- The performance of this updated detector is then evaluated on real images.
- This creates a differentiable chain that allows the generator to receive feedback on how its synthetic samples influenced the detector's ability to handle real-world cases.
The framework is built upon the CycleGAN architecture and includes global and local discriminators to ensure inserted objects blend seamlessly into the background without requiring pixel-level segmentation masks.
Experiments and Results
The model was evaluated on two challenging tasks: the NIH Chest X-ray dataset (focusing on lung nodules) and the Cityscapes dataset (focusing on small or occluded pedestrians).
Performance and Utility
DetectorGAN achieved state-of-the-art results on both benchmarks. On the NIH Chest X-ray dataset, it improved Average Precision (AP) by a relative 20% and localization accuracy by a relative 50% compared to baselines. In pedestrian detection, it raised the AP from 0.593 (real data only) to 0.613.
A key insight is that realism does not equal utility. The generator is trained to maximize detection loss on synthetic images while minimizing it on real ones, forcing it to create "hard examples" that challenge the detector. Qualitative evaluations demonstrate that DetectorGAN produces more accurate localizations and fewer false positives than baseline models.
Conclusion
DetectorGAN demonstrates that integrating a detector into the generative training loop significantly improves object detection in small-data regimes. By explicitly teaching the generator to create useful training examples through an unrolling mechanism, we can overcome the limitations of standard GAN-based augmentation. Future work will explore automated placement logic and scaling to multi-class datasets.
Summary updated