NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

SAMwave: Wavelet-Driven Feature Enrichment for Effective Adaptation of Segment Anything Model

Saurabh Yadav, Avi Gupta, Koteswar Rao JerripothulaarXiv 2025 · OpenReview

TL;DR

This paper introduces SAMwave, a novel method for adapting large pre-trained vision models like SAM to new tasks by enriching their feature representations with wavelet-derived high-frequency information. SAMwave significantly improves performance on low-level vision tasks, outperforming existing adaptation techniques by leveraging the richer spatial-frequency details captured by wavelets, especially when using complex-valued adapters.

What Problem Does This Paper Address?

Large foundation models, such as the Segment Anything Model (SAM), have revolutionized computer vision by achieving state-of-the-art results on many tasks. However, these models often struggle when applied to tasks they weren't explicitly trained for, leading to performance degradation. Existing methods to adapt these models, like adapter-based fine-tuning, often rely on extracting high-frequency features from the Fourier domain. The authors argue that these Fourier-based approaches are limited because they use fixed masks that don't adapt well to the varying frequency characteristics of different images and tasks. This inflexibility hinders their ability to capture the fine-grained details crucial for tasks like precise segmentation, especially in challenging low-level vision scenarios.

Methods

SAMwave's core innovation lies in its Wavelet High-Frequency (WHF) module. Instead of the Fourier transform, it uses the Discrete Wavelet Transform (DWT) to extract high-frequency spatial features. The DWT decomposes an image into subbands (approximation, horizontal, vertical, and diagonal details). SAMwave focuses on combining the detail subbands (horizontal, vertical, and diagonal) to create a rich high-frequency feature map.

A key extension is the use of complex wavelet transforms and complex-valued adapters. Complex wavelets can capture additional information like phase, which real wavelets miss. Complex-valued adapters, which use complex numbers in their internal computations, are proposed to better leverage these complex wavelet features.

These enriched features are then integrated into the SAM architecture through lightweight adapters. These adapters are placed within SAM's image encoder layers and combine the original SAM features with the newly extracted wavelet features. The authors also highlight the flexibility of their WHF module, noting it can seamlessly incorporate various wavelet types, including complex ones, without altering the overall architecture.

Datasets

The paper evaluates SAMwave on four low-level vision tasks, utilizing a variety of established datasets:

  • Camouflaged Object Detection: COD10K, CAMO, CHAMELEON
  • Shadow Detection: SBU, ISTD
  • Defocus Blur Detection: CUHK, DUT
  • PolyP Detection: CVC-ClinicDB, ColonDB, Kvasir-SEG, ETIS
  • Forgery Detection: CASIA, IMD20

The paper provides a table detailing the train/test splits for these datasets.

Key Insights and Ideas

  • Fourier limitations: The authors empirically demonstrate that fixed Fourier masks, commonly used for high-frequency feature extraction, offer only marginal improvements and are not optimal for adapting large models to diverse tasks.
  • Wavelets offer richer details: Wavelet transforms provide a more adaptive and effective way to extract multi-scale high-frequency features, capturing finer spatial and frequency localization compared to Fourier methods.
  • Complex wavelets unlock more information: Utilizing complex wavelet transforms and complex-valued adapters allows for the capture of richer image information, including phase, leading to improved adaptation performance, especially with the SAM2 backbone.
  • Adaptability is key: The proposed SAMwave framework is flexible, easily integrating different wavelet types and demonstrating consistent performance gains across various low-level vision tasks and backbones (SAM and SAM2).

Key Results

SAMwave consistently outperforms existing adaptation methods across four low-level vision tasks.

  • Camouflaged Object Detection: SAMwave significantly outperforms existing task-specific and fine-tuning methods on three datasets (CHAMELEON, CAMO, COD10K), achieving top performance with both SAM and SAM2 backbones. For instance, with SAM2 and complex-valued adapters, SAMwave achieves an S-measure of 0.931 on CHAMELEON, a notable improvement.
  • Shadow Detection: The method shows substantial performance improvements on ISTD and SBU datasets, with complex-valued adapters achieving a BER of 0.92 on ISTD.
  • Defocus Blur Detection: SAMwave achieves the best results on DUT and CUHK datasets, particularly when using complex-valued adapters with SAM2, reaching an Fβ score of 0.907 on DUT.
  • PolyP Detection: Significant improvements are observed across multiple datasets (CVC-ClinicDB, ColonDB, Kvasir-SEG, ETIS), with complex-valued adapters on SAM2 yielding the best results. For example, on Kvasir-SEG, SAMwave achieves an mIoU of 0.867.
  • Forgery Detection: SAMwave demonstrates strong performance on IMD20, achieving an F1 score of 0.626 with the Coiflet wavelet and SAM backbone.

Limitations and Future Work

  • Computational Cost: While the adapters are described as "lightweight," the paper doesn't explicitly detail the computational overhead introduced by the WHF module and adapters.
  • Generalizability of Complex Adapters: While complex-valued adapters show promise, their performance relative to real-valued adapters can vary depending on the specific wavelet and backbone used. The paper notes that complex-valued adapters yield improved results with the SAM2 backbone, highlighting its enhanced compatibility.
  • Future Work: The authors suggest that their framework's flexibility allows for integration with other advanced wavelet transforms and complex-valued network architectures, potentially leading to further performance gains. The paper also hints at exploring the interpretability of the learned wavelet features.

Summary updated

Abstract

The emergence of large foundation models has propelled significant advances in various domains. The Segment Anything Model (SAM), a leading model for image segmentation, exemplifies these advances, outperforming traditional methods. However, such foundation models often suffer from performance degradation when applied to complex tasks for which they are not trained. Existing methods typically employ adapter-based fine-tuning strategies to adapt SAM for tasks and leverage high-frequency features extracted from the Fourier domain. However, Our analysis reveals that these approaches offer limited benefits due to constraints in their feature extraction techniques. To overcome this, we propose \textbf{\textit{SAMwave}}, a novel and interpretable approach that utilizes the wavelet transform to extract richer, multi-scale high-frequency features from input data. Extending this, we introduce complex-valued adapters capable of capturing complex-valued spatial-frequency information via complex wavelet transforms. By adaptively integrating these wavelet coefficients, SAMwave enables SAM's encoder to capture information more relevant for dense prediction. Empirical evaluations on four challenging low-level vision tasks demonstrate that SAMwave significantly outperforms existing adaptation methods. This superior performance is consistent across both the SAM and SAM2 backbones and holds for both real and complex-valued adapter variants, highlighting the efficiency, flexibility, and interpretability of our proposed method for adapting segment anything models.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
DUT · defocus blur detectionSAMwave (SAM2 backbone; complex-valued Symmetric-b adapter)M0.052Defocus Blur Detection · fine-tuned · resolution=1024×1024 · adapter=complex-valued Symmetric-b · backbone=SAM2
Source quote
L359: Ours (Symmetric-b) │ 0.907 │ 0.052 │ 0.928 │ 0.036
CUHK · defocus blur detectionSAMwave (SAM2 backbone; complex-valued Symmetric-b adapter)M0.036Defocus Blur Detection · fine-tuned · resolution=1024×1024 · adapter=complex-valued Symmetric-b · backbone=SAM2
Source quote
L359: Ours (Symmetric-b) │ 0.907 │ 0.052 │ 0.928 │ 0.036
ETIS · PolyP detectionSAMwave (SAM2 backbone; complex-valued Symmetric-b adapter)mIoU0.730Polyp Segmentation · fine-tuned · adapter=complex-valued Symmetric-b · backbone=SAM2
Source quote
L388: \multicolumn{7}{c||}{mIoU\uparrow} │ 0.595 │ 0.681 │ 0.610 │ 0.223 │ 0.603 │ \multicolumn{1}{c|}{0.622} │ 0.611 │ \multicolumn{1}{c|}{0.654} │ 0.709 │ 0.683 │ 0.720 │ \multicolumn{1}{c|}{\redtext{0.737}} │ \redtext{0.730} │ 0.676
BibTeX
@misc{yadav2025samwave,
  author = {Saurabh Yadav and Avi Gupta and Koteswar Rao Jerripothula},
  title = {{SAMwave: Wavelet-Driven Feature Enrichment for Effective Adaptation of Segment Anything Model}},
  year = {2025},
  eprint = {2507.20186},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.20186},
}
Figure