Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Weighted multi-scale and wavelet-enhanced Segment Anything Model for salient object detection

  • Zhe Liu ,

    Roles Conceptualization, Investigation, Methodology, Software, Validation, Writing – original draft, Writing – review & editing

    1787511109@qq.com

    Affiliation School of Intelligent Science and Information Engineering, Shenyang University, Shenyang, Liaoning, China

  • Dan Tian

    Roles Conceptualization, Supervision, Writing – review & editing

    Affiliation School of Intelligent Science and Information Engineering, Shenyang University, Shenyang, Liaoning, China

Abstract

Salient Object Detection (SOD) is concerned with isolating the visually most noticeable objects in an image via precise segmentation. Previous approaches, especially those that adapt the Segment Anything Model (SAM), often yield saliency maps that contain incomplete object masks, blurred boundaries, and a lack of fine-grained details. This issue is especially severe for scenes with objects of different scales or complex textures. We argue that these issues stem from three inherent limitations of existing adaptation strategies: (1) existing adapters rely on rigid multi-scale fusion strategies, lacking learnable cross-scale calibration to handle objects of diverse sizes, (2) simple feature concatenation ignores cross-level semantic correlations, (3) spatial-domain operations inevitably discard high-frequency details. The proposed WMW-SAM, a Weighted Multi-Scale and Wavelet-Enhanced SAM, is designed to handle these limitations for SOD. Specifically, we develop the Weighted Multi-Scale Adapter (WMSA), which utilizes learnable weighting across multiple receptive fields to calibrate features of different scales. Then, our Multi-level Feature Cross-fusion Module (MFCM) employs cascaded top-down cross-attention to facilitate deep interaction that connects high-level semantics with low-level details. Finally, we develop a Detail Enhancement Module (DEM) that leverages the Discrete Wavelet Transform (DWT) to explicitly extract and enhance high-frequency sub-bands. This operation effectively recovers sharp boundaries and intricate textures, which are often overlooked by spatial-domain operations. Extensive experiments on multiple benchmark datasets demonstrate the superior performance of our proposed WMW-SAM, which achieves accurate and detailed saliency predictions.

1. Introduction

Salient Object Detection (SOD) [1] aims to identify the most visually salient objects or regions in an image. As a fundamental vision task, it serves as a critical step for numerous downstream applications, including object tracking [2,3], scene segmentation [4,5], and person re-identification [6,7]. Moreover, techniques developed for SOD have also been adapted to related tasks, such as multi-scale synthetic aperture radar (SAR) object detection [8] and energy-efficient water-surface object detection [9]. The past decade has witnessed remarkable success of methods based on Convolutional Neural Networks (CNNs) for SOD. Nevertheless, the limited receptive fields of CNNs hinder their ability to capture global contextual information. Notably, thanks to the global perception capability enabled by the self-attention mechanism, Vision Transformers (ViT) [10] achieve performance improvements in SOD. However, for complex scenes, the performance and generalization ability of these SOD models remain low. This is largely due to limited training data and large domain gaps.

The Segment Anything Model (SAM) [11] is recognized as a powerful visual foundation model for universal image segmentation. It leverages over one billion training masks and demonstrates exceptional generalization on many segmentation tasks [1216]. However, its performance depends heavily on manual prompts for object identification, such as specific points, bounding boxes, or coarse masks [17]. In the context of SOD, it is impractical to provide such prompts, as ground truth is unavailable during inference. SAM can automatically generate masks via grid prompts, but these masks are class-agnostic and cannot separate salient objects from the background. Moreover, full fine-tuning of SAM for SOD is computationally expensive and often leads to performance degradation or catastrophic forgetting of its pre-trained knowledge.

In order to address these issues, recent works employ Parameter-Efficient Fine-Tuning (PEFT) for the adaptation of foundation models to different tasks. Specifically, existing methods primarily focus on multi-scale modeling and feature fusion to transfer SAM to the SOD task. Nevertheless, these approaches exhibit inherent limitations. First, existing fusion strategies for multi-scale features lack the learnable weighting mechanism required to handle objects of different sizes. Second, simple fusion strategies fail to capture intricate cross-level semantic correlations. Finally, as detail enhancement remains restricted to the spatial-domain, these methods are prone to losing high-frequency structural information. Consequently, as shown in Fig 1, current methods still suffer from incomplete object masks and blurred boundaries in complex scenes.

thumbnail
Fig 1. Visual examples of objects with diverse scales and intricate details.

The predictions are generated by MDSAM [17] and WMW-SAM methods.

https://doi.org/10.1371/journal.pone.0355742.g001

To overcome these limitations, we propose the Weighted Multi-Scale and Wavelet-Enhanced SAM (WMW-SAM), a novel framework for SOD. Our approach effectively adapts SAM to the SOD task by incorporating multi-scale perception and frequency-domain detail enhancement. Specifically, we introduce the Weighted Multi-Scale Adapter (WMSA), which employs a learnable weighting mechanism across multiple receptive fields to calibrate features of different scales. Furthermore, we introduce a Multi-level Feature Cross-fusion Module (MFCM) based on Multi-level Cross-Attention (MCA). MFCM uses cascaded top-down interaction rather than simple concatenation to effectively fuse high-level semantics with low-level details. Finally, we develop a Detail Enhancement Module (DEM) that leverages the Discrete Wavelet Transform (DWT) to explicitly extract and enhance high-frequency sub-bands. This frequency-aware mechanism successfully recovers sharp boundaries and complex textures that are often lost in spatial-domain operations. Extensive experiments on multiple SOD benchmark datasets demonstrate the superior performance of our WMW-SAM over existing methods.

Our main contributions are summarized as follows:

  • We design a Weighted Multi-Scale Adapter (WMSA) to address the rigid multi-scale feature aggregation in existing SAM-based SOD methods. This adapter employs learnable weighting across multiple receptive fields and calibrates multi-scale features for salient objects of diverse sizes.
  • We propose a Multi-level Feature Cross-fusion Module (MFCM) to overcome the ineffective cross-level semantic fusion caused by simple concatenation. The MFCM uses cascaded top-down cross-attention to facilitate deep interaction that connects high-level semantics with low-level details.
  • We further develop a Detail Enhancement Module (DEM) to recover high-frequency structural details that spatial-domain operations inevitably lose. The DEM leverages the Discrete Wavelet Transform (DWT) to explicitly extract and enhance high-frequency sub-bands, restoring sharp boundaries and intricate textures.
  • We conduct extensive experiments on multiple SOD benchmark datasets to verify our method’s superiority and generalization capability.

2. Related work

2.1. Salient object detection

Current mainstream SOD methods can be roughly divided into two categories: CNN-based and Transformer-based [17]. The CNN-based methods typically use deep convolutional networks such as VGGNet [18] and ResNet [19] as backbones to extract multi-scale features and then generate saliency maps through decoder structures. For example, Zhang et al. [20] introduce a recursive learning framework for SOD, which adaptively combines multi-resolution features and incorporates edge-aware information to refine object boundaries. Zeng et al. [21] utilize a global-local refinement framework to solve the problem of detail loss and boundary inaccuracy in high-resolution SOD. Wei et al. [22] employ a selective feature fusion module and a cascaded feedback decoder to address the discrepancies between multi-level features and enhance the prediction of fine details. Mohammadi et al. [23] design a content-aware guidance mechanism that integrates low-level and high-level features to suppress non-salient regions resembling salient objects while handling salient objects with non-uniform appearance. Liu et al. [24] propose a unified framework with dynamic feature integration and task-adaptive attention to simultaneously solve salient object, edge, and skeleton detection and reduce task conflicts. Zhao et al. [25] adopt the gate mechanism to balance the contribution of each encoder block and reduce non-salient information. Pang et al. [26] introduce a multi-scale interactive network to improve spatial coherence across levels. Wei et al. [27] propose a label decoupling framework that decomposes the saliency label into body and detail maps to solve the problem of prediction difficulty and pixel imbalance near object boundaries. Wang et al. [28] design a multiple enhancement network that uses pixel, region, and object level supervision. It produces clearer boundaries and more complete salient objects in complex scenes. This network uses multi-level hybrid losses and multiscale feature enhancement to refine boundaries of complex objects in cluttered scenes. Although these CNN-based methods make significant progress, they often produce unsatisfactory results in complex situations. The main reason is CNNs’ inherent local receptive fields, which severely limit the capture of the global semantic context critical for SOD.

Recently, thanks to the global perception capability of the self-attention mechanism, ViT [10] has demonstrated excellent performance in SOD. Based on these advantages, Liu et al. [29] leverage T2T-ViT [30] to capture long-range dependencies and integrate multi-level features to boost detection performance. To further optimize saliency features, Yun et al. [31] design a self-refined network with pyramid Transformers, which enhances both global semantics and local details. Zhuge et al. [32] adopt the Swin Transformer [33] to extract multi-scale features, thereby improving the structural integrity of salient regions. Wang et al. [34] utilize a combination of multiple Transformers to learn robust local-global representations in the scribble-based RGB-D SOD task. Moreover, Deng et al. [35] propose a recurrent multi-scale architecture to address the challenge of generating high-quality saliency maps for high-resolution images. Although such Transformer-based models achieve impressive performance, they often struggle to capture fine-grained structural details. More critically, compared with large-scale visual foundation models, they still have limited generalization ability in complex and unseen scenes. Our approach exploits the excellent feature extraction and generalization provided by vision foundation models, and applies them to the SOD task to obtain improved results.

2.2. Segment anything model

SAM [11] is a groundbreaking visual foundation model for universal image segmentation. Through appropriate adjustments, it demonstrates remarkable performance on various downstream tasks [1216]. Nevertheless, original SAM heavily relies on manual prompts, which are unavailable in fully automatic SOD. Although full fine-tuning can transfer SAM to SOD, it inevitably introduces too many trainable parameters and often leads to performance degradation due to catastrophic forgetting [17]. To mitigate this issue, PEFT methods have been widely explored. For instance, Cui et al. [36] efficiently fine-tune SAM for SOD with a Low Rank Adaptation (LoRA). Xu et al. [37] introduce a SAM-based multidimensional exploration method for weakly supervised SOD. Ke et al. [38] enhance SAM by introducing a learnable high-quality output token into its mask decoder to generate more accurate and detailed segmentation masks. Although effective in certain cases, these methods still fail to fully capture multi-scale contextual information required for SOD.

To solve this problem, Gao et al. [17] introduce a Lightweight Multi-Scale Adapter (LMSA) to inject multi-scale features into the SAM encoder. However, this approach relies on rigid multi-scale aggregation and lacks learnable cross-scale calibration to handle diverse object scales. Furthermore, the simple fusion mechanisms and spatial-domain decoding strategies in these methods cannot preserve fine-grained edge details and therefore fail to segment complex scenes accurately. To overcome these issues, we leverage a parameter-efficient WMSA module to adapt SAM for the SOD task. Additionally, we introduce lightweight modules to exploit multi-level interactions and frequency-domain details, and obtain superior results on the SOD task.

3. Our proposed method

This section presents the Weighted Multi-Scale and Wavelet-Enhanced SAM (WMW-SAM) to address the limitations of existing strategies that adapt SAM to SOD. As shown in Fig 2, WMW-SAM integrates three core components: the Weighted Multi-Scale Adapter (WMSA), the Multi-level Feature Cross-fusion Module (MFCM), and the Detail Enhancement Module (DEM). The following subsections present the specific formulations of these modules.

thumbnail
Fig 2. Architecture of our WMW-SAM.

The frozen SAM encoder incorporates the Weighted Multi-Scale Adapter (WMSA) for multi-scale perception. Then, the extracted hierarchical features (X3, X6, X9, X12) are integrated through the Multi-level Feature Cross-fusion Module (MFCM), which employs Multi-level Cross-Attention (MCA). Finally, the Detail Enhancement Module (DEM) refines the initial prediction using Wavelet Attention (WA) to recover high-frequency edge details.

https://doi.org/10.1371/journal.pone.0355742.g002

3.1. Weighted multi-scale adapter

While SAM demonstrates good performance across many segmentation tasks, its dependence on manual prompts and lack of task-specific multi-scale features hinder its direct use in automatic SOD. Full fine-tuning can adapt SAM to SOD, but it incurs prohibitive computational cost and often overfits on limited data. Consequently, parameter-efficient adaptation via lightweight adapters [39] has become the dominant approach. A recent study by Gao et al. [17] introduces an LMSA module that injects multi-scale information into SAM to capture finer spatial details. However, this approach relies on rigid multi-scale aggregation and lacks learnable cross-scale calibration to handle salient objects with diverse sizes and shapes. To overcome this, we introduce a WMSA module. It employs parallel depth-wise convolutions (e.g., 3 × 3, 5 × 5, 7 × 7) to construct multi-scale receptive fields and fuses features of different scales via global learnable scalar weights. By embedding WMSA into the SAM encoder, our WMW-SAM acquires robust multi-scale perception with only a few extra parameters. This design maintains high training efficiency and preserves the foundation model’s generalization ability under complex scenes.

As shown in Fig 3, each Transformer block of the SAM encoder comprises a Multi-Head Self-Attention (MHSA) [40], a Multi-Layer Perceptron (MLP), and Layer Normalization [41]. Specifically, given the input feature, the operations in the i-th block are formulated as:

(1)(2)
thumbnail
Fig 3. Illustration of the proposed WMSA.

We add WMSA before the first normalization in each Transformer block.

https://doi.org/10.1371/journal.pone.0355742.g003

where denotes an input to the i-th Transformer block, represents the intermediate output, and LN corresponds to Layer Normalization. To adapt SAM for SOD, we utilize WMSA before the first LN in each Transformer block.

The architecture of WMSA is illustrated in Fig 3. Specifically, we first calibrate the distribution of the input feature , then project it into a low-dimensional subspace via a learnable linear layer, thereby reducing computational complexity:

(3)

where α and β are learnable scale and shift parameters, respectively, and Di denotes the linear projection layer for dimensionality reduction in the i-th adapter.

Subsequently, we introduce a weighted fusion mechanism that enhances model sensitivity to salient objects with various sizes. It consists of three parallel depth-wise convolutional branches with kernel sizes of 3 × 3, 5 × 5, 7 × 7, which capture spatial information at different receptive fields. The resulting multi-scale features are combined using global learnable weighting coefficients wk. With an internal residual connection, this fusion process is formulated as:

(4)

where DWConvk denotes the depth-wise convolutional layer with a k × k kernel, and ε is a small constant for numerical stability. To apply the depth-wise convolutions, the projected 1D token sequence (where N = H × W and denotes the reduced channel dimension) is first reshaped into a 2D spatial grid . After the parallel convolutions, the features are flattened back to the sequence format. Since the SAM encoder adopts a standard ViT architecture without hierarchical down-sampling, the spatial resolution H × W remains consistent across all stages. Furthermore, the original absolute positional embeddings, added before the first block, are continuously propagated via residual connections. Our WMSA operates exclusively on the reshaped grids without modifying or recalibrating these embeddings. The depth-wise convolutions operate on the 2D spatial grids and thereby naturally preserve the structural ordering. Consequently, the local features extracted by our WMSA are spatially consistent with the tokens processed by the subsequent global self-attention layers. To further improve the fused features, we introduce a lightweight residual block to refine the multi-scale representation:

