Lune

CVPR2025Top-tier venue

Repurposing Stable Diffusion Attention for Training-Free Unsupervised Interactive Segmentation

Markus Karmann, Onay Urfalioglu

Abstract

Recent progress in interactive point prompt based Image Segmentation allows to significantly reduce the manual effort to obtain high quality semantic labels. State-of-the-art unsupervised methods use self-supervised pre-trained models to obtain pseudo-labels which are used in training a prompt-based segmentation model. In this paper, we propose a novel unsupervised and training-free approach based solely on the self-attention of Stable Diffusion. We interpret the self-attention tensor as a Markov transition operator, which enables us to iteratively construct a Markov chain. Pixel-wise counting of the required number of iterations along the Markov chain to reach a relative probability threshold yields a Markov-iteration-map, which we simply call a Markov-map. Compared to the raw attention maps, we show that our proposed Markov-map has less noise, sharper semantic boundaries and more uniform values within semantically similar regions. We integrate the Markov-map in a simple yet effective truncated nearest neighbor framework to obtain interactive point prompt based segmentation. Despite being training-free, we experimentally show that our approach yields excellent results in terms of Number of Clicks (NoC), even outperforming state-of-the-art training based unsupervised methods in most of the datasets. Code is available at https://github.com/mkarmann/m2n2.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Emerging Properties in Self-Supervised Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Segment Anything cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • gen2seg: Generative Models Enable Generalizable Instance Segmentation cites High-Resolution Image Synthesis with Latent Diffusion Models
  • gen2seg: Generative Models Enable Generalizable Instance Segmentation cites Emerging Properties in Self-Supervised Vision Transformers
  • gen2seg: Generative Models Enable Generalizable Instance Segmentation cites Segment Anything
  • SDMATTE: Grafting Diffusion Models for Interactive Matting cites High-Resolution Image Synthesis with Latent Diffusion Models
  • SDMATTE: Grafting Diffusion Models for Interactive Matting cites Segment Anything
  • Direct Segmentation without Logits Optimization for Training-Free Open-Vocabulary Semantic Segmentation cites High-Resolution Image Synthesis with Latent Diffusion Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. gen2seg: Generative Models Enable Generalizable Instance SegmentationOm Khangaonkar, Hamed PirsiavashICLR 2026 · 2 citations
  2. SDMATTE: Grafting Diffusion Models for Interactive MattingLongfei Huang, Yu Liang, Hao Zhang, Jinwei Chen et al.ICCV 2025 · 1 citation
  3. Direct Segmentation without Logits Optimization for Training-Free Open-Vocabulary Semantic SegmentationJiahao Li, Yang Lu, Yachao Zhang, Fangyong Wang et al.CVPR 2026

Builds on26

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  2. Segment AnythingAlexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao et al.ICCV 2023 · 13,211 citations
  3. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
  4. Emerging Properties in Self-Supervised Vision TransformersMathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou et al.ICCV 2021 · 8,921 citations
  5. DiffusionDet: Diffusion Model for Object DetectionShoufa Chen, Peize Sun, Yibing Song, Ping LuoICCV 2023 · 715 citations

Related papers

  1. Dataset Diffusion: Diffusion-based Synthetic Data Generation for Pixel-Level Semantic SegmentationQuang Nguyen, Truong Vu, Anh Tran, Khoi NguyenNeurIPS 2023 · 154 citations
  2. Open-Vocabulary Attention Maps with Token Optimization for Semantic Segmentation in Diffusion ModelsPablo Marcos-Manchón, Roberto Alcover-Couso, Juan C. SanMiguel, Jose M. MartínezCVPR 2024 · 9 citations
  3. SeeDiff: Off-the-Shelf Seeded Mask Generation from Diffusion ModelsJoon Hyun Park, Kumju Jo, Sungyong BaikAAAI 2025 · 2 citations
  4. Diffuse, Attend, and Segment: Unsupervised Zero-Shot Segmentation using Stable DiffusionJunjiao Tian, Lavisha Aggarwal, Andrea Colaco, Zsolt Kira et al.CVPR 2024 · 61 citations
  5. Label-Efficient Semantic Segmentation with Diffusion ModelsDmitry Baranchuk, Andrey Voynov, Ivan Rubachev, Valentin Khrulkov et al.ICLR 2022 · 700 citations
Dusk over the sea between two cliffs drawn in fine vertical lines