--- license: - odbl - cc-by-sa-4.0 size_categories: - n<1K pretty_name: TerraMesh-Masks-Eval tags: - Earth observation - Zero-Shot Segmentation - Benchmark task_categories: - image-feature-extraction library_name: webdataset configs: - config_name: default data_files: - split: test path: test_metadata.parquet --- [![arXiv](https://img.shields.io/badge/arXiv-coming_soon-b31b1b?logo=arxiv)](https://arxiv.org/) [![Code](https://img.shields.io/badge/GitHub-TerraMesh_Masks-0F62FE?logo=github)](https://github.com/IBM/TerraMesh-Masks) [![HuggingFace](https://img.shields.io/badge/Hugging_Face-TerraMesh_Masks-FFD21E?logo=huggingface)](https://huggingface.co/ibm-esa-geospatial/TerraMesh-Masks) # TerraMesh-Masks-Eval TerraMesh-Masks-Eval is a human-verified benchmark dataset to evaluate open-vocabulary segmentation models on satellite imagery. This dataset provides binary segmentation masks with captions togehther with input samples from [TerraMesh](https://huggingface.co/ibm-esa-geospatial/TerraMesh). We also provide a training dataset, called [TerraMesh-Masks](https://huggingface.co/ibm-esa-geospatial/TerraMesh-Masks). Examples from the evaluation subset: ![eval_examples.png](https://github.com/IBM/TerraMesh-Masks/raw/main/assets/eval_examples.png) ## Usage Download the data loading code from [GitHub](https://github.com/IBM/TerraMesh-Masks) and install requirements with `pip install -r requirements.txt`. For development, you can stream data directly from Hugging Face. Load from samples from the evaluation dataset: ```python from torch.utils.data import DataLoader from terramesh.masks_eval_dataset import build_eval_dataset dataset = build_eval_dataset( path="https://huggingface.co/datasets/ibm-esa-geospatial/TerraMesh-Masks-Eval/resolve/main/test/", # Default modalities=["S2RGB", "BINARY_MASK"], # Select from ["S2L2A", "S2L1C", "S2RGB", "S1_merged", "DEM", "BINARY_MASK"] batch_size=4, ) dataloader = DataLoader(dataset, batch_size=None) batch = next(iter(dataloader)) ``` ## Download You can download the dataset with the Hugging Face CLI tool ```shell hf download ibm-esa-geospatial/TerraMesh-Masks-Eval --repo-type dataset --local-dir data/TerraMesh ``` This results in the following data structure: ```text TerraMesh ├── test │   ├── BINARY_MASK.tar │   ├── DEM.tar │   ├── S1_merged.tar │   ├── S2L1C.tar │   ├── S2L2A.tar │   └── S2RGB.tar └── test_metadata.parquet ``` Different from TerraMesh, the samples are now stored as tif files which makes reviewing samples easier. You can also untar the archives and load them without using `webdataset`. ## Citation Preprint for TerraMesh-Masks is coming soon! TerraMesh: ```bibtex @article{blumenstiel2025terramesh, title={Terramesh: A planetary mosaic of multimodal earth observation data}, author={Blumenstiel, Benedikt and Fraccaro, Paolo and Marsocci, Valerio and Jakubik, Johannes and Maurogiovanni, Stefano and Czerkawski, Mikolaj and Sedona, Rocco and Cavallaro, Gabriele and Brunschwiler, Thomas and Bernabe-Moreno, Juan and others}, journal={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops}, year={2025}, } ``` ## Licenses The mask annotations are released under ODbL, following the OpenStreetMap license. The image data is released under CC-BY-SA 4.0, following the license from TerraMesh. ## Acknowledgements TerraMesh is part of the **FAST‑EO** project funded by the European Space Agency Φ‑Lab. The binary annotations are based on the base layer provided by [Overture Maps](https://overturemaps.org/) and from [OpenStreetMap](https://www.openstreetmap.org/copyright) tags. The image data in TerraMesh (and therefore this repository) is sourced from various sources: The satellite images (S2L1C, S2L2A, S1GRD, S1RTC) are sourced from the [SSL4EO‑S12 v1.1](https://huggingface.co/datasets/embed2scale/SSL4EO-S12-v1.1) (CC-BY-4.0) and [MajorTOM‑Core](https://huggingface.co/Major-TOM) (CC-BY-SA-4.0) datasets. The LULC data is provided by [ESRI, Impact Observatory, and Microsoft](https://planetarycomputer.microsoft.com/dataset/io-lulc-annual-v02) (CC-BY-4.0). The DEM data is produced using [Copernicus WorldDEM-30](https://dataspace.copernicus.eu/explore-data/data-collections/copernicus-contributing-missions/collections-description/COP-DEM) © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved