data_ingestion/sentinel2/improve_cloud_mask_ensemble
Improves cloud masks by merging the product cloud mask with cloud and shadow masks computed by an ensemble of machine learning segmentation models. This workflow computes cloud and shadow probabilities using and ensemble of segmentation models, thresholds them, and merges the models’ masks with the product mask.
Sources
s2_raster: Sentinel-2 L2A raster.
product_mask: Cloud mask obtained from the product’s quality indicators.
Sinks
mask: Improved cloud mask.
Parameters
cloud_thr: Confidence threshold to assign a pixel as cloud.
shadow_thr: Confidence threshold to assign a pixel as shadow.
Tasks
cloud: Computes the cloud probability of a Sentinel-2 L2A raster using an ensemble of five cloud segmentation models.
shadow: Computes shadow probabilities using a convolutional segmentation model for L2A.
merge: Merges cloud, shadow and product cloud masks into a single mask.
Workflow Yaml
name: improve_cloud_mask_ensemble
sources:
s2_raster:
- cloud.sentinel_raster
- shadow.sentinel_raster
product_mask:
- merge.product_mask
sinks:
mask: merge.merged_cloud_mask
parameters:
cloud_thr: null
shadow_thr: null
tasks:
cloud:
workflow: data_ingestion/sentinel2/cloud_ensemble
shadow:
op: compute_shadow_prob
merge:
op: merge_cloud_masks_simple
op_dir: merge_cloud_masks
parameters:
cloud_prob_threshold: '@from(cloud_thr)'
shadow_prob_threshold: '@from(shadow_thr)'
edges:
- origin: cloud.cloud_probability
destination:
- merge.cloud_probability
- origin: shadow.shadow_probability
destination:
- merge.shadow_probability
description:
short_description: Improves cloud masks by merging the product cloud mask with cloud
and shadow masks computed by an ensemble of machine learning segmentation models.
long_description: This workflow computes cloud and shadow probabilities using and
ensemble of segmentation models, thresholds them, and merges the models' masks
with the product mask.
sources:
s2_raster: Sentinel-2 L2A raster.
product_mask: Cloud mask obtained from the product's quality indicators.
sinks:
mask: Improved cloud mask.
parameters:
cloud_thr: Confidence threshold to assign a pixel as cloud.
shadow_thr: Confidence threshold to assign a pixel as shadow.