Skip to content

AI Imagery Feature Extraction

github-actions[bot] edited this page Oct 25, 2026 · 1 revision

This page is generated from the repository on every merge to main; changes made here are overwritten.

extract_features_from_imagery (two-phase)

Extract object boundary polygons from a loaded raster using a class-agnostic segmentation model (FastSAM) -- for a specific image the user actually has (a fresh drone/satellite photo, a scanned map), NOT for pre-vetted baseline data (use fetch_building_footprints for that instead, which is faster and free but can lag real conditions by months). Runs entirely locally/offline once the model is downloaded -- no cloud vision API call, matching this plugin's offline-first posture. IMPORTANT: this tool is class-agnostic -- it finds object BOUNDARIES, never object IDENTITIES. Never describe a result polygon as a specific class ('this is a building') unless the user's own request already established that framing for the whole image; state plainly that these are detected boundaries with a confidence score, not classified objects. Requires the raster's pixel dimensions to be at most max_pixel_dimension -- clip to a smaller area of interest first for a large image rather than expecting this tool to silently downsample it for you. Requires the optional ultralytics package (installs a real ML runtime plus a ~150MB+ model checkpoint on first use) -- install via qpip if prompted, or manually in the OSGeo4W Shell.

Parameter Type Required Description
raster_layer string yes An already-loaded raster layer to extract features from.
output_layer_name string no Name for the resulting polygon layer. Defaults to '{raster_layer}_extracted_features'.
min_area_m2 number no Optional: drop detected features smaller than this real-world area (square meters) -- SAM-family 'segment everything' mode reliably produces noise-scale false positives worth filtering out.
confidence_threshold number no Minimum model confidence (0-1) to keep a detected feature. Defaults to 0.4.
max_pixel_dimension integer no Hard cap on the raster's width/height in pixels. Defaults to 2048 -- larger rasters are rejected with an error asking you to clip first, rather than silently downsampled.

Clone this wiki locally