Abstract
Marine Animal Segmentation (MAS) is a critical yet challenging task due to the unique optical properties of underwater environments, such as light scattering, low contrast, and complex animal camouflage. While the Segment Anything Model (SAM) has demonstrated remarkable generalization in terrestrial domains, its performance degrades significantly in underwater scenarios. We introduce MAS-SAM, a framework that adapts SAM for MAS by integrating parameter-efficient adapters and a multi-scale Progressive Prediction Decoder. Our approach effectively bridges the domain gap and captures fine-grained structural details. Evaluated on four public benchmarks, MAS-SAM consistently outperforms existing state-of-the-art methods, achieving a mean IoU of 0.788 on the MAS3K dataset.
Introduction
Segmenting marine animals is significantly more difficult than segmenting terrestrial objects. Underwater environments suffer from light scattering and absorption, which lead to blurred boundaries, degraded image quality, and low contrast. Furthermore, many marine species have evolved camouflage to blend perfectly into their surroundings, making them nearly invisible to standard computer vision models.
While the Segment Anything Model (SAM) has revolutionized general image segmentation, it struggles in the marine domain for two primary reasons: a significant domain gap (as it was trained primarily on well-lit terrestrial images) and architectural simplicity in its decoder, which often loses the fine-grained structural details—such as thin fins or tentacles—necessary for high-quality marine animal masks.
Methodology
MAS-SAM maintains the core of SAM while customizing it through three main components designed to handle underwater complexities.
1. Adapter-informed SAM Encoder (ASE)
Instead of retraining the massive SAM encoder, MAS-SAM freezes its weights and inserts parameter-efficient modules: LoRA (Low-Rank Adaptation) in the attention layers and a bottleneck Adapter in the feed-forward networks. This allows the model to learn underwater-specific features without the computational cost of full fine-tuning.
2. Hypermap Extraction Module (HEM)
Standard SAM typically utilizes only the final output of the encoder. HEM extracts features from multiple intermediate layers (layers 3, 6, 9, and 12) and aggregates them into a "hypermap." This provides both high-level contextual guidance and low-level spatial details, which are essential for identifying camouflaged targets.
3. Progressive Prediction Decoder (PPD)
We replace SAM's original decoder with a pyramidal structure. This decoder progressively refines the segmentation mask by aggregating features from the prompt, the ASE, and the HEM. Within the decoder, a Fusion Attention Module (FAM) uses channel-wise attention to prioritize relevant features across different scales, helping the model distinguish animals from cluttered backgrounds.
Experiments and Results
MAS-SAM was evaluated on four public MAS benchmarks: MAS3K, RMAS, UFO120, and RUWI. The model consistently outperformed state-of-the-art (SOTA) methods, including CNN-based models (like ECDNet), Transformer-based models (like H2Former), and other SAM-adaptation techniques.
As shown in the quantitative results, MAS-SAM achieved a mean Intersection over Union (mIoU) of 0.788 on the MAS3K dataset, representing a substantial improvement over the original SAM (0.566) and the previous SOTA, MASNet (0.742). Qualitatively, MAS-SAM excels at capturing intricate details where other models produce incomplete masks, demonstrating superior robustness in high-clutter environments.
Conclusion
MAS-SAM demonstrates that large foundation models like SAM can serve as excellent "feature banks" for specialized domains when unlocked via lightweight adapters and multi-scale refinement. By leveraging intermediate encoder features and a progressive decoder, MAS-SAM successfully overcomes the challenges of underwater camouflage and light distortion. Future work will focus on optimizing the model for real-time deployment on underwater autonomous vehicles (AUVs) and extending the framework to video for improved temporal consistency.
Summary updated