(5)

where σ denotes the GELU activation function [42]. Subsequently, we apply a 1 × 1 convolution to compress and integrate the refined features, and then use GELU for nonlinear activation. The output is projected back to the original dimensionality via another linear layer. Finally, a residual connection yields the output of the WMSA module:

(6)

where Ui denotes the linear up-projection layer of the i-th adapter.

In summary, with the proposed WMSA, our framework adapts SAM to the SOD task with only a few additional parameters. Moreover, unlike static adapters with fixed multi-scale aggregation, our method enables learnable recalibration of multi-scale features, leading to more accurate identification and localization of salient objects in complex scenes.

3.2. Multi-level feature cross-fusion module

The SAM encoder produces features at multiple levels. Shallow layers retain fine spatial details, while deeper layers capture high-level semantics. However, for SOD in complex scenes, sole reliance on high-level features from deep layers may fail to accurately detect objects. Therefore, effective fusion of features from different levels becomes necessary. The original SAM uses only the final output for mask decoding and discards valuable information from intermediate layers. Basic fusion methods like concatenation or summation do not fully explore the connections between layers. To overcome these issues, we propose the MFCM module. Based on MCA, MFCM integrates features from multiple stages of the SAM encoder in a more comprehensive manner.

The MCA module uses high-level semantic context to refine low-level features. It builds a top-down pathway that helps shallow layers suppress background noise and highlight fine details related to salient objects. As shown in Fig 4, we first apply channel attention [43] to recalibrate the input features and improve their representational quality. Next, we employ cross-attention with the current low-level features as the Query and the higher-level features as the Key and Value. This design enables shallow features to query and integrate relevant high-level semantics, which leads to better cross-level interaction and semantic alignment. This process is summarized as:

(7)(8)(9)(10)

In the above formulas, φ corresponds to linear projection, and BN to batch normalization. is the intermediate feature obtained after channel attention and 1 × 1 convolution. For the deepest feature , no higher-level semantic reference exists. Therefore, it skips the cross-attention stage and is refined only by the channel attention module.

The MFCM refines features in a top-down cascade manner based on MCA. In this process, each shallow feature receives semantic guidance from deeper features. Then, a 1 × 1 convolution processes the concatenation of all refined features () and produces , which supplies multi-level information to the mask decoder:

(11)(12)(13)

Unlike the original SAM, which uses only the final encoder output, our MFCM fuses features from multiple levels of the SAM encoder, allowing the decoder to produce clearer saliency maps.

3.3. Detail enhancement module

Although WMSA and MFCM adapt SAM to SOD and fuse multi-level features, the patch embedding in the SAM encoder still loses fine spatial details. Moreover, simple upsampling in the SAM decoder cannot fully recover high-frequency information. This often leads to poor detection of objects with complex edges or slender shapes. To overcome this, we propose a DEM module that uses frequency-domain information to restore lost structural details.

As shown in Fig 5, DEM consists of a primary decoding branch and an auxiliary detail branch. The primary branch gradually resamples features from the mask decoder up to the input resolution, while fine details from the original image are extracted by an auxiliary branch to support the primary feature. In the auxiliary branch, we introduce Wavelet Attention (WA), which differs from standard spatial-domain edge extraction. The wavelet transform [44] is used to isolate and enhance high-frequency components in the frequency-domain. This enables precise recovery of edge details.

The primary branch reconstructs the spatial resolution of the final prediction. First, we concatenate the high-level semantic feature from the mask decoder with the upsampled feature from the final layer of the SAM encoder, and we compress its channel dimension via a 1 × 1 convolution. Then, the combined feature enters multiple upsampling stages. Each stage consists of bilinear interpolation followed by a 3 × 3 convolution. This process restores the feature maps to the original input resolution, formulated as follows:

(14)(15)

where US×2 represents a twofold upsampling via bilinear interpolation.

The upsampled feature provides a coarse feature, which exhibits blurred boundaries and lacks high-frequency details due to the smoothing effect of repeated bilinear interpolation. To address this, we employ WA in the auxiliary branch to recover edge information in the frequency-domain. First, we use a 3 × 3 convolution on the input image I to extract local features:

(16)

Subsequently, Flocal is fed into the WA module. This module first applies a single-level Haar DWT to decompose the feature into one low-frequency sub-band and three high-frequency sub-bands. The three high-frequency sub-bands correspond to structural details in the vertical, horizontal, and diagonal directions:

(17)

We apply learnable thresholds to these high-frequency sub-bands. Then, the results are concatenated and fused by a 1 × 1 convolution. Finally, they are combined with the low-frequency sub-band and reconstructed via the Inverse Discrete Wavelet Transform (IDWT) into an edge-enhanced feature:

