Generative Data Augmentation Improves Scribble-supervised Semantic Segmentation

Jacob Schnell, Jieke Wang, Lu Qi, Vincent Tao Hu, Meng TangarXiv 2023

Abstract

Recent advances in generative models, such as diffusion models, have made generating high-quality synthetic images widely accessible. Prior works have shown that training on synthetic images improves many perception tasks, such as image classification, object detection, and semantic segmentation. We are the first to explore generative data augmentations for scribble-supervised semantic segmentation. We propose ScribbleGen, a generative data augmentation method that leverages a ControlNet diffusion model conditioned on semantic scribbles to produce high-quality training data. However, naive implementations of generative data augmentations may inadvertently harm the performance of the downstream segmentor rather than improve it. We leverage classifier-free diffusion guidance to enforce class consistency and introduce encode ratios to trade off data diversity for data realism. Using the guidance scale and encode ratio, we can generate a spectrum of high-quality training images. We propose multiple augmentation schemes and find that these schemes significantly impact model performance, especially in the low-data regime. Our framework further reduces the gap between the performance of scribble-supervised segmentation and that of fully-supervised segmentation. We also show that our framework significantly improves segmentation performance on small datasets, even surpassing fully-supervised segmentation.

Introduction

Semantic segmentation—the task of assigning a class label to every pixel in an image—traditionally requires "full-mask" supervision. These pixel-perfect annotations are labor-intensive and expensive to produce. Weakly-supervised semantic segmentation (WSSS) offers a cost-effective alternative by using "scribbles" (sparse lines) instead of full masks. However, models trained on scribbles historically lag behind their fully-supervised counterparts.

While generative models like Stable Diffusion could theoretically "fill in the blanks" to create more training data, naive integration often introduces noise that confuses the segmentor. This is particularly true when the generative model is trained on small datasets. This paper introduces ScribbleGen, a framework designed to create synthetic images that effectively augment scribble-supervised training.

Methods

ScribbleGen is built upon ControlNet, a modified version of Stable Diffusion 1.5. The framework follows a multi-step process to ensure synthetic data quality and relevance.

The ScribbleGen framework uses ControlNet conditioned on real scribble labels to synthesize high-fidelity images for training a segmentation model.

Conditioned Synthesis and Guidance

The model takes a real scribble map and a text prompt to generate synthetic images. To prevent "hallucinations" (e.g., generating a dog when the label specifies a cat), the authors employ Classifier-Free Guidance (CFG), ensuring the output strictly adheres to the classes defined in the scribbles.

The Encode Ratio ($\lambda$)

A key innovation of this work is the encode ratio ($\lambda$). Instead of generating images from pure noise ($\lambda=1.0$), the system adds a controlled amount of noise to a real image and then denoises it. A high $\lambda$ promotes diversity and creativity, while a low $\lambda$ prioritizes realism by keeping the synthetic image close to the original texture.

Adaptive Sampling Curriculum

The authors propose an Adaptive $\lambda$ Sampling scheme. Early in training, the segmentor is exposed to realistic synthetic images (low $\lambda$). As training progresses, the diversity is increased (higher $\lambda$), providing a curriculum that helps the model generalize without being overwhelmed by noise early on.

Results and Discussion

The framework was evaluated on the Pascal VOC 2012 dataset using ScribbleSup annotations. To test robustness, the authors also created low-data subsets containing 50%, 25%, and 12.5% of the original training data.

ScribbleGen (Ours) significantly improves mIoU compared to naive augmentation and real-only baselines, particularly as the number of real images decreases.

Performance Gains

ScribbleGen improved the mIoU of state-of-the-art scribble-supervised models like AGMM from 78.1% to 78.9% on the full Pascal VOC dataset. More importantly, it significantly narrowed the gap between scribble-based and full-mask supervision.

Success in Low-Data Regimes

In data-scarce environments (12.5% of data), naive augmentation actually degraded performance due to low-quality generations. In contrast, ScribbleGen’s adaptive sampling proved essential, significantly boosting accuracy and even surpassing fully-supervised models in some small-dataset scenarios. This demonstrates that even diffusion models trained on limited data can provide useful augmentation if the encode ratio is properly managed.

Conclusion

ScribbleGen demonstrates that generative data augmentation is a powerful tool for weakly-supervised tasks when diversity and realism are carefully balanced. Future work may explore open-vocabulary models to eliminate the need for class-specific fine-tuning and develop new metrics beyond FID to measure the downstream utility of synthetic data.

Summary updated

BibTeX
@misc{schnell2023generative,
  author = {Jacob Schnell and Jieke Wang and Lu Qi and Vincent Tao Hu and Meng Tang},
  title = {{Generative Data Augmentation Improves Scribble-supervised Semantic Segmentation}},
  year = {2023},
  eprint = {2311.17121},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.17121},
}
Figure