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

Free-Mask: A Novel Paradigm of Integration Between the Segmentation Diffusion Model and Image Editing

Bo Gao, Jianhui Wang, Xinyuan Song, Yangfan He, Fangxu Xing, Tianyu Shi · DOI

TL;DR

This paper introduces Free-Mask, a novel framework that leverages diffusion models and image editing to automatically generate high-quality synthetic datasets for semantic segmentation, eliminating the need for manual annotation. By combining text-to-image generation with advanced editing techniques and an active learning paradigm, Free-Mask creates diverse, realistic multi-instance segmentation data, significantly improving model performance and generalization.

What Problem Does This Paper Address?

Semantic segmentation, a crucial task in computer vision for understanding scenes, typically requires vast amounts of meticulously annotated data. This manual annotation process is incredibly time-consuming and expensive, hindering the development and deployment of segmentation models, especially for complex, real-world scenarios. While recent advancements in text-to-image diffusion models have shown promise in generating synthetic data, existing methods often struggle with generating multiple instances within a single image, leading to issues like object occlusion and inaccurate masks. This limitation restricts the diversity and realism of the generated datasets.

Methods

Free-Mask tackles this challenge by integrating a diffusion model for segmentation with sophisticated image editing capabilities. The core of their approach involves:

  • Diffusion Model for Segmentation: They leverage the attention maps generated by diffusion models (like Stable Diffusion) as a proxy for segmentation masks. These attention maps highlight regions corresponding to text prompts, providing a foundation for mask generation.
  • Image Editing Pipeline: To overcome the limitations of direct diffusion model output, Free-Mask employs a three-step image editing process:
  • Adaptive Matching Thesaurus: This module ensures semantic consistency by identifying appropriate foreground objects that semantically align with the background scene, preventing illogical object placements (e.g., a giraffe in an airport).
  • Foreground Object Location: This technique precisely determines where to place the selected foreground objects within the background image, ensuring realistic positioning and avoiding floating objects.
  • Image Harmonization: This step integrates the foreground objects seamlessly into the background by adjusting lighting and other visual cues, ensuring overall visual consistency.
  • Adversarial Iterative Active Learning: To further refine the generated data and improve model performance, they introduce an active learning paradigm. The generated data is used to train a segmentation model (Mask2Former), which then acts as a "discriminator" to filter out low-quality samples and retain the top-performing ones for subsequent training iterations. This process iteratively enhances both the dataset quality and the segmentation model's capabilities.

Datasets

The authors evaluate their approach on two standard semantic segmentation benchmarks:

  • PASCAL VOC 2012: Used for training and evaluation.
  • Cityscapes: Used for training and evaluation.

They also generate synthetic datasets for training and evaluation, including both single-instance and multi-instance scenarios, aiming to mimic open-world environments.

Key Insights and Ideas

  • Attention Maps as Masks: The paper demonstrates that cross-attention maps from diffusion models can serve as valuable, albeit coarse, initial masks for semantic segmentation, providing a foundation for generating synthetic data.
  • Image Editing is Crucial for Realism: Directly relying on diffusion model outputs for multi-instance segmentation is insufficient. The proposed image editing pipeline (Adaptive Matching Thesaurus, Foreground Object Location, Image Harmonization) is essential for creating realistic and semantically coherent synthetic scenes.
  • Active Learning for Data Curation: The adversarial iterative active learning framework is a powerful way to automatically curate high-quality synthetic data. By using the trained segmentation model to filter generated samples, they achieve a balance between data diversity and accuracy, leading to better model generalization.
  • 70% Filtering is Optimal: Empirical results show that retaining the top 70% of samples based on quality scores consistently yields the best segmentation performance, striking a practical balance between clean data and sample diversity.

Key Results

  • Free-Mask generates high-quality multi-instance segmentation results without manual annotations.
  • The proposed method significantly improves semantic segmentation performance on PASCAL VOC 2012 and Cityscapes datasets compared to existing methods like DiffuMask and Dataset Diffusion, achieving notable mIoU gains. For instance, on VOC2012, their method trained with synthetic data achieves an mIoU of 62.5% (ResNet50), outperforming DiffuMask (57.4%) and Dataset Diffusion (60.5%).
  • The framework demonstrates strong zero-shot segmentation capabilities, achieving state-of-the-art results on unseen classes.
  • The active learning strategy leads to substantial improvements in segmentation accuracy, with mIoU increasing from 68% to nearly 79% on the VOC 2012 validation dataset.
  • Qualitative results show superior handling of occlusions compared to generate-then-segment approaches.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that while their method is effective, it still relies on pre-trained diffusion models and text encoders.
  • The current approach involves a multi-stage pipeline (generation, editing, active learning), and further end-to-end optimization could be explored.
  • Future Work:
    • The authors plan to further extend their method by deriving multi-instance, multi-object segmentation masks directly from the Diffusion Model, aiming for a fully end-to-end augmentation pipeline.
  • They will release their code soon.

Summary updated

BibTeX
@inproceedings{gao2025free,
  author = {Bo Gao and Jianhui Wang and Xinyuan Song and Yangfan He and Fangxu Xing and Tianyu Shi},
  title = {{Free-Mask: A Novel Paradigm of Integration Between the Segmentation Diffusion Model and Image Editing}},
  booktitle = {ACM Multimedia},
  year = {2025},
  doi = {10.1145/3746027.3755191},
}
Figure