(18)

To generate attention weights, we first apply Global Average Pooling (GAP) to aggregate spatial information, and then use Flatten to expand the feature. Then, wavelet attention-guided weights are generated via the Softmax function. These weights multiply the original input feature to yield the final frequency-domain enhanced detail feature:

(19)

Finally, we concatenate the detail-rich feature Fwa with the primary feature Fup, and output the final saliency prediction through a series of convolutions:

(20)

In summary, DEM combines the semantic feature from the primary branch with the frequency-enhanced detail from the auxiliary branch. This helps recover the structural information lost in the original SAM. As a result, our WMW-SAM produces more accurate saliency maps.

3.4. Loss functions

During training, we combine BCE loss, IoU loss, and L1 loss to optimize the parameters. Both the final refined prediction Sf and the intermediate coarse prediction Sm are used for loss computation to better guide the intermediate layers and facilitate gradient propagation. The total loss is the sum of these two parts:

(21)(22)

where G denotes the salient object’s ground truth map.

4. Experiments

4.1. Experiment settings

Datasets. We train our network on the DUTS-TR [45] dataset, which contains 10,553 images. We evaluate our method on five widely-used benchmark datasets: DUTS-TE [45] (5,019 images), DUT-OMRON [46] (5,168 images), HKU-IS [47] (4,447 images), ECSSD [48] (1,000 images), and PASCAL-S [49] (850 images).

Metrics. To quantitatively assess the performance of our WMW-SAM, we adopt four metrics commonly used in SOD research: Mean Absolute Error (MAE) [50], maximum F-measure () [45], S-measure () [51], and mean Enhanced-alignment Measure (Em) [52].

Implementation Details. Our model is implemented in PyTorch and trained on a single NVIDIA GeForce RTX 4090 GPU. We initialize the image encoder and mask decoder with pretrained weights from the SAM1 using the ViT-B backbone, and randomly initialize all new modules in WMW-SAM. Input images are resized to 384 × 384, and the batch size is set to 16. We utilize the AdamW optimizer with a weight decay of 1e-4. During training, the SAM encoder remains frozen. The learning rates for other pretrained weights and the newly introduced modules are set to 3e-5 and 3e-4, respectively. The entire training process lasts for 100 epochs, including a warm-up period of 5 epochs.

4.2. Comparative experiments

To comprehensively evaluate the effectiveness of our WMW-SAM, we compare it with 13 representative methods, including DFI [24], MINet [26], F3Net [22], LDF [27], GateNet [25], CAGNet [23], VST [30], ICON [33], SelfReformer [32], MENet [33], BRRF [53], SAM [11], and MDSAM [17].

Quantitative Evaluation. Tables 1 and 2 show the quantitative results on five widely used benchmark datasets. We compare our method with 13 other methods in terms of MAE, , , and Em. The results show that our method achieves the best performance on DUTS, HKU-IS, and ECSSD and remains highly competitive on DUT-OMRON. Notably, our method achieves convincing results on the metric across five datasets compared to previous models. Although our WMW-SAM performs slightly worse on the PASCAL-S dataset, it still achieves the best overall results. Compared to the original SAM, our model shows clear improvement with only a few additional parameters, even at a lower input resolution. Our core modules WMSA, MFCM, and DEM introduce merely 1.38M, 1.61M, and 0.23M trainable parameters, respectively. Including other auxiliary components (e.g., dimension matching layers and the final output convolution), the complete WMW-SAM totals 95.52M, which adds an overhead of approximately 5.58M to the frozen SAM. Compared with MDSAM, our approach delivers better accuracy with fewer parameters and runs at 62 FPS. In addition, we present the precision-recall [54] and F-measure curves [55] in Fig 6.

thumbnail
Table 1. Quantitative comparison of our method with other methods on DUTS-TE and DUT-OMRON.

https://doi.org/10.1371/journal.pone.0355742.t001

thumbnail
Table 2. Quantitative comparison of our method with other methods on HKU-IS, ECSSD, and PASCAL-S.

https://doi.org/10.1371/journal.pone.0355742.t002

thumbnail
Fig 6. Precision-recall and F-measure curves of the proposed method and other methods on five SOD datasets.

https://doi.org/10.1371/journal.pone.0355742.g006

To evaluate the stability of our WMW-SAM, we repeat the experiments three times with different random seeds (42, 43, 44) on DUTS-TE and DUT-OMRON. Table 3 reports the means and standard deviations of MAE, , , and Em. The small standard deviations across the three runs demonstrate the robustness and reproducibility of our proposed method.

thumbnail
Table 3. Repeated-run results (mean ± std) of our method on DUTS-TE and DUT-OMRON.

https://doi.org/10.1371/journal.pone.0355742.t003

Qualitative Evaluation. Fig 7 shows a visual comparison of our WMW-SAM with other approaches. Our method produces more accurate saliency maps in challenging scenes, such as small objects (row 1), large objects (row 2), multiple objects (row 3), low-contrast environments (row 4), and backlit scenes (row 5). These qualitative results indicate the strong performance and robustness achieved by our method.

