Documentation

AI Segmentation in QGIS

Get started in minutes. Point at objects, get precise vectors.

AI Segmentation video tutorial
Watch the full tutorial on YouTube

1Installation

1. Get QGIS

Make sure you have QGIS 3.x installed on your machine.

Download QGIS

2. Download Plugin

Open QGIS, go to Plugins → 🧩 Manage and Install Plugins, search for "AI Segmentation" and click Install

Download Plugin

2First Launch

Install or update dependencies, unlock the plugin with your verification code, then download the AI Segmentation model. Everything is automated, with no manual setup and no QGIS restart.

When the plugin is updated, Step 1 may show Update Dependencies instead of Install Dependencies. Click it to refresh the existing environment.

Auto-install / update dependencies

It creates an isolated Python virtual environment and installs or updates:

  • • PyTorch
  • • AI Segmentation Model
  • • Rasterio, Pandas, NumPy

Auto-install AI Segmentation Model

Downloads the AI model based on your QGIS version:

  • • QGIS 3.34+: ~323 MB
  • • QGIS 3.22/3.28: ~375 MB
  • • Cached locally for offline use

Installation Paths

Here's where the plugin stores its files on your system:

AI Model for Segmentation

C:\Users\<username>\.qgis_ai_segmentation\checkpoints\

Cached Encoding of your raster (for faster AI processing)

C:\Users\<username>\.qgis_ai_segmentation\features\

Python Dependencies (venv)

C:\Users\<username>\.qgis_ai_segmentation\venv_py3.*

3How to Use

Segment one at a time

Save multiple, export together

Click on one element at a time (building, car, tree...), save each polygon, then export them all together in a single layer.

Supported layers

Local and online

Works with local rasters (GeoTIFF, JPG, PNG) and online layers (WMS, XYZ tiles like Google Satellite, OpenStreetMap).

1

Select Your Layer

Choose a raster or online layer (WMS, XYZ tiles) from the dropdown. Local rasters are encoded into tiles once and cached. Online layers are fetched at the current zoom level.

2

Click on an Object

Left-click to include an area, right-click to exclude. Focus on a single element: one building, one car, one tree.

3

Refine (Optional)

Use Expand/Contract to adjust boundaries. Use Simplify to reduce polygon complexity.

4

Save Polygon

Click 'Save polygon' to add this segmentation to your collection. The counter shows how many you've saved.

5

Repeat or Export

Segment another object and save again, or click 'Export to layer' to save all collected polygons as a single GeoPackage.

Why one object at a time? The AI model works best when focusing on a single element. Save each polygon individually, then export them all together.

4Refine Selection

Fine-tune your segmentation results before exporting. Click the "Refine selection" panel to expand it.

Expand / Contract

Dilate or erode the mask boundaries. Positive values expand outward, negative values shrink inward. Range: -1000 to +1000 pixels.

Simplify Outline

Reduce polygon complexity using Douglas-Peucker algorithm. Higher values = smoother but less precise edges. Range: 0 to 1000. Default: 3.

Fill Holes

Fill interior holes completely surrounded by the selection. Useful for buildings with courtyards or objects with gaps.

Min. Region Size

Remove small disconnected artifacts below this area threshold (in pixels²). Example: 100 = ~10x10 pixel regions, 900 = ~30x30. Range: 0-100000.

5Shortcuts

Keyboard Shortcuts

KeyAction
GStart segmentation
Left ClickAdd positive point (include)
Right ClickAdd negative point (exclude)
Ctrl+Z (Cmd+Z on Mac)Undo last point
SSave polygon
EnterExport to layer
EscapeStop segmentation

6Support the Project

Want to give some love?

A rating on the QGIS Plugin Marketplace would be a banger for sure

Found a bug, want more features?

We are on a spicy quest to make the best AI tools in QGIS, pleaseee help us (: