# torchgeo/torchgeo

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/torchgeo-torchgeo).**

3,895 stars · 519 forks · Python · mit

## Links

- GitHub: https://github.com/torchgeo/torchgeo
- Homepage: https://www.osgeo.org/projects/torchgeo/
- awesome-repositories: https://awesome-repositories.com/repository/torchgeo-torchgeo.md

## Topics

`computer-vision` `datasets` `deep-learning` `earth-observation` `geospatial` `models` `pytorch` `remote-sensing` `satellite-imagery` `torchvision` `transforms`

## Description

TorchGeo is a PyTorch library designed for deep learning on geospatial data, providing a framework for building and training neural networks for tasks such as semantic segmentation, object detection, and change detection. It serves as a comprehensive pipeline for remote sensing, featuring specialized dataset loaders and multispectral image preprocessing tools.

The library is distinguished by a dedicated remote sensing model zoo and extensive support for transfer learning, allowing users to integrate pre-trained weights optimized for specific satellite sensors. It also includes support for self-supervised learning on unlabeled geospatial data and provides utilities for mapping multispectral weights to custom input channels.

The project covers broad capability areas including geospatial dataset management—such as coordinate reference system reprojection, spatial sampling, and dataset splitting—as well as data preprocessing and the implementation of model architectures for various data dimensions. It further provides command-line interfaces for executing training workflows and tools for visualizing geospatial datasets, including imagery and model predictions.

## Tags

### Artificial Intelligence & ML

