

This distance transform encodes each point in the image with the distance in meters from a building boundary. This transform was applied to SpaceNet data both here, and here. 2.3 Signed Distance TransformĪ final method for labeling ground truth is to adopt the signed distance transform of Yuan 2016. Hence if one used the mask for algorithm training data one would erroneously conclude that one large building exists at these locales rather than multiple smaller adjacent buildings. Note that this approach cannot differentiate the large cluster of adjacent buildings in the center left of the bottom image or the long lines of row houses in the top image. The right column demonstrates the building mask created with create_building_mask.py. The middle column shows building outlines. The left column displays the raw image with building polygons overlaid in orange. Output of plot_building_mask.py for two sample SpaceNet images (top and bottom rows).
#SPACENET 2 CODE#
The code below takes the GeoJSON label file and corresponding image and returns two coordinate arrays, one in geospatial coordinates (latitude and longitude) and one in pixel coordinates.įigure 4. A number of sophisticated functions using GDAL and other geospatial libraries are available in the SpaceNet utilities repository on GitHub. This information (along with much more) can be extracted with the GDAL code suite. Transforming these vertices into pixel coordinates requires knowledge of the image extent and precise geometric coordinate transform. The GeoJSON file lists building polygon vertices in latitude and longitude. We describe three methods of transforming the GeoJSON label files into pixel coordinates in various formats.

After the initial data download, or extraction, the second step in the extract-transform-load (ETL) process is to transform the latitude-longitude coordinates in the GeoJSON label files to pixel coordinates. Ground Truth TransformĬomputer vision algorithms tend to operate in pixel space, where locations are reported on the matrix of pixel positions rather than latitude and longitude. The elevation field is always zero for this dataset. Here we show the first building label associated with the image note that coordinates are stored as a WKT polygon or multipolygon with coordinates stored as. First entry of the GeoJSON label file associated with Figure 2. Upon downloading and expanding the tarballs, the TopCoder training directory structure should appear as follows:įigure 3.
#SPACENET 2 DOWNLOAD#
In short, the command to download processed 200m x 200m image tiles with associated building footprints is: aws s3api get-object -bucket spacenet-dataset \ -key AOI_1_Rio/processedData/ \ -request-payer requester įor this post, we will focus on the TopCoder challenge dataset. Detailed descriptions of data formats and download instructions can be found here.
