--- license: mit task_categories: - image-classification - feature-extraction language: - en tags: - satellite - sentinel-2 - remote-sensing - geospatial - satclip size_categories: - 100K.tif` files. Sharding the original 78 GB tar makes resumable downloads and partial loads practical; the single `satclip.tar` is included as well so users can grab everything at once if they prefer. ## Per-patch format Each `patch_.tif` is a GeoTIFF with: - **Shape:** 256 × 256 pixels - **Bands:** 12 (Sentinel-2 L2A: B01, B02, B03, B04, B05, B06, B07, B08, B8A, B09, B11, B12 — B10 is excluded) - **dtype:** uint16 (raw reflectance, scale by 10,000 to get [0,1]) - **CRS:** UTM zone of the source raster (EPSG:326XX / 327XX) - **Resolution:** 10 m > **Note:** Pillow / `datasets.Image` cannot decode 12-band uint16 GeoTIFFs. Use `rasterio` (or `tifffile`) to read these files. ## Loading ### Stream a few shards directly ```python import io import tarfile import rasterio from huggingface_hub import hf_hub_download shard_path = hf_hub_download( repo_id="kklmmr/s2-100k", filename="data/shard-00000.tar", repo_type="dataset", ) with tarfile.open(shard_path) as tar: member = tar.getmember("patch_42.tif") buf = tar.extractfile(member).read() with rasterio.MemoryFile(buf) as mem, mem.open() as src: arr = src.read() # shape: (12, 256, 256), dtype uint16 bounds = src.bounds # UTM bbox crs = src.crs # e.g. EPSG:32610 ``` ### Pair patches with their coordinates ```python import pandas as pd from huggingface_hub import hf_hub_download meta_path = hf_hub_download( repo_id="kklmmr/s2-100k", filename="metadata.parquet", repo_type="dataset", ) meta = pd.read_parquet(meta_path) # columns: fn, lon, lat, patch_idx, shard ``` ### Download everything ```python from huggingface_hub import snapshot_download local_dir = snapshot_download( repo_id="kklmmr/s2-100k", repo_type="dataset", local_dir="./s2-100k", ) ``` ## Provenance - **Original dataset:** Sampled and released by the SatCLIP authors (Klemmer et al., 2023). - **Original host:** `https://satclip.blob.core.windows.net/$web/satclip/` (Microsoft Azure Blob Storage). - **Source code:** [microsoft/satclip](https://github.com/microsoft/satclip). - **Paper:** [SatCLIP: Global, General-Purpose Location Embeddings with Satellite Imagery](https://arxiv.org/abs/2311.17179). This repository contains **only the dataset**. The pretrained SatCLIP model checkpoints are available from the original SatCLIP authors. ## License MIT, matching the upstream SatCLIP project. ## Citation ```bibtex @article{klemmer2023satclip, title={SatCLIP: Global, General-Purpose Location Embeddings with Satellite Imagery}, author={Klemmer, Konstantin and Rolf, Esther and Robinson, Caleb and Mackey, Lester and Ru{\ss}wurm, Marc}, journal={arXiv preprint arXiv:2311.17179}, year={2023} } ```