Skip to content

Luke-Pratley/building_road_segmentation

Repository files navigation

Building and Road Network Segmentation of Satellite Images

Python application

In this repository, I investigate ways to semantically segment buildings and roads in top down. The motivation is that humanitarian and natural disasters can impact roads and buildings, and having a tool that can quickly survey them is useful. I make use of tensorflow to create a UNet and perform the prediction.

Example

Below we display an example of an input image and the corresponding ground truth and predicted road network and building footprints.

Input Image

Predicted Labels

The Data

The training and test data is taken from two SpaceNet competitions 2 and 3, where the road and building data are cross matched. The foler data_cleaning_EDA holds the notebooks that cover the EDA and data cleaning process.

The Models

There are a number of models implemented for testing in this repository, all of which are variations of UNet:

Requirements

For a good list of requirements, you can check the testing build in .github/workflows/python-app.yml.

It should work with Python 3.8 or greater.

Note: raterio and gdal can have issues on windows. The order of import in python of geopandas and rasterio can be important.

For the EDA:

  • geopandas
  • pandas
  • matplotlib
  • rasterio
  • numpy
  • gdal

For the Training/Inference:

  • PIL/Pillow
  • Tensorflow 2.8