Granular Computing-driven SAM: From Coarse-to-Fine Guidance for Prompt-Free Segmentation

Qiyang Yu, Yu Fang, Tianrui Li, Xuemei Cao, Yan Chen, Jianghao Li, Fan Min, Yi Zhang · OpenReview

Abstract

Prompt-free image segmentation aims to generate accurate masks without manual guidance. Typical pre-trained models, notably Segmentation Anything Model (SAM), generate prompts directly at a single granularity level. However, this approach has two limitations: (1) Localizability, lacking mechanisms for autonomous region localization; (2) Scalability, limited fine-grained modeling at high resolution. To address these challenges, we introduce Granular Computing-driven SAM (Grc-SAM), a coarse-to-fine framework motivated by Granular Computing (GrC). First, the coarse stage adaptively extracts high-response regions from features to achieve precise foreground localization and reduce reliance on external prompts. Second, the fine stage applies finer patch partitioning with sparse local swin-style attention to enhance detail modeling and enable high-resolution segmentation. Third, refined masks are encoded as latent prompt embeddings for the SAM decoder, replacing handcrafted prompts with an automated reasoning process. By integrating multi-granularity attention, Grc-SAM bridges granular computing with vision transformers. Extensive experimental results demonstrate Grc-SAM outperforms baseline methods in both accuracy and scalability.

Introduction

The Segment Anything Model (SAM) has significantly advanced computer vision, yet it remains hindered by a "prompting" bottleneck. Achieving high-quality masks typically necessitates manual point or box inputs. While SAM's Automatic Mask Generation (SAM-AMG) mode exists, it relies on a computationally expensive brute-force grid-sampling approach that often fails to capture fine-grained details or semantically critical regions.

Grc-SAM addresses these challenges by making SAM truly "prompt-free" through a coarse-to-fine approach inspired by Granular Computing. This framework automatically identifies semantically important regions to guide segmentation, resulting in higher accuracy and a massive 87% reduction in inference time compared to SAM’s standard automatic mode.

Methodology: Granular Computing in Vision

Grc-SAM treats image segmentation as a hierarchical process of refining "granules" of information, moving from global context to local precision.

Architecture of Grc-SAM showing the coarse-to-fine mask generation process.

Coarse Stage: Global Guidance

Instead of blind point sampling, the model employs an adaptive multi-layer global attention fusion strategy. By analyzing attention maps across various encoder layers, the system generates a "coarse importance score." This score effectively identifies high-response foreground regions while filtering out irrelevant background noise.

Fine Stage: Local Refinement

Once regions of interest are identified, the model applies Sparse Swin-style Attention (W-SSA). This mechanism restricts attention computation to local windows within the high-response regions. By ignoring the background at this stage, Grc-SAM processes high-resolution details without the quadratic memory costs associated with global attention.

Automated Reasoning

The refined masks from the fine stage are encoded as latent prompt embeddings. These are fed directly into the SAM decoder, replacing manual prompts with an automated, end-to-end reasoning process. This shift from global to sparse local attention reduces time complexity to $O(\rho \times N)$, where $\rho$ represents the proportion of the image containing the target object.

Experimental Results

The framework was evaluated across five diverse datasets, including ADE20K, PASCAL VOC 2012, ISIC, and Oxford-IIIT Pet, covering both multi-class and specialized binary segmentation tasks.

Comparison of Grc-SAM with state-of-the-art methods on ADE20K and PASCAL VOC datasets.

Grc-SAM demonstrates that computational efficiency can coexist with high accuracy:

  • Efficiency: Compared to SAM-AMG, Grc-SAM reduces FLOPs by 44% and slashes inference time by 87% (from ~1198ms to ~159ms per image).
  • Accuracy: On the PASCAL VOC benchmark, it achieved a mean Intersection-over-Union (mIoU) of 79.5%, surpassing both the original SAM and HQ-SAM.
  • Generalization: The model showed strong performance on the Oxford-IIIT Pet dataset (89.6% Dice score), indicating a superior ability to handle complex textures like fur compared to brute-force methods.

Conclusion and Future Work

Grc-SAM successfully bridges the gap between traditional Granular Computing and modern Vision Transformers. While it excels in natural scenes, its performance on specialized medical datasets like ISIC was slightly lower than task-specific models like U²-Net, suggesting that domain-specific priors remain valuable for niche applications. Future research will explore integrating patch-level semantic information directly into the segmentation process to further enhance autonomous vision systems.

Summary updated

BibTeX
@misc{yu2025granular,
  author = {Qiyang Yu and Yu Fang and Tianrui Li and Xuemei Cao and Yan Chen and Jianghao Li and Fan Min and Yi Zhang},
  title = {{Granular Computing-driven SAM: From Coarse-to-Fine Guidance for Prompt-Free Segmentation}},
  year = {2025},
  eprint = {2511.19062},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.19062},
}
Figure