Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Turning geospatial imagery into pixel-level thematic maps

1. Context

In L04 you prepared training data for GeoAI workflows. In L06 you trained an object detection model that draws a box around each discrete object it finds. This lesson takes a different approach to the same broad problem: rather than localizing individual objects, a semantic segmentation model assigns a class label to every pixel in an image, producing a dense mask at the same spatial dimensions as the input.

This distinction matters because many geospatial questions are not about discrete, countable objects at all. Mapping a water body, a forest, a cloud, or a land-cover class is fundamentally a “which pixels belong to which class” question, not a “how many objects and where” question. Semantic segmentation is the right tool for exactly this kind of continuous, area-based mapping.

Looking ahead, L08 combines the ideas from this lesson with the object-level awareness of L06 into instance segmentation, which separates individual objects while still tracing their pixel-level boundaries. Everything you learn here about masks, encoders, and decoders carries forward directly.


2. Motivation

A large share of practical remote sensing work is really segmentation work: water masks for flood monitoring, cloud masks as a preprocessing step before almost any other analysis, building footprints for urban planning, and land-cover maps for environmental and agricultural monitoring. In each case, the deliverable is a thematic map, not a list of objects.

Segmentation also tends to be more forgiving of irregular shapes than detection. A river, a coastline, or a field boundary rarely fits neatly into a rectangle, so a pixel-level prediction captures the actual geometry in a way a bounding box cannot. For a project that needs area estimates, boundary delineation, or a full thematic map, segmentation is usually the more direct path than trying to force the problem into a detection or classification framing.


3. Learning objectives

By the end of this lesson, you should be able to:


4. Lesson roadmap

  1. When segmentation fits — how segmentation differs from classification and detection, and when pixel-level masks are the right choice.

  2. Segmentation concepts — image-to-mask prediction, binary and multi-class masks, probability maps, and sliding-window inference.

  3. Architectures and encoders — the encoder-decoder pattern, skip connections, U-Net as a baseline, and when to consider alternatives.

  4. Binary segmentation workflow — the main hands-on workflow: building footprint segmentation from data preparation through evaluation and vector output.

  5. Bands and sensors — comparing RGB, Sentinel-2, and NAIP inputs for the same task, and how band configuration affects results.

  6. Pre-trained models — using sensor-agnostic, inference-only models for water and cloud masking, and what responsibility remains yours.

  7. Multi-class and post-processing — land-cover classification with many classes, and turning raster predictions into clean vector outputs.

  8. Project transfer — deciding whether segmentation fits your project, and sketching your classes, bands, and evaluation plan.

Pages 1–3 build the conceptual foundation. Page 4 is the main hands-on workflow, and pages 5–7 extend it across sensors, pre-trained models, and multi-class problems. Page 8 transfers everything to your own project.


5. Project framing

While reading this lesson, keep your own project in mind and consider:


6. Before class


7. After this lesson

After working through this lesson, you should have: