How microsoft/torchgeo works
TorchGeo is a PyTorch domain library for geospatial machine learning. The principal workflow composes georeferenced imagery and labels, samples geographic patches, batches samples through a data module, and supplies them to a training task. Its broader capabilities include benchmark datasets, transforms, model architectures and pretrained weights, self-supervised learning, and prediction output. The README documents the user workflow; sampled source confirms dataset, sampler, and data-module responsibilities. Several model and task implementations are represented from the source index, so their internal connections are not asserted.
Main entry points: tasks Training tasks · datamodules/geo.py Data modules · datasets/geo.py Raster datasets · main.py Training CLI
Components 22
Geospatial data
- Raster datasets
torchgeo/datasets/geo.py - Benchmark datasets
torchgeo/datasets - BigEarthNet
torchgeo/datasets/bigearthnet.py - Chesapeake
torchgeo/datasets/chesapeake.py - Dataset utilities
torchgeo/datasets/utils.py
Sampling and input
- Geospatial samplers
torchgeo/samplers - Data modules
torchgeo/datamodules/geo.py - Data transforms
torchgeo/transforms
Models and learning
- Training tasks
torchgeo/tasks - Task base
torchgeo/tasks/base.py - MoCo learning
torchgeo/tasks/moco.py - BYOL learning
torchgeo/tasks/byol.py - ResNet models
torchgeo/models/resnet.py - ConvLSTM model
torchgeo/models/convlstm.py - EarthLoc model
torchgeo/models/earthloc.py - L-TAE model
torchgeo/models/ltae.py - Presto model
torchgeo/models/presto.py - Other model architectures
torchgeo/models - Specialized losses
torchgeo/losses
Training support
- Training CLI
torchgeo/main.py - Prediction writer
torchgeo/callbacks/writer.py
Other components
- ML user
Connections 15
- ML user → Raster datasets: composes data
- ML user → Benchmark datasets: selects benchmark
- Raster datasets → Geospatial samplers: sample patches
- Benchmark datasets → Data modules: loads batches
torchgeo/datamodules/geo.py - Raster datasets → Data modules: loads dataset
torchgeo/datamodules/geo.py - Data modules → Geospatial samplers: configures samplers
torchgeo/datamodules/geo.py - Data modules → Training tasks: supplies batches
- Data transforms → Raster datasets: transforms samples
- Training tasks → ResNet models: uses models
- Training tasks → Other model architectures: uses models
torchgeo/tasks/moco.py - MoCo learning → Task base: extends task
torchgeo/tasks/moco.py - BYOL learning → Task base: extends task
torchgeo/tasks/byol.py - Training CLI → Data modules: configures data
torchgeo/main.py - Training CLI → Training tasks: configures tasks
torchgeo/main.py - Training tasks → Prediction writer: writes predictions