NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Diverse Generation while Maintaining Semantic Coordination: A Diffusion-Based Data Augmentation Method for Object Detection

Sen Nie, Zhuo Wang, Xinxin Wang, Kunlun HearXiv 2024 · DOI

Abstract

Recent studies emphasize the crucial role of data augmentation in enhancing the performance of object detection models. However, existing methodologies often struggle to effectively harmonize dataset diversity with semantic coordination. To bridge this gap, we introduce an innovative augmentation technique leveraging pre-trained conditional diffusion models to mediate this balance. Our approach encompasses the development of a Category Affinity Matrix, meticulously designed to enhance dataset diversity, and a Surrounding Region Alignment strategy, which ensures the preservation of semantic coordination in the augmented images. Extensive experimental evaluations confirm the efficacy of our method in enriching dataset diversity while seamlessly maintaining semantic coordination. Our method yields substantial average improvements of +1.4AP, +0.9AP, and +3.4AP over existing alternatives on three distinct object detection models, respectively.

Introduction

Object detection models are inherently data-hungry, requiring vast amounts of annotated images to generalize effectively across diverse real-world scenarios. While standard augmentation techniques like "Mixup" or "Mosaic" are widely used, they primarily manipulate existing pixels, offering limited diversity. Conversely, newer generative methods that synthesize entirely new objects often suffer from a lack of semantic coordination—the logical relationship between an object and its context.

For example, a generative model might "paste" an alligator into a living room or a toaster onto a highway. While these images are highly diverse, they represent nonsensical scenarios that can confuse a detector, leading to poor performance in real-world contexts where logic matters. The challenge lies in generating data that is "different enough" to help the model learn new features, but "realistic enough" to maintain the semantic integrity of the scene.

Visual comparison of different augmentation strategies across the spectrum of diversity and semantic coordination.

Methodology

We propose a three-stage pipeline designed to bridge the gap between diversity and realism by leveraging the power of conditional diffusion models.

1. Category Affinity Matrix

To ensure that replaced objects fit their surroundings, we utilize a Category Affinity Matrix based on CLIP (Contrastive Language-Image Pre-training) embeddings. Instead of random category replacement, the system calculates the semantic similarity between classes. For instance, the system might replace a dog with a cat or a cow with a horse. By encoding "common sense" into the augmentation process, we ensure the new object remains plausible within the original scene's context.

2. Surrounding Region Alignment

To eliminate the "pasted-on" look common in naive generative augmentations, we employ DDIM Inversion. This technique captures the latent noise structure of the original image's background. During the generation of the new object, the model blends the new "object noise" with the original "background noise." This ensures that lighting, texture, and edges of the new object seamlessly match the existing environment, maintaining the "soul" of the original photograph.

3. Instance-Level Filtering

Not every generation is a success. To maintain high data quality, we use a pre-trained ResNet-50 classifier as a "quality control" gate. If the generated object does not clearly resemble the intended target category, the image is discarded to prevent noisy or ambiguous data from entering the training set.

Experimental Results

The proposed method was evaluated on three major benchmarks: Microsoft COCO, Objects365 (Food subset), and Open Images. Our approach consistently outperformed both "model-free" (Mosaic, Mixup) and "model-based" (X-Paste, SD-Inpaint) baselines.

Detection AP50 performance comparison across different augmentation methods for Faster R-CNN, Mask R-CNN, and YOLOX.

Key Performance Gains

  • COCO Dataset: Our method provided average improvements of +1.4 AP for Faster R-CNN, +0.9 AP for Mask R-CNN, and a significant +3.4 AP for YOLOX compared to other state-of-the-art augmentation methods.
  • Fine-Grained Detection: On the Open Images dataset, the method achieved a +4.4 AP improvement over the "Vanilla" (no augmentation) baseline.
  • The "Goldilocks Zone": Experimental results suggest that a mix of approximately 50-75% real data combined with our synthetic augmentations yields the best performance, successfully balancing the trade-off between overfitting and artifact introduction.

Conclusion and Future Work

Our diffusion-based augmentation framework demonstrates that for object detection, where an object is matters as much as what it is. By maintaining semantic coordination while increasing diversity, we achieve superior performance across multiple architectures. Future research will focus on reducing the computational cost of diffusion-based generation and exploring adaptive thresholding to further automate the pipeline for diverse datasets.

Summary updated

BibTeX
@misc{nie2024diverse,
  author = {Sen Nie and Zhuo Wang and Xinxin Wang and Kunlun He},
  title = {{Diverse Generation while Maintaining Semantic Coordination: A Diffusion-Based Data Augmentation Method for Object Detection}},
  year = {2024},
  eprint = {2408.02891},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.02891},
}
Figure