TL;DR
This paper introduces CMaP-SAM, a novel framework that significantly improves few-shot segmentation by leveraging the Segment Anything Model (SAM). It addresses SAM's limitations in handling continuous position priors and information loss during prompt conversion by introducing a contraction mapping module for robust prior optimization and an adaptive alignment module to bridge the representation gap. This approach achieves state-of-the-art performance on challenging benchmarks.
What Problem Does This Paper Address?
Few-shot segmentation (FSS) aims to identify and segment objects from new categories using only a few annotated examples. While recent methods have benefited from the powerful Segment Anything Model (SAM), they face two critical challenges:
- Information Loss in Prompt Conversion: SAM requires discrete prompts (points, boxes, or masks), but FSS methods often generate continuous probability distributions as "position priors" to guide segmentation. Existing approaches to convert these continuous priors to discrete prompts lead to substantial information loss, especially regarding uncertainty in ambiguous regions.
- Insufficient Utilization of Structural Correlations: Current FSS methods primarily rely on global semantic matching between support and query images for position priors. This overlooks the crucial structural correlations within the query image itself, leading to imprecise boundaries and difficulties with complex object structures or visually similar distractors.
Methods
CMaP-SAM tackles these challenges with three key components:
- Contraction Mapping Prior Module: This is the core innovation. It reformulates position prior optimization as a Banach contraction mapping, providing mathematical guarantees for convergence. This module iteratively refines position priors by:
- Structural Consistency Propagation: Using pixel-wise structural similarity to capture intrinsic correlations within the query image.
- Initial Semantic Anchoring: Preserving semantic guidance from support images to prevent the optimization from getting stuck in local optima based solely on structure.
-
Piecewise Affine Normalization: A novel normalization function that constrains position prior values to [0, 1] while introducing a dynamic range constraint to prevent noise amplification. This iterative process results in a converged prior that balances semantic information and structural integrity.
-
Adaptive Distribution Alignment Module: This module bridges the gap between the continuous probability distributions generated by the prior module and SAM's requirement for binary mask inputs. It intelligently aligns these representations, preserving the rich uncertainty information from the continuous priors and preventing the information loss seen in prior methods that simply quantize to discrete points.
- Foreground-Background Decoupled Refinement Module: This architecture acknowledges the inherent asymmetry between foreground objects (coherent structures) and background regions (complex variations). It processes these regions separately using a multi-scale feature pyramid and a dedicated feature decoupling network, leading to more accurate segmentation masks, especially for objects with complex boundaries.
Datasets
The paper evaluates CMaP-SAM on three standard few-shot segmentation benchmarks:
- PASCAL-5': Constructed from PASCAL VOC 2012, with 20 semantic categories split into 4 folds of 5 classes.
- COCO-20': Based on MS COCO, with 80 categories split into 4 folds of 20 classes, known for its dense annotations and complex scenes.
- FSS-1000: Features 1,000 categories with high inter-class similarity and limited samples per category.
Key Insights and Ideas
- Contraction Mapping for Prior Optimization: Framing position prior refinement as a Banach contraction mapping is a theoretically sound and effective way to ensure convergence and robust optimization, balancing semantic and structural cues.
- Bridging Continuous and Discrete Representations: The adaptive distribution alignment module is crucial for effectively leveraging SAM's capabilities without sacrificing the rich information present in continuous probability distributions.
- Foreground-Background Asymmetry: Explicitly treating foreground and background differently in the refinement stage is key to handling the diverse characteristics of these regions in segmentation tasks.
- SAM as a Powerful Backbone for FSS: The paper demonstrates how SAM can be effectively integrated into FSS frameworks, not just as a segmentation tool but as a component that benefits from well-optimized priors.
Key Results
CMaP-SAM achieves state-of-the-art performance on the evaluated datasets:
- PASCAL-5':
- 1-shot: 71.1 mIoU (outperforming previous best specialized method by 5.5 points and general model FSS-SAM by 2.6 points).
- 5-shot: 76.3 mIoU.
- COCO-20':
- 1-shot: 56.1 mIoU (outperforming FSS-SAM by 16.1 points).
- 5-shot: 65.3 mIoU.
Qualitative results show robust segmentation across various challenging scenarios, including scale variations, occlusions, and complex backgrounds.
Limitations and Future Work
The authors acknowledge the following limitations and suggest future directions:
- Computational Overhead: CMaP-SAM inherits SAM's large ViT-based image encoder, leading to higher FLOPs and lower inference speed compared to lightweight CNN-based methods.
- Performance Saturation: Similar to other FSS methods, performance improvement plateaus as the number of support samples increases.
- Future Work:
- Explore lightweight SAM variants (e.g., EfficientSAM), pruning, or distillation for improved efficiency.
- Develop meta-learned prompt generators for more efficient and scalable real-world applications.
- Investigate further improvements in handling extreme cases where foreground and background appearances are highly similar or where the method fails.
Summary updated