Segment Anything for GIS
Put Meta's Segment Anything models to work on real GIS data, and measure how well they do. The series starts with samgeo and box prompts, adds text prompts with Grounding DINO and SAM 2.1, and then uses SAM in QGIS and ArcGIS Pro. Later parts scale it to a whole town, follow new buildings through ten years of aerial photographs, prompt SAM with example images, draw field boundaries, count cars in car parks, train a small model on SAM's masks, and test SAM on radar, elevation and false-colour imagery. Every result is scored against an official reference map.
- Intermediate to Advanced
- 2 of 11 published
- About 31 minutes so far
Start with part 1: Segment Anything on satellite and aerial imagery in Python: a samgeo tutorial
The parts, in order
-
Segment Anything on satellite and aerial imagery in Python: a samgeo tutorial
Run Meta's Segment Anything Model on high-resolution aerial imagery with segment-geospatial (samgeo), on a CPU. Generate masks automatically, vectorise them to a GeoPackage, filter them by area, shape and NDVI to find buildings, and prompt SAM with points and boxes, checked against OpenStreetMap.
-
Text-prompted Segment Anything on aerial imagery: Grounding DINO and SAM 2.1 in Python
Segment buildings, trees, water and cars from a text prompt with Grounding DINO and SAM 2.1 in Python on a CPU, the open equivalent of ArcGIS Pro's Text SAM. Choose the prompt wording, tile size and threshold on one Utrecht district, then measure accuracy on another against the Dutch BGT register.
-
Segment Anything in QGIS with the Geo-SAM plugin: clicks, boxes and how accurate each one is
-
Text SAM in ArcGIS Pro: text-prompted Segment Anything on a CPU, tested against the BGT
-
Segment Anything over a whole district on a CPU: tiles, seams, checkpoints and worker pools in Python
-
SAM 2.1 video memory for change detection: new buildings in ten years of aerial photographs, scored against the BAG
-
Prompt Segment Anything with example images: DINOv2 and SAM 2.1 in Python
-
Agricultural field boundaries with Segment Anything: SAM 2.1 point grids in Python
-
Count cars in car parks with Segment Anything: Grounding DINO and SAM 2.1 on aerial imagery in Python
-
Segment Anything masks as training labels: a weakly supervised U-Net against a fine-tuned SAM 2.1 decoder
-
Segment Anything beyond RGB: water from radar, elevation and false colour with SAM 2.1
A new part is published each week. Follow the TechnicalGIS RSS feed to hear when the next one is out.