Complete GeoAI Tutorial: Building Footprint Extraction Using U-Net, Grounding DINO, and SAM
A comprehensive technical tutorial presents an end-to-end geospatial deep learning pipeline for extracting building footprints from high-resolution aerial imagery. The workflow combines multiple computer vision models, including U-Net with ResNet-34 encoder for semantic segmentation alongside zero-shot approaches using Grounding DINO and SAM, with comparisons against Mask R-CNN for instance segmentation.
The pipeline spans environment configuration, NAIP imagery and vector label acquisition, georeferenced chip generation, and mask creation. The U-Net model undergoes training with cross-validation and early stopping, with pixel-level performance evaluation using IoU and F1 metrics.
Sliding-window inference processes unseen scenes to generate prediction and probability rasters. Predicted masks convert into cleaned and regularized building polygons with geometric property calculation and comparison between raw and orthogonalized outputs.
The workflow extends to real-world datasets using NAIP imagery from Microsoft Planetary Computer and labels from Overture Maps, demonstrating practical applicability for production scenarios.