Extracts building footprints from satellite imagery using ESRI's pretrained Mask R-CNN model (usa_building_footprints.dlpk), without ArcGIS Pro.
-
Download from: USA Building Footprints — ArcGIS Online
-
Sign in when prompted. Georgia Tech users: use
gtmapsas your organization URL: -
Click Download to get
usa_building_footprints.dlpk -
Run
1_inspect_dlpk.pyto extract the model files intomodel/
- Python 3.12
- NVIDIA GPU recommended (CUDA 12.6+)
uvfor environment management
uv venv
uv add torch torchvision --index "https://download.pytorch.org/whl/cu126" --index-strategy unsafe-best-match
uv add arcgis rasterio Pillow numpy shapely scipy matplotlibPlace the ESRI model files in model/ (extracted from usa_building_footprints.dlpk):
model/
├── usa_building_footprints.emd # model metadata
└── usa_building_footprints.pth # weights (Mask R-CNN ResNet50 FPN)
Run 1_inspect_dlpk.py to extract them automatically from the .dlpk file.
input/your_image.tif
↓
2_predict.py → output/footprints.geojson
↓
4_regularize.py → output/footprints_reg.geojson
↓
3_visualize.py → output/overlay_raw.png
output/overlay_regularized.png
uv run python 1_inspect_dlpk.pyuv run python 2_predict.py --image input/your_image.tif| Parameter | Default | Description |
|---|---|---|
--threshold |
0.9 |
Confidence threshold (lower = more detections) |
--cell_size |
0.3 |
Target resolution in m/px (model training resolution) |
--overlap |
256 |
Tile overlap in pixels (reduces missed edge buildings) |
--batch_size |
4 |
Tiles per GPU batch (increase for large images, e.g. 16) |
Snaps polygon edges to right angles, similar to ArcGIS Pro's Regularize Building Footprint tool.
uv run python 4_regularize.py| Parameter | Default | Description |
|---|---|---|
--tolerance |
1.0 |
Simplification tolerance in map units before snapping |
uv run python 3_visualize.pyProduces output/overlay_raw.png and output/overlay_regularized.png (if regularized footprints exist).
output/footprints.geojson— raw detected footprints (geo-referenced polygons)output/footprints_reg.geojson— regularized footprintsoutput/overlay_raw.png— visual overlay on satellite imageoutput/overlay_regularized.png— regularized overlay
- Input imagery must be a GeoTIFF with a projected CRS (EPSG:3857 recommended)
- The model was trained on US imagery at 0.3 m/px; imagery is automatically resampled to this resolution
- GPU is used automatically if available; CPU fallback is supported
