geo-eval-harness
Evaluate geospatial image models and location encoders with classification, segmentation, and coordinate prediction tasks. Configure runs with CLI flags or validated YAML.
- Image classification uses frozen embeddings with KNN-5 or logistic regression.
- Segmentation supports frozen backbones, LoRA, and full fine-tuning with linear, convolutional, FPN, DPT, UPerNet, and U-Net heads.
- CoordBench evaluates location encoders with random, spatial-block, and official holdouts.
- Runs append results to CSV files.
--resumeskips completed evaluations with matching configurations. - Custom image models implement
BenchModel._forward_patch_features; custom location encoders implementLocationEncoder._encode. See the custom model guide and contribution guide.
Installation
pip install geo-eval-harness
For development:
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. On Linux x86_64 the install automatically includes GPU-accelerated FAISS KNN (CUDA 12, driver R525+, also works on GPU-less machines); other platforms get CPU FAISS.
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:
geo-eval-harness download geobench_v1
To download only the datasets needed for a run:
geo-eval-harness download geobench_v1 --datasets m-eurosat
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:
geo-eval-harness download geobench_v2
geo-eval-harness download eurosat
geo-eval-harness download openearthmap-sar
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
The default device is cuda:0. Select CPU with --device cpu:
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:
geo-eval-harness profile --model rcf --dataset m-eurosat --device cpu \
--batch-size 8 --warmup 1 --measurements 5 > profile.json
geo-eval-harness flops --model rcf --device cpu --band-configs rgb \
--seg-heads --output results/my_compute_cost.csv
run, flops, coord, 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.
Both accept --config and --dry-run. See
docs/examples/profile.yaml,
docs/examples/flops.yaml, and the
configuration reference.
Optional profile and intrinsic_dim passes within an image run retain their
separate per-model CSVs unless output.file explicitly combines them.
Handcrafted classification baseline
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:
python -m geo_eval_harness download geobench_v1
python -m geo_eval_harness download geobench_v2 --datasets benv2,treesatai,so2sat,forestnet
python -m geo_eval_harness download eurosat
python -m geo_eval_harness download resisc45
python -m geo_eval_harness download aid
python experiments/run_handcrafted.py
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.
CoordBench — location encoders
geo-eval-harness coord runs the coordinate-only track: point
(lon, lat) in, a downstream label out. Benchmarks are streamed directly from
the unified taylor-geospatial/coordbench
HuggingFace dataset (PDFM, SatCLIP, SustainBench, CDC PLACES, MOSAIKS/USAVars,
the DeepMind/AlphaEarth suite, and more — no local download). A frozen encoder
is probed with KNN and a ridge linear head under random or
spatial-block cross-validation (regression → R², classification → accuracy).
# MIND on the full suite, using random and spatial cross-validation
geo-eval-harness coord --model mind --dataset all --split both
# One dataset family with the sine/cosine baseline and a linear probe
geo-eval-harness coord --model sincos --dataset pdfm --methods linear
--model mind (MIND,
distilled from AlphaEarth/Climplicit/GeoCLIP/SINR) and --model sincos work with
the base install. The other pretrained encoders (SatCLIP / GeoCLIP / Climplicit /
SINR, via rshf) need the coordbench extra:
pip install "geo-eval-harness[coordbench]",
then --model climplicit (etc.). Results land in
results/coordbench_results.csv. Add your own encoder by subclassing
LocationEncoder (implement _encode) and setting model.target to its
importable Python name, with constructor options under model.kwargs. See the
CoordBench guide
and the runnable
FourierLocationEncoder example.
Learn more
- Documentation — full configuration reference, available models, dataset tables, multi-band experiments, evaluation methodology, output schema, dev / release workflow, and troubleshooting.
- AGENTS.md — contributor guide and house style.
- Cleanlab analysis — standalone dataset auditing, probability extraction, and review galleries, with separate dependencies.
Citation
To cite the software:
@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}
}
License
MIT.
Metadata
Release files for geo-eval-harness 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| geo_eval_harness-0.5.0.tar.gz | 2.3 MB | With provenance | Details for geo_eval_harness-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| geo_eval_harness-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for geo_eval_harness-0.5.0-py3-none-any.whl |
Total release size: 4.7 MB
Release files / geo_eval_harness-0.5.0.tar.gz
| Download URL | geo_eval_harness-0.5.0.tar.gz |
|---|---|
| Size | 2.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00a97f166968ce3719e77b52b0598154f92876db7bbd2118ba262a66b5e46c82
|
|
BLAKE2b-256 checksum How to use checksums |
60229e0b0fc6c40020080b4578625b40be0b4e90b2e5bec3de43d0241b3403c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / geo_eval_harness-0.5.0-py3-none-any.whl
| Download URL | geo_eval_harness-0.5.0-py3-none-any.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84d4fbb9add9064ef986c1b33a742262a7ef4511339553f9453b3f5cc4d45688
|
|
BLAKE2b-256 checksum How to use checksums |
a96926e83dd0c91daa1c264a9f892efc98bd5dfdbbdbe9e91fc88d2d57fafd3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for geo-eval-harness 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for geo_eval_harness-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.