Gen2Det: Generate to Detect

Saksham Suri, Fanyi Xiao, Animesh Sinha, Sean Culatana, Raghuraman Krishnamoorthi, Chenchen Zhu, Abhinav Shrivastava · DOI

Abstract

Training high-performance object detectors is often bottlenecked by the availability of large-scale, accurately labeled datasets, particularly for rare object categories. Gen2Det introduces a modular pipeline that leverages diffusion-based grounded inpainting to generate realistic, scene-centric synthetic training data. By integrating intelligent filtering and a modified training recipe, Gen2Det significantly improves detection performance in long-tailed and low-data regimes, outperforming traditional "copy-paste" synthetic data methods.

Introduction

State-of-the-art object detection relies heavily on massive datasets. However, for rare objects—the "long tail" of data distributions—collecting sufficient real-world examples is often prohibitively expensive. Previous attempts to use synthetic data typically relied on "object-centric" generation: creating a single object, segmenting it, and pasting it onto a background. This approach often results in unrealistic lighting, shadows, and perspective, and requires complex, high-quality segmentation masks.

Gen2Det addresses these issues by shifting to a "scene-centric" approach. Instead of pasting, it uses grounded inpainting to render objects directly into existing image layouts, ensuring visual coherence and simplifying the data generation process.

Comparison of Gen2Det with previous object-centric methods and performance on LVIS.

Methods

The Gen2Det pipeline is composed of three primary stages designed to produce and utilize high-quality synthetic data.

1. Grounded Generation

Using a pre-trained grounded inpainting diffusion model (e.g., GLIGEN), Gen2Det takes an existing image layout—defined by bounding boxes and labels—and masks out the objects. The model then re-generates these specific regions based on the provided class labels, ensuring the new objects are naturally integrated into the surrounding scene context.

2. Two-Tier Filtering

To mitigate the risk of "hallucinations" or low-quality artifacts common in generative models, Gen2Det employs a two-tier filtering process:

  • Aesthetic Filtering: A CLIP-based classifier discards visually distorted or unpleasing images.
  • Detector Filtering: A detector trained on real data validates the synthetic images. If the detector cannot identify the requested object within the specified box with high confidence, the annotation is discarded.

3. Modified Training Recipe

To effectively train on a mix of real and synthetic data, the authors introduce several strategies:

  • Batch Sampling: Training batches are mixed at a specific ratio (e.g., 20% synthetic).
  • Background Ignore: To handle unlabeled objects generated by the diffusion model, the training loss is modified to "ignore" high-scoring background regions, preventing the detector from being penalized for finding valid but unlabeled "hallucinations."
  • No Mask Loss: Since synthetic data only provides bounding boxes, segmentation mask loss is skipped for these samples.
The Gen2Det pipeline: from grounded inpainting to filtered synthetic data for detector training.

Experiments and Results

The authors evaluated Gen2Det on the LVIS (long-tailed) and COCO (standard) benchmarks, as well as a "Low-Data COCO" (LD-COCO) subset.

Key Results

  • LVIS Performance: Gen2Det improved Box AP by 2.13 points and Mask AP by 1.84 points over a real-data baseline. The most significant gains were seen in rare categories, with an improvement of nearly 3 points in AP.
  • Low-Data Efficiency: In the 1% COCO regime, Gen2Det provided a substantial +3.08 Box AP boost.
  • Operational Efficiency: Gen2Det is 3.4x faster to train than previous state-of-the-art methods like XPaste because it eliminates the need for generating expensive segmentation masks.

Insights

The success of Gen2Det highlights that context is critical; generating objects in-situ via inpainting allows models to learn more robust features. Furthermore, the "Background Ignore" strategy and rigorous filtering are essential to prevent generative noise from degrading detector performance.

Conclusion

Gen2Det demonstrates that scene-centric grounded generation is a powerful and efficient way to augment object detection datasets. While it significantly boosts performance for rare classes and low-data scenarios, future work may focus on generating high-fidelity segmentation masks directly and further optimizing the balance between synthetic data diversity and fidelity.

Summary updated

BibTeX
@misc{suri2023gen,
  author = {Saksham Suri and Fanyi Xiao and Animesh Sinha and Sean Culatana and Raghuraman Krishnamoorthi and Chenchen Zhu and Abhinav Shrivastava},
  title = {{Gen2Det: Generate to Detect}},
  year = {2023},
  eprint = {2312.04566},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.04566},
}
Figure