--- license: - cc0-1.0 language: - en tags: - clouds - sentinel-2 - image-segmentation - deep-learning - remote-sensing pretty_name: cloudsen12plus viewer: false ---
[![Dataset Image](https://tacofoundation.github.io/taco.png)](https://cloudsen12.github.io/)

This dataset follows the TACO specification.

# [cloudsen12plus](https://cloudsen12.github.io/) **Website:** https://cloudsen12.github.io/ **version:** 1.1.2 ****The largest dataset of expert-labeled pixels for cloud and cloud shadow detection in Sentinel-2**** CloudSEN12+ version 1.1.0 is a significant extension of the CloudSEN12 dataset, which doubles the number of expert-reviewed labels, making it, by a large margin, the largest cloud detection dataset to date for Sentinel-2. All labels from the previous version have been curated and refined, enhancing the dataset's truestworthiness. This new release is licensed under CC0, which puts it in the public domain and allows anyone to use, modify, and distribute it without permission or attribution. The images are padded from 509x509 to 512x512 and 2000x2000 to 2048x2048 to ensure that the patches are divisible by 32. The padding is filled with zeros in the left and bottom sides of the image. For those who prefer traditional storage formats, GeoTIFF files are available in our [ScienceDataBank](https://www.scidb.cn/en/detail?dataSetId=2036f4657b094edfbb099053d6024b08&version=V1) repository. `CloudSEN12+` v.1.1.0 offers three distinct modes, tailored for diverse research and application needs: - **`cloudsen12-l1c`**: Patches derived from Sentinel-2 Level-1C imagery, including high-quality labels, scribble annotations, and unlabeled data. - **`cloudsen12-l2a`**: Similar to cloudsen12-l1c but based on Sentinel-2 Level-2A data as processed by Google Earth Engine. - **`cloudsen12-extra`**: A supplementary collection of metadata to enhance contextual understanding of landscapes. Cloud masks from multiple sources have **NOT** been normalized to align with the CloudSEN12 class schema. This mode includes: - **`elevation:`** Elevation data (meters) sourced from the Copernicus DEM GLO-30. - **`lc10:`** ESA WorldCover 10m v100 land cover product. - **`vv:`** Normalized Sentinel-1 Global Backscatter Model Land Surface (VV polarization). - **`vh:`** Normalized Sentinel-1 Global Backscatter Model Land Surface (VH polarization). - **`cloudmask_qa60:`** Cloud mask from Sentinel-2 Level-1C. - **`cloudmask_sen2cor:`** Cloud mask from Sentinel-2 Level-2A. - **`cloudmask_s2cloudless:`** Cloud mask generated by Sentinel Hub Cloud Detector. - **`cloudmask_cloudscore_cs_v1:`** Cloud mask generated by [Pasquarella et al. 2023](https://openaccess.thecvf.com/content/CVPR2023W/EarthVision/html/Pasquarella_Comprehensive_Quality_Assessment_of_Optical_Satellite_Imagery_Using_Weakly_Supervised_CVPRW_2023_paper.html). - **`cloudmask_cloudscore_cs_cdf_v1:`** Cloud mask generated by [Pasquarella et al. 2023](https://openaccess.thecvf.com/content/CVPR2023W/EarthVision/html/Pasquarella_Comprehensive_Quality_Assessment_of_Optical_Satellite_Imagery_Using_Weakly_Supervised_CVPRW_2023_paper.html). - **`cloudmask_unetmobv2_v1:`** Cloud mask generated by [Aybar et al. 2022](https://www.nature.com/articles/s41597-022-01878-2). - **`cloudmask_unetmobv2_v2:`** Cloud mask generated by [Aybar et al. 2024](https://www.sciencedirect.com/science/article/pii/S2352340924008163). - **`cloudmask_sensei_v2:`** Cloud mask generated by [Alistair Francis 2024](https://ieeexplore.ieee.org/document/10505181). - Changelog: - Version 1.1.2: - BUG FIX: cloudmask_qa60 now are in uint16 rather than uint8 to avoid overflow. - Version 1.1.1: - BUG FIX: VV and VH now are in int16 rather than uint16 to avoid overflow. - Version 1.1.0: - We save all GeoTIFF files with discard_lsb=2 to improve the compression ratio. - Fixed 2000x2000 rotated patches. The datapoints are now correctly oriented. Check the patches: - ROI_2526__20200709T105031_20200709T105719_T31UDQ - ROI_0070__20190708T130251_20190708T130252_T24MUA - ROI_4565__20200530T100029_20200530T100502_T32TQP - Improved the quality of the following patches: - ROI_1098__20200515T190909_20200515T191310_T11WPN - ROI_1735__20190814T163849_20190814T164716_T15SXS - ROI_0760__20190516T022551_20190516T022553_T56WMD - ROI_3696__20200419T075611_20200419T080344_T35MRN - ROI_2864__20170529T105621_20170529T110523_T31TCN - We removed the following patches due to poor quality: - ROI_3980__20190228T005641_20190228T005640_T58WDB - ROI_1489__20210228T070831_20210228T070834_T40TDP - Consideration: - The field `roi_id` field serves as a unique identifier for the geographical location of each patch. In other words, it is used to link S2 images with a specific geographic location. However, the roi_id between the 509x509 and 2000x2000 patches are not the same. For example, the roid_id: `ROI_0008` in the 509x509 patches is not the same as the `ROI_0008` in the 2000x2000 patches. In this version, we fixed this issue by summing the max value of the 509x509 patches to the 2000x2000 patches. In this way, the `roi_id` between the 509x509 and 2000x2000 patches are unique. If users of 2000x2000 patches need to match the original roi_id published in the previous version, they can use the following formula: - `old_roi_id_2000 = old_roi_id_2000 - 12101` where `12101` is the max value of the 509 patches. We also reported the previous roi as old_roi_id.
drawing
*CloudSEN12+ spatial coverage. The terms p509 and p2000 denote the patch size 509 × 509 and 2000 × 2000, respectively. `high`, `scribble`, and `nolabel` refer to the types of expert-labeled annotations* ## 🔄 Reproducible Example Open In Colab Load this dataset using the `tacoreader` library. ```python import tacoreader import rasterio as rio print(tacoreader.__version__) # 0.5.3 # Remotely load the Cloud-Optimized Dataset dataset = tacoreader.load("tacofoundation:cloudsen12-l1c") #dataset = tacoreader.load("tacofoundation:cloudsen12-l2a") #dataset = tacoreader.load("tacofoundation:cloudsen12-extra") # Read a sample sample_idx = 2422 s2_l1c = dataset.read(sample_idx).read(0) s2_label = dataset.read(sample_idx).read(1) # Retrieve the data with rio.open(s2_l1c) as src, rio.open(s2_label) as dst: s2_l1c_data = src.read([4, 3, 2], window=rio.windows.Window(0, 0, 512, 512)) s2_label_data = dst.read(window=rio.windows.Window(0, 0, 512, 512)) # Display fig, ax = plt.subplots(1, 2, figsize=(10, 5)) ax[0].imshow(s2_l1c_data.transpose(1, 2, 0) / 3000) ax[0].set_title("Sentinel-2 L1C") ax[1].imshow(s2_label_data[0]) ax[1].set_title("Human Label") plt.tight_layout() plt.savefig("taco_check.png") plt.close(fig) ```
drawing
## 🛰️ Sensor Information The sensor related to the dataset: **sentinel2msi** ## 🎯 Task The task associated with this dataset: **semantic-segmentation** ## 📂 Original Data Repository Source location of the raw data:**[https://huggingface.co/datasets/isp-uv-es/CloudSEN12Plus](https://huggingface.co/datasets/isp-uv-es/CloudSEN12Plus)** ## 💬 Discussion Insights or clarifications about the dataset: **[https://huggingface.co/datasets/tacofoundation/cloudsen12/discussions](https://huggingface.co/datasets/tacofoundation/cloudsen12/discussions)** ## 🔀 Split Strategy How the dataset is divided for training, validation, and testing: **stratified** ## 📚 Scientific Publications Publications that reference or describe the dataset. ### Publication 01 - **DOI**: [10.1038/s41597-022-01878-2](10.1038/s41597-022-01878-2) - **Summary**: CloudSEN12 first release. Only 509 x 509 patches. - **BibTeX Citation**: ```bibtex @article{aybar2022cloudsen12, title={CloudSEN12, a global dataset for semantic understanding of cloud and cloud shadow in Sentinel-2}, author={Aybar, Cesar and Ysuhuaylas, Luis and Loja, Jhomira and Gonzales, Karen and Herrera, Fernando and Bautista, Lesly and Yali, Roy and Flores, Angie and Diaz, Lissette and Cuenca, Nicole and others}, journal={Scientific Data}, volume={9}, number={1}, pages={782}, year={2022}, publisher={Nature Publishing Group UK London} } ``` ### Publication 02 - **DOI**: [10.1109/IGARSS52108.2023.10282381](10.1109/IGARSS52108.2023.10282381) - **Summary**: Exploration of incorrect annotations in cloud semantic segmentation datasets. - **BibTeX Citation**: ```bibtex @inproceedings{aybar2023lessons, title={Lessons Learned From Cloudsen12 Dataset: Identifying Incorrect Annotations in Cloud Semantic Segmentation Datasets}, author={Aybar, Cesar and Montero, David and Mateo-Garc{'\i}a, Gonzalo and G{'o}mez-Chova, Luis}, booktitle={IGARSS 2023-2023 IEEE International Geoscience and Remote Sensing Symposium}, pages={892--895}, year={2023}, organization={IEEE} } ``` ### Publication 03 - **DOI**: [10.1016/j.dib.2024.110852](10.1016/j.dib.2024.110852) - **Summary**: Extended version of CloudSEN12. We include 2000 x 2000 patches to the dataset. - **BibTeX Citation**: ```bibtex @article{aybar2024cloudsen12+, title={CloudSEN12+: The largest dataset of expert-labeled pixels for cloud and cloud shadow detection in Sentinel-2}, author={Aybar, Cesar and Bautista, Lesly and Montero, David and Contreras, Julio and Ayala, Daryl and Prudencio, Fernando and Loja, Jhomira and Ysuhuaylas, Luis and Herrera, Fernando and Gonzales, Karen and others}, journal={Data in Brief}, volume={56}, pages={110852}, year={2024}, publisher={Elsevier} } ``` ## 🤝 Data Providers Organizations or individuals responsible for the dataset. |**Name**|**Role**|**URL**| | :--- | :--- | :--- | |Image & Signal Processing|host|[https://isp.uv.es/](https://isp.uv.es/)| |European Space Agency (ESA)|producer|[https://www.esa.int/](https://www.esa.int/)| ## 🧑‍🔬 Curators Responsible for structuring the dataset in the TACO format. |**Name**|**Organization**|**URL**| | :--- | :--- | :--- | |Cesar Aybar|Image & Signal Processing|[https://csaybar.github.io/](https://csaybar.github.io/)| ## 🏷️ Labels The dataset contains four classes: clear, thick cloud, thin cloud, and cloud shadow. |**Name**|**Category**|**Description**| | :--- | :--- | :--- | |clear|0|Pixels without cloud and cloud shadow contamination. They are primarily identified using bands B4- B3-B2, B1-B12-B13, and the cirrus band.| |thick cloud|1|Opaque clouds that block all the reflected light from the Earth's surface. We identify them by assuming clouds exhibit distinctive shapes and maintain higher reflectance values in bands B4-B3-B2, B1-B12-B13, and the cirrus band.| |thin cloud|2|Semitransparent clouds that alter the surface spectral signal but still allow to recognize the background. This is the hardest class to identify. We utilize CloudApp [1] to better understand the background, both with and without cloud cover.| |cloud shadow|3|Dark pixels where light is occluded by thick or thin clouds. Cloud shadows depend on clouds presence and, by considering the solar position, we can identify and map these shadows through a reasoned projection of the cloud shape.| ## 🌈 Optical Bands No data value is always: **99** ### `tacofoundation:cloudsen12-l1c` - `s2l1c` |**Name**|**Common Name**|**Description**|**Center Wavelength** (nm)|**Full Width Half Max** (nm)|**Index**|**Scale Factor**| | :--- | :--- | :--- | :--- | :--- | :--- | :--- | |B01|Coastal aerosol|Band 1 - Coastal aerosol - 60m|443.5|17.0|0|0.0001| |B02|Blue|Band 2 - Blue - 10m|496.5|53.0|1|0.0001| |B03|Green|Band 3 - Green - 10m|560.0|34.0|2|0.0001| |B04|Red|Band 4 - Red - 10m|664.5|29.0|3|0.0001| |B05|Red edge 1|Band 5 - Vegetation red edge 1 - 20m|704.5|13.0|4|0.0001| |B06|Red edge 2|Band 6 - Vegetation red edge 2 - 20m|740.5|13.0|5|0.0001| |B07|Red edge 3|Band 7 - Vegetation red edge 3 - 20m|783.0|18.0|6|0.0001| |B08|NIR|Band 8 - Near infrared - 10m|840.0|114.0|7|0.0001| |B8A|Red edge 4|Band 8A - Vegetation red edge 4 - 20m|864.5|19.0|8|0.0001| |B09|Water vapor|Band 9 - Water vapor - 60m|945.0|18.0|9|0.0001| |B10|Cirrus|Band 10 - Cirrus - 60m|1375.5|31.0|10|N/A| |B11|SWIR 1|Band 11 - Shortwave infrared 1 - 20m|1613.5|89.0|11|0.0001| |B12|SWIR 2|Band 12 - Shortwave infrared 2 - 20m|2199.5|173.0|12|0.0001| - `target` The 'scribble' and 'nolabel' patches contains 99 values, which represent 'no data' in CloudSEN12. |**Name**|**Common Name**|**Description**|**Center Wavelength**|**Full Width Half Max**|**Index**|**Scale Factor**| | :--- | :--- | :--- | :--- | :--- | :--- | :--- | |B01|Cloud Label|Cloud labels annotated by humans|-|-|0|1| ### `tacofoundation:cloudsen12-l2a` - `s2l2a` |**Band**|**Name**|**Description**|**Center Wavelength** (nm)|**Bandwidth** (nm)|**Index**|**Scale Factor**| | :--- | :--- | :--- | :--- | :--- | :--- | :--- | |B01|Coastal aerosol|Band 1 - Coastal aerosol - 60m|443.5|17.0|0|0.0001| |B02|Blue|Band 2 - Blue - 10m|496.5|53.0|1|0.0001| |B03|Green|Band 3 - Green - 10m|560.0|34.0|2|0.0001| |B04|Red|Band 4 - Red - 10m|664.5|29.0|3|0.0001| |B05|Red edge 1|Band 5 - Vegetation red edge 1 - 20m|704.5|13.0|4|0.0001| |B06|Red edge 2|Band 6 - Vegetation red edge 2 - 20m|740.5|13.0|5|0.0001| |B07|Red edge 3|Band 7 - Vegetation red edge 3 - 20m|783.0|18.0|6|0.0001| |B08|NIR|Band 8 - Near infrared - 10m|840.0|114.0|7|0.0001| |B8A|Red edge 4|Band 8A - Vegetation red edge 4 - 20m|864.5|19.0|8|0.0001| |B09|Water vapor|Band 9 - Water vapor - 60m|945.0|18.0|9|0.0001| |B11|SWIR 1|Band 11 - Shortwave infrared 1 - 20m|1613.5|89.0|10|0.0001| |B12|SWIR 2|Band 12 - Shortwave infrared 2 - 20m|2199.5|173.0|11|0.0001| |AOT|-|Aerosol Optical Thickness|-|-|12|0.001| |WVP|-|Water Vapor Pressure. The height the water would occupy if the vapor were condensed into liquid and spread evenly across the column|-|-|13|0.001| - `target` The 'scribble' and 'nolabel' patches contains 99 values, which represent 'no data' in CloudSEN12. |**Name**|**Common Name**|**Description**|**Center Wavelength**|**Full Width Half Max**|**Index**|**Scale Factor**| | :--- | :--- | :--- | :--- | :--- | :--- | :--- | |B01|Cloud Label|Cloud labels annotated by humans|-|-|0|1| ### `tacofoundation:cloudsen12-extra` | **Band** | **Name** | **Description** | **Center Wavelength** (nm) | **Bandwidth** (nm) | **Index** | **Scale Factor** | |-------------------------|----------------------------------|------------------------------------------------------------------------------------------------------------------|----------------------------|--------------------|-----------|------------------| | elevation | Elevation | Elevation data (meters) sourced from the Copernicus DEM GLO-30. | - | - | 0 | 1 | | lc10 | Landcover | ESA WorldCover 10m v100 land cover product. | - | - | 0 | 1 | | vv | Vertical-Vertical Polarization | Normalized Sentinel-1 Global Backscatter Model (VV polarization). | - | - | 0 | 0.1 | | vh | Vertical-Horizontal Polarization | Normalized Sentinel-1 Global Backscatter Model (VH polarization). | - | - | 0 | 0.1 | | cloudmask_qa60 | QA60 | Cloud mask from Sentinel-2 Level-1C. | - | - | 0 | 1 | | cloudmask_sen2cor | Sen2Cor | Cloud mask from Sentinel-2 Level-2A. | - | - | 0 | 1 | | cloudmask_s2cloudless | S2Cloudless | Cloud mask generated by Sentinel Hub Cloud Detector. | - | - | 0 | 1 | | cloudmask_cloudscore_cs_v1 | CloudScore v1 | Cloud mask generated by [Pasquarella et al. 2023](https://openaccess.thecvf.com/content/CVPR2023W/EarthVision/html/Pasquarella_Comprehensive_Quality_Assessment_of_Optical_Satellite_Imagery_Using_Weakly_Supervised_CVPRW_2023_paper.html) model. | - | - | 0 | 1 | | cloudmask_cloudscore_cs_cdf_v1 | CloudScore CDF v1 | Cloud mask generated by [Pasquarella et al. 2023](https://openaccess.thecvf.com/content/CVPR2023W/EarthVision/html/Pasquarella_Comprehensive_Quality_Assessment_of_Optical_Satellite_Imagery_Using_Weakly_Supervised_CVPRW_2023_paper.html) model. | - | - | 0 | 1 | | cloudmask_unetmobv2_v1 | UNetMobV2 v1 | Cloud mask generated by [Aybar et al. 2022](https://www.nature.com/articles/s41597-022-01878-2) model. | - | - | 0 | 1 | | cloudmask_unetmobv2_v2 | UNetMobV2 v2 | Cloud mask generated by [Aybar et al. 2024](https://www.sciencedirect.com/science/article/pii/S2352340924008163) model.| - | - | 0 | 1 | | cloudmask_sensei_v2 | Sensei v2 | Cloud mask generated by [Alistair Francis 2024](https://ieeexplore.ieee.org/document/10505181). | - | - | 0 | 1 | ## 👀 Additional metadata In addition to the **`stac`** and **`rai`** fields, this dataset includes the following fields at the sample level. | **ID** | **Description** | |------------------------------|---------------------------------------------------------------------------------| | `roi_id` | Unique identifier for the region of interest (ROI). | | `old_roi_id` | Previous identifier for the region of interest, if applicable. See considerations section above. | | `equi_id` | Identifier for the corresponding equi7grid system. | | `equi_zone` | Zone or section within the equi7grid system. | | `label_type` | Type of label assigned to the ROI. It can be: `high`. `scribble`, and `nolabe`. | | `s2_id` | Identifier for the Sentinel-2 image ids. | | `real_proj_shape` | Image in CloudSEN12 are padded with zeros (see description above). This field contains the shape of the original image. It can be: 2000 and 509. | `s2_mean_solar_azimuth_angle` | Mean solar azimuth angle for the Sentinel-2 image (in degrees). | | `s2_mean_solar_zenith_angle` | Mean solar zenith angle for the Sentinel-2 image (in degrees). | | `thick_percentage` | Percentage of thick clouds in the ROI estimated by the annotator for the `high` label. For `scribble` and `nolabel` labels, this value is derived from UNetMobV2-V1 predictions. | | `thin_percentage` | Percentage of thin clouds in the ROI estimated by the annotator for the `high` label. For `scribble` and `nolabel` labels, this value is derived from UNetMobV2-V1 predictions. | | `cloud_shadow_percentage` | Percentage of cloud shadows in the ROI estimated by the annotator for the `high` label. For `scribble` and `nolabel` labels, this value is derived from UNetMobV2-V1 predictions. | | `clear_percentage` | Percentage of clear sky in the ROI estimated by the annotator for the `high` label. For `scribble` and `nolabel` labels, this value is derived from UNetMobV2-V1 predictions. | ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6402474cfa1acad600659e92/cCoXkNzbOLH34gejjkMzr.png)