Raster Vision: Geospatial Deep Learning Framework for Satellite Imagery

Jul 10, 2025

Introduction

Processing massive satellite and aerial imagery for machine learning often requires a fragmented pipeline of custom scripts, manual tiling, and complex georeferencing. Raster Vision solves this by providing a unified, open-source framework that bridges the gap between Geographic Information Systems (GIS) and deep learning-based computer vision. With its built-in support for PyTorch and a low-code configuration approach, it allows developers to move from raw GeoTIFFs to deployed models without needing to be deep learning experts. This framework simplifies the entire geospatial ML workflow, enabling high-impact analysis for environmental monitoring, urban planning, and disaster response.

What Is Raster Vision?

Raster Vision is an open-source Python library and framework designed for building computer vision models on satellite, aerial, and other large imagery sets, including oblique drone imagery. It is maintained by Azavea and released under the Apache License 2.0, providing a comprehensive suite of utilities for reading geo-referenced data, training models, making predictions, and writing out predictions in geo-referenced formats.

The project functions as both a low-code framework—where users can configure a full pipeline via JSON files—and a flexible library, allowing developers to import individual components into Jupyter notebooks or integrate them with other ML libraries like PyTorch Lightning. This dual nature makes it accessible to GIS professionals while remaining powerful enough for experienced ML engineers.

Why Raster Vision Matters

Standard computer vision datasets are typically small, uniform images (like JPEGs) that lack spatial context. In contrast, geospatial data is often stored in massive GeoTIFFs with complex metadata, coordinate systems, and projections. Traditionally, this required developers to manually “chip” images into smaller patches, align labels, and then manually map predictions back to geographical locations—a process prone to error and highly repetitive.

Raster Vision eliminates this friction by automating the geospatial-to-tensor conversion. It handles the idiosyncrasies of multiband imagery and massive datasets out-of-the-box, ensuring that the spatial integrity of the data is preserved throughout the ML pipeline. By providing a repeatable and comparable way to run experiments, it allows researchers to prototype new approaches quickly without writing thousands of lines of boilerplate data-processing code.

As the demand for Earth observation data grows, tools that can scale these workflows to the cloud (via AWS Batch or SageMaker) are critical. Raster Vision provides the infrastructure to move from a local prototype to a production-scale geospatial AI application efficiently.

Key Features

  • Automated Chip Creation: Automatically breaks massive geospatial images into smaller, model-ready “chips” based on training labels or Areas of Interest (AOIs), eliminating manual tiling.
  • Multi-Task Support: Built-in support for the three most common geospatial ML tasks: chip classification (land-cover), object detection (bounding boxes), and semantic segmentation (per-pixel classification).
  • Geospatial I/O Utilities: Full suite of tools for reading geo-referenced data and writing predictions back into geo-referenced formats, ensuring results are immediately usable in GIS software.
  • Low-Code Pipeline Configuration: Users can define the entire ML workflow—from data sources to model parameters—using a simple JSON configuration file, making experiments repeatable.
  • Cloud Scalability: Native integration with AWS Batch and AWS SageMaker, allowing users to scale training and prediction tasks across multiple GPU instances in the cloud.
  • Flexible Backend: Primarily uses PyTorch for model training and evaluation, but maintains an extensible architecture that allows for custom backends and loss functions.
  • Multiband Imagery Support: Handles imagery with more than three bands (e.g., Sentinel-2 or Landsat), allowing models to leverage spectral information beyond the visible RGB spectrum.
  • Distributed Training: Supports multi-node and multi-GPU training via PyTorch DDP, automatically utilizing all available GPUs on a machine to accelerate training.

How Raster Vision Compares

Feature Raster Vision eo-learn ArcGIS AI
Open Source Yes (Apache 2.0) Yes Proprietary
Configuration JSON / Low-Code Python API GUI-based
Cloud Integration AWS Batch/SageMaker General Purpose Esri Cloud
Primary Focus End-to-End Pipeline Data Preprocessing Pre-trained Models

While eo-learn focuses heavily on the data preprocessing and patch extraction phase, Raster Vision provides a more complete end-to-end pipeline, including the bundling of models for deployment. The primary differentiator is the “low-code” aspect; a user can define a complex experiment in a JSON file and run it without writing extensive Python code, which is a significant advantage for GIS analysts who may not be deep learning experts.

Compared to proprietary solutions like ArcGIS AI, Raster Vision offers total transparency and the ability to customize the model architecture and loss functions. This is critical for scientific research where the “black box” nature of proprietary tools can be a barrier to reproducibility. The tradeoff is that ArcGIS provides more out-of-the-box pre-trained models, whereas Raster Vision is a framework for building and training your own.

Getting Started: Installation

Install via pip

The fastest way to get started is by installing the library directly from PyPI:

pip install rastervision

Use Pre-built Docker Image

To avoid dependency conflicts with GDAL and PyTorch, using the official Docker images is highly recommended. Images are published to quay.io:

docker pull quay.io/azavea/raster-vision:pytorch-latest

Build from Source

If you need to customize the framework, you can build the Docker image from scratch after cloning the repository:

git clone https://github.com/azavea/raster-vision.git
cd raster-vision
docker/build

Prerequisites: Ensure you have Docker installed and a compatible NVIDIA GPU with CUDA drivers if you are performing model training.

How to Use Raster Vision

The typical workflow in Raster Vision involves four primary stages: data input, pipeline configuration, execution, and deployment. You start by providing a set of geo-referenced images (e.g., GeoTIFFs) and corresponding labels (e.g., GeoJSON or other GeoTIFFs). These are defined in a configuration file.

Raster Vision then processes these images into chips. For example, in a semantic segmentation task, it will create patches of the image that overlap with your labeled areas. It then trains a PyTorch model using the specified hyperparameters and evaluates the model against a validation set, producing metrics like F1 score, precision, and recall.

Once training is complete, the framework bundles the trained model weights and the configuration into a “model bundle.” This bundle can then be used to run predictions on new, unseen imagery using the predict command, which automatically handles the tiling and re-stitching of the output into a geo-referenced raster file.

Code Examples

Raster Vision can be used as a CLI tool or as a library. Below are examples of how to execute common tasks.

Running a Prediction

To use a pre-trained model bundle to make predictions on a new scene, use the predict command. This command takes the model bundle and the image to be analyzed:

rastervision predict \n  https://s3.amazonaws.com/azavea-research-public-data/raster-vision/examples/model-zoo-0.31/spacenet-vegas-buildings-ss/model-bundle.zip \n  https://s3.amazonaws.com/azavea-research-public-data/raster-vision/examples/model-zoo-0.31/spacenet-vegas-buildings-ss/sample-predictions/sample-img-spacenet-vegas-buildings-ss.tif

Executing a Pipeline Example

If you are running one of the provided examples (such as SpaceNet Rio), you can execute the training and prediction pipeline using a test script:

python rastervision_pytorch_backend/rastervision/pytorch_backend/examples/test.py run "spacenet-rio-cc" --remote

Custom Data Source in Python

When using Raster Vision as a library, you can define custom raster sources to combine multiple bands from different files:

from rastervision.core.data import RasterioSource, MultiRasterSource

# Define sources for different sensors
rs_sentinel_1 = RasterioSource("s3://bucket/sentinel1.tif", raster_transformers=[StatsTransformer()])
rs_sentinel_2 = RasterioSource("s3://bucket/sentinel2.tif", raster_transformers=[MinMaxTransformer()])

# Combine into a multi-source tensor
raster_source_multi = MultiRasterSource(raster_sources=[rs_sentinel_1, rs_sentinel_2])

Real-World Use Cases

Raster Vision is particularly effective in scenarios where high-resolution imagery is too large for standard ML tools. Examples include:

  • Urban Planning: A city planner can use semantic segmentation to automatically map building footprints and road networks from high-resolution aerial imagery, replacing manual digitization.
  • Environmental Monitoring: A conservationist can use chip classification to monitor deforestation or land-cover change over time by analyzing multi-temporal satellite imagery.
  • Disaster Response: After a flood or earthquake, emergency responders can use object detection to identify damaged buildings or blocked roads in real-time from drone imagery to coordinate rescue efforts.
  • Precision Agriculture: An agronomist can use multiband imagery (NIR bands) to calculate vegetation indices and classify crop health across thousands of acres of farmland.

Contributing to Raster Vision

Raster Vision is an open-source project that welcomes contributions from the community. The project follows a standard GitHub flow for contributions. Developers can contribute by reporting bugs via the GitHub Issues page or submitting pull requests for new features and bug fixes.

The project includes a CODE_OF_CONDUCT.md to ensure a collaborative and respectful environment. For those looking to get started, it is recommended to review the official contribution guidelines in the documentation to understand the coding standards and the release process.

Community and Support

The primary hub for community interaction is the GitHub Discussions forum, where users can ask questions, share their projects, and collaborate with the maintainers. Documentation is available at docs.rastervision.io, providing a full API reference and tutorial notebooks.

The project is maintained by Azavea, a geospatial software company, and has been used by governments, non-profits, and graduate students worldwide. While the activity level is moderate, the framework remains a stable and the most comprehensive low-code option for geospatial deep learning.

Conclusion

Raster Vision provides a critical bridge between the world of GIS and modern deep learning. By automating the complex and error-prone process of geospatial data preparation, it allows developers to focus on the model’s performance rather than the data’s coordinate systems. Whether you are a GIS analyst moving into AI or an ML engineer tackling satellite imagery for the first time, Raster Vision is the right choice when you need a repeatable, scalable, and open-source pipeline.

If you are working with massive GeoTIFFs and want to avoid the manual tiling of images, start by trying the quickstart guide and running one of the provided SpaceNet examples. Star the repo, join the GitHub Discussions, and start unlocking the potential of your geospatial data.

What is Raster Vision and what problem does it solve?

Raster Vision is an open-source framework for deep learning on satellite and aerial imagery. It solves the problem of manual data preparation (tiling/chipping) and the georeferencing of predictions, which are typically the most time-consuming parts of a geospatial ML workflow.

How do I install Raster Vision?

You can install Raster Vision via pip using pip install rastervision, or use the official Docker images from quay.io for a more stable environment with all geospatial dependencies pre-installed.

Does Raster Vision support multi-GPU training?

Yes, Raster Vision supports distributed training via PyTorch DDP, allowing it to automatically utilize all available GPUs on a machine to accelerate the training process.

Can I use Raster Vision for object detection?

Yes, it has built-in support for chip classification, object detection, and semantic segmentation, making it versatile for various computer vision tasks on overhead imagery.

How does Raster Vision compare to eo-learn?

While eo-learn is excellent for data preprocessing and patch extraction, Raster Vision provides a more complete end-to-end pipeline including model bundling and deployment tools, with a low-code JSON configuration approach.

Can I use Raster Vision for non-satellite imagery?

Yes, the framework is designed for any large imagery sets, including oblique drone imagery and even histopathology slides (Whole Slide Images), as long as they are geo-referenced or spatially indexed.

What license does Raster Vision use?

Raster Vision is released under the Apache License 2.0, allowing users to freely use, modify, and distribute the software for both commercial and commercial-free projects.