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.
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
- The issue is often caused by a binary mismatch between the underlying
- 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:
- Convert the BigEarthNet patches into numpy arrays
- Use these arrays to initialize the interface class
- Provide any additional metadata information to the interface
- 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
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-patch-interface-0.1.2.tar.gz
.
File metadata
- Download URL: bigearthnet-patch-interface-0.1.2.tar.gz
- Upload date:
- Size: 139.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.1.5 CPython/3.8.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f31a3ab3504ed5e72462e517aca804fce5aad2f3499fcc451ad75198e429bcc3 |
|
MD5 | c5c819eb815d1611778ff347dffb18a5 |
|
BLAKE2b-256 | eb7578db9ade30aecdde99c75259812a5f5e1dc50391e169437c6544a54d84eb |
File details
Details for the file bigearthnet_patch_interface-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: bigearthnet_patch_interface-0.1.2-py3-none-any.whl
- Upload date:
- Size: 140.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.1.5 CPython/3.8.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dc1a5401b9e29c6d3b0de32f5b032762a6c6b13e1404970e6b33557df2eb384 |
|
MD5 | f10228224ac697c905e8a969548f8226 |
|
BLAKE2b-256 | 4215ea719235134ea5ead52d650b01ff7cd3f68f1618d9009b5c68a93aeb3009 |