Papers › From Text to Mask: Localizing Entities Using the Attention of Text-to-Image Diffusion Models

From Text to Mask: Localizing Entities Using the Attention of Text-to-Image Diffusion Models

8 Sep 2023arXiv:2309.04109archive 2025-07-28

Changming Xiao, Qi Yang, Feng Zhou, ChangShui Zhang

Diffusion models have revolted the field of text-to-image generation recently. The unique way of fusing text and image information contributes to their remarkable capability of generating highly text-related images. From another perspective, these generative models imply clues about the precise correlation between words and pixels. In this work, a simple but effective method is proposed to utilize the attention mechanism in the denoising network of text-to-image diffusion models. Without re-training nor inference-time optimization, the semantic grounding of phrases can be attained directly. We evaluate our method on Pascal VOC 2012 and Microsoft COCO 2014 under weakly-supervised semantic segmentation setting and our method achieves superior performance to prior methods. In addition, the acquired word-pixel correlation is found to be generalizable for the learned text embedding of customized generation methods, requiring only a few modifications. To validate our discovery, we introduce a new practical task called "personalized referring image segmentation" with a new dataset. Experiments in various situations demonstrate the advantages of our method compared to strong baselines on this task. In summary, our work reveals a novel way to extract the rich multi-modal knowledge hidden in diffusion models for segmentation.

PaperPDFCode

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

Big-Brother-Pikachu/Text2Mask officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

DenoisingImage GenerationImage SegmentationSegmentationSemantic SegmentationText to Image GenerationText-to-Image GenerationWeakly supervised Semantic SegmentationWeakly-Supervised Semantic Segmentation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Weakly-Supervised Semantic Segmentation COCO 2014 val T2MDiffusion(DeepLabV2-ResNet101) mIoU 45.7 #11 of 39 Archive leaderboard report
Weakly-Supervised Semantic Segmentation PASCAL VOC 2012 test T2MDiffusion(DeepLabV2-ResNet101) Mean IoU 74.2 #11 of 60 Archive leaderboard report
Weakly-Supervised Semantic Segmentation PASCAL VOC 2012 val T2MDiffusion(DeepLabV2-ResNet101) Mean IoU 73.3 #16 of 73 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

DiffusionLatent Diffusion Model

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections