Accepted at IEEE Robotics and Automation Letters (RA-L) · 2026

MaskGuidelightweight segmentation, built for the ocean.

The Segment Anything Model is accurate but far too heavy for underwater robots, while lightweight models lose accuracy in murky, low-contrast seas. MaskGuide closes the gap with a feature-level distillation framework that disentangles teacher features into foreground and background and fuses them into a cleaner supervisory signal — yielding Tiny-MSAM, an ultra-light encoder that keeps 99.4% of SAM's accuracy at 3.5M parameters and 164.7 FPS.

Xinrui Wu1#   Ziqiang Zheng2#   Yiwei Chen2   Zeyu Ma1*   Yang Yang1   Sai-Kit Yeung2
1University of Electronic Science and Technology of China  ·  2The Hong Kong University of Science and Technology
#Equal contribution  ·  *Corresponding author
Xinrui Wu xinruiwu.wxr@gmail.com  ·  Ziqiang Zheng zhengziqiang1@gmail.com  ·  Yiwei Chen ychenmb@connect.ust.hk  ·  Zeyu Ma mazeyu@uestc.edu.cn  ·  Yang Yang yang.yang@uestc.edu.cn  ·  Sai-Kit Yeung saikit@ust.hk
Published in IEEE Robotics and Automation Letters  ·  Vol. 11, No. 6, pp. 6775–6782  ·  June 2026

Full paper · in your browser

Read the whole paper, right here.

The complete IEEE RA-L camera-ready (8 pages) — no download required. Scroll through below, or open it full-screen / save a copy from the toolbar.

MaskGuide · IEEE RA-L 2026 · camera-ready Open full-screen ↗ Download

Your browser can't display the PDF inline.

Open the paper ↗
Feature quality vs. model size — Ours, MobileSAM, SAM 2 edge-deployable
Feature-map and prediction comparison: MaskGuide (13.42 MB) matches SAM 2 (856 MB) feature quality at a fraction of the size, and far surpasses MobileSAM
Tiny-MSAM at a glance real-time · on-device · marine-adapted
3.5M
parameters
164.7FPS
inference speed
99.4%
of SAM ViT-H accuracy
13.4MB
weight footprint
0.5% of SAM's parameters 58% of MobileSAM's parameters +133% FPS vs MobileSAM 3-stage TIO training UIIS · IMC · COCO

The challenge

Marine biologists need SAM-level masks on an underwater robot — but SAM's ViT-H encoder is 637 M parameters, and shrinking it underwater wrecks the accuracy.

Underwater imagery is a worst case for segmentation: light attenuation, color distortion, low contrast and cluttered backgrounds erode the very cues a model relies on. SAM and SAM 2 still cope — but their heavyweight encoders can't run on the edge devices marine robots actually carry.

Off-the-shelf lightweight models (MobileSAM, FastSAM) are fast, yet they were distilled on everyday land scenes with generic strategies, so they degrade sharply in the sea. The result is a stubborn gap: either accurate and unusable, or deployable and unreliable.

MaskGuide attacks the gap at the feature level — improving the supervisory signal itself rather than pre-processing pixels — to train an encoder that is both tiny and ocean-ready.

Why naive distillation fails underwater

Three ways feature maps break in the sea.

Distilling straight from raw marine images carries noise and weak guidance into the student. A PCA view of the feature maps exposes three recurring failures — each of which MaskGuide is designed to repair.

Feature-map diagnosis — baseline vs. MaskGuide PCA heatmaps
PCA heatmaps comparing baseline and MaskGuide features across three failure modes: foreground-background confusion, inter-class overlap, and ambiguous boundaries
foreground ↔ background
Confused with background

The target blends into cluttered reef and sand; activations look the same inside and outside the object.

inter-class overlap
Confused with other objects

Different organisms share near-identical features, so the model can't tell one instance from another.

diffuse edges
Unclear boundaries

Activations smear out and never form a crisp contour, blurring the object's true outline.

Our approach

MaskGuide: disentangle, then fuse.

Rather than enhancing the input image, MaskGuide enhances the teacher's features. Using the teacher's own mask, it splits each feature map into a foreground stream and a background stream, then recombines all three views into a single, higher-quality target for distillation — at no extra inference cost to the student.

The MaskGuide pipeline — MaskFusion + IoU-guided dynamic weighting A · B · C
MaskGuide schematic: teacher features are masked into foreground and background branches, fused by MaskFusion, and distilled into the student encoder with IoU-guided dynamic weighting
Branch 1 · Foreground
Foreground purification

Element-wise gating keeps target features and suppresses background noise, focusing the student on the teacher's intrinsic object representation.

I_fg = I ⊙ M
Branch 2 · Background
Context enhancement

The inverted mask amplifies surrounding context, restoring boundary discrimination and contextual reasoning that pure foreground focus would lose.

I_bg = I ⊙ (1 − M)
Fusion · Core
MaskFusion

A weighted element-wise average of the original, foreground and background streams builds a richer teacher signal while staying cheap and inference-free.

F_fused = Fusion(F_orig, F_fg, F_bg)

