--- license: cc0-1.0 task_categories: - image-segmentation language: - en tags: - clouds - earth-observation - remote-sensing - sentinel-2 - deep-learning - multi-spectral - satellite - geospatial pretty_name: cloudsen12 size_categories: - 100K **CloudSEN12+** is a significant extension of the [CloudSEN12](https://cloudsen12.github.io/) 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 trustworthiness. 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. ## Data Folder order The CloudSEN12+ dataset is organized into `train`, `val`, and `test` splits. The images have been 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.
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* **ML-STAC Snippet** ```python import mlstac dataset = mlstac.load('isp-uv-es/CloudSEN12Plus') ``` **Sensor: Sentinel2 - MSI** **ML-STAC Task: image-segmentation** **Data raw repository: [https://cloudsen12.github.io/](https://cloudsen12.github.io/)** **Dataset discussion: [https://huggingface.co/datasets/isp-uv-es/CloudSEN12Plus/discussions](https://huggingface.co/datasets/isp-uv-es/CloudSEN12Plus/discussions)** **Split_strategy: stratified** **Paper: [https://www.sciencedirect.com/science/article/pii/S2352340924008163](https://www.sciencedirect.com/science/article/pii/S2352340924008163)** ## Data Providers |Name|Role|URL| | :---: | :---: | :---: | |Image & Signal Processing|['host']|https://isp.uv.es/| |ESA|['producer']|https://www.esa.int/| ## Curators |Name|Organization|URL| | :---: | :---: | :---: | |Cesar Aybar|Image & Signal Processing|http://csaybar.github.io/| ## Labels For human **_high-quality_** labels (also UnetMobV2_V2 & UnetMobV2_V1 predictions). |Name|Value| | :---: | :---: | |clear|0| |thick-cloud|1| |thin-cloud|2| |cloud-shadow|3| For human **_scribble_** labels. |Name|Value| | :---: | :---: | |clear|0| |thick-cloud border|1| |thick-cloud center|2| |thin-cloud border|3| |thin-cloud center|4| |cloud-shadow border|5| |cloud-shadow center|6| ## Dimensions |Axis|Name|Description| | :---: | :---: | :---: | |0|C|Spectral bands| |1|H|Height| |2|W|Width| ## Spectral Bands |Name|Common Name|Description|Center Wavelength|Full Width Half Max|Index| | :---: | :---: | :---: | :---: | :---: | :---: | |B01|coastal aerosol|Band 1 - Coastal aerosol - 60m|443.5|17.0|0| |B02|blue|Band 2 - Blue - 10m|496.5|53.0|1| |B03|green|Band 3 - Green - 10m|560.0|34.0|2| |B04|red|Band 4 - Red - 10m|664.5|29.0|3| |B05|red edge 1|Band 5 - Vegetation red edge 1 - 20m|704.5|13.0|4| |B06|red edge 2|Band 6 - Vegetation red edge 2 - 20m|740.5|13.0|5| |B07|red edge 3|Band 7 - Vegetation red edge 3 - 20m|783.0|18.0|6| |B08|NIR|Band 8 - Near infrared - 10m|840.0|114.0|7| |B8A|red edge 4|Band 8A - Vegetation red edge 4 - 20m|864.5|19.0|8| |B09|water vapor|Band 9 - Water vapor - 60m|945.0|18.0|9| |B10|cirrus|Band 10 - Cirrus - 60m|1375.5|31.0|10| |B11|SWIR 1|Band 11 - Shortwave infrared 1 - 20m|1613.5|89.0|11| |B12|SWIR 2|Band 12 - Shortwave infrared 2 - 20m|2199.5|173.0|12| |CM1| Cloud Mask 1| Expert-labeled image. |-|-|13| |CM2| Cloud Mask 2| UnetMobV2-V1 labeled image. |-|-|14| ## Data Structure We use `.mls` format to store the data in HugginFace and GeoTIFF for ScienceDataBank. ## Folder Structure The **fixed/** folder contains high and scribble labels, which have been improved in this new version. These changes have already been integrated. The **demo/** folder contains examples illustrating how to utilize the models trained with CLoudSEN12 to estimate the hardness and trustworthiness indices. The **images/** folder contains the CloudSEN12+ imagery ## Download The code below can be used to download the dataset using the `mlstac` library. For a more detailed example, please refer to the `examples` section in our website [https://cloudsen12.github.io/](https://cloudsen12.github.io/). ```python import mlstac import matplotlib.pyplot as plt import numpy as np ds = mlstac.load(snippet="isp-uv-es/CloudSEN12Plus") subset = ds.metadata[(ds.metadata["split"] == "test") & (ds.metadata["label_type"] == "high") & (ds.metadata["proj_shape"] == 509)][10:14] datacube = mlstac.get_data(dataset=subset) ``` Make a plot of the data point downloaded ```python datapoint = datacube[2] datapoint_rgb = np.moveaxis(datapoint[[3, 2, 1]], 0, -1) / 5_000 fig, ax = plt.subplots(1, 3, figsize=(10, 5)) ax[0].imshow(datapoint_rgb) ax[0].set_title("RGB") ax[1].imshow(datapoint[13], cmap="gray") ax[1].set_title("Human label") ax[2].imshow(datapoint[14], cmap="gray") ax[2].set_title("UnetMobV2 v1.0") ``` ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6402474cfa1acad600659e92/scVhZf3rkB3uWkZZ6Epmu.png) ## Citation Cite the dataset as: ```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}, pages={110852}, year={2024}, publisher={Elsevier} } ```