TL;DR
When segmenting objects in a brand-new domain (like satellite or medical images) using only a few labeled examples, most models fail because they match features at the wrong scale: either too coarse (whole-image features) or too fine (tiny, over-segmented fragments). SARNet solves this "granularity dilemma" by grouping over-segmented regions into coherent semantic-level entities and refining them with global context, achieving state-of-the-art performance across four cross-domain benchmarks.
What Problem Does This Paper Address?
Imagine training a segmentation model on everyday photos (cars, dogs, chairs) and then asking it to segment skin lesions or satellite-view bodies of water using just one labeled example. This is Cross-Domain Few-Shot Segmentation (CD-FSS).
Most existing CD-FSS methods focus on adapting backbone features so they generalize better across domains. The authors point out that this misses a crucial factor: correspondence granularity—the scale at which you match the labeled "support" image to the unlabeled "query" image.
- Too coarse (Image-level): Matching directly on coarse, ImageNet-pretrained features introduces severe source-domain bias. Background textures often light up more strongly than the actual target object.
- Too fine (Fragment-level): Recent methods use the Segment Anything Model (SAM) to get domain-agnostic object masks. However, SAM tends to over-segment—chopping a single object into many tiny pieces. Matching at this fragment level creates noisy, ambiguous correspondences. Furthermore, SAM's automatic mask generator leaves an average of 8.4% of pixels uncovered, and 32.7% of those missed pixels actually belong to the target object.
Methods
To hit the sweet spot between coarse and fine, the authors propose SARNet (Semantic-aware Aggregation and Refinement Network), built on a standard ResNet-50 backbone and a Self-Support Prototype (SSP) prediction head.
- Residual Mask: Before doing any matching, SARNet computes a "residual mask" covering all pixels missed by SAM, ensuring 100% image coverage.
- Semantic-level Mask Aggregation Module (SMAM): SMAM takes the initial SAM + residual masks and merges them into coherent semantic regions using two simple rules:
- Force-merge tiny fragments: Any mask covering less than 1% of the image ($\tau_r = 0.01$) is merged into its most similar semantic region.
- Group similar regions: Larger masks with high feature similarity ($\ge 0.95$ cosine similarity) are merged together; otherwise, they form a new semantic category.
- Semantic-level Feature Refinement Module (SFRM): Isolated regions still lack context. SFRM applies self-attention across the aggregated semantic prototypes to capture global context and inter-region relationships. It also extracts representative foreground/background prototypes from both the support and query images, fusing them to handle intra-class variations (e.g., two different-looking airplanes).
Datasets
- Training (Source Domain): PASCAL VOC 2012 (with SBD augmentation), containing 20 common object categories.
- Evaluation (Target Domains): Four diverse, unseen benchmarks:
- FSS-1000: Tiny daily objects.
- DeepGlobe: Satellite imagery.
- ISIC: Dermoscopy images of skin lesions.
- Chest X-ray: Medical lung X-ray screenings.
Key Insights and Ideas
- Fewer, coherent masks beat many fragments: On DeepGlobe, fragment-level methods average 12.3 masks per category, whereas semantic-level aggregation reduces this to 2.6. Fewer, cleaner masks lead to consistently higher cross-domain similarity between support prototypes and query features.
- Aggregation must precede refinement: In ablation studies, applying contextual refinement (SFRM) directly to unmerged fragment masks actually hurt performance (dropping mIoU from 68.1% to 67.8%) because it amplified noisy local cues. Combining SMAM + SFRM boosted performance to 71.5%.
- Don't mix granularities: Trying to combine both fragment-level and semantic-level cues degraded performance (69.1% vs. 71.5%), confirming that mixing granularities reintroduces unstable local matches.
Key Results
Evaluated using mean Intersection over Union (mIoU) with a ResNet-50 backbone:
- State-of-the-art accuracy: SARNet achieves 72.8% mIoU (1-shot) and 76.2% mIoU (5-shot) on average across the four target datasets, outperforming the previous best method (GPRN) by +1.1% and +0.9%, respectively.
- Efficiency: Without test-time Adaptive Point Selection (APS), SARNet reaches 71.5% mIoU using 9.7M parameters and 56.2G FLOPs—nearly identical complexity to the prior method IFA (8.7M / 56.1G), but with a +3.7% mIoU* gain. With APS enabled, it matches GPRN's computational footprint (~100.2M params, 428.3G FLOPs) while delivering higher accuracy.
Limitations and Future Work
Like other SAM-based approaches, SARNet relies on pre-generated SAM masks, and enabling test-time APS refinement significantly increases computational cost (dropping speed from 27.6 FPS to 8.1 FPS). In future work, the authors plan to extend semantic-level correspondence modeling to other cross-domain few-shot tasks and explore granularity-adaptive correspondence learning.
Summary updated