TorchGeo: ML Workflows for Open Geospatial Data
2026-11-04 , Bataglieri

Discover how TorchGeo simplifies machine learning with scripted access to high-quality open datasets like Landsat and Sentinel-2. This Python environment automates geospatial operations using built-in libraries and GDAL-backed standard data sources. Earth observation without specialized expertise.


_1: TorchGeo: ML Workflows for Open Geospatial Data

  • Scripted Access to Landsat, Sentinel-2, and Beyond
  • Brian M Hamlin, TorchGeo project for FOSS4G NA 2026

_2: The Geospatial ML Barrier

  • Problem: High barrier to entry for ML in geospatial.
    Pain Points: Manual data alignment, CRS mismatches, learning GDAL/rasterio APIs, finding open data.
  • Shift focus from data wrangling to solution building.

_3: What is TorchGeo?

  • TorchGeo is a PyTorch domain library, similar to torchvision, providing datasets, samplers, transforms, and pre-trained models specific to geospatial data.
  • Built on GDAL (with rasterio) for robust I/O.
  • OSGeo Context: Part of the open geospatial ecosystem.

_4: Scripted Access to Open Data

  • Datasets have tested data access scripts provided
    e.g. Landsat (1-9), Sentinel-2, NAIP, and Chesapeake Land Cover.
  • Reproducible workflows; data updates automatically.

_5: Automated Geospatial Operations (GDAL Under the Hood)

  • Automated reprojection, resampling, and clipping.
  • How: TorchGeo handles the GDAL calls transparently during data loading.
  • Result: aligned multi-spectral stacks (e.g., combining Sentinel-2 bands with vector masks) without manual gdalwarp.

_6: Handling Multi-Modal Data

  • Challenge: Combining raster (imagery) and vector (labels/boundaries).
  • Workflow: Automatically sample pixel-aligned patches where rasters and vectors overlap.
  • Visual: Diagram showing Raster + Vector → Aligned Patch.

_7: Standard Data Formats

  • Compatibility: Works with Cloud Optimized GeoTIFFs (COGs), GeoTIFFs, Shapefiles/GeoJSON.
  • Why it matters: Scalable, cloud-native workflows without local storage bottlenecks.

_8: Pre-trained Models for Remote Sensing

  • Beyond ImageNet: Models pre-trained on actual satellite data (Sentinel-2, Landsat).
    Benefit: Tracking performance on geospatial tasks with less training data.
  • Simplicity: Load weights in one line (similar to torchvision).

_9: Real-World Example: Land Cover Classification

_10: Benchmarking & Reproducibility

  • Science: Built-in benchmarks for 120+ datasets (e.g., EuroSAT, SpaceNet).
    Value: Compare new models against standard baselines quickly.
  • Community: Contribute new datasets/models back to the library.

_11: Getting Started

_12: Contact & Q&A

  • Links: GitHub, Documentation, online communities .
  • Acknowledgments: TorchGeo contributors, OSGeo, PyTorch team.

Questions?


Topics: Select 1–3 areas of interest that best describe your proposal.: Cloud-Native Geo, Emerging Tech & Future Directions, Geo AI & Machine Learning

Brian M. Hamlin, an OSGeo Charter Member since 2012, is a longtime advocate for open geospatial software; OSGeoLive Linux maintainer and PostGIS fan. He currently mentors the TorchGeo project, bridging machine learning and open earth observation data to Open Science for Environment