--- license: mit task_categories: - image-feature-extraction language: - en tags: - sentinel - satelite - photo - earthloc pretty_name: 'EarthLoc 2021 Database ' size_categories: - 100K Commas (`,`) in the keys have been used to replace dots (`.`) due to WebDataset's format. You’ll need to reverse this replacement (`replace(',', '.')`) when decoding. For more details on how the key structure encodes geospatial metadata, refer to the [EarthLoc repository](https://github.com/gmberton/EarthLoc). --- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/635d011579599a4f7dab0613/Vyfyx4iEPFzQTXersMLzU.png) ## 🧪 Example: Displaying the First Image in a Shard You can inspect a sample using the following code in a Jupyter notebook: ```python import webdataset as wds from PIL import Image import matplotlib.pyplot as plt # Path to a WebDataset .tar file tar_path = "./shard-000000.tar" # Create a WebDataset iterator dataset = wds.WebDataset(tar_path).decode("pil") # Load the first sample sample = next(iter(dataset)) # Access image and key image = sample["jpg"] # PIL Image key = sample["__key__"].replace(',', '.') # Display the image plt.imshow(image) plt.axis("off") plt.title(f"Key: {key}") plt.show() # Print the key (for metadata parsing) print(f"Key: {key}")