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

Dataset Diffusion: Diffusion-based Synthetic Data Generation for Pixel-Level Semantic Segmentation

Quang Nguyen, Truong Vu, Anh Tran, Khoi Nguyen

TL;DR

This paper introduces "Dataset Diffusion," a novel framework that leverages Stable Diffusion to generate synthetic images with pixel-level semantic segmentation masks. This approach significantly reduces the need for costly manual annotation, enabling the creation of large-scale datasets for training semantic segmentation models.

What Problem Does This Paper Address?

Creating high-quality datasets for semantic segmentation, a crucial task in computer vision for tasks like autonomous driving and scene understanding, is incredibly labor-intensive. Manually annotating every pixel in an image with its class label is time-consuming and expensive. While generative models can create synthetic data, existing methods often only provide image-level labels or struggle with complex, real-world scenes containing multiple interacting objects. This paper aims to bridge this gap by generating realistic images with precise, pixel-level semantic segmentation masks, effectively automating dataset creation.

Methods

The core of "Dataset Diffusion" lies in its innovative use of the text-to-image diffusion model, Stable Diffusion (SD). The authors introduce three key techniques:

  • Class-Prompt Appending: To ensure all target objects are represented, they append explicit class labels to the text prompts used by SD. This helps overcome issues where standard captions might miss certain objects or use different terminology.
  • Class-Prompt Cross-Attention: This technique refines the cross-attention maps generated by SD, focusing specifically on the class labels. This allows for more precise localization of objects within the generated images.
  • Self-Attention Exponentiation: They leverage the self-attention maps from SD to enhance the quality and precision of the generated segmentation masks. By powering the self-attention map before combining it with the cross-attention map, they can propagate information to similar regions, improving mask accuracy.

Additionally, the framework incorporates an uncertainty-aware segmentation loss during the training of the semantic segmenter. This allows the model to disregard uncertain regions in the generated masks, making it more robust to imperfections. They also employ a self-training technique to further refine the segmentation masks.

Datasets

The authors evaluate their method on two established semantic segmentation datasets:

  • PASCAL VOC 2012: A dataset with 20 object classes and 1 background class.
  • COCO 2017: A larger dataset with 80 object classes and 1 background class.

To standardize evaluation, they introduce two new benchmarks:

  • synth-VOC: Synthetic dataset generated using PASCAL VOC's training images and captions.
  • synth-COCO: Synthetic dataset generated using COCO 2017's training images and captions.

These benchmarks are created by using the original dataset's captions (or generating them for VOC) and appending class labels to form the text prompts for Stable Diffusion.

Key Insights and Ideas

  • Leveraging Diffusion Models for Pixel-Level Tasks: The paper demonstrates that powerful text-to-image diffusion models like Stable Diffusion can be adapted beyond image generation to produce valuable pixel-level annotations, opening new avenues for synthetic data generation.
  • The Power of Explicit Class Prompts: Simply appending class names to existing captions significantly improves the ability of diffusion models to generate images that accurately represent all desired objects, addressing a key limitation of prior work.
  • Attention Maps as Implicit Segmentation: The cross-attention and self-attention mechanisms within diffusion models, when cleverly utilized and refined, can act as implicit segmentation cues, providing a foundation for generating masks.
  • Handling Imperfect Data: The inclusion of uncertainty-aware loss and self-training highlights the practical necessity of accounting for the inherent noise and imperfections in synthetically generated data.

Key Results

  • On the synth-VOC benchmark, their approach achieved an impressive mIoU of 64.8, significantly outperforming the concurrent method DiffuMask by 4.2 mIoU.
  • On the synth-COCO benchmark, a DeepLabV3 model trained on their synthetic dataset achieved 34.2 mIoU, compared to 54.9 mIoU for a model trained on real data. While a gap exists, this demonstrates the viability of their synthetic data for training powerful segmenters.
  • The class-prompt appending technique alone improved performance by 7.3 mIoU compared to simple text prompts.
  • Qualitative results show successful generation of complex scenes with multiple objects, though some failure cases were observed with excessively complex prompts or intertwined objects.

Limitations and Future Work

  • Complexity Limitations: The authors acknowledge that Stable Diffusion can struggle with generating images that precisely match excessively complex prompts involving many objects or highly intertwined objects. This can lead to missing objects in the generated images and masks.
  • Dataset Bias: The generated data may inherit biases present in the LAION-5B dataset, on which Stable Diffusion was trained.
  • Future Directions: The paper suggests ongoing research into improving diffusion model guidance (e.g., layout conditions) and addressing dataset bias as promising avenues for future work. They also mention that their framework is primarily designed for common objects in everyday scenes, not specialized domains like medical or aerial imagery.

Summary updated

BibTeX
@inproceedings{nguyen2023dataset,
  author = {Quang Nguyen and Truong Vu and Anh Tran and Khoi Nguyen},
  title = {{Dataset Diffusion: Diffusion-based Synthetic Data Generation for Pixel-Level Semantic Segmentation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=AqYELikTRx},
}
Figure