How to Detect Building Footprints in QGIS Automatically
I ran automatic detection over a zone of central Paris and got 635 polygons back in one pass. Deciding which 82 to keep took longer than the detection did, and that second part is what almost every tutorial leaves out.


The short version. To detect building footprints in
automatically: install an AI detection plugin from the plugin manager, load your imagery, draw a zone, name the object, run it. You get a polygon layer in your project CRS. Then filter that raw output by confidence and area, because a large share of what comes back is not a building.
What a building footprint is
The outline of a building where it meets the ground, as a flat polygon. Not the roof, not the parcel, not the address point.
Which matters here, because vertical imagery gives you the roof. On a five-storey Haussmann block shot near-nadir the offset is small. On a tower it is not. Worth knowing before you promise anyone a footprint layer.
Check the open datasets first
For a lot of jobs you don't need to detect anything.
- OpenStreetMap is excellent wherever mappers are active, and buildings carry attributes. Pull it in with QuickOSM.
- Microsoft Global ML Building Footprints, over a billion machine-extracted buildings, strongest in North America.
- Google Open Buildings covers the Global South, where OSM is thinnest.

Load one against your imagery. You only move on when the coverage has holes, the vintage is wrong, or the footprints have to match the specific orthophoto a client handed you.
Under fifty buildings, draw them
Digitize by hand. Free, exact, and I'd still do it myself at that size. Turn on snapping first (Project -> Snapping Options, vertex and segment, topological editing on) or you'll spend the afternoon deleting slivers.
Around the 60th building you start cutting corners you'd never have cut on the 6th, and you don't notice. It's already in the layer.
The automatic way
The plugin here is AI Segmentation, which my co-founder and I build at TerraLab, so read this section knowing whose tool it is. It installs from the plugin manager like any other: no download by hand, no Python environment, no dedicated graphics card, because the model runs on our servers. Windows, macOS and Linux.
Draw a zone, type buildings, hit Detect. That's the whole prompt, in your own language if you prefer. Results stream back tile by tile as one polygon layer in the project CRS.

The one setting worth learning is precision, which is the tile size. Small tiles give the model a close look, which small objects need. Big tiles give it context, which a farm parcel needs. Tiles are also what you pay for: one credit each. Every account gets a free allowance each month, no card asked for, and Pro raises it. Detection runs on European servers, we do not train on your imagery, and there is a small local model if nothing may leave your machine.
Then the panel walks you through three steps before anything becomes a layer: filter what to Keep, Correct what the model missed, and choose the output Shapes. The complete guide covers all three. The first one is where the job is won, so it gets the next section.
Filtering is the whole job
Raw detection output is a set of candidate polygons with confidence scores. On dense imagery most are small and uncertain. I exported this Paris run with both filters wide open, so every candidate landed in the layer: 635 polygons over 1.18 km².
Half of what came back is smaller than a parking space: vents, skylights, stairwell housings, courtyard sheds. Real things on the imagery, correctly outlined, and not what anyone means by a building footprint.
So filter. Move the two sliders in the panel, or do the same job from the attribute table with Select by Expression:
"area_m2" >= 50 AND "score" >= 0.5
That leaves 82 polygons out of 635, covering 222,338 m² of the 263,658 m² total. Rather than take my word for the thresholds, move them yourself. Green survives your filter, white does not.

82 / 635polygons kept (13%)
84%of the built area (222,338 m²)
The same 635 detections the attribute table holds. Drop the confidence to zero and the courtyard sheds and skylights come back.
Watch the second number while you drag the first. Throwing away 87% of the polygons costs 16% of the area. The rest is noise you'd have deleted by hand anyway, one at a time, while wondering whether the tool was any good.
Tune both to the job. A survey of industrial sheds can push the area floor to 200 m². Mapping informal settlements, 50 m² throws away real houses, so drop to 15 and lean on the confidence score instead.
What a clean result looks like
Paris is a hard case. Same tool on detached housing about 10 km west:

85m²
median polygon area
Paris run: 3.2 m²
0.79
median confidence
Paris run: 0.26
251polygons
kept, out of 251 returned
Paris run: 82 out of 635
Same tool, same city, nothing to throw away. What changed is the built fabric, not the model.
Where this breaks: dense continuous blocks

Each polygon traces the built envelope of a whole block, hugging the street line and correctly cutting out the courtyards. Good for built-up area or impervious surface, wrong if you need a polygon per address. No model reading a vertical image can find the party wall between two attached buildings, because from above there is nothing there to see.
So I wouldn't use automatic detection for a per-address layer in a historic city centre. Cadastral data plus manual correction wins there.
Cleaning the geometry
Three native QGIS tools tidy a footprint layer, and the order matters because simplify moves the vertices you just squared.
- Simplify, 0.5 m tolerance over aerial imagery. Cuts the vertex count hard without moving the boundary anywhere you'd notice.
- Orthogonalize. Snaps near-right angles square. Reach for it on open data or hand-traced work, where nothing has squared them yet.
- Delete holes, only if you want solid footprints. Not on the Paris result: those holes are courtyards and they're correct.
On a detected layer step 2 is close to a no-op. I measured that rather than assume it, running Orthogonalize over 190 detected buildings and comparing all 1,845 corners before and after.
87.9%
corners already within 1° of square
before running anything
87.9%
after Orthogonalize
the same 1,845 corners
1.7cm
median vertex shift
9.1 cm at the worst

The 12% that are not square are the attached terraces. Look at the stepped edge running down the middle of the block. No corner tool fixes that, because those steps follow a real roof line rather than a modelling error.
Which method to use
| Open datasets | Hand-digitizing | Automatic detection | |
|---|---|---|---|
| Cost | Free | Free | Free tier, then paid |
| Setup | Minutes | None | Minutes |
| Good for | Areas already covered well | Under ~50 buildings | Hundreds to thousands |
| Matches your imagery | No | Yes | Yes |
| Consistent across a team | Yes | No | Yes |
| Dense continuous blocks | Varies | Yes | Block envelopes only |
| Provenance you can state | Dataset and vintage | You | Your imagery, with a confidence score |
Questions I get
Does it work on drone imagery? Better than on satellite. Ground resolution matters more than the source: a 5 cm orthophoto gives cleaner boundaries and higher confidence than a 30 cm satellite scene.
Do I need a GPU? No. Both modes run on our servers by default, and the small local model runs on your own CPU, slower and less accurate. If you want everything to stay on your machine, Geo-SAM and samgeo are free and good, and they do want an NVIDIA card.
What does a run cost? One credit per tile in automatic mode, one credit per object saved in semi-automatic. Every account gets a free allowance each month, and the local model costs nothing at all.



