torchvision for satellite imagery, minus the RGB assumptions
TorchGeo makes PyTorch work with satellite imagery by handling coordinate systems, spectral bands, and massive rasters for you.

What it does
TorchGeo is a PyTorch domain library for geospatial and remote-sensing data, positioned as a companion to torchvision. It provides datasets, samplers, transforms, and pre-trained models that handle the usual satellite-imagery headaches: multispectral bands beyond RGB, varying spatial resolutions, and mismatched coordinate reference systems. You can compose datasets from multiple satellites or sources using set-style union and intersection operators, and the library automatically aligns projections and resolutions.
The interesting bit
It is the first library to support pre-trained weights for multispectral sensors like Sentinel-2, adopting torchvision’s multi-weight API so you aren’t stuck with RGB ImageNet baselines. It also bundles PyTorch Lightning datamodules and trainers with fixed train-val-test splits to reduce boilerplate and improve reproducibility.
Key highlights
- Geospatial datasets automatically reproject to a common CRS and resolution when composed
- Set operators (
UnionDataset/IntersectionDataset) let you merge or overlap satellite sources without manual alignment - Benchmark datasets for classification, segmentation, object detection, and change detection that return dictionary-style samples
- Pre-trained weights for non-RGB sensors via torchvision’s multi-weight API
- Lightning datamodules and trainers for reproducible experiments
Caveats
- Some datasets require you to bring your own imagery (e.g., Landsat), while others auto-download and checksum
Verdict
Remote sensing researchers and ML practitioners who want to skip geospatial data-wrangling should start here. If your data is already tidy RGB images, plain torchvision is still simpler.
Frequently asked
- What is torchgeo/torchgeo?
- TorchGeo makes PyTorch work with satellite imagery by handling coordinate systems, spectral bands, and massive rasters for you.
- Is torchgeo open source?
- Yes — torchgeo/torchgeo is open source, released under the MIT license.
- What language is torchgeo written in?
- torchgeo/torchgeo is primarily written in Python.
- How popular is torchgeo?
- torchgeo/torchgeo has 4.1k stars on GitHub.
- Where can I find torchgeo?
- torchgeo/torchgeo is on GitHub at https://github.com/torchgeo/torchgeo.