Skip to main content

Package version Conda version Supported Python versions Build Status Overall downloads Last month downloads Code coverage

Sentinel Hub's cloud detector for Sentinel-2 imagery

NOTE: s2cloudless masks are now available as a precomputed layer within Sentinel Hub. Check the announcement blog post and technical documentation.

The s2cloudless Python package provides automated cloud detection in Sentinel-2 imagery. The classification is based on a single-scene pixel-based cloud detector developed by Sentinel Hub's research team and is described in more detail in this blog.

The s2cloudless algorithm was part of an international collaborative effort aimed at intercomparing cloud detection algorithms. The s2cloudless algorithm was validated together with 9 other algorithms on 4 different test datasets and in all cases found to be on the Pareto front. See the paper

Installation

The package requires a Python version >= 3.8. The package is available on the PyPI package manager and can be installed with

$ pip install s2cloudless

To install the package manually, clone the repository and

$ pip install .

One of s2cloudless dependencies is lightgbm package. If having problems during installation, please check the LightGBM installation guide.

Before installing s2cloudless on Windows, it is recommended to install package shapely from Unofficial Windows wheels repository

Input: Sentinel-2 scenes

The inputs to the cloud detector are Sentinel-2 images. In particular, the cloud detector requires the following 10 Sentinel-2 band reflectances: B01, B02, B04, B05, B08, B8A, B09, B10, B11, B12, which are obtained from raw reflectance values in the following way: B_i/10000. From product baseline 04.00 onward additional harmonization factors have to be applied to data according to instructions from ESA.

You don't need to worry about any of this, if you are using Sentinel-2 data obtained from Sentinel Hub Process API. By default, the data is already harmonized according to documentation. The API is supported in Python with sentinelhub-py package and used within s2cloudless.CloudMaskRequest class.

Examples

A Jupyter notebook on how to use the cloud detector to produce cloud mask or cloud probability map can be found in the examples folder.

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Metadata

Release files for s2cloudless 1.7.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for s2cloudless 1.7.3
File Size Uploaded
s2cloudless-1.7.3.tar.gz 4.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for s2cloudless 1.7.3
File Interpreter ABI Platform
s2cloudless-1.7.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 MB

Release files / s2cloudless-1.7.3.tar.gz

Download URL s2cloudless-1.7.3.tar.gz
Size 4.8 MB
Tags Source
SHA-256 checksum
How to use checksums
6538894722b7e64d6f79595fa9f4b47ac98523bd323e4a9d918e2920cd438801
BLAKE2b-256 checksum
How to use checksums
d8058b562bdb705637fc8967e18b3a595ea48b2d8eb6bdec50c9c8d3ea182ca8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.18

Release files / s2cloudless-1.7.3-py3-none-any.whl

Download URL s2cloudless-1.7.3-py3-none-any.whl
Size 4.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
bd8ea8f21df724e77ed48592bfce1c49f4093aebe3561f88c9a276cd14c934bf
BLAKE2b-256 checksum
How to use checksums
a5ed1971cd2cd4d1e08940a209308bc1a142618cb7dc84586af7fad69c0db4d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.18

Release history Release notifications | RSS feed

This release

1.7.3 This release

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.0

1 release file

1.4.0

1 release file

1.3.0

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page