Skip to content
intermediateimage

SpaceNet Building Footprint Outlines on Satellite Scenes

Outline building footprints as closed polygons on satellite-style scenes with the geo_annotation scheme. The ten scenes are illustrative synthetic images.

Get This Design

View on GitHub(opens in a new tab)

Clone or download from the repository

Quick start:

bash
git clone https://github.com/davidjurgens/potato-showcase.git
cd potato-showcase/image/aerial/spacenet-building-footprints
potato start config.yaml

About this dataset

SpaceNet is a remote sensing dataset and challenge series by Van Etten, Lindenbaum, and Bacastow. Challenge 2 covers building footprints in Las Vegas, Paris, Shanghai, and Khartoum, with 24,586 scenes of 200 m by 200 m (650 px by 650 px) holding 302,701 building footprints. All SpaceNet data is distributed under a Creative Commons Attribution-ShareAlike 4.0 license.

In the original protocol, a GIS team at DigitalGlobe (now Radiant Solutions) annotated each scene to within 5 pixels for building polygon corners. One expert labeled an area and a second expert validated 100% of the areas. The guide asks for closed, non-overlapping polygons with squared corners, rooflines shifted to the base corners where the base is visible, and no attributes. The design puts the guide in the instructions and uses a geo_annotation scheme with the polygon tool and a single Building label. The sample scenes are synthetic images drawn for the design and placed at arbitrary 200 m extents, because SpaceNet is share-alike licensed. Scenes 1 and 2 carry deliberately offset suggested polygons to show a review-and-correct pass. The paper leaves annotator disagreement for future work, so the design reports no agreement figure.

The model_training block turns on training and write-back, and the torchvision-segment trainer is chosen on the admin training page. That trainer fine-tunes a torchvision Mask R-CNN on the polygons drawn over each scene's raster and predicts polygons for scenes nobody has outlined. Predictions are written back to the map as suggestions that count as an answer only after an annotator edits or accepts a suggestion. The trainer needs a raster basemap with an extent or a GeoTIFF, which is why the design uses local images instead of map tiles. Training runs on the study's own labels, and the trainer does not serve or deploy a model.

Scenes (Challenge 2)
24,586
Building footprints
302,701
Scene size
200 m x 200 m (650 px x 650 px)
Areas
Las Vegas, Paris, Shanghai, Khartoum
Corner tolerance
within 5 pixels
Validation
second expert on 100% of areas
Sample scenes here
10 illustrative synthetic scenes

Configuration File

This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.

