Automated Image Recognition Framework

Quang-Binh Nguyen, Trong-Vu Hoang, Ngoc-Do Tran, Tam V. Nguyen, Minh-Triet Tran, Trung-Nghia Le

TL;DR

The Automated Image Recognition (AIR) framework uses generative AI to completely automate the pipeline of dataset creation, data augmentation, and model training. By leveraging large language models (LLMs) for prompt engineering and diffusion models for image synthesis, AIR eliminates the need for manual data labeling while delivering high-performance image classifiers for niche or data-scarce tasks.

What Problem Does This Paper Address?

Deep learning models are notoriously data-hungry, but collecting and labeling thousands of images is a massive bottleneck. This challenge spikes exponentially when dealing with novel, sensitive, or rare scenarios.

Take early forest fire detection as an example. To train a model to spot a fire before it spreads, you need images of tiny plumes of smoke or small localized flames. However, almost all forest fire images on the internet depict massive, fully developed infernos. Intentionally starting real forest fires to take photos is dangerous, expensive, and legally fraught. The authors address this data-scarcity problem by asking: Can we use generative AI to build high-quality, pre-annotated datasets from scratch and automatically train robust classifiers?

Methods

The authors introduce the AIR framework, which splits data synthesis into two distinct pipelines depending on user needs:

  1. AIR-Gen (Dataset Generation): For users starting with zero images. The user simply inputs basic keywords (e.g., "small fire and smoke", "tropical forest"). An automated prompt engineering module powered by GPT-3.5-Turbo expands these into highly detailed, structured prompts using in-context learning. These prompts feed into Stable Diffusion (specifically the Realistic Vision checkpoint) to generate diverse, high-quality images.
  2. AIR-Aug (Data Augmentation): For users who have a small, limited dataset and want to expand it. It uses a CLIP text decoder to reverse-engineer textual prompts directly from the existing images. Stable Diffusion then generates new variations. To bridge the stylistic gap (camera noise, lighting, blur) between real and generated images, an optional CycleGAN style transfer step is applied.
Fig. 1: Overall pipeline of our proposed AIR framework with two primary pro- cesses for data synthesis: AIR-Gen creating new datasets and AIR-Aug gener- ating augmented data for a given dataset.

Duplicated and Outlier Removal

Generative models often repeat themselves or produce completely irrelevant anomalies. To clean the dataset automatically, AIR uses a CLIP ViT-B/16 feature extractor to compute the cosine similarity between all generated image pairs. An empirical distribution adjustment algorithm then automatically filters out near-identical duplicates and irrelevant outliers.

Finally, the framework features a Deep Model Management platform that automatically trains standard backbones (such as ResNet, EfficientNetV2, Vision Transformer, or Swin Transformer) on the synthesized data, providing a turn-key solution for non-experts.

Datasets

The framework was validated using two primary setups:

  • Early Forest Fire Dataset (Newly Synthesized): Generated entirely via AIR-Gen, containing 4,494 "small fire and smoke" images and 4,361 "normal" forest images. This was qualitatively evaluated against the real-world FLAME dataset (aerial imagery of prescribed pile burns).
  • MIT Indoor Scene Dataset (MIT-67): A standard benchmark for indoor scene recognition, used to evaluate the AIR-Aug pipeline by simulating data-scarce environments (using 50% and 100% of the original training set).

Key Insights and Ideas

  • LLMs as Prompt Engineers: Instead of forcing users to master complex prompt engineering syntax (e.g., adding attention weights like (dramatic:1.4) or quality tokens like 4K UHD), an LLM can reliably handle this via in-context learning, significantly boosting the visual diversity and distribution of the generated dataset.
  • The "Early Fire" Feature Space Gap: Feature space visualization (via CLIP) revealed that real internet images of forest fires cluster far away from normal forests because they depict massive blazes. AIR-Gen successfully synthesized early-stage fires that clustered closer to normal forests, capturing the subtle, hard-to-collect features necessary for early warning systems.
  • Style Transfer is Crucial for Augmentation: Simply mixing raw text-to-image variations into a real dataset can introduce domain shock due to differences in textures and generative artifacts. Applying CycleGAN to align the styles prevents the classifier from overfitting to the "generative look."

Key Results

  • Forest Fire Classification: Models trained purely on the AIR-Gen synthesized early forest fire dataset achieved an impressive mean accuracy of 95.48% using a 5-fold cross-validation protocol.
  • MIT-67 Augmentation: Integrating AIR-Aug data with the full MIT-67 training set boosted the top-1 accuracy of an EfficientNetV2 model by roughly 4% (reaching 81.72% from a baseline of 77.54%).
  • Ablation Performance: Removing the duplicate/outlier removal module dropped accuracy by up to 2.03%, and omitting style transfer dropped accuracy by up to 3.22%, proving the necessity of AIR's post-processing steps.

Limitations and Future Work

The framework's data generation quality is fundamentally bound by the underlying text-to-image model. Consequently, AIR struggles in highly specialized domains where Stable Diffusion lacks strong priors, such as medical imaging or highly abstract, non-realistic artwork.

To broaden its real-world utility, the authors plan to expand the framework to support a wider variety of specialized Stable Diffusion checkpoints and implement an automated mechanism to switch between them based on the user's specific target domain.

Summary updated

BibTeX
@inproceedings{nguyen2025automated,
  author = {Quang-Binh Nguyen and Trong-Vu Hoang and Ngoc-Do Tran and Tam V. Nguyen and Minh-Triet Tran and Trung-Nghia Le},
  title = {{Automated Image Recognition Framework}},
  booktitle = {ICCCI},
  year = {2025},
  doi = {10.1007/978-3-032-09321-9\_20},
}
Figure