A collection of common tools to interact with the BigEarthNet dataset.
Project description
Common BigEarthNet Tools
A personal collection of common tools to interact with the BigEarthNet dataset.
This library provides a collection of high-level tools to better work with the BigEarthNet dataset.
bigearthnet_common
tries to:
- Collect the most relevant constants into a single place to reduce the time spent looking for these, like:
- The 19 or 43 class nomenclature strings
- URL
- Band statistics (mean/variance) as integer and float
- Channel names
- etc.
- Provide common metadata related functions
- Safe JSON parser for S1/S2
- Get the original split
- Get a list of snowy/cloudy patches
- Convert the old labels to thew new label nomenclature
- Generate multi-hot encoded label views
- Easily filter patches and generate subsets as CSV files
Installation
The package is available via PyPI and can be installed with:
pip install bigearthnet_common
The package has Python-only dependencies and should cause no issues in more complex Conda environments with various binaries.
Review constants
To quickly search for BigEarthNet constants of interest, call:
ben_constants_prompt
orpython -m bigearthnet_common.constants
Sets generator
To generate sets/subsets from the data and to store them as a CSV file, use:
ben_build_csv_sets --help
This command-line tool let's the user easily create subsets from common constraints. To generate a CSV file that contains all Sentinel-2 patches from Serbia only durng the Summer and Spring months, call the function as:
ben_build_csv_sets <FILE_PATH> S2 --seasons Winter --seasons Summer --countries Serbia --remove-unrecommended-dl-patches
Note: By default this tool will always remove the unrecommended patches, i.e. patches that contain seasonal snow, shadows, clouds, or that have no labels in the 19-class nomenclature
Contributing
Contributions are always welcome!
Please look at the corresponding ipynb
notebook from the nbs
folder to review the source code.
These notebooks include extensive documentation, visualizations, and tests.
The automatically generated Python files are available in the bigearthnet_common
module.
More information is available in the contributing guidelines document.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bigearthnet_common-2.4.0.tar.gz
.
File metadata
- Download URL: bigearthnet_common-2.4.0.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.7.12 Linux/5.11.0-1028-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8814a3f19401584e96da4169f8183db761566dc4c829fd16523205c940d33ad |
|
MD5 | f49fce074fe19fc505a62b4f3613a19b |
|
BLAKE2b-256 | a65c8fa563c9511b5c0b35273ef7b952fee544fb0dfc76240851b87e6b6fe05a |
File details
Details for the file bigearthnet_common-2.4.0-py3-none-any.whl
.
File metadata
- Download URL: bigearthnet_common-2.4.0-py3-none-any.whl
- Upload date:
- Size: 5.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.7.12 Linux/5.11.0-1028-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a01de7a8bc7a3122f847daac43fcd61b88e71e11a7194e7c1d829bd87adefd9d |
|
MD5 | 262b9cdd8b447a43fea7a5e8c2905e49 |
|
BLAKE2b-256 | 6d5abb1eccb8e83f9396f05852834141a35bbf82f0e349a084e52c35b3094e2b |