Data-Efficient Algal Bloom Segmentation in Freshwater Bodies Using a Three-Stage Transfer Learning Pipeline with Attention-Enhanced Decoding
Organizations: Department of Biological and Agricultural Engineering, Kansas State University
Abstract
Harmful algal blooms threaten water quality and public health, yet automated segmentation of bloom regions in freshwater imagery is limited by scarce pixel-level annotations. We present a transfer-learning pipeline that adapts a Swin Transformer U-Net with SCSE decoder attention from ImageNet-1K to water-body segmentation (RIWA, LaRS) and then to algal blooms, together with a model-assisted annotation protocol that expands the labelled algae corpus from 145 to 655 images. In a single-seed ablation on a 41-image validation split (checkpoint S2-A4 and its variants), corpus expansion is the dominant factor (+11 mIoU points); water-body pretraining helps only on the expanded corpus (+1.1 points over ImageNet initialization); SCSE attention adds 0.3 points; and a learnable positional encoding lowers mIoU by 0.6 points and is omitted. Adding 476 images, 188 of them algae-free, reduces false-positive area on non-water scenes from 22.6% to 4.9%. Against nine baselines on a 256-image test split, a separately trained checkpoint of the same architecture (S2-A13) reaches mIoU 0.919 and the highest algae IoU (0.902); a near-duplicate audit indicates train/test overlap in this split, so these scores are likely optimistic.
Figures & tables
| Dataset | Train | Val/Test | Used for |
| Stage 1 — water-body pretraining | |||
| RIWA | 1,142 | 167 / 323 | Stage 1 |
| LaRS | 2,605 | 198 / 1,203 | Stage 1 |
| Ablation pool | |||
| Algae, initial | 118 | 18 / 9 | S2-A1 – S2-A3 |
| Algae, expanded | 573 | 41 / 41 | S2-A4, A4 ′ , A5, A8 |
| Hyperparameter | Value |
|---|---|
| Optimizer | AdamW |
| Base learning rate | |
| Weight decay | |
| LR schedule | Cosine annealing + 3-epoch warm-up |
| Training epochs | 50 |
| Encoder freeze duration | 15 epochs (Phase 2a) |
| Model | mIoU | IoU Algae | IoU Bkg. | Prec. Algae | Rec. Algae | Latency (ms) | Rank |
|---|---|---|---|---|---|---|---|
| SMP-UNet++ EfficientNet-B4 | 0.9239 | 0.8933 | 0.9546 | 0.9233 | 0.9649 | 26.90 | 1 |
| SMP-UNet ResNet34 | 0.9216 | 0.8896 | 0.9537 | 0.9313 | 0.9521 | 10.39 | 2 |
| DeepLabV3 ResNet101 | 0.9204 | 0.8873 | 0.9535 | 0.9415 | 0.9391 | 49.40 | 3 |
| Swin-UNet (Ours), S2-A13 | 0.9192 | 0.9021 | 0.9362 | 0.9499 | 0.9472 | 50.27 | 4 |
| SMP-FPN ResNet50 | 0.9186 | 0.8848 | 0.9524 | 0.9396 | 0.9381 | 10.39 | 5 |
| SMP-DeepLabV3+ ResNet101 | 0.9166 | 0.8825 | 0.9507 | 0.9289 | 0.9464 | 15.95 | 6 |
| ID | Experiment | Variable under test |
| Stage 1 — Water body pretraining | ||
| S1-A1 | RIWA only | RIWA as sole pretraining source |
| S1-A2 | RIWA + LaRS | Sequential curriculum (reference) |
| Stage 2 — Transfer curriculum & dataset size | ||
| S2-A1 | ImageNet only | No pretraining, small data |
| S2-A1 ′ | Random init, small | No init, no expansion (lower bound) |
| ID | mIoU | IoU | IoU | Pix. Acc |
|---|---|---|---|---|
| S1-A1: RIWA only † | 0.9295 | 0.8975 | 0.9562 | 0.9697 |
| S1-A2: RIWA+LaRS (ref.) | 0.9899 | 0.9884 | 0.9912 | 0.9950 |
| ID | Experiment | mIoU | IoU | IoU | Pix. Acc | Val Loss |
|---|---|---|---|---|---|---|
| Small dataset (145 images) — pretraining comparison | ||||||
| S2-A1 † | ImageNet only | 0.7450 | 0.7947 | 0.6953 | 0.8602 | 0.6019 |
| S2-A1 ′† | Random init | 0.7434 | 0.7942 | 0.6926 | 0.8594 | 0.6014 |
| S2-A2 † | RIWA checkpoint | 0.7178 | 0.7684 | 0.6632 | 0.8420 | 0.5757 |
| S2-A3 † | RIWA+LaRS checkpoint | 0.6609 | 0.7189 | 0.6010 | 0.8049 | 0.7446 |
| Expanded dataset (655 images) — dataset size and pretraining | ||||||
Image Segmentation
Image segmentation assigns pixels or voxels to objects and regions, supporting measurement, scene understanding, and decisions across image domains.
See all 418 papers