cloudsen12_models

Package to run inference with models created by the CloudSEN12 team☁️

https://github.com/ipl-uv/cloudsen12_models

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 11 DOI reference(s) in README
  • Academic publication links
    Links to: sciencedirect.com, nature.com
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.8%) to scientific vocabulary
Last synced: 8 months ago · JSON representation ·

Repository

Package to run inference with models created by the CloudSEN12 team☁️

Basic Info
Statistics
  • Stars: 3
  • Watchers: 3
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Created almost 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

CloudSEN12 DOI:10.1038/s41597-022-01878-2 CloudSEN12+ DOI:10.1016/j.dib.2024.110852 PyPI PyPI - License HF HF docs

Logo CloudSEN12

This package contains minimum code to run the CloudSEN12 models☁️ proposed in Aybar et al. 2022 and Aybar et al. 2024.

pip install cloudsen12_models

Run: ```python

Read S2 image from Google Earth Engine

bandsgee = ['B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B8A', 'B9', 'B10', 'B11', 'B12'] imglocal = eeimage.exportimage('COPERNICUS/S2HARMONIZED/20240417T06463120240417T070110T40RCN', crs='EPSG:32640',transform=Affine(*[10, 0, 300000, 0, -10, 2800020]), bandsgee=bands_gee, geometry=box(55.325, 25.225, 55.415, 25.28))

Load model

modelv2 = cloudsen12.loadmodelbyname(name="UNetMobV2V2", weightsfolder="cloudsen12models")

Compute cloud mask

cloudmaskv2 = modelv2.predict(imglocal/10000)

Plot

fig, ax = plt.subplots(1,2,figsize=(14,5),sharey=True, tightlayout=True) rgb = (imglocal.isel({"band": [bandsgee.index(b) for b in ["B4","B3","B2"]]}) / 4500.).clip(0,1) plot.show(rgb,ax=ax[0]) cloudsen12.plotcloudSEN12mask(cloudmaskv2,ax=ax[1]) ``` <img src="https://raw.githubusercontent.com/IPL-UV/cloudsen12models/main/notebooks/exampleflooddubai_2024.png">

Full example at: runingee_image.ipynb.

models HF

With this package, the following models can be loaded: (with the function cloudsen12.load_model_by_name())

  • cloudsen12 Model trained on the 13 bands of Sentinel-2 L1C in the CloudSEN12 dataset.
  • cloudsen12l2a Model trained on the 12 bands of Sentinel-2 L2A in the CloudSEN12 dataset.
  • dtacs4bands Model trained on the NIR, RED, GREEN and BLUE bands of Sentinel-2 L1C in the CloudSEN12 dataset. Bands: ["B08", "B04", "B03", "B02"]
  • landsat30 Model trained on the common bands of Sentinel-2 L1C and Landsat 8 and 9 in the CloudSEN12 dataset. Bands: ['B01', 'B02', 'B03', 'B04', 'B08', 'B10', 'B11', 'B12'].
  • UNetMobV2_V1 Model trained on the 13 bands of Sentinel-2 L1C in the CloudSEN12 dataset. The cloud masks of this model are included in CloudSEN12+ dataset.
  • UNetMobV2_V2 Model trained on the 13 bands of Sentinel-2 L1C in the CloudSEN12+.

For examples about dataset use and training see cloudsen12.github.io.

Citation

If you find this code useful please cite:

``` @article{aybarcloudsen122024, title = {{CloudSEN12}+: {The} largest dataset of expert-labeled pixels for cloud and cloud shadow detection in {Sentinel}-2}, issn = {2352-3409}, url = {https://www.sciencedirect.com/science/article/pii/S2352340924008163}, doi = {10.1016/j.dib.2024.110852}, journal = {Data in Brief}, 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 Valladares, Jeanett and Flores, Lucy A. and Mamani, Evelin and Quiñonez, Maria and Fajardo, Rai and Espinoza, Wendy and Limas, Antonio and Yali, Roy and Alcántara, Alejandro and Leyva, Martin and Loayza-Muro, Raúl and Willems, Bram and Mateo-García, Gonzalo and Gómez-Chova, Luis}, month = aug, year = {2024}, pages = {110852}, }

@article{aybarcloudsen122022, title = {{CloudSEN12}, a global dataset for semantic understanding of cloud and cloud shadow in {Sentinel}-2}, volume = {9}, issn = {2052-4463}, url = {https://www.nature.com/articles/s41597-022-01878-2}, doi = {10.1038/s41597-022-01878-2}, number = {1}, urldate = {2023-01-02}, journal = {Scientific Data}, 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 Espinoza, Wendy and Prudencio, Fernando and Llactayo, Valeria and Montero, David and Sudmanns, Martin and Tiede, Dirk and Mateo-García, Gonzalo and Gómez-Chova, Luis}, month = dec, year = {2022}, pages = {782}, }

```

Acknowledgments

This research has been funded by the DEEPCLOUD project (PID2019-109026RB-I00) funded by the Spanish Ministry of Science and Innovation (MCIN/AEI/10.13039/501100011033) and the European Union (NextGenerationEU).

DEEPCLOUD project (PID2019-109026RB-I00, University of Valencia) funded by MCIN/AEI/10.13039/501100011033.

Owner

  • Name: Image Processing Lab (IPL)
  • Login: IPL-UV
  • Kind: organization
  • Location: Paterna Research Facilities, Valencia, Spain

Image Processing Lab (IPL)

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite CloudSEN12 paper"
authors:
- family-names: "Aybar"
  given-names: "Cesar"
  orcid: "https://orcid.org/0000-0003-2745-9535"
  affiliation: "Universitat de Valencia"
- family-names: "Mateo-Garcia"
  given-names: "Gonzalo"
  orcid: "https://orcid.org/0000-0002-0569-393X"
  affiliation: "Universitat de Valencia"
title: "cloudsen12_models"
version: 0.1
doi: 10.1038/s41597-022-01878-2
date-released: 2024-07-11
url: "https://www.nature.com/articles/s41597-022-01878-2"

GitHub Events

Total
  • Watch event: 1
  • Member event: 2
  • Push event: 10
  • Create event: 1
Last Year
  • Watch event: 1
  • Member event: 2
  • Push event: 10
  • Create event: 1

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 195 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 12
  • Total maintainers: 1
pypi.org: cloudsen12_models

🛰️ CloudSEN12 models

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 195 Last month
Rankings
Dependent packages count: 9.9%
Downloads: 23.5%
Average: 29.7%
Dependent repos count: 55.7%
Maintainers (1)
Last synced: 9 months ago

Dependencies

requirements.txt pypi
  • georeader-spaceml >=1.0
  • huggingface_hub *
  • torch >=1.13
setup.py pypi