- Published on
Designing Footprint Extraction from NAIP Imagery Using U-Net, Grounding DINO, SAM, and Mask R-CNN
- Authors

- Name
- DeepHorus
A new hands-on tutorial introduces a complete GeoAI workflow for extracting building footprints from high-resolution NAIP aerial imagery, combining popular deep learning models. Designed for geospatial developers, the tutorial leverages open-source tools such as geoai-py, PyTorch, and segmentation-models-pytorch to make the process replicable.
The project addresses the growing need for automated mapping from remote sensing data, as manual digitization remains slow and expensive. The workflow covers data download, spatial inspection, generation of georeferenced image chips and segmentation masks, and training a U-Net model with a ResNet-34 encoder. Model performance is evaluated using IoU and F1 metrics.
The tutorial also demonstrates sliding-window inference on unseen scenes and converts predicted masks into cleaned, regularized building polygons. It benchmarks these results against a pretrained Mask R-CNN instance segmentation model. Additionally, it explores zero-shot segmentation using Grounding DINO and the Segment Anything Model (SAM).
Real-world applicability is shown by extending the pipeline to NAIP imagery served through Microsoft Planetary Computer and building labels from Overture Maps. This makes the methods suitable for large-scale mapping projects, disaster response, and urban planning. The configuration specifies a tile size of 512 pixels, a stride of 256, a batch size of 8, and 12 training epochs.
With optional GPU acceleration, training is significantly faster, and the tutorial includes installation instructions for Google Colab. Practitioners can compare semantic segmentation and instance detection outputs side by side. The included polygon cleaning and regularization step addresses a common pain point in geospatial analysis.
Early community feedback suggests that tutorials combining multiple state-of-the-art models are highly valuable. They lower the technical barrier for remote sensing experts with limited deep-learning experience. By packaging all steps in one notebook, the tutorial ensures reproducibility and ease of adoption.
Future versions may integrate additional architectures, larger benchmark datasets, or fully automated label generation. As geospatial AI evolves, such structured guides will likely become standard resources in the sector. The tutorial is already positioned as a step toward bridging computer vision and geographic information systems.