Fine-tune satellite vision models without hand-wiring pipelines
TerraTorch provides a flexible framework for fine-tuning geospatial foundation models by abstracting the usual boilerplate of wiring backbones to decoders and wrangling satellite datasets.

What it does TerraTorch is a PyTorch Lightning library built on TorchGeo that handles the repetitive scaffolding for geospatial vision tasks. It provides trainers for segmentation, classification, and pixel-wise regression, plus model factories that marry geospatial backbones—such as Prithvi, Clay, or SatMAE—to decoders from SMP or mmsegmentation. Instead of writing custom dataset classes, you point the ready-made datamodules at your data and launch jobs via CLI or Jupyter notebooks.
The interesting bit It treats geospatial foundation models as interchangeable components. You can slot backbones from Prithvi to Clay into the same training pipeline alongside standard timm backbones, then pair them with decoders from SMP or mmsegmentation without rewriting the loop.
Key highlights
- Pre-configured support for geospatial backbones including Prithvi, TerraMind, SatMAE, ScaleMAE, Clay, and TorchGeo models like DOFA and Satlas.
- Ready-to-go datamodules for GEO-Bench and all TorchGeo datasets that need no custom classes.
- Optional add-ons for weather foundation models, PEFT, VLLM, and Weights & Biases logging.
- Model factories that pair backbones with decoders from SMP and mmsegmentation.
- Published on arXiv with an architecture overview and quick-start docs.
Caveats
- GDAL is a hard dependency and can be painful to install outside of conda-forge.
- The library does not host models; you must source backbones yourself and verify their licenses.
- Optional weather foundation model support requires Python 3.11 or newer.
Verdict Worth your time if you are fine-tuning satellite vision models and want to skip PyTorch Lightning boilerplate; avoid it if you expect a fully hosted model zoo or a GDAL-free install.
Frequently asked
- What is torchgeo/terratorch?
- TerraTorch provides a flexible framework for fine-tuning geospatial foundation models by abstracting the usual boilerplate of wiring backbones to decoders and wrangling satellite datasets.
- Is terratorch open source?
- Yes — torchgeo/terratorch is open source, released under the Apache-2.0 license.
- What language is terratorch written in?
- torchgeo/terratorch is primarily written in Python.
- How popular is terratorch?
- torchgeo/terratorch has 834 stars on GitHub.
- Where can I find terratorch?
- torchgeo/terratorch is on GitHub at https://github.com/torchgeo/terratorch.