[](https://doi.org/10.1038/s41598-023-47595-7) [](https://pypi.org/project/ml4floods/) [](https://pypi.org/project/ml4floods/) [](https://github.com/spaceml-org/ml4floods/blob/main/LICENSE) [](https://huggingface.co/datasets/isp-uv-es/WorldFloodsv2) [](https://huggingface.co/isp-uv-es/ml4floods) [](https://spaceml-org.github.io/ml4floods/) <a href='https://youtu.be/wMLuHf9s9zk'><img src='https://img.shields.io/badge/Tutorial-%23FF0000.svg?style=flat&logo=youtube&logoColor=white' /></a>
<p align="center">
<img src="https://raw.githubusercontent.com/spaceml-org/ml4floods/main/jupyterbook/ml4floods_banner.png" alt="awesome ml4floods" width="50%">
</p>
ML4Floods is an end-to-end ML pipeline for flood extent estimation: from data preprocessing, model training, model deployment to visualization. Here you can find the [WorldFloodsV2🌊 dataset](https://spaceml-org.github.io/ml4floods/content/worldfloods_dataset.html) and [trained models 🤗](https://huggingface.co/isp-uv-es/ml4floods) for flood extent estimation in Sentinel-2 and Landsat.
<p align="center">
<img src="https://raw.githubusercontent.com/spaceml-org/ml4floods/main/jupyterbook/content/ml4ops/ts_albania.gif" alt="awesome flood extent estimation" width="100%">
</p>
## Install
Install from [pip](https://pypi.org/project/ml4floods/):
```bash
pip install ml4floods
```
Install the latest version from GitHub:
```bash
pip install git+https://github.com/spaceml-org/ml4floods#egg=ml4floods
```
## Docs
[](https://spaceml-org.github.io/ml4floods/)
These tutorials may help you explore the datasets and models:
* [Kherson Dam Break *end-to-end* flood extent map](https://spaceml-org.github.io/ml4floods/content/ml4ops/HOWTO_postprocess_inference.html) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/ml4ops/HOWTO_postprocess_inference.ipynb)
* [Run the model on time series of Sentinel-2 images](https://spaceml-org.github.io/ml4floods/content/ml4ops/HOWTO_inference_on_image_time_series.html) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/ml4ops/HOWTO_inference_on_image_time_series.ipynb)
* [Ingest data from Copernicus EMS](https://spaceml-org.github.io/ml4floods/content/prep/full_data_ingest.html) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/prep/full_data_ingest.ipynb)
* [ML-models step by step](https://spaceml-org.github.io/ml4floods/content/ml_overview.html)
* [Training](https://spaceml-org.github.io/ml4floods/content/ml4ops/HOWTO_Train_models.html) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/ml4ops/HOWTO_Train_models.ipynb)
* [Inference on new data](https://spaceml-org.github.io/ml4floods/content/ml4ops/HOWTO_Run_Inference_on_new_data.html) (a Sentinel-2 image) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/ml4ops/HOWTO_Run_Inference_on_new_data.ipynb)
* [Perf metrics](https://spaceml-org.github.io/ml4floods/content/ml4ops/HOWTO_performance_metrics_workflow.html) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/ml4ops/HOWTO_performance_metrics_workflow.ipynb)
## The *WorldFloods* database
[](https://huggingface.co/datasets/isp-uv-es/WorldFloodsv2)
The [*WorldFloods* database](https://www.nature.com/articles/s41598-023-47595-7) contains 509 pairs of Sentinel-2 images and flood segmentation masks.
It requires approximately 76GB of hard-disk storage.
The *WorldFloods* database and all pre-trained models are released under a [Creative Commons non-commercial licence](https://creativecommons.org/licenses/by-nc/4.0/legalcode.txt)
<img src="https://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nc.png" alt="licence" width="60"/>
To download the *WorldFloods* database or the pretrained flood segmentation models see [the instructions to download the database](https://spaceml-org.github.io/ml4floods/content/worldfloods_dataset.html).
## Cite
If you find this work useful please cite:
```
@article{portales-julia_global_2023,
title = {Global flood extent segmentation in optical satellite images},
volume = {13},
issn = {2045-2322},
doi = {10.1038/s41598-023-47595-7},
number = {1},
urldate = {2023-11-30},
journal = {Scientific Reports},
author = {Portalés-Julià , Enrique and Mateo-GarcÃa, Gonzalo and Purcell, Cormac and Gómez-Chova, Luis},
month = nov,
year = {2023},
pages = {20316},
}
@article{mateo-garcia_towards_2021,
title = {Towards global flood mapping onboard low cost satellites with machine learning},
volume = {11},
issn = {2045-2322},
doi = {10.1038/s41598-021-86650-z},
number = {1},
urldate = {2021-04-01},
journal = {Scientific Reports},
author = {Mateo-Garcia, Gonzalo and Veitch-Michaelis, Joshua and Smith, Lewis and Oprea, Silviu Vlad and Schumann, Guy and Gal, Yarin and Baydin, Atılım Güneş and Backes, Dietmar},
month = mar,
year = {2021},
pages = {7249},
}
```
## About
ML4Floods has been funded by the United Kingdom Space Agency (UKSA) and led by [Trillium Technologies](http://trillium.tech/). In addition, this research has been partially supported 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).
Raw data
{
"_id": null,
"home_page": "https://github.com/spaceml-org/ml4floods",
"name": "ml4floods",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "floods pytorch machine-learning earth",
"author": "SpaceML-org",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/cb/ba/0ff93cc51705e0f94a4452d4ab561ea02fdc493b64a5d343d0c2e4eb1eec/ml4floods-1.1.1.tar.gz",
"platform": null,
"description": "\n[](https://doi.org/10.1038/s41598-023-47595-7) [](https://pypi.org/project/ml4floods/) [](https://pypi.org/project/ml4floods/) [](https://github.com/spaceml-org/ml4floods/blob/main/LICENSE) [](https://huggingface.co/datasets/isp-uv-es/WorldFloodsv2) [](https://huggingface.co/isp-uv-es/ml4floods) [](https://spaceml-org.github.io/ml4floods/) <a href='https://youtu.be/wMLuHf9s9zk'><img src='https://img.shields.io/badge/Tutorial-%23FF0000.svg?style=flat&logo=youtube&logoColor=white' /></a>\n\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/spaceml-org/ml4floods/main/jupyterbook/ml4floods_banner.png\" alt=\"awesome ml4floods\" width=\"50%\">\n</p>\n\nML4Floods is an end-to-end ML pipeline for flood extent estimation: from data preprocessing, model training, model deployment to visualization. Here you can find the [WorldFloodsV2\ud83c\udf0a dataset](https://spaceml-org.github.io/ml4floods/content/worldfloods_dataset.html) and [trained models \ud83e\udd17](https://huggingface.co/isp-uv-es/ml4floods) for flood extent estimation in Sentinel-2 and Landsat.\n\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/spaceml-org/ml4floods/main/jupyterbook/content/ml4ops/ts_albania.gif\" alt=\"awesome flood extent estimation\" width=\"100%\">\n</p>\n\n## Install\n\nInstall from [pip](https://pypi.org/project/ml4floods/):\n\n```bash\npip install ml4floods\n```\n\nInstall the latest version from GitHub:\n\n```bash\npip install git+https://github.com/spaceml-org/ml4floods#egg=ml4floods\n```\n\n## Docs \n\n[](https://spaceml-org.github.io/ml4floods/)\n\nThese tutorials may help you explore the datasets and models:\n* [Kherson Dam Break *end-to-end* flood extent map](https://spaceml-org.github.io/ml4floods/content/ml4ops/HOWTO_postprocess_inference.html) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/ml4ops/HOWTO_postprocess_inference.ipynb)\n* [Run the model on time series of Sentinel-2 images](https://spaceml-org.github.io/ml4floods/content/ml4ops/HOWTO_inference_on_image_time_series.html) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/ml4ops/HOWTO_inference_on_image_time_series.ipynb)\n* [Ingest data from Copernicus EMS](https://spaceml-org.github.io/ml4floods/content/prep/full_data_ingest.html) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/prep/full_data_ingest.ipynb)\n* [ML-models step by step](https://spaceml-org.github.io/ml4floods/content/ml_overview.html)\n * [Training](https://spaceml-org.github.io/ml4floods/content/ml4ops/HOWTO_Train_models.html) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/ml4ops/HOWTO_Train_models.ipynb)\n * [Inference on new data](https://spaceml-org.github.io/ml4floods/content/ml4ops/HOWTO_Run_Inference_on_new_data.html) (a Sentinel-2 image) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/ml4ops/HOWTO_Run_Inference_on_new_data.ipynb)\n * [Perf metrics](https://spaceml-org.github.io/ml4floods/content/ml4ops/HOWTO_performance_metrics_workflow.html) [](https://colab.research.google.com/github/spaceml-org/ml4floods/blob/main/jupyterbook/content/ml4ops/HOWTO_performance_metrics_workflow.ipynb)\n\n## The *WorldFloods* database\n [](https://huggingface.co/datasets/isp-uv-es/WorldFloodsv2)\n \nThe [*WorldFloods* database](https://www.nature.com/articles/s41598-023-47595-7) contains 509 pairs of Sentinel-2 images and flood segmentation masks. \nIt requires approximately 76GB of hard-disk storage. \n\nThe *WorldFloods* database and all pre-trained models are released under a [Creative Commons non-commercial licence](https://creativecommons.org/licenses/by-nc/4.0/legalcode.txt) \n<img src=\"https://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nc.png\" alt=\"licence\" width=\"60\"/>\n\nTo download the *WorldFloods* database or the pretrained flood segmentation models see [the instructions to download the database](https://spaceml-org.github.io/ml4floods/content/worldfloods_dataset.html).\n\n## Cite\n\nIf you find this work useful please cite:\n\n```\n@article{portales-julia_global_2023,\n\ttitle = {Global flood extent segmentation in optical satellite images},\n\tvolume = {13},\n\tissn = {2045-2322},\n\tdoi = {10.1038/s41598-023-47595-7},\n\tnumber = {1},\n\turldate = {2023-11-30},\n\tjournal = {Scientific Reports},\n\tauthor = {Portal\u00e9s-Juli\u00e0, Enrique and Mateo-Garc\u00eda, Gonzalo and Purcell, Cormac and G\u00f3mez-Chova, Luis},\n\tmonth = nov,\n\tyear = {2023},\n\tpages = {20316},\n}\n@article{mateo-garcia_towards_2021,\n\ttitle = {Towards global flood mapping onboard low cost satellites with machine learning},\n\tvolume = {11},\n\tissn = {2045-2322},\n\tdoi = {10.1038/s41598-021-86650-z},\n\tnumber = {1},\n\turldate = {2021-04-01},\n\tjournal = {Scientific Reports},\n\tauthor = {Mateo-Garcia, Gonzalo and Veitch-Michaelis, Joshua and Smith, Lewis and Oprea, Silviu Vlad and Schumann, Guy and Gal, Yarin and Baydin, At\u0131l\u0131m G\u00fcne\u015f and Backes, Dietmar},\n\tmonth = mar,\n\tyear = {2021},\n\tpages = {7249},\n}\n```\n\n## About\n\nML4Floods has been funded by the United Kingdom Space Agency (UKSA) and led by [Trillium Technologies](http://trillium.tech/). In addition, this research has been partially supported 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).\n",
"bugtrack_url": null,
"license": null,
"summary": "Machine learning models for end-to-end flood extent segmentation.",
"version": "1.1.1",
"project_urls": {
"Homepage": "https://github.com/spaceml-org/ml4floods"
},
"split_keywords": [
"floods",
"pytorch",
"machine-learning",
"earth"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4f090dbf3e0dac3f366e14390922c732e9e6e8e9f3aad1bc8d6ff230b9b0bf2f",
"md5": "44ce810d8fb36097cf31da22f2176116",
"sha256": "8b202c781509aa781df1fafe2b3e996442c4c891ea3109256642754b95fbfec1"
},
"downloads": -1,
"filename": "ml4floods-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "44ce810d8fb36097cf31da22f2176116",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 139105,
"upload_time": "2025-07-31T15:51:47",
"upload_time_iso_8601": "2025-07-31T15:51:47.803865Z",
"url": "https://files.pythonhosted.org/packages/4f/09/0dbf3e0dac3f366e14390922c732e9e6e8e9f3aad1bc8d6ff230b9b0bf2f/ml4floods-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cbba0ff93cc51705e0f94a4452d4ab561ea02fdc493b64a5d343d0c2e4eb1eec",
"md5": "30f61cbe879f73935a3bb71dbe344a03",
"sha256": "43abf964d977da63e663bd9a4a3cd32a863f7d123f9b4f79377312634d290c92"
},
"downloads": -1,
"filename": "ml4floods-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "30f61cbe879f73935a3bb71dbe344a03",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 121302,
"upload_time": "2025-07-31T15:51:49",
"upload_time_iso_8601": "2025-07-31T15:51:49.501236Z",
"url": "https://files.pythonhosted.org/packages/cb/ba/0ff93cc51705e0f94a4452d4ab561ea02fdc493b64a5d343d0c2e4eb1eec/ml4floods-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-31 15:51:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "spaceml-org",
"github_project": "ml4floods",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "torch",
"specs": []
},
{
"name": "torchvision",
"specs": []
},
{
"name": "pytorch-lightning",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "rasterio",
"specs": []
},
{
"name": "geopandas",
"specs": []
},
{
"name": "tqdm",
"specs": []
},
{
"name": "albumentations",
"specs": []
},
{
"name": "google-cloud-storage",
"specs": []
},
{
"name": "fsspec",
"specs": []
},
{
"name": "gcsfs",
"specs": []
},
{
"name": "requests_html",
"specs": []
},
{
"name": "earthengine-api",
"specs": []
},
{
"name": "mercantile",
"specs": []
},
{
"name": "seaborn",
"specs": []
},
{
"name": "gdown",
"specs": []
},
{
"name": "matplotlib-scalebar",
"specs": []
},
{
"name": "georeader-spaceml",
"specs": []
},
{
"name": "huggingface_hub",
"specs": []
}
],
"lcname": "ml4floods"
}