TIO — a three-stage training curriculum

A static distillation schedule can't transfer SAM's full capability into a tiny model. TIO (Three-stage Iterative Optimization) sequences the objectives — general grounding, marine distillation, then hard-sample refinement — to avoid catastrophic forgetting.

STAGE I
Primary Capability
Broad pre-training on COCO builds foundational features and prevents premature overfitting to marine data.
STAGE II
Feature Distillation
MaskGuide transfers knowledge on marine data (UIIS + IMC), focusing the student on biological features.
STAGE III
Refinement
IoU-guided dynamic weighting up-weights low-IoU hard cases: λ = 10/(1+IoU) when IoU < 0.9.

general grounding → marine feature distillation → hard-sample refinement

Benchmarks · UIIS · IMC · COCO

Smaller, faster, and more accurate.

On underwater instance segmentation (UIIS), our marine-tuned IMC benchmark, and COCO, MaskGuide lifts both backbones above their teachers, while the from-scratch Tiny-MSAM rivals SAM at a fraction of the cost.

Metrics 1-P single-point prompt 5-P five-point prompt BBox box prompt Avg. mean of the three all values are mIoU
MethodParamsUIIS Avg.IMC Avg.COCO
SAM (ViT-H) teacher637 M39.886.580.4
SAM 2 (Large)224 M41.085.680.8
SAM 2 (Tiny)38.9 M37.384.878.2
MobileSAM (ViT-Tiny)6 M39.583.277.8
Ours MobileSAM6 M43.487.279.1
Tiny-MSAM from scratch3.5 M40.981.777.0
Ours SAM637 M44.389.080.6

mIoU on UIIS / IMC / COCO. Cells run warm (strong) → cool (weak) within each column. Our MobileSAM variant beats its own teacher SAM (ViT-H) on UIIS and IMC; Tiny-MSAM reaches 99.4% of SAM's UIIS accuracy with 0.5% of its parameters.

ModelWeightsFPS
SAM (ViT-H)2.43 GB4.2
SAM 2 (Large)856 MB11.9
SAM 2 (Tiny)149 MB31.4
FastSAM138 MB37.2
EfficientSAM39.1 MB112.3
MobileSAM23.18 MB127.4
Tiny-MSAM Ours13.42 MB164.7

Efficiency on the edge. Tiny-MSAM is the lightest and fastest of all open SAM variants — a favorable Pareto point on the accuracy–efficiency curve.

01

Beats its own teacher

After MaskGuide, the MobileSAM student surpasses SAM (ViT-H) on UIIS and IMC — better features, not just cheaper ones, because the fused teacher signal is cleaner than the raw one.

02

SAM accuracy, edge budget

Tiny-MSAM holds 99.4% of SAM's UIIS accuracy at 3.5M params, 13.4MB and 164.7 FPS — and it was trained from scratch, revealing the method's lower bound.

03

Better than enhance-then-segment

Distillation beats running an underwater image-enhancement front-end (Semi-UIR) before segmentation — 87.2 vs 84.5 Avg. on IMC — by transferring robust priors instead of amplifying artifacts.

Dataset

IMC — a self-collected marine benchmark

Built with a marine-biologist team for taxonomy-aware and salient instance segmentation. Evaluation also spans UIIS (underwater instance segmentation) and COCO 2017 (general-domain grounding).

18,948
images
1,000
marine species
37,804
instance masks
41,944
salient masks

A closer look

MaskGuide converges faster, and higher.

On the validation set, the same pipeline trained with MaskGuide (red) reaches a higher IoU plateau far sooner than the identical run without it (cyan) — directly explaining the accuracy gains in the tables above.

Tiny-MSAM · Stage 2val IoU
Validation IoU convergence curve for Tiny-MSAM Stage 2, MaskGuide vs without MaskGuide
MobileSAM · Stage 3val IoU
Validation IoU convergence curve for MobileSAM Stage 3, MaskGuide vs without MaskGuide

Both backbones converge faster and to a higher final IoU with MaskGuide — stable knowledge transfer rather than noisy, slow distillation.

Side by side

Cleaner masks in hard water.

Across severe light attenuation, low contrast and cluttered backgrounds, MaskGuide produces more precise, reliable masks than MobileSAM — and matches or beats the much larger SAM. Click any image to enlarge.

Qualitative segmentation comparison across underwater scenarios for input, SAM, MobileSAM and our method
Per-scenario comparison vs. SAM & MobileSAMqualitative

Citation

Cite MaskGuide.

If MaskGuide or Tiny-MSAM helps your work on marine perception or efficient segmentation, please cite the RA-L paper.

BibTeX
@article{wu2026maskguide,
  title={MaskGuide: Efficient Distillation for Deployable Lightweight Segmentation in Marine Environments},
  author={Wu, Xinrui and Zheng, Ziqiang and Chen, Yiwei and Ma, Zeyu and Yang, Yang and Yeung, Sai-Kit},
  journal={IEEE Robotics and Automation Letters},
  volume={11},
  number={6},
  pages={6775--6782},
  year={2026},
  publisher={IEEE}
}