- [Remote Sensing Machine Learning](https://awesome-repositories.com/f/artificial-intelligence-ml/remote-sensing-machine-learning.md) — Provides a framework for building and training PyTorch models to analyze satellite and aerial imagery.
- [Image Data Preprocessing](https://awesome-repositories.com/f/artificial-intelligence-ml/image-data-preprocessing.md) — Provides tools for cleaning and transforming raw raster and vector data for neural network pipelines.
- [Pre-training Transfer Learning](https://awesome-repositories.com/f/artificial-intelligence-ml/pre-training-transfer-learning.md) — Provides extensive support for leveraging pre-trained weights from diverse sensors to train models on small datasets. ([source](https://torchgeo.readthedocs.io/en/stable/api/models.html))
- [Remote Sensing Transfer Learning](https://awesome-repositories.com/f/artificial-intelligence-ml/pre-training-transfer-learning/remote-sensing-transfer-learning.md) — Adapts models pre-trained on global satellite imagery to perform specific geospatial tasks with limited labeled data.
- [Geospatial Data Modules](https://awesome-repositories.com/f/artificial-intelligence-ml/pytorch-backends/pytorch-tensor-interoperabilities/geospatial-data-modules.md) — Wraps geospatial loading and sampling logic into standard PyTorch tensor pipelines for seamless deep learning training.
- [Multispectral Band Mapping](https://awesome-repositories.com/f/artificial-intelligence-ml/weight-parameter-mapping/multispectral-band-mapping.md) — Maps pre-trained neural network weights from specific satellite sensor bands to custom multispectral input channels.
- [Geospatial Dataset Splitters](https://awesome-repositories.com/f/artificial-intelligence-ml/dataset-management/evaluation-datasets/dataset-splitting-utilities/geospatial-dataset-splitters.md) — Divides datasets using random bounding box assignment, grid-cell sampling, or temporal splitting to prevent spatial leakage. ([source](https://torchgeo.readthedocs.io/en/stable/api/datasets.html))
- [End-to-End Training Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/end-to-end-training-pipelines.md) — Provides integrated workflows for executing end-to-end geospatial machine learning experiments. ([source](https://cdn.jsdelivr.net/gh/torchgeo/torchgeo@main/README.md))
- [Geospatial Model Architectures](https://awesome-repositories.com/f/artificial-intelligence-ml/geospatial-model-architectures.md) — Implements diverse model architectures to process time series, 2D images, 3D change detection, and 4D atmosphere data. ([source](https://torchgeo.readthedocs.io/en/stable/api/models.html))
- [Geospatial Pre-training Datasets](https://awesome-repositories.com/f/artificial-intelligence-ml/large-scale-model-training/training-datasets/geospatial-pre-training-datasets.md) — Provides support for loading large-scale global imagery collections designed for foundation model development. ([source](https://torchgeo.readthedocs.io/en/stable/api/datasets.html))
- [Pre-trained Model Zoos](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/fine-tuning-and-customization/model-fine-tuning/pre-trained-model-zoos.md) — Ships a dedicated collection of pre-trained weights and architectures optimized for geospatial tasks.
- [Pre-trained Model Application](https://awesome-repositories.com/f/artificial-intelligence-ml/pre-trained-model-application.md) — Enables the use of specialized pre-trained weights for segmentation and object detection on geographic data. ([source](https://torchgeo.readthedocs.io/en/stable/api/index.html))
- [Remote Sensing Task Workflows](https://awesome-repositories.com/f/artificial-intelligence-ml/remote-sensing-task-workflows.md) — Manages training and evaluation workflows for specialized remote sensing tasks such as change detection and semantic segmentation. ([source](https://torchgeo.readthedocs.io/en/stable/api/index.html))

### Part of an Awesome List

- [Geospatial Machine Learning](https://awesome-repositories.com/f/awesome-lists/ai/geospatial-machine-learning.md) — Serves as a framework for building and training neural networks for semantic segmentation, object detection, and change detection.
- [Geospatial Development Libraries](https://awesome-repositories.com/f/awesome-lists/devtools/geospatial-development-libraries.md) — Implements a PyTorch-based library for deep learning on geospatial data, handling remote sensing imagery and coordinate systems.
- [Satellite Datasets](https://awesome-repositories.com/f/awesome-lists/data/satellite-datasets.md) — Utilizes pre-trained weights and specialized architectures to extract insights from multispectral and temporal geographic data.

### Data & Databases

- [Coordinate-Based Spatial Sampling](https://awesome-repositories.com/f/data-databases/coordinate-based-spatial-sampling.md) — Extracts small image patches from large-scale geospatial datasets using coordinate-based samplers. ([source](https://cdn.jsdelivr.net/gh/torchgeo/torchgeo@main/README.md))
- [Coordinate Reference System Transformations](https://awesome-repositories.com/f/data-databases/coordinate-reference-system-transformations.md) — Provides automatic reprojection of multispectral imagery between different coordinate reference systems during data loading.
- [Imagery and Mask Loaders](https://awesome-repositories.com/f/data-databases/data-loading-optimizations/custom-dataset-loading/imagery-and-mask-loaders.md) — Enables loading of uncurated raster imagery and vector masks for custom model training and inference. ([source](https://torchgeo.readthedocs.io/en/stable/api/datasets.html))
- [Raster Data Loaders](https://awesome-repositories.com/f/data-databases/data-loading-optimizations/custom-dataset-loading/raster-data-loaders.md) — Implements specialized loading for raster files incorporating custom coordinate reference systems and band selection. ([source](https://torchgeo.readthedocs.io/en/stable/api/datasets.html))
- [Training Data Pipelines](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-processing/ml-data-pipelines/training-data-pipelines.md) — Manages the pipeline for splitting, sampling, and loading geospatial data into mini-batches for training. ([source](https://torchgeo.readthedocs.io/en/stable/api/datamodules.html))
- [Geospatial Dataset Management](https://awesome-repositories.com/f/data-databases/geospatial-dataset-management.md) — Manages the loading and sampling of large-scale geographic datasets with automatic coordinate reference system and resolution handling.
- [Geospatial Sampling Strategies](https://awesome-repositories.com/f/data-databases/geospatial-sampling-strategies.md) — Provides specialized sampling strategies to extract spatial samples and batches from geospatial data sources. ([source](https://torchgeo.readthedocs.io/en/stable/api/index.html))
- [Grid-Based Spatial Sampling](https://awesome-repositories.com/f/data-databases/grid-based-spatial-sampling.md) — Extracts chips in a structured grid pattern with configurable stride to cover specific regions of interest. ([source](https://torchgeo.readthedocs.io/en/stable/api/samplers.html))
- [Remote Sensing Dataset Loaders](https://awesome-repositories.com/f/data-databases/remote-sensing-dataset-loaders.md) — Provides specialized tools for loading, reprojecting, and sampling raster and vector data from satellite and aerial sensors.
- [Geospatial Metadata Extractors](https://awesome-repositories.com/f/data-databases/retrieval-metadata/geospatial-metadata-extractors.md) — Handles imagery with geographic metadata, including automatic coordinate reprojection and resolution matching. ([source](https://cdn.jsdelivr.net/gh/torchgeo/torchgeo@main/README.md))
- [Geospatial Dataset Joins](https://awesome-repositories.com/f/data-databases/data-collections-datasets/cross-source-joins/geospatial-dataset-joins.md) — Joins disparate geospatial datasets by aligning them based on overlapping geographic bounding boxes.
- [Geospatial Dataset Unions](https://awesome-repositories.com/f/data-databases/data-collections-datasets/cross-source-joins/geospatial-dataset-unions.md) — Combines multiple image sources or labels using union operations to create multimodal or spatially aligned datasets. ([source](https://torchgeo.readthedocs.io/en/stable/))
- [Benchmark Dataset Loaders](https://awesome-repositories.com/f/data-databases/static-benchmark-datasets/benchmark-dataset-loaders.md) — Loads standardized geospatial benchmark datasets containing images and target labels for machine learning tasks. ([source](https://cdn.jsdelivr.net/gh/torchgeo/torchgeo@main/README.md))

### Graphics & Multimedia

- [Multispectral Processors](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-manipulation/image-processing/multispectral-processors.md) — Provides a suite of spatial transformations and indices for preparing multispectral satellite imagery.
- [Multispectral Image Enhancements](https://awesome-repositories.com/f/graphics-multimedia/multispectral-image-enhancements.md) — Calculates normalized difference indices and applies spatial rearrangements to enhance multispectral satellite imagery. ([source](https://torchgeo.readthedocs.io/en/stable/api/index.html))
- [Spatial-Level Transformations](https://awesome-repositories.com/f/graphics-multimedia/spatial-level-transformations.md) — Implements specialized spatial transformations on satellite and aerial imagery to prepare data for neural networks. ([source](https://torchgeo.readthedocs.io/en/stable/_sources/index.rst.txt))
- [Vector Rasterizers](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/vector-rendering-pipelines/vector-graphics-renderers/vector-rasterizers.md) — Converts geospatial vector masks into pixel-based grids to create ground truth labels for semantic segmentation.
- [Device-Side Tensor Transformations](https://awesome-repositories.com/f/graphics-multimedia/spatial-level-transformations/device-side-tensor-transformations.md) — Implements spatial augmentations and normalized difference indices directly on GPU tensors for efficient deep learning pipelines.

### Software Engineering & Architecture

- [Spatial](https://awesome-repositories.com/f/software-engineering-architecture/randomized-selection-algorithms/randomized-data-retrieval/random-sampling/spatial.md) — Extracts random chips from a region of interest to maximize dataset variety during training. ([source](https://torchgeo.readthedocs.io/en/stable/api/samplers.html))

### Scientific & Mathematical Computing

- [Geospatial Dataset Splitting](https://awesome-repositories.com/f/scientific-mathematical-computing/spatial-bounding-box-management/geospatial-dataset-splitting.md) — Divides geospatial datasets using geographic region boundaries to ensure a rigorous separation between training and validation sets.
