Introduction
The rapid advancement of deep learning is fundamentally limited by the availability of high-quality, annotated data. For complex perception tasks such as semantic segmentation or depth estimation, manual labeling is prohibitively expensive and time-consuming. For instance, annotating a single frame for the Cityscapes dataset can require up to an hour of human labor. While synthetic data from 3D engines offers a potential solution, it often suffers from a "sim-to-real" gap, lacking the diversity and nuance of natural imagery.
DatasetDM (Dataset Diffusion Model) addresses this challenge by repurposing pre-trained text-to-image diffusion models as versatile "text-to-data" generators. By extracting the rich semantic and geometric representations already embedded within models like Stable Diffusion, DatasetDM can synthesize an infinite stream of high-fidelity images paired with accurate, multi-task annotations.
Methodology: From Pixels to Perception
The DatasetDM framework operates by treating a frozen diffusion model as a feature extractor and adding a lightweight, unified perception decoder.
1. The Perception Decoder (P-Decoder)
Rather than training a new generative model, the authors introduce the P-Decoder, a transformer-based architecture designed to interface with the internal layers of a diffusion model’s UNet. It processes multi-scale feature maps and cross-attention layers, which naturally contain information about object boundaries, textures, and spatial relationships.
2. Visual Align and Instruct Tuning
To bridge the gap between latent features and specific perception tasks, the model undergoes a "tuning" phase. This requires a remarkably small amount of real-world data—typically fewer than 100 images (less than 1% of standard training sets). Through image inversion, these real images are mapped into the diffusion model's latent space, allowing the P-Decoder to learn how to translate internal features into specific outputs like segmentation masks or depth maps.
3. Automated Prompt Engineering with GPT-4
To maximize dataset diversity, DatasetDM utilizes GPT-4 to generate a vast array of descriptive prompts. These prompts guide the diffusion model to create varied scenes, while the P-Decoder simultaneously generates the corresponding ground-truth labels. This integration removes the human-in-the-loop bottleneck for prompt engineering, enabling fully automated data synthesis.
Experimental Evaluation
The authors evaluated DatasetDM across six major benchmarks covering five distinct downstream tasks:
- Semantic Segmentation: Pascal-VOC 2012 and Cityscapes.
- Instance Segmentation: COCO 2017.
- Depth Estimation: NYU Depth V2.
- Pose Estimation: COCO 2017 Pose.
- Fashion Segmentation: DeepFashion-MM.
Key Insights
The "Power of 1%"
One of the most significant findings is the efficiency of the alignment process. By using only 100 labeled images to train the P-Decoder, DatasetDM can generate an infinite volume of high-quality training data. This suggests that diffusion models are "implicit labelers" that already possess a deep understanding of visual structures; the P-Decoder simply translates that internal knowledge into a format humans can use.
Superior Generalization
Models trained on DatasetDM’s synthetic data often outperform those trained on limited real-world data. This is attributed to the diffusion model's "imagination"—its ability to generate a wider distribution of scenarios than those captured in static, physical datasets. On VOC 2012, synthetic data provided a 13.3% mIoU gain over the baseline, while COCO 2017 instance segmentation saw a 12.1% AP increase.
Zero-Shot Capabilities
Leveraging the broad vocabulary of the underlying diffusion model, DatasetDM demonstrates impressive zero-shot performance. It can generate annotations for object categories it was not explicitly trained on during the alignment phase, showcasing the robustness of the learned feature mappings and the model's ability to handle rare or unseen classes.
Conclusion and Future Work
DatasetDM represents a paradigm shift in data generation, moving from manual annotation to automated synthesis. While the quality of synthetic data remains tied to the capabilities of the base diffusion model, the framework provides a scalable, efficient, and high-performance alternative to traditional data collection. The entire training process for the P-Decoder takes roughly 20 hours on a single Tesla V100 GPU, making it highly accessible. Future iterations using more advanced models like SDXL are expected to further narrow the realism gap and expand the complexity of tasks that can be automated.
Summary updated