AI Segmentation
QGIS
Tutorial

AI Segmentation for QGIS: The Complete Guide

A town center before and after automatic building detection (after)
A town center before and after automatic building detection (before)
ImageryDetected
Drag to compare
A whole town center, detected in one pass (Saint-Germain-en-Laye, France, on Google Satellite imagery). Drag the handle to compare.

AI Segmentation turns the imagery you already have open in QGIS into clean vector layers. It works two ways. First, Automatic mode, where you draw a zone, name the object, and get every instance at once (building footprints, parcels, trees, roads, solar panels): it runs in the cloud, no GPU on your machine. Then Manual mode, where you click one object and the AI outlines it, locally on your computer and unlimited. The image above is a single Automatic run, and this guide walks through it live in QGIS, setting by setting.

Install and activate

In QGIS, open Plugins -> Manage and Install Plugins, search for AI Segmentation, and install. Then sign in from the panel (a browser tab, about 15 seconds) and both modes are ready.

AI Segmentation panel with the Manual/Automatic switch, ready to start
Pick your imagery layer and launch.

Your first detection

Goal: extract every building footprint of the town center above. One run, start to finish.

Draw your zone

Click Start Automatic AI Segmentation, then click around the area on the map and close the loop. Crisp, well-contrasted imagery gives the cleanest polygons.

The zone drawn point by point, then closed.

Name the object

Type the object (here building), or pick it in the Library of ready-made objects with previews.

The setup step: object set to building, example card, detail slider

Show an example (optional)

One word is not always enough. Draw an example hands the AI a sample from your own imagery (same sensor, season, and resolution): outline one object, the AI looks for its look-alikes. Exclude a look-alike does the opposite: outline a false positive to tell the AI "not this". A few examples plus a name is usually the strongest combination, and examples alone work when the object has no good name.

Show an example: one positive example (green) and one exclusion (red) drawn on the map

The reference chips in the panel: example 1 in green, exclusion 2 in red

Set the Detail

The Detail slider splits your zone into a grid of 1024 px tiles, each detected at full resolution and stitched back into one seamless layer, so objects crossing a seam are merged. Finer detail cuts smaller tiles and finds smaller objects; the tile count updates live (here 12 tiles). There is no size limit on the zone.

Live tile grid preview over the zone

Detect

Click Detect objects. The zone is processed tile by tile and results draw live on the map. This run found 2,415 objects in about two minutes.

Detection in progress, tile 4 of 12, 365 objects found so far

Partial results drawing live during the run

Review

Detection opens a review, not an export. Everything below is instant and needs no re-run: you filter and reshape the detections until the layer looks right. The next section goes through each control.

The review panel: count, display colors, confidence histogram

Export

Click Export polygons. You get a styled GeoPackage layer with a GIS-ready schema: class, score, area_m2, perimeter_m. Here, 306 building footprints.

Exported GeoPackage layer with 306 building footprints

Attribute table with class, score, area_m2 and perimeter_m columns

The review controls, explained

Confidence

Every detection carries a score: how sure the AI is that this polygon really is your object. The run returns everything plausible, and the Confidence slider sets the minimum score to keep: drag toward More objects to reveal weaker detections, toward Only confident to keep only the strongest. The histogram above the slider shows how many objects sit at each level, and the count updates live. The same run, swept live between More objects and Only confident:

Drag the Confidence slider and the layer and count update instantly.

Dense, repetitive objects like these roofs score modestly, so starting low and pruning up usually beats the reverse. Objects you fixed by hand are always kept, whatever the confidence.

Display colors

Four ways to look at the same detections, each answering a different question. Random (one color per object) checks that neighbors are separated. Outline checks boundaries against the imagery. Confidence shows where the AI is sure (yellow) or hesitant (purple), which tells you where to point the confidence slider. Normal is a single clean color. Visual only, the geometry never changes.

The four display modes side by side: Random, Outline, Confidence, Normal
Same detections, four readings: Random to separate neighbors, Outline to check boundaries, Confidence to spot hesitations, Normal to see the layer.

Refine detections

The Refine detections section reshapes every polygon at once, instantly:

Refine detections panel with shape, size and outline controls
Shape, size and outline controls, applied live to the whole layer.
  • Right angles snaps edges to 90 degrees, for man-made shapes like buildings, pools and solar panels.
  • Round corners softens outlines, for natural shapes like trees and bushes.
  • Fill holes closes interior gaps in each polygon.
  • Min / Max size hides detections outside a ground-area range, the fastest way to drop tiny noise blobs.
  • Simplify outline, Clean edges and Expand/Contract fine-tune the outline itself.

The same trick on anything

Automatic mode is one input away from a completely different job: change the word, get another layer. Farm parcels over 5 km²:

Farm parcels before and after automatic detection (after)
Farm parcels before and after automatic detection (before)
ImageryDetected
Drag to compare
Prompt: farm field. About 250 parcels over 5 km2, one run.

Or the road network of a dense urban area:

Urban roads before and after automatic detection (after)
Urban roads before and after automatic detection (before)
ImageryDetected
Drag to compare
Prompt: road. The drivable surface extracted as polygons.

Trees, cars, greenhouses, pools, solar panels all work the same way; the Library in the panel lists ready-made objects with previews if you'd rather not guess the wording.

Manual mode

Manual runs a local model on your own computer, unlimited, after a one-time setup from the panel. Click an object and the AI outlines it; left-click adds area, right-click removes, and you keep and export polygons one by one. It shines when you need ten precise objects rather than a thousand, or when you want full control over every outline.

Manual mode: one click on a roof, one clean polygon outlined
Manual mode: one click, one outline, on your machine.

The two modes chain together: Refine in Manual mode, right inside the Automatic review, opens your detections in Manual so you can fix or add a few objects by hand, then come back and export everything together.

Refine in Manual mode button inside the Automatic review panel
Refine in Manual mode: touch up the automatic result by hand, then export.

Try it on your own map

The best test is a zone you actually work on: install AI Segmentation, run it there, and compare the layer with what you would have digitized by hand. And if anything behaves oddly, the ? Help button in the panel reaches us directly.

Written byLilien Auger
·6 min read
Contact