Surface Water Detection โ€” EfficientNet-B4 + UNet++

A semantic segmentation model for detecting surface water from Sentinel-2 multispectral satellite imagery, trained on the Earth Surface Water Dataset.

Model Description

Property Value
Architecture UNet++
Encoder EfficientNet-B4 (ImageNet pretrained)
Input 6-band Sentinel-2 (B2, B3, B4, B8, B11, B12)
Input Size 512 ร— 512 tiles
Output Classes 2 (Background, Water)
Parameters ~19M
Framework segmentation-models-pytorch + PyTorch Lightning

Training Details

Parameter Value
Dataset Earth Surface Water Dataset
Training Tiles 1,581 (from 64 scenes, 512ร—512, stride 128)
Validation Tiles 396
Epochs 50
Batch Size 8
Learning Rate 1e-4
Weight Decay 1e-4
Optimizer Adam
Loss Cross-Entropy

Performance

Tile-level Validation (during training)

Metric Value
Best Val IoU 0.9863
Best Val Loss 0.0112
Train IoU (final) 0.989

Full-scene Validation (31 scenes, sliding window 512ร—512, overlap 256)

Metric Value
IoU 0.9635
Dice 0.9814

Usage

Installation

pip install geoai-py timm segmentation-models-pytorch

Inference from HuggingFace Hub

import geoai

geoai.timm_segmentation_from_hub(
    input_path="sentinel2_scene.tif",
    output_path="water_mask.tif",
    repo_id="giswqs/s2-water-unetplusplus-efficientnet-b4",
    window_size=512,
    overlap=256,
    batch_size=4,
)

Input Format

The model expects 6-band Sentinel-2 L2A GeoTIFF images:

Band Index Sentinel-2 Band Wavelength (nm) Resolution
1 B2 (Blue) 490 10m
2 B3 (Green) 560 10m
3 B4 (Red) 665 10m
4 B8 (NIR) 842 10m
5 B11 (SWIR1) 1610 20m
6 B12 (SWIR2) 2190 20m

Dataset

The Earth Surface Water Dataset contains 95 globally distributed Sentinel-2 scenes with binary water masks:

  • Training: 64 scenes
  • Validation: 31 scenes
  • Source: Zenodo

Citation

@ARTICLE{Luo2021-te,
  title     = "{An applicable and automatic method for earth surface water
               mapping based on multispectral images}",
  author    = "Luo, Xin and Tong, Xiaohua and Hu, Zhongwen",
  journal   = "International Journal of Applied Earth Observation and
               Geoinformation",
  publisher = "Elsevier BV",
  volume    =  103,
  pages     =  102472,
  year      =  2021,
  url       = "http://dx.doi.org/10.1016/j.jag.2021.102472",
  doi       = "10.1016/j.jag.2021.102472",
  issn      = "1569-8432,1872-826X",
}

License

This model is released under the CC-BY-4.0 license, consistent with the training dataset license.

Downloads last month
19
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train giswqs/s2-water-unetplusplus-efficientnet-b4

Evaluation results

  • Validation IoU (full scenes) on Earth Surface Water Dataset (Sentinel-2)
    self-reported
    0.964
  • Validation Dice (full scenes) on Earth Surface Water Dataset (Sentinel-2)
    self-reported
    0.981
  • Best Tile-level Val IoU on Earth Surface Water Dataset (Sentinel-2)
    self-reported
    0.986