Skip to main content

A simple interface class that includes all the relevant information about BigEarthNet patches.

Project description

BigEarthNet Patch Interface

A simple interface class that includes all the relevant information about BigEarthNet patches.

Tests MyPy Type Checker License Python Versions PyPI version Conda Version pdm-managed Auto Release

A common issue when using a BigEarthNet archive is that the code to load a patch is

  • Slow
  • The necessary libraries to load the data have complex dependencies and cause issues with popular deep-learning libraries
    • The issue is often caused by a binary mismatch between the underlying numpy versions
  • Hard to understand how to access the optimized data

A popular approach is to use the key-value storage LMDB. The patch names are set as keys, and the value is somehow encoded. Decoding the values is a common source of bugs when different deep-learning libraries are used.

The goal of this repository is to alleviate this issue. The actual image data will be encoded as numpy arrays to support the most popular deep-learning libraries. Usually, these arrays can be loaded without copying the underlying data.

The provided patch interface will define a Python class containing the relevant bands, encoded as an np.ndarray, and may include some metadata. The interface class allows for fast introspection, validation, and data loading.

It is easier to convert this intermediate data format to a more deep-learning optimized format or use the class itself for embedding in a key-value storage format like LMDB. Please refer to the official {{BenEncoder}} documentation for details on how to generate various output formats.

In general, the encoding pipeline is as follows:

  1. Convert the BigEarthNet patches into numpy arrays
  2. Use these arrays to initialize the interface class
  3. Provide any additional metadata information to the interface
  4. Serialize/convert the data to the desired output format

The decoder should be as simple as possible with minimal dependencies. Ideally, the correct usage of the decoder should also be depicted in the corresponding {{BenEncoder}} section.

:::{note} This interface is tightly coupled with the {{BenEncoder}} libary!

The main reason for providing this interface as a standalone package is to minimize the required dependencies of a user that wants to load/use already encoded patches. Creating the interface from the raw data requires heavy libraries that often cause binary conflicts. The interface class can be installed as a standalone library and only requires the (easier to install) decoder libraries.

:::

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bigearthnet-patch-interface-0.1.2.tar.gz (139.0 kB view details)

Uploaded Source

Built Distribution

bigearthnet_patch_interface-0.1.2-py3-none-any.whl (140.9 kB view details)

Uploaded Python 3

File details

Details for the file bigearthnet-patch-interface-0.1.2.tar.gz.

File metadata

File hashes

Hashes for bigearthnet-patch-interface-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f31a3ab3504ed5e72462e517aca804fce5aad2f3499fcc451ad75198e429bcc3
MD5 c5c819eb815d1611778ff347dffb18a5
BLAKE2b-256 eb7578db9ade30aecdde99c75259812a5f5e1dc50391e169437c6544a54d84eb

See more details on using hashes here.

File details

Details for the file bigearthnet_patch_interface-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for bigearthnet_patch_interface-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1dc1a5401b9e29c6d3b0de32f5b032762a6c6b13e1404970e6b33557df2eb384
MD5 f10228224ac697c905e8a969548f8226
BLAKE2b-256 4215ea719235134ea5ead52d650b01ff7cd3f68f1618d9009b5c68a93aeb3009

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page