thumbnail
Fig 7. Visual comparison of saliency maps with our WMW-SAM and other methods.

https://doi.org/10.1371/journal.pone.0355742.g007

Furthermore, we note recent advancements in SOD, including heavy architectures such as DualGazeNet [56] and BiRefNet [57], diffusion-guided generation paradigms like DGSSM [58], and highly efficient designs like CPDR [59]. While models with massive parameter capacities or iterative generation processes achieve higher accuracy, they often come with substantial computational costs. In contrast, our WMW-SAM achieves an effective balance between accuracy and efficiency. By introducing a few trainable parameters, our approach achieves superior performance over CPDR and approaches the accuracy of heavier architectures, while maintaining an inference speed of 62 FPS.

4.3. Ablation studies

We perform ablation studies to evaluate each module in WMW-SAM. Table 4 shows the results on DUTS-TE and ECSSD. We use the frozen SAM with an LMSA adapter as the baseline. Based on this baseline, we add our WMSA, then MFCM, and finally the wavelet-enhanced DEM. Fig 8 provides a visual comparison of these configurations. All experiments in this section use a resolution of 384 × 384.

thumbnail
Table 4. Ablation studies of the proposed modules. MFCM* indicates using simple concatenation for fusion. DEM* indicates the removal of WA. The best results are marked in bold.

https://doi.org/10.1371/journal.pone.0355742.t004

thumbnail
Fig 8. Visual comparisons for showing the benefits of the proposed modules.

The image labels (a) to (f) correspond to model configurations in Table 4.

https://doi.org/10.1371/journal.pone.0355742.g008

Effectiveness of WMSA. We verify the effectiveness of WMSA by replacing LMSA with WMSA in the baseline model. As shown in Table 4, this change improves performance on all metrics. Furthermore, the visual comparisons in Fig 8 reveal that the baseline performs poorly on objects of different scales. With the introduction of WMSA, the model generates more accurate segmentation masks for both small and large objects. This shows that WMSA makes the model more adaptable to objects of various sizes.

Effectiveness of MFCM. Table 4 shows the effect of MFCM. The performance gain from row 2 to row 3 is marginal. This is because simple concatenation fails to effectively filter or fuse multi-level features and may even introduce noise, which degrades overall performance. With the integration of the MFCM, the accuracy improves more pronouncedly. As shown in Fig 8, simple concatenation still produces blurred edges, while MFCM helps the model capture object shapes and boundaries more completely. This leads to better detection results.

Effectiveness of DEM. Rows 5 and 6 of Table 4 give the quantitative results for the DEM and its WA. A basic DEM without WA brings only a small gain, which suggests that spatial-domain operation struggles to recover fine details. When WA is added, performance improves more clearly. This is because WA works in the frequency-domain and helps the model focus on high-frequency signals related to object boundaries. As a result, the model captures richer structural information. Fig 8 shows that WA enables the model to create sharper boundaries and finer textures, and thus yields improved saliency maps.

5. Conclusion

In this paper, we propose WMW-SAM, a novel framework that adapts SAM to the SOD task while preserving its pre-trained knowledge. To address the inherent limitations of previous adaptation strategies, we introduce three core components. First, WMSA employs learnable weights across multiple receptive fields. This design enables the encoder to handle salient objects of diverse sizes with few extra parameters, thus reducing incomplete predictions. Second, MFCM utilizes cascaded top-down cross-attention to enable effective interaction that connects high-level semantics with low-level details. This deep interaction helps to generate sharper object boundaries. Third, DEM leverages DWT to explicitly isolate and enhance high-frequency sub-bands in the frequency-domain. This operation recovers fine textures and edge information that tend to be discarded in spatial-domain processing. Extensive experiments on benchmark datasets confirm that our method yields more accurate saliency maps in complex scenes.

References

  1. 1. Borji A, Cheng M-M, Jiang H, Li J. Salient object detection: a benchmark. IEEE Trans Image Process. 2015;24(12):5706–22. pmid:26452281
  2. 2. Zhang P, Liu W, Wang D, Lei Y, Wang H, Lu H. Non-rigid object tracking via deep multi-scale spatial-temporal discriminative saliency maps. Pattern Recogn. 2020;100:107130.
  3. 3. Zhou Z, Pei W, Li X, Wang H, Zheng F, He Z. Saliency-associated object tracking. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021. pp. 9866–75.
  4. 4. Wang W, Shen J, Porikli F. Saliency-aware geodesic video object segmentation. In: Proceedings of the IEEE conference on computer vision and pattern recognition. 2015. pp. 3395–402.
  5. 5. Zhang P, Liu W, Wang H, Lei Y, Lu H. Deep gated attention networks for large-scale street-level scene segmentation. Pattern Recogn. 2019;88:702–14.
  6. 6. Gao S, Yu C, Zhang P, Lu H. Part Representation Learning with Teacher-Student Decoder for Occluded Person Re-Identification. In IEEE International Conference on Acoustics, Speech and Signal Processing. IEEE; 2024. pp. 2660–4.
  7. 7. Quispe R, Pedrini H. Improved person re-identification based on saliency and semantic parsing with deep neural network models. Image Vision Comput. 2019;92:103809.
  8. 8. Wei A, Liu S, Zhang C, Liu S, Xu K, Chen Z. FSINet: a robust feature separation and integration network for multiscale SAR object detection. IEEE J Select Top Appl Earth Observ Remote Sens. 2026.
  9. 9. He Y, Cheng W, Deng B, Zhang Y, Cheng L, Wang Y. SWS-YOLO: An energy-efficient spiking neural network for water-surface object detection. Neurocomputing. 2026:134066.
  10. 10. Dosovitskiy A, Beyer L, Kolesnikov A, Weissenborn D, Zhai X, Unterthiner T, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint. 2020.
  11. 11. Kirillov A, Mintun E, Ravi N, Mao H, Rolland C, Gustafson L, et al. Segment anything. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2023. pp. 4015–26.
  12. 12. Chen T, Zhu L, Deng C, Cao R, Wang Y, Zhang S, et al. Sam-adapter: Adapting segment anything in underperformed scenes. In Proceedings of the IEEE/CVF International Conference on Computer Vision. 2023. pp. 3367–75.
  13. 13. Ma J, He Y, Li F, Lin H, You C, Wang B. Segment anything in medical images. Nat Commun. 2024;15(1):654.
  14. 14. Ren T, Liu S, Zeng A, Lin J, Li K, Cao H, et al. Grounded sam: Assembling open-world models for diverse visual tasks. arXiv preprint. 2024.
  15. 15. Yan T, Wan Z, Deng X, Zhang P, Liu Y, Lu H. MAS-SAM: Segment Any Marine Animal with Aggregated Features. arXiv preprint. 2024.
  16. 16. Zhang P, Yan T, Liu Y, Lu H. Fantastic Animals and Where to Find Them: Segment Any Marine Animal with Dual SAM. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2024. pp. 2578–87.
  17. 17. Gao S, Zhang P, Yan T, Lu H. Multi-scale and detail-enhanced segment anything model for salient object detection. Proceedings of the 32nd ACM international conference on multimedia. 2024. pp. 9894–903.
  18. 18. Simonyan K, Zisserman A. Very deep convolutional networks for large-scale image recognition. arXiv preprint. 2014.
  19. 19. He K, Zhang X, Ren S, Sun J. Deep residual learning for image recognition. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2016. pp. 770–8.
  20. 20. Zhang P, Wang D, Lu H, Wang H, Ruan X. Amulet: Aggregating multi-level convolutional features for salient object detection. In: Proceedings of the IEEE international conference on computer vision. 2017. pp. 202–11.
  21. 21. Zeng Y, Zhang P, Zhang J, Lin Z, Lu H. Towards high-resolution salient object detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2019. pp. 7234–43.
  22. 22. Wei J, Wang S, Huang Q. F³Net: Fusion, Feedback and Focus for Salient Object Detection. Proc AAAI Conf Artif Intell. 2020;34(07):12321–8.
  23. 23. Mohammadi S, Noori M, Bahri A, Ghofrani Majelan S, Havaei M. CAGNet: content-aware guidance for salient object detection. Pattern Recogn. 2020;103:107303.
  24. 24. Liu J-J, Hou Q, Cheng M-M. Dynamic feature integration for simultaneous detection of salient object, edge and skeleton. IEEE Trans Image Process. 2020;29:8652–667. pmid:32845837
  25. 25. Zhao X, Pang Y, Zhang L, Lu H, Zhang L. Suppress and balance: A simple gated network for salient object detection. In: Proceedings of European Conference on Computer Vision. Springer; 2020. pp. 35–51.
  26. 26. Pang Y, Zhao X, Zhang L, Lu H. Multi-scale interactive network for salient object detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 9413–9422, 2020.
  27. 27. Wei J, Wang S, Wu Z, Su C, Huang Q, Tian Q. Label decoupling framework for salient object detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2020. pp. 13025–34.
  28. 28. Wang Y, Wang R, Fan X, Wang T, He X. Pixels, regions, and objects: Multiple enhancement for salient object detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023. pp. 10031–40.
  29. 29. Liu N, Zhang N, Wan K, Shao L, Han J. Visual saliency transformer. In: Proceedings of the IEEE/CVF international conference on computer vision. 2021. pp. 4722–32.
  30. 30. Yuan L, Chen Y, Wang T, Yu W, Shi Y, Jiang ZH, et al. Tokens-to-token vit: Training vision transformers from scratch on imagenet. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021. pp. 558–67.
  31. 31. Yun YK, Lin W. Selfreformer: Self-refined network with transformer for salient object detection. arXiv preprint. 2022.
  32. 32. Zhuge M, Fan D-P, Liu N, Zhang D, Xu D, Shao L. Salient Object Detection via Integrity Learning. IEEE Trans Pattern Anal Mach Intell. 2023;45(3):3738–52. pmid:35666793
  33. 33. Liu Z, Lin Y, Cao Y, Hu H, Wei Y, Zhang Z, et al. Swin transformer: Hierarchical vision transformer using shifted windows. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021. pp. 10012–22.
  34. 34. Wang Y, Zhang L, Zhang P, Zhuge Y, Wu J, Yu H, et al. Learning Local-Global Representation for Scribble-Based RGB-D Salient Object Detection via Transformer. IEEE Trans Circuits Syst Video Technol. 2024;34(11):11592–604.
  35. 35. Deng X, Zhang P, Liu W, Lu H. Recurrent multi-scale transformer for high-resolution salient object detection. In Proceedings of the 31st ACM International Conference on Multimedia. 2023. pp. 7413–23.
  36. 36. Cui R, He S, Qiu S. Adaptive low rank adaptation of segment anything to salient object detection. arXiv preprint. 2023.
  37. 37. Xu B, Jiang Q, Zhao X, Lu C, Liang H, Liang R. Multidimensional exploration of segment anything model for weakly supervised video salient object detection. IEEE Trans Circuits Syst Video Technol. 2025;35(4):2987–98.
  38. 38. Ke L, Ye M, Danelljan M, Tai YW, Tang CK, Yu F, et al. Segment anything in high quality. Advances in Neural Information Processing Systems. 2024. 36.
  39. 39. Houlsby N, Giurgiu A, Jastrzebski S, Morrone B, De Laroussilhe Q, Gesmundo A. Parameter-efficient transfer learning for NLP. In: International conference on machine learning. PMLR; 2019. pp. 2790–9.
  40. 40. Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, et al. Attention is all you need. Advances in Neural Information Processing Systems. 2017;30.
  41. 41. Ba JL, Kiros JR, Hinton GE. Layer normalization. arXiv preprint. 2016.
  42. 42. Hendrycks D, Gimpel K. Gaussian error linear units (gelus). arXiv preprint. 2016.
  43. 43. Hu J, Shen L, Sun G. Squeeze-and-excitation networks. In: Proceedings of the IEEE conference on computer vision and pattern recognition. 2018. pp. 7132–41.
  44. 44. Liu W, Yan Q, Zhao Y. Densely self-guided wavelet network for image denoising. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Workshops (CVPRW). 2020. pp. 1742–50.
  45. 45. Wang L, Lu H, Wang Y, Feng M, Wang D, Yin B, et al. Learning to detect salient objects with image-level supervision. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2017. pp. 136–45.
  46. 46. Yang C, Zhang L, Lu H, Ruan X, Yang M. Saliency detection via graph-based manifold ranking. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2013. pp. 3166–73.
  47. 47. Li G, Yu Y. Visual saliency based on multiscale deep features. In: Proceedings of the IEEE conference on Computer Vision and Pattern Recognition. 2015. pp. 5455–63.
  48. 48. Yan Q, Xu L, Shi J, Jia J. Hierarchical saliency detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2013. pp. 1155–62.
  49. 49. Li Y, Hou X, Koch C, Rehg JM, Yuille AL. The secrets of salient object segmentation. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2014. pp. 280–87.
  50. 50. Perazzi F, Krähenbühl P, Pritch Y, Hornung A. Saliency filters: Contrast based filtering for salient region detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. IEEE; 2012. pp. 733–40.
  51. 51. Fan DP, Cheng MM, Liu Y, Li T, Borji A. Structure-measure: A new way to evaluate foreground maps. In: Proceedings of the IEEE international conference on computer vision. 2017. pp. 4548–57.
  52. 52. Fan DP, Gong C, Cao Y, Ren B, Cheng MM, Borji A. Enhanced-alignment measure for binary foreground map evaluation. arXiv preprint. 2018.
  53. 53. Ma M, Xia C, Xie C, Chen X, Li J. Boosting Broader Receptive Fields for Salient Object Detection. IEEE Trans Image Process. 2023;32:1026–38. pmid:37018243
  54. 54. Cheng M-M, Mitra NJ, Huang X, Torr PHS, Hu S-M. Global Contrast Based Salient Region Detection. IEEE Trans Pattern Anal Mach Intell. 2015;37(3):569–82. pmid:26353262
  55. 55. Achanta R, Hemami S, Estrada F, Susstrunk S. Frequency-tuned salient region detection. IEEE Conference on Computer Vision and Pattern Recognition. 2009. pp. 1597–604.
  56. 56. Zhang Y, Ping H, Li Y, Bing Z, Sun F, Knoll A. DualGazeNet: A Biologically Inspired Dual-Gaze Query Network for Salient Object Detection. arXiv preprint. 2025.
  57. 57. Zheng P, Gao D, Fan D, Liu L, Laaksonen J, Ouyang W. Bilateral reference for high-resolution dichotomous image segmentation. arXiv preprint. 2024.
  58. 58. Ghosh S, Sur A, Mitra P. DGSSM: Diffusion guided state-space models for multimodal salient object detection. arXiv preprint. 2026.
  59. 59. Li Y, Wang H, Katsaggelos A. Cpdr: Towards highly-efficient salient object detection via crossed post-decoder refinement. arXiv preprint. 2025.