A globally applicable deep learning model for Sentinel-2 cloud and shadow detection

This study presents and evaluates a globally applicable cloud and shadow masking model for Sentinel-2 top-of-atmosphere (TOA) reflectance using a state-of-the-art transformer-based U-Net model (Swin-Unet) trained with nearly 20 thousand globally distributed 512 × 512 20 m pixel patches to classify each pixel as cloud, cloud shadow, or clear. The training data were compiled from publicly available annotation data, that were refined for obvious annotation errors and supplemented with additional annotations to enhance representation of underrepresented cloud and surface conditions. The trained Swin-Unet model was validated using the KappaSet and CloudSEN12+ testing datasets and compared with the Fmask, Sen2Cor scene classification layer (SCL), and a deep learning model CloudS2Mask. The Swin-Unet achieved the highest overall accuracy (91.32 %) and the highest F1-scores for cloud (0.909) and clear classes (0.935), despite a lower cloud shadow F1-score (0.691) than CloudS2Mask (0.743). The four models were also applied to 11,458 Sentinel-2 images acquired over a calendar year for 78 globally distributed 109 × 109 km tiles and the temporal smoothness index (TSI) of the time series ‘clear’ surface reflectance was derived. The Swin-Unet model yielded the smallest TSI value (most temporally consistent reflectance) for each selected Sentinel-2 band. Visual assessment confirmed the superior performance of the Swin-Unet model. The results highlight the potential of the Swin-Unet model for Sentinel-2 cloud and cloud shadow detection for images acquired anywhere and anytime. The training data and model are publicly available to enable users to apply them efficiently. • Globally applicable Swin-Unet model for Sentinel-2 cloud/shadow detection developed. • Refined and augmented publicly available annotation datasets for training. • Evaluated with 11,458 global images for time series clear reflectance consistency. • Superior accuracy over Fmask, SCL, and CloudS2Mask methods. • Training data, ready-to-use application codes and trained model published.

Authors

Institutions

Publication Details

Journal
Science of Remote Sensing
Published
2025-09-03
DOI
https://doi.org/10.1016/j.srs.2025.100278
Primary Topic
Remote Sensing in Agriculture
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A globally applicable deep learning model for Sentinel-2 cloud and shadow detection

David P. Roy, Hugo De Lemos, Hankui K. Zhang, Dong Luo et al.
1 links
Science of Remote Sensing
Remote Sensing in Agriculture
article

A globally applicable deep learning model for Sentinel-2 cloud and shadow detection

David P. Roy, Hugo De Lemos, Hankui K. Zhang, Dong Luo, Junjie Li
article en

Abstract

This study presents and evaluates a globally applicable cloud and shadow masking model for Sentinel-2 top-of-atmosphere (TOA) reflectance using a state-of-the-art transformer-based U-Net model (Swin-Unet) trained with nearly 20 thousand globally distributed 512 × 512 20 m pixel patches to classify each pixel as cloud, cloud shadow, or clear. The training data were compiled from publicly available annotation data, that were refined for obvious annotation errors and supplemented with additional annotations to enhance representation of underrepresented cloud and surface conditions. The trained Swin-Unet model was validated using the KappaSet and CloudSEN12+ testing datasets and compared with the Fmask, Sen2Cor scene classification layer (SCL), and a deep learning model CloudS2Mask. The Swin-Unet achieved the highest overall accuracy (91.32 %) and the highest F1-scores for cloud (0.909) and clear classes (0.935), despite a lower cloud shadow F1-score (0.691) than CloudS2Mask (0.743). The four models were also applied to 11,458 Sentinel-2 images acquired over a calendar year for 78 globally distributed 109 × 109 km tiles and the temporal smoothness index (TSI) of the time series ‘clear’ surface reflectance was derived. The Swin-Unet model yielded the smallest TSI value (most temporally consistent reflectance) for each selected Sentinel-2 band. Visual assessment confirmed the superior performance of the Swin-Unet model. The results highlight the potential of the Swin-Unet model for Sentinel-2 cloud and cloud shadow detection for images acquired anywhere and anytime. The training data and model are publicly available to enable users to apply them efficiently. • Globally applicable Swin-Unet model for Sentinel-2 cloud/shadow detection developed. • Refined and augmented publicly available annotation datasets for training. • Evaluated with 11,458 global images for time series clear reflectance consistency. • Superior accuracy over Fmask, SCL, and CloudS2Mask methods. • Training data, ready-to-use application codes and trained model published.

Science of Remote SensingVol. 12
William & Mary (US), South Dakota State University (US), Michigan State University (US)
Openalex Percentile: Top 77%
Remote Sensing in Agriculture
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.