[Paper Review] Self-Calibrated Cross Attention Network for Few-Shot Segmentation
This paper proposes a Self-Calibrated Cross Attention Network (SCCAN) for few-shot image segmentation, introducing a novel self-calibrated cross attention (SCCA) module that mitigates background mismatch and foreground-background entanglement by fusing query features with aligned support features through patch-based self- and cross-attention. The method achieves state-of-the-art performance, improving mIoU by 5.6% over prior SOTA on COCO-20i under 5-shot settings.
The key to the success of few-shot segmentation (FSS) lies in how to effectively utilize support samples. Most solutions compress support foreground (FG) features into prototypes, but lose some spatial details. Instead, others use cross attention to fuse query features with uncompressed support FG. Query FG could be fused with support FG, however, query background (BG) cannot find matched BG features in support FG, yet inevitably integrates dissimilar features. Besides, as both query FG and BG are combined with support FG, they get entangled, thereby leading to ineffective segmentation. To cope with these issues, we design a self-calibrated cross attention (SCCA) block. For efficient patch-based attention, query and support features are firstly split into patches. Then, we design a patch alignment module to align each query patch with its most similar support patch for better cross attention. Specifically, SCCA takes a query patch as Q, and groups the patches from the same query image and the aligned patches from the support image as K&V. In this way, the query BG features are fused with matched BG features (from query patches), and thus the aforementioned issues will be mitigated. Moreover, when calculating SCCA, we design a scaled-cosine mechanism to better utilize the support features for similarity calculation. Extensive experiments conducted on PASCAL-5^i and COCO-20^i demonstrate the superiority of our model, e.g., the mIoU score under 5-shot setting on COCO-20^i is 5.6%+ better than previous state-of-the-arts. The code is available at https://github.com/Sam1224/SCCAN.
Motivation & Objective
- To address the limitations of existing few-shot segmentation methods that suffer from background mismatch and foreground-background entanglement when fusing query and support features.
- To preserve spatial details by avoiding prototype compression and instead using cross-attention with aligned support features.
- To enhance feature fusion by simultaneously leveraging self-attention within query features and cross-attention with support features.
- To improve robustness and accuracy in few-shot segmentation through a pseudo mask aggregation module and a scaled-cosine mechanism for attention scoring.
Proposed method
- The SCCA block splits query and support features into patches and uses a patch alignment module to match each query patch with its most similar support patch containing foreground pixels.
- SCCA computes self-attention on query patches and cross-attention between query patches and aligned support patches, enabling query background features to be fused with matched background features from the same query image.
- A scaled-cosine mechanism is introduced to enhance similarity computation between query and support features, encouraging more effective utilization of support features in cross-attention.
- The pseudo mask aggregation (PMA) module generates robust query masks by aggregating all pairwise similarity scores, reducing noise sensitivity compared to methods using only the maximum similarity.
- The full SCCAN model integrates SCCA blocks with a memory-efficient Swin Transformer backbone, enabling efficient patch-based attention with reduced computational cost.
- The model is trained end-to-end using a learning-to-learn paradigm, where support samples are used to adapt to novel classes during inference with minimal annotated examples.
Experimental results
Research questions
- RQ1How can we reduce background mismatch in few-shot segmentation when query background features lack corresponding support features?
- RQ2To what extent can self-calibrated cross attention mitigate foreground-background entanglement during feature fusion?
- RQ3Can patch-based alignment and scaled-cosine attention improve the quality of cross-attention in few-shot segmentation?
- RQ4How does the proposed pseudo mask aggregation module compare to existing methods in terms of robustness to noisy attention scores?
- RQ5What is the optimal configuration of patch size and number of SCCA blocks for maximizing segmentation accuracy?
Key findings
- The proposed SCCAN model achieves a 5.6% mIoU improvement over the previous state-of-the-art on the COCO-20i dataset under 5-shot settings, reaching 67.0% mIoU.
- On PASCAL-5i under 1-shot, the model achieves 67.0% mIoU, with ablation studies showing that each component—PMA, PA, and SC—contributes incrementally to performance.
- The patch alignment module improves mIoU by 0.5% over baseline SCCA, reducing misalignment issues in local attention computation.
- The scaled-cosine mechanism increases attention focus on relevant support features, as visualized in attention score maps, leading to better feature utilization.
- The optimal patch size for SCCA is 8, achieving the highest mIoU on both PASCAL-5i and COCO-20i, while 8 SCCA blocks yield the best performance in terms of mIoU and FB-IoU.
- The model maintains high efficiency with only 480.9 GFLOPs for inference on a single query-support pair, demonstrating practical feasibility.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.