Skip to content

S2-Cloudless service specifications


icon

This service generates cloud masks (CLM) and probabilities (CLP) using the s2cloudless algorithm developed at Sinergise. It supports both Sentinel-2 Level-1C and Level-2A Calibrated Datasets.

📕 The tutorial of the S2-Cloudless service is available in this section.


Service Description

The Sentinel-2 Cloudless processor (S2-Cloudless) processing service provides cloud masks and probabilities computed using the s2cloudless algorithm developed at Sinergise1. They are available as Sentinel-2 bands named CLP (cloud probabilities) and CLM (cloud masks). The classification is based on a single-scene pixel-based cloud detector developed by Sentinel Hub's research team and is described in more detail in the Sentinel Hub blog2. The s2cloudless algorithm was part of an international collaborative effort aimed at intercomparing cloud detection algorithms. The S2-Cloudless algorithm3 was validated together with 9 other algorithms on 4 different test datasets and in all cases found to be on the Pareto front4. This service supports Calibrated Datasets from Sentinel-2 L1C and L2A data.

cover

Note

The S2-Cloudless processor is offered in the ESA Charter Mapper as 2 separated on-demand services: the Sentinel-2 Cloudless for L1C and Sentinel-2 Cloudless for L2A.

Inputs

The S2-Cloudless service requires as input a Calibrated Dataset (L1C or L2A) from the Sentinel-2 mission.

Parameters

The S2-Cloudless service requires a specified number of mandatory and optional parameters. Table 1 describes the service parameters.

Parameter Description Required Default value
Input product reference A reference to a Sentinel-2 Level-1C or L2A calibrated dataset. YES
Cloud probability threshold to mask cloudy pixels This parameter specifies the cloud probability threshold. All pixels with cloud probability above this threshold are masked as cloudy pixels. Default value is 0.4. YES 0.4
Size of the disk in pixels to perform convolution Size of the disk in pixels for performing convolution (averaging probability over pixels). Default value is 4. Value 0 means do not perform this post-processing step. YES 4
Size of the disk in pixels to perform dilation Size of the disk in pixels for performing dilation (averaging probability over pixels). Default value is 2. Value 0 means do not perform this post-processing step. YES 2

Table 1 - Service parameters for the S2-Cloudless for L1C and L2A services.

Output

The result products of the S2-Cloudless service are the following single band or multi-band assets in COG format:

  • input single band multispectral reflectance assets,

  • Cloud Mask (CLM) single band asset (s2cloudless_clm): 0 (no clouds), 1 (clouds), 255 (no data),

  • Cloud Mask (CLM) overview asset (s2cloudless_clm_overview): True Color Composite with True values of CLM in white superimposed,

  • Cloud Probability (CLP) single band asset (s2cloudless_clp): probabilty in the [0-1] range,

  • Cloud Probability (CLP) overview asset (s2cloudless_clp_overview): True Color Composite with CLP in a red to white color map superimposed,

The CLM no data value of 255 is also returned if a tile has missing CLM and CLP bands, for example due to errors. This ensures that values of 0 and 1 can be used with confidence for each pixel. CLP will in such a case return 0.

S2-Cloudless product specifications can be found in below Tables.

Attribute Value / description
Long Name S2-Cloudless Cloud Mask single band
Short Name s2cloudless_clm
Description CLM binary mask: 1=clouds, 0=no-clouds
Data Type UnSigned 8-bit Integer
Band Single
Format COG
Projection Native as Sentinel-2 L1C or L2A product
Units N/A
Valid Range [0 - 1]
Fill Value 255
Attribute Value / description
Long Name S2-Cloudless Cloud Mask overview
Short Name s2cloudless_clm_overview
Description True Color Composite with True values of CLM in white superimposed
Data Type UnSigned 8-bit Integer
Band 4
Format COG
Projection Native as Sentinel-2 L1C or L2A product
Units N/A
Valid Range [0 - 255]
Attribute Value / description
Long Name S2-Cloudless Cloud Probability single band
Short Name s2cloudless_clp
Description Cloud probability in a [0-1] range
Data Type UnSigned 8-bit Integer
Band Single
Format COG
Projection Native as Sentinel-2 L1C or L2A product
Units N/A
Valid Range [0 - 1]
Fill Value 255
Attribute Value / description
Long Name S2-Cloudless Cloud Probability overview
Short Name s2cloudless_clp_overview
Description True Color Composite with CLP in a red to white color map superimposed
Data Type UnSigned 8-bit Integer
Band 4
Format COG
Projection Native as Sentinel-2 L1C or L2A product
Units N/A
Valid Range [0 - 255]

Filter and or Vectorize CLM single band asset

S2-Cloudless's cloud mask can be spatially filtered and / or converted to polygon using the FilterVectorize service.

To further post-process the s2cloudless_clm single band asset by removing small isolated clusters of pixel employ the FilterVectorize service in Filter mode by selecting a filter threshold size value.

The cloud mask can also be converted to polygons by using the FilterVectorize service in Vectorize mode and selecting only true values DN=1 (clouds).

To apply both spatial filtering and vectorization on CLM asset employ the FilterVectorize service in the Filter and Vectorize mode.

Warning

Only the s2cloudless_clm single band asset can be used in the FilterVectorize on-demand service, being the only discrete raster produced by the S2-Cloudless service.


  1. Sentinel Hub Blog (2017), Improving Cloud Detection with Machine Learning, available at https://medium.com/sentinel-hub

  2. Sentinel Hub's cloud detector for Sentinel-2 imagery in python (2018), source code available in Github at https://github.com/sentinel-hub

  3. Sentinel Hub Blog (2020) Sentinel Hub Cloud Detector, available at https://medium.com/sentinel-hub

  4. Skakun S. et al, (2022) “Cloud Mask Intercomparison eXercise (CMIX): An evaluation of cloud masking algorithms for Landsat 8 and Sentinel-2”, Remote Sensing of Environment, Volume 274, 2022, 112990, ISSN 0034-4257, DOI: 10.1016/j.rse.2022.112990