Data Augmentation for Image Classification Using Generative AI

Fazle Rahat, M. Shifat Hossain, Md Rubel Ahmed, Sumit Kumar Jha, Rickard Ewetz

TL;DR

Researchers have developed Automated Generative Data Augmentation (AGA), a framework that uses a pipeline of LLMs, diffusion models, and image segmentation to create diverse training data. By isolating original subjects and placing them in AI-generated backgrounds, AGA achieves a massive 15.6% accuracy boost on ImageNet and significantly improves model explainability.

What Problem Does This Paper Address?

Deep learning models are data-hungry. To perform well, especially in "fine-grained" tasks (like distinguishing between two very similar bird species), they need massive, diverse datasets. Traditionally, we use Data Augmentation—flipping, rotating, or cropping images—to "fake" more data. However, these methods don't add much semantic variety.

While Generative AI (like Stable Diffusion) seems like a perfect solution for creating new data, it has a major flaw: subject corruption. If you ask an AI to generate a "prairie chicken on rocks," it might generate something that looks more like a parrot or a generic bird, losing the specific features needed for accurate classification. This paper tackles the challenge of using generative power to diversify backgrounds without ruining the authenticity of the foreground subject.

Methods

The authors propose the Automated Generative Data Augmentation (AGA) framework, which follows a sophisticated three-step pipeline:

  1. Subject Isolation (Masked Image Generation): Instead of letting the AI generate a whole new image, AGA uses GroundingDINO (to find the object) and the Segment Anything Model (SAM) to create a pixel-perfect mask of the original subject. This ensures the "truth" of the object is never altered.
  2. Domain Caption Generation: A Large Language Model (Llama-2) acts as a creative director. It generates diverse background descriptions (e.g., "a bird in a desert on a sunny day") while strictly avoiding the class name (e.g., "bird") to prevent the diffusion model from accidentally "hallucinating" a second subject into the background.
  3. Augmented Image Generation: Stable Diffusion XL generates a new background based on the LLM's prompt. The original, isolated subject is then subjected to affine transformations (scaling, rotating, flipping) and seamlessly merged onto this new AI-generated background.

Datasets

The framework was evaluated on three primary datasets:

  • ImageNet10: A 10-class subset of the massive ImageNet dataset.
  • CUB (Caltech-UCSD Birds-200-2011): A challenging fine-grained dataset of 200 bird species.
  • iWildCam: A dataset of global camera trap images, representing difficult real-world conditions.
  • Out-of-Distribution (OOD) Sets: To test generalizability, they used ImageNet-Sketch and ImageNet-V2.

Key Insights and Ideas

  • Foreground Authenticity is King: The "aha moment" here is that we shouldn't trust generative models to recreate specific subjects. By "cutting out" the real subject and only using AI for the "scenery," the model learns the subject's features more robustly.
  • Breaking the Scaling Ceiling: Previous research suggested that generative augmentation hits a point of diminishing returns after 4x the original dataset size. AGA breaks this, showing continued accuracy improvements even at 10x augmentation.
  • Contextual Robustness: By placing a bird in a desert, a forest, and a snowy mountain, the model learns to ignore the background and focus on the bird itself. This leads to better explainability; Grad-CAM visualizations show that AGA-trained models focus much more tightly on the actual object than baseline models.

Key Results

The quantitative gains are substantial across the board:

  • Accuracy Boost: On ImageNet10, a ResNet-101 model improved from 78.4% to 93.6% (a 15.6% absolute increase).
  • OOD Performance: In out-of-distribution tests (ImageNet-V2), accuracy jumped by 23.5% compared to baseline models.
  • Explainability: The framework achieved a 64.3% improvement in SIC score (Softmax Information Curve), indicating that the models are not just more accurate, but more confident and focused on the right features.
  • SOTA Comparison: AGA outperformed other modern techniques like MixUp, CutMix, and ALIA across multiple benchmarks.

Limitations and Future Work

The authors identify a few "growing pains" for the framework:

  • Visual Inconsistency: Occasionally, the lighting or shadows of the original subject don't perfectly match the AI-generated background, leading to "unnatural" looking images.
  • Subject-Background Compatibility: There are rare cases where the subject and the background are semantically mismatched in a way that might confuse a model (though the results suggest this is currently a minor issue).
  • Future Directions: The team aims to explore more advanced blending techniques to improve the "seamlessness" of the merges and investigate how this method scales to even more complex, multi-object scenes.

Summary updated

BibTeX
@inproceedings{rahat2025data,
  author = {Fazle Rahat and M. Shifat Hossain and Md Rubel Ahmed and Sumit Kumar Jha and Rickard Ewetz},
  title = {{Data Augmentation for Image Classification Using Generative AI}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2025},
  doi = {10.1109/wacv61041.2025.00410},
}
Figure