git clone https://github.com/torchgeo/geo-eval-harness
cd geo-eval-harness
uv sync --extra dev
Requires Python 3.12+ and runs on Linux, macOS, and Windows.
The Python package is geo_eval_harness; use import geo_eval_harness and python -m geo_eval_harness. TerraTorch models require the separate source installation.
Download a dataset
The runner expects datasets under ./data/. To grab GeoBench V1:
Hugging Face archive downloads use pinned commits and SHA-256 manifests in src/geo_eval_harness/checksums/. See the dataset guide for download sources, splits, bands, and licenses.
Run a basic experiment
# Inspect available presets and datasets without loading ML dependencies
geo-eval-harness models
geo-eval-harness datasets
# A single dataset with a pretrained ImageNet ResNet-50
geo-eval-harness run --model timm/resnet50 --dataset m-eurosat
By default, run prefers the current CUDA device, then MPS, then CPU. Use --device cpu to select CPU explicitly.
geo-eval-harness run --model rcf --dataset m-eurosat --device cpu
Results are appended to results/models/<model name>.csv. The repository includes reference results; installing the package does not download them. Use --output results/my_run.csv or output.file in YAML to select a separate file. Re-run with --resume to skip completed rows whose configuration matches. Each evaluation is saved as it finishes.
# Linear-only probing, with explicit flags overriding the YAML
geo-eval-harness run --config docs/examples/image-run.yaml --methods linear --device cpu
# Validate selections without loading a model or dataset
geo-eval-harness run --model rcf --dataset m-eurosat --dry-run
The docs/examples/ paths refer to a repository checkout. For an installed package, save a linked example locally and pass its path to --config. See image-run.yaml for an image configuration and run --config-help for the JSON schema. Omitted settings inherit
model and dataset defaults; explicit YAML values override them, and supplied
flags override YAML. This includes explicit false, null, and [].
geo-eval-harness, python -m geo_eval_harness, and python -m geo_eval_harness.cli expose the same commands.
Measure encoder cost
The standalone profile command measures one fixed real dataset batch and writes JSON to stdout by default. The flops command uses synthetic inputs, does not load dataset samples, and appends compute measurements to a CSV:
run, flops, and profile share --output-dir for a common output root and --output for an exact file path that takes precedence. Image runs retain their models/, profiles/, and intrinsic_dim/ subdirectories. Standalone profiling writes profile.json beneath an explicit output root.
The handcrafted model adds deterministic spectral and spatial measurements to the ImageStats baseline. The handcrafted_level1, handcrafted_level2, and handcrafted_level3 presets select cumulative feature sets; handcrafted defaults to level 2. Feature width depends on the input bands and available spectral indices.
Download the classification datasets and run the level sweep from this checkout:
The sweep includes ImageStats as level 0 and every classification protocol in the current dataset catalog, including AID, multilabel datasets and EuroSAT’s spatial split. It uses all bands with identity input normalization, with 224-pixel resizing, KNN-5, validation-selected C, train-plus-validation final refit, and 200 bootstrap draws.
The sweep writes to results/models/handcrafted_level*.csv and a local imagestats_handcrafted_control.csv control file (the committed reference results in results/models/ keep handcrafted_level{1,2,3}.csv alongside imagestats.csv). Feature lists and completion status are saved under outputs/handcrafted/. Resume skips matching completed rows; a missing linear or KNN result is reported as a failure. Summaries, including --report-only, select rows matching the requested configuration and devices. Use --output-dir results/handcrafted-current to keep a sweep separate.
Use --levels 1 2, --datasets eurosat resisc45, or --dry-run for a smaller run. The extractor also works through the normal CLI:
python -m geo_eval_harness run --model handcrafted_level2 \
--dataset eurosat --bands all --normalization none
All four presets default to all bands and identity normalization. Custom YAML can set model: {name: handcrafted, kwargs: {level: 3}}; preprocessing belongs under input, not constructor kwargs.
Learn more
Documentation — full
configuration reference, available models, dataset tables, multi-band
experiments, evaluation methodology, output schema, dev / release
workflow, and troubleshooting.
Cleanlab analysis — standalone dataset auditing, probability extraction, and review galleries, with separate dependencies.
Citation
If you use geo-eval-harness in your research, please cite our paper:
@misc{lehmann2026geoevalharnessevaluationharnessgeospatial,
title={geo-eval-harness: An Evaluation Harness for Geospatial Foundation Models},
author={Nils Lehmann and Caleb Robinson and Isaac Corley and Jennifer Marcus and Inbal Becker-Reshef and Juan M. Lavista Ferres and Hannah Kerner},
year={2026},
eprint={2611.33990},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2611.33990},
}
To cite the software itself:
@misc{geoevalharness,
title = {geo-eval-harness: A lightweight benchmarking framework for geospatial foundation models},
author = {geo-eval-harness Contributors},
year = {2026},
note = {Software},
url = {https://github.com/torchgeo/geo-eval-harness}
}
geo-eval-harness
Evaluate geospatial image models with classification and segmentation tasks. Configure runs with CLI flags or validated YAML.
--resumeskips completed evaluations with matching configurations.BenchModel._forward_patch_features. See the custom model guide and contribution guide.Installation
For development:
Requires Python 3.12+ and runs on Linux, macOS, and Windows.
The Python package is
geo_eval_harness; useimport geo_eval_harnessandpython -m geo_eval_harness. TerraTorch models require the separate source installation.Download a dataset
The runner expects datasets under
./data/. To grab GeoBench V1:To download only the datasets needed for a run:
V1 uses the JSON-metadata mirror under
data/classification_v1.0_wds/, with a pinned revision and archive SHA-256 verification.Download GeoBench V2 or an individual dataset by its catalog name:
Hugging Face archive downloads use pinned commits and SHA-256 manifests in
src/geo_eval_harness/checksums/. See the dataset guide for download sources, splits, bands, and licenses.Run a basic experiment
By default,
runprefers the current CUDA device, then MPS, then CPU. Use--device cputo select CPU explicitly.Results are appended to
results/models/<model name>.csv. The repository includes reference results; installing the package does not download them. Use--output results/my_run.csvoroutput.filein YAML to select a separate file. Re-run with--resumeto skip completed rows whose configuration matches. Each evaluation is saved as it finishes.The
docs/examples/paths refer to a repository checkout. For an installed package, save a linked example locally and pass its path to--config. Seeimage-run.yamlfor an image configuration andrun --config-helpfor the JSON schema. Omitted settings inherit model and dataset defaults; explicit YAML values override them, and supplied flags override YAML. This includes explicitfalse,null, and[].geo-eval-harness,python -m geo_eval_harness, andpython -m geo_eval_harness.cliexpose the same commands.Measure encoder cost
The standalone
profilecommand measures one fixed real dataset batch and writes JSON to stdout by default. Theflopscommand uses synthetic inputs, does not load dataset samples, and appends compute measurements to a CSV:run,flops, andprofileshare--output-dirfor a common output root and--outputfor an exact file path that takes precedence. Image runs retain theirmodels/,profiles/, andintrinsic_dim/subdirectories. Standalone profiling writesprofile.jsonbeneath an explicit output root.Both accept
--configand--dry-run. Seedocs/examples/profile.yaml,docs/examples/flops.yaml, and the configuration reference. Optionalprofileandintrinsic_dimpasses within an image run retain their separate per-model CSVs unlessoutput.fileexplicitly combines them.Handcrafted classification baseline
The handcrafted model adds deterministic spectral and spatial measurements to the ImageStats baseline. The
handcrafted_level1,handcrafted_level2, andhandcrafted_level3presets select cumulative feature sets;handcrafteddefaults to level 2. Feature width depends on the input bands and available spectral indices.Download the classification datasets and run the level sweep from this checkout:
The sweep includes ImageStats as level 0 and every classification protocol in the current dataset catalog, including AID, multilabel datasets and EuroSAT’s spatial split. It uses all bands with identity input normalization, with 224-pixel resizing, KNN-5, validation-selected C, train-plus-validation final refit, and 200 bootstrap draws.
The sweep writes to
results/models/handcrafted_level*.csvand a localimagestats_handcrafted_control.csvcontrol file (the committed reference results inresults/models/keephandcrafted_level{1,2,3}.csvalongsideimagestats.csv). Feature lists and completion status are saved underoutputs/handcrafted/. Resume skips matching completed rows; a missing linear or KNN result is reported as a failure. Summaries, including--report-only, select rows matching the requested configuration and devices. Use--output-dir results/handcrafted-currentto keep a sweep separate.Use
--levels 1 2,--datasets eurosat resisc45, or--dry-runfor a smaller run. The extractor also works through the normal CLI:All four presets default to all bands and identity normalization. Custom YAML can set
model: {name: handcrafted, kwargs: {level: 3}}; preprocessing belongs underinput, not constructor kwargs.Learn more
Citation
If you use geo-eval-harness in your research, please cite our paper:
To cite the software itself:
License
MIT.