Image for post
Image for post

The SpaceNet 7 Multi-Temporal Urban Development Challenge Algorithmic Baseline

Adam Van Etten
Aug 27 · 6 min read

Preface: SpaceNet LLC is a nonprofit organization dedicated to accelerating open source, artificial intelligence applied research for geospatial applications, specifically foundational mapping (i.e., building footprint & road network detection). SpaceNet is run in collaboration by co-founder and managing partner CosmiQ Works, co-founder and co-chair Maxar Technologies, and our partners including Amazon Web Services (AWS), Capella Space, Topcoder, IEEE GRSS, the National Geospatial-Intelligence Agency and Planet.

The SpaceNet 7 Challenge has an ambitious goal: identify and track building locations and change (i.e., construction) at the individual building identifier level, all from a deep temporal stack of medium resolution satellite imagery. As discussed in our SN7 announcement blog, this task is highly relevant to myriad humanitarian, urban planning, and disaster response scenarios. In this post we open source an algorithmic baseline for the SpaceNet 7 Challenge, as a means to both demonstrate that the proposed task is indeed feasible, and to provide a starting point that significantly lowers the barrier of entry for participants in the upcoming competition.

1. Solaris

Solaris is an open source machine learning pipeline for overhead imagery developed by CosmiQ Works. This package allows non-experts in the geospatial realm to build, train, test, and score machine learning models with a simple and well-documented workflow. Furthermore, the significant effort put into data preprocessing greatly reduces the challenges inherent in using geospatial data; for example the oft-annoying task of converting GeoJSON labels of a random coordinate reference system (CRS) into pixel coordinates or a pixel mask is trivial within Solaris. Accordingly, and unsurprisingly, we use Solaris for the baseline algorithm.

2. Data Access

As always with SpaceNet, data is freely available as part of the Registry of Open Data on AWS. All you need is an AWS account and the AWS CLI installed and configured. Once you’ve done that, simply run the command below to download the training dataset to your working directory:

3. Data Prep

SpaceNet 7 building footprint labels are in GeoJSON format. We will use the labels_match folder, which contains both the geometry and unique identifier for each building (see Figure 1).

Once the training masks have been created, we simply create a CSV with the data locations, edit the filepaths in the Solaris .yml file, and we are ready to launch training.

Which will render something akin to:

Once the training masks have been created, we simply create a CSV with the data locations, edit the filepaths in the Solaris .yml file, and we are ready to launch training.

4. Training

Training is simple to launch. Once the baseline algorithm has been downloaded from GitHub and the dockerfile built, simply run:

This model is based upon XD_XD’s submission to the SpaceNet 4 challenge, and features a VGG16 + U-Net architecture. Training for the full 300 epochs of the baseline model the should take 20 hours (~$60) on a p3.2xlarge AWS instance. Alternately, instead of training, one could use the pre-trained weights included in the baseline repository.

5. Inference — Segmentation Mask

Once training is completed (or pre-trained weights are selected) inference can be initiated via:

For the SpaceNet 7 test_public dataset, the script will execute in ~2.5 minutes on a p3.2xlarge AWS instance (which equates to an inference rate of ~60 square kilometers per second). The output of the segmentation model is a prediction mask of building footprints (see Figures 3, 4), and performance is surprisingly good given the moderate resolution of the imagery.

Image for post
Image for post
Figure 3. Top: input image (left) and prediction mask (right) for a sample chip. Bottom: Zoom-in of the image and prediction mask .
Image for post
Image for post
Figure 4. Sample prediction mask data cube.

6. Footprint Extraction

Building footprint geometries can be quickly extracted the from the prediction mask with Solaris:

7. Building Identifier Tracking

Connecting building identifiers between time steps is the trickiest stage of the baseline algorithm. The inclusion of Unusable Data Masks (UDMs) in the SpaceNet 7 labels is important from a dataset completeness perspective, but complicates building identifier tracking. This is because building labels at times behave like subatomic particles, popping into and out of existence seemingly at random depending on cloud cover. This is illustrated in Figure 6.

Despite these complications, one can extract persistent building identifiers using the following function, which tracks footprint identifiers across the deep time stack:

While this footprint matching module is of course imperfect, in many cases it works quite well (see Figure 7).

8. Scoring

Scoring with the legacy SpaceNet metric of an IOU-based F1 provides an aggregate score of F1 = 0.42. Previous SpaceNets had far higher scores (e.g. F1 > 0.8 at nadir in SpaceNet 4), and used a higher IOU threshold of 0.5 (vs 0.25 for SpaceNet 7 due to the very small building pixel sizes), yet the imagery was also ~10✕ sharper. On the balance, the baseline F1 score is still higher than we anticipated.

Yet, this F1 score does not capture the dynamic nature of the SpaceNet 7 dataset, and therefore the SCOT metric is far more informative. More details on that metric are available in a previous blog, but in brief: the SpaceNet Change and Object Tracking (SCOT) metric combines an object tracking and change term into a singular score. For SpaceNet 7, we find the change term (mean score of 0.06) to be far more challenging than the tracking term (mean score of 0.39). In the aggregate, scoring each of the 20 areas of interest in the SpaceNet test_public dataset gives a combined score of SCOT = 0.158 (out of a possible 1.0).

9. Conclusions

While the SpaceNet 7 task is a very challenging one, and we are happy with this score as an initial baseline, there is certainly much room for improvement. See the CosmiQ_SN7_Baseline GitHub repository for further details on the algorithmic baseline and how to run through the entire algorithm from start to finish.

The ability to localize and track the change in building footprints over time is fundamental to myriad applications, from disaster preparedness and response to urban planning. The SpaceNet 7 baseline model discussed in this blog should provide a good starting point to further investigations in this challenging task. With the upcoming launch of SpaceNet 7 (now slated for September 8, 2020), we look forward to seeing what improvements can be made to this baseline.

* Thanks to Nick Weir and Daniel Hogan for assistance designing the algorithmic baseline.

* 2020 — Aug — 28 Update: This blog was updated to include more details on scoring.

The DownLinQ

Welcome to the official blog of CosmiQ Works, an IQT Lab…

Adam Van Etten

Written by

The DownLinQ

Welcome to the official blog of CosmiQ Works, an IQT Lab dedicated to exploring the rapid advances delivered by artificial intelligence and geospatial startups, industry, academia, and the open source community

Adam Van Etten

Written by

The DownLinQ

Welcome to the official blog of CosmiQ Works, an IQT Lab dedicated to exploring the rapid advances delivered by artificial intelligence and geospatial startups, industry, academia, and the open source community

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store