yaml
# yaml-language-server: $schema=https://potatoannotator.readthedocs.io/en/latest/schemas/potato-config.schema.json
# SpaceNet building footprints: outline each building on a satellite scene.
#
# Dataset: SpaceNet Challenge 2 (Las Vegas, Paris, Shanghai, Khartoum)
# Dataset URL: https://registry.opendata.aws/spacenet/
# Licence: CC BY-SA 4.0 (https://spacenet-dataset.s3.amazonaws.com/LICENSE.md)
# Paper: Van Etten, Lindenbaum and Bacastow, "SpaceNet: A Remote Sensing
#   Dataset and Challenge Series", arXiv:1807.01232 (2018).
# DOI: 10.48550/arXiv.1807.01232
# BibTeX:
#   @misc{vanetten2018spacenet,
#     doi = {10.48550/ARXIV.1807.01232},
#     url = {https://arxiv.org/abs/1807.01232},
#     author = {Van Etten, Adam and Lindenbaum, Dave and Bacastow, Todd M.},
#     title = {SpaceNet: A Remote Sensing Dataset and Challenge Series},
#     publisher = {arXiv},
#     year = {2018}
#   }
#
# Protocol (paper section 2.4 and Appendix A, "SpaceNet Building Footprint
# Labeling Guide"). Quoted:
#   "A GIS team at DigitalGlobe (now Radiant Solutions) fully annotated each
#   scene to within 5 pixels for building polygon corners."
#   "The labels went through a rigorous QA/QC process, with one expert
#   labeling a specific area and then a second expert performing validation
#   on 100% of the areas."
#   Labeling guide, items used here:
#   "2. Rooflines will first be extracted to best represent the shape of the
#   footprint and for any buildings where the base of the building is
#   partially visible due to off-nadir angle the polygon will be shifted to
#   best fit the base corners."
#   "3. Buildings will have squared corners (assuming they are true to the
#   shape of the building)."
#   "4. Extraction of building corners will be within 5 pixels of the
#   location on the imagery."
#   "5. Building footprints will be closed polygons and will not overlap."
#   "6. No attributes will be populated."
#   "7. Adjoining buildings with different heights shall be captured at one
#   visible roof for the whole block and shifted to that visible roofs
#   baseline."
# The paper leaves annotator disagreement for future work, so no agreement
# figure is claimed here.
#
# Label: one class, a building footprint polygon.
#
# Adaptations:
#   - The ten scenes are ILLUSTRATIVE. They are synthetic 650 x 650 px images
#     drawn for this design (media/LICENSE-media.txt), not SpaceNet
#     imagery, because SpaceNet is CC BY-SA. They are georeferenced to
#     200 m x 200 m extents at an arbitrary location, not the SpaceNet tiles'
#     locations, and use Potato's image-with-extent basemap, so the map
#     needs no network and no tile server.
#   - The original labelers worked in a GIS on 30 cm pan-sharpened GeoTIFFs;
#     here annotators use the polygon tool in the browser.
#   - Scenes 1 and 2 carry deliberately offset suggested polygons
#     (preannotation_field) to show a review-and-correct pass. The original
#     QA/QC was a second expert validating 100% of the areas; that is only
#     imitated by the suggestions.
#   - Guidance items 2 and 7 (off-nadir base shift, adjoining roofs) are
#     reproduced in the instructions, but the synthetic scenes are
#     nadir-view, so they do not exercise them.
#
# Model training (Potato 2.14.0): the `torchvision-segment` trainer
# (kinds geometry and geo, image modality; `pip install
# 'potato-annotation[train-vision]'`) fine-tunes a torchvision Mask R-CNN on
# the polygons drawn over each item's raster, then predicts polygons on
# scenes nobody has outlined. Predictions come back as GeoJSON in EPSG:4326
# and show on the map as suggestions that count as an answer only when an
# annotator edits or accepts them (writeback below). It trains on a raster
# basemap with an extent or a GeoTIFF; a basemap of server tiles has no
# raster and would be left out. It does not serve or deploy a model, and it
# does not export ONNX. Pick the trainer on /admin/training with the admin
# key below.
#
# Run:
#   python potato/flask_server.py start config.yaml -p 8000

annotation_task_name: "SpaceNet building footprints (illustrative scenes)"

task_dir: "."
data_files:
  - sample-data.json
media_directory: media

item_properties:
  id_key: id
  text_key: text

output_annotation_dir: annotation_output
export_annotation_format: jsonl

require_password: false
admin_api_key: "demo-admin-key"

user_config:
  allow_all_users: true
  users: []

annotation_schemes:
  - annotation_type: geo_annotation
    name: building_footprints
    description: "Outline each building footprint as a closed polygon"
    task: draw
    tools: [polygon]
    labels:
      - name: Building
        color: "#D55E00"
    basemap_field: map
    preannotation_field: suggested
    snapping: true
    height: 560
    label_requirement:
      required: false

model_training:
  enabled: true
  writeback:
    schemas: ["building_footprints"]
    include_unlabeled: true
    min_confidence: 0.5

annotation_instructions: |
  Outline every building you can see as one closed polygon with the polygon
  tool, following the SpaceNet building footprint labeling guide.
  Trace the roofline so the polygon fits the footprint, and shift it to the
  base corners where the base of a building is visible because of an
  off-nadir angle. Give buildings squared corners when the building has them,
  and place each corner within 5 pixels of its location on the image.
  Close every polygon and keep polygons from overlapping. Do not add any
  attributes. For adjoining buildings with different heights, capture one
  visible roof for the whole block and shift it to that roof's baseline.
  Where a suggested polygon is already drawn, correct it or delete it.
  The scenes here are synthetic and illustrative.

Sample Data

json
[
  {
    "id": "sn_001",
    "text": "Scene 1: outline every building footprint you can see. Illustrative image, 200 m by 200 m.",
    "map": {
      "image": "/media/tile_001.png",
      "extent": [
        10,
        45,
        10.00254,
        45.0018
      ]
    },
    "suggested": {
      "type": "FeatureCollection",
      "features": [
        {
          "type": "Feature",
          "properties": {
            "label": "Building"
          },
          "geometry": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  10.0015444,
                  45.0003192
                ],
                [
                  10.0017251,
                  45.0002962
                ],
                [
                  10.0016912,
                  45.0001626
                ],
                [
                  10.0015105,
                  45.0001857
                ],
                [
                  10.0015444,
                  45.0003192
                ]
              ]
            ]
          }
        },
        {
          "type": "Feature",
          "properties": {
            "label": "Building"
          },
          "geometry": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  10.0004894,
                  45.0015986
                ],
                [
                  10.0006587,
                  45.001577
                ],
                [
                  10.0006047,
                  45.0013645
                ],
                [
                  10.0004355,
                  45.001386
                ],
                [
                  10.0004894,
                  45.0015986
                ]
              ]
            ]
          }
        },
        {
          "type": "Feature",
          "properties": {
            "label": "Building"
          },
          "geometry": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  10.0009292,
                  45.0004976
                ],
                [
                  10.0013022,
                  45.00045
                ],
                [
                  10.0012669,
                  45.000311
                ],
                [
                  10.0008939,
                  45.0003586
                ],
                [
                  10.0009292,
                  45.0004976
                ]
              ]
            ]
          }
        }
      ]
    }
  },
  {
    "id": "sn_002",
    "text": "Scene 2: outline every building footprint you can see. Illustrative image, 200 m by 200 m.",
    "map": {
      "image": "/media/tile_002.png",
      "extent": [
        10.003,
        45,
        10.00554,
        45.0018
      ]
    },
    "suggested": {
      "type": "FeatureCollection",
      "features": [
        {
          "type": "Feature",
          "properties": {
            "label": "Building"
          },
          "geometry": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  10.0050313,
                  45.0015079
                ],
                [
                  10.0053478,
                  45.001505
                ],
                [
                  10.0053453,
                  45.0013666
                ],
                [
                  10.0050288,
                  45.0013694
                ],
                [
                  10.0050313,
                  45.0015079
                ]
              ]
            ]
          }
        },
        {
          "type": "Feature",
          "properties": {
            "label": "Building"
          },
          "geometry": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  10.0034824,
                  45.001098
                ],
                [
                  10.003795,
                  45.0010952
                ],
                [
                  10.0037915,
                  45.0009014
                ],
                [
                  10.0034789,
                  45.0009042
                ],
                [
                  10.0034824,
                  45.001098
                ]
              ]
            ]
          }
        },
        {
          "type": "Feature",
          "properties": {
            "label": "Building"
          },
          "geometry": {
            "type": "Polygon",
            "coordinates": [
              [
                [
                  10.0041894,
                  45.0010053
                ],
                [
                  10.0045177,
                  45.0010024
                ],
                [
                  10.0045147,
                  45.0008335
                ],
                [
                  10.0041865,
                  45.0008364
                ],
                [
                  10.0041894,
                  45.0010053
                ]
              ]
            ]
          }
        }
      ]
    }
  }
]

// ... and 8 more items

Dataset & paper

Van Etten et al., arXiv 2018

Paper DOI
10.48550/arXiv.1807.01232

Citation (BibTeX)

bibtex
@misc{vanetten2018spacenet,
  doi = {10.48550/ARXIV.1807.01232},
  url = {https://arxiv.org/abs/1807.01232},
  author = {Van Etten, Adam and Lindenbaum, Dave and Bacastow, Todd M.},
  title = {SpaceNet: A Remote Sensing Dataset and Challenge Series},
  publisher = {arXiv},
  year = {2018}
}

Details

Annotation Types

geo_annotation

Domain

Remote SensingSatellite ImageryMapping

Use Cases

Building Footprint ExtractionInstance SegmentationMap Annotation

Tags

spacenetbuilding-footprintssatellitepolygongeospatialmask-r-cnn

Found an issue or want to improve this design?

Open an Issue(opens in a new tab)