AFANet: Adaptive Frequency-Aware Network for Weakly-Supervised Few-Shot Semantic Segmentation

Jiaqi Ma, Guo-Sen Xie, Fang Zhao, Zechao Li

TL;DR

This paper introduces AFANet, a novel network for weakly-supervised few-shot semantic segmentation (WFSS). AFANet leverages frequency domain information to better understand image structures and adaptively integrates CLIP's powerful text-image understanding through online learning, achieving state-of-the-art results on challenging datasets.

What Problem Does This Paper Address?

The core challenge AFANet tackles is semantic segmentation in scenarios with very limited labeled data (few-shot) and weak supervision (image-level labels instead of pixel-level masks). Traditional semantic segmentation requires vast amounts of pixel-perfect annotations, which are prohibitively expensive and time-consuming to obtain, especially for specialized domains. Few-shot learning aims to mitigate this by learning from just a few examples, but applying it to segmentation with only image-level labels (WFSS) is particularly difficult. Existing methods often struggle to extract sufficient semantic information from these limited and weak annotations, leading to suboptimal performance.

Methods

AFANet introduces two key novel modules:

  • Cross-Granularity Frequency-Aware Module (CFM): This module decomposes RGB images into high-frequency (detail) and low-frequency (structural) components. By realigning these frequency distributions across different granularities, CFM aims to optimize and enhance the semantic structural information within images, going beyond traditional RGB-based feature extraction. This is achieved using octave convolutions and a novel realignment process.
  • CLIP-Guided Spatial-Adapter Module (CSM): Instead of relying on CLIP's knowledge in a static, offline manner, CSM integrates CLIP's powerful cross-modal understanding online. It adaptively transforms CLIP's textual features to align with the specific data distribution of the downstream task. This spatial adaptation, guided by the frequency domain features from CFM, bridges the gap between CLIP's general knowledge and the specific requirements of the WFSS task, providing richer cross-modal semantic information.

These modules work in conjunction with a standard segmentation network to produce the final predictions.

Datasets

AFANet was evaluated on two widely-used datasets for semantic segmentation:

  • Pascal-5<sup>i</sup>: A dataset with 20 categories, typically split into 4 folds for evaluation.
  • COCO-20<sup>i</sup>: A larger and more challenging dataset with 80 categories.

The paper notes that for the WFSS task, these datasets are used with image-level labels instead of the traditional pixel-level annotations.

Key Insights and Ideas

  • Frequency Domain is Richer Than RGB: The paper strongly suggests that frequency domain information (high and low frequencies) provides more nuanced and robust semantic cues than RGB color information alone, especially for tasks like segmentation where structural details and contours are crucial.
  • Online CLIP Adaptation is Key: Simply using CLIP's pre-trained knowledge offline is insufficient for specialized tasks. AFANet's innovation lies in its online adaptation of CLIP's features, guided by the task's specific visual information, leading to significantly improved performance.
  • Synergy Between Frequency and CLIP: The combination of frequency-aware features (CFM) and adaptively integrated CLIP features (CSM) creates a powerful synergy, allowing the model to better understand both visual structures and semantic concepts from limited, weakly labeled data.
  • Weak Supervision is Viable for Few-Shot Segmentation: The success of AFANet demonstrates that even with challenging image-level labels, state-of-the-art performance is achievable in few-shot semantic segmentation.

Key Results

AFANet achieved state-of-the-art performance on both Pascal-5<sup>i</sup> and COCO-20<sup>i</sup> datasets for weakly-supervised few-shot semantic segmentation.

  • Pascal-5<sup>i</sup>: With VGG16 as a backbone, AFANet achieved a mean IoU of 61.51% in the 1-shot setting, surpassing the baseline IMR-HSNet by up to 6%. It also outperformed some pixel-level supervised methods.
  • COCO-20<sup>i</sup>: In the 1-shot setting with VGG16, AFANet achieved a mean IoU of 41.3%, showing a significant improvement over the baseline and outperforming most pixel-level supervised methods.
  • Qualitative Results: Visualizations showed AFANet producing more complete contours, better handling camouflage, suppressing background noise more effectively, and accurately segmenting multiple occluded objects compared to the baseline.

Limitations and Future Work

  • Adapter Size Optimization: The paper conducted ablation studies to find the optimal adapter size for CSM, indicating that this parameter is crucial for performance. While they found 25 to be optimal, further exploration of adaptive adapter sizing could be a future direction.
  • Hyperparameter Sensitivity: Ablation studies on hyperparameters $\alpha$ and $\beta$ for the loss function showed that setting them to 1 yielded the best results, suggesting a need for careful tuning.
  • Future Work: The authors hope their work inspires further research in WFSS, particularly in leveraging frequency domain information and adaptive cross-modal integration. The paper implicitly suggests that exploring more sophisticated ways to combine frequency and semantic information, or further refining the online adaptation of large pre-trained models, could lead to even greater advancements.

Summary updated

BibTeX
@article{ma2025afanet,
  author = {Jiaqi Ma and Guo-Sen Xie and Fang Zhao and Zechao Li},
  title = {{AFANet: Adaptive Frequency-Aware Network for Weakly-Supervised Few-Shot Semantic Segmentation}},
  journal = {IEEE Trans. Multimedia},
  year = {2025},
  doi = {10.1109/tmm.2025.3535348},
}
Figure