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.

Visualising and interpreting a change map

You ran ChangeStar on the previous page. This page works through exactly what result contains, and how to look at it critically, before the next page covers tuning and export.


1. Motivation

result is not just a change map; it is a small bundle of related rasters that, read together, tell you much more than any single one alone. Learning to read all of them is what lets you judge whether a detected change is trustworthy, rather than accepting a binary mask at face value.


2. Core idea

ChangeStar’s predict() returns a dictionary with entries for the binary change map, the underlying change probability, and both hard and probabilistic building segmentation for each of the two input dates. Reading the probability map entries alongside the hard classifications is what lets you judge confidence, not just presence, of a detected change.


3. Workflow

A. Inspect the result dictionary

The dictionary contains change_map (the binary changed/unchanged raster), change_prob (the underlying per-pixel change probability, a probability map), t1_semantic and t2_semantic (hard building masks for each date), t1_semantic_prob and t2_semantic_prob (their corresponding probability rasters), and num_semantic_classes (how many segmentation classes the model distinguishes, here just building versus background).

B. The five-panel overview

visualize() lays out the before image, the after image, both dates’ building segmentation, and the change map side by side, exactly the kind of side-by-side comparison you have used throughout this course to sanity-check a model’s output against the source imagery directly.

C. Overlay visualization

visualize_overlay() draws detected buildings (in blue) and detected changes (in red) directly on top of the original imagery for each date, which makes it easier to judge, at a glance, whether flagged changes correspond to something visually plausible in the underlying scene, rather than examining an abstract mask in isolation.

D. Reading probability rasters

The same logic applies to t1_semantic_prob and t2_semantic_prob: if a building’s segmentation confidence is low at one date but not the other, that alone might explain an apparent “change” that is really closer to model uncertainty about a borderline structure.


4. Python reactivation

hasattr(value, "shape") checks whether an object has a shape attribute before trying to use it, a defensive pattern useful when a dictionary mixes array-like values (with a shape) and plain values (like num_semantic_classes, a single integer) in one loop, avoiding an error on the entries that are not arrays.


5. Common pitfalls


6. Mini task

You notice a small cluster of “changed” pixels in a residential area where the overlay visualization shows no building in either the 2019 or 2022 image. Using the outputs described on this page, describe two ways you would investigate before deciding whether this is a real detection or a likely error.

Sample solution

First, check change_prob at that location: a low probability value would suggest the detection is not particularly confident and may be closer to noise. Second, check t1_semantic_prob and t2_semantic_prob at the same location: if the building segmentation confidence is also low or inconsistent there, that points toward a segmentation-driven artifact (the model being uncertain about the pixel’s building status at one or both dates) rather than a genuine building change, since ChangeStar’s change detection is informed by its own per-date segmentation.


7. Key takeaways