CloudSEN12Plus / README.md
csaybar's picture
Update README.md
2bcd2e9 verified
---
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<n<1M
---
# 🚨 New Dataset Version Released!
## We are excited to announce the release of **Version [1.1]** of our dataset!
## This update includes:
- **[L2A & L1C support]**.
- **[Temporal support]**.
- **[Check the data without downloading (Cloud-optimized properties)]**.
# 📥 Go to: https://huggingface.co/datasets/tacofoundation/cloudsen12 and follow the instructions in colab
<center>
<img src="cloudsen12.gif" alt="drawing" width="35%"/>
</center>
**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.
<center>
<img src="https://cdn-uploads.huggingface.co/production/uploads/6402474cfa1acad600659e92/9UA4U3WObVeq7BAcf37-C.png" alt="drawing" width="50%"/>
</center>
*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*
**TACO Snippet**
```python
import tacoreader
import rasterio as rio
dataset = tacoreader.load("tacofoundation:cloudsen12-l1c")
```
**Sensor: Sentinel2 - MSI**
**TACO Task: image-segmentation**
**TACO Dataset Version: 1.1.0**
**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 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)
```
![image/png](https://cdn-uploads.huggingface.co/production/uploads/6402474cfa1acad600659e92/0nRv7sqMRMNY-TVkY2kh7.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},
DOI={10.1016/j.dib.2024.110852},
publisher={Elsevier}
}
```