Using Convolutional Neural Networks to detect features in sattelite images
In a previous blog post we have seen how to build Convolutional Neural Networks (CNN) in Tensorflow, by building various CNN architectures (like LeNet5, AlexNet, VGGNet-16) from scratch and training them on the MNIST, CIFAR-10 and Oxflower17 datasets.
It starts to get interesting when you start thinking about the practical applications of CNN and other Deep Learning methods. If you have been following the latest technical developments you probably know that CNN’s are used for face recognition, object detection, analysis of medical images, automatic inspection in manufacturing processes, natural language processing tasks, any many other applications. You could say that you’re only limited by your imagination and creativity (and of course motivation, energy and time) to find practical applications for CNN’s.
Inspired by Kaggle’s Sattelite Imagery Feature Detection challenge, I would like to find out how easy it is to detect features (roads in this particular case) in sattelite and aerial images.
If this is possible, the practical applications of it will be enormous. In a time of global urbanisation, cities are expanding, growing and changing continiously. This of course comes along with new infrastructures, new buildings and neighbourhoods and changing landscapes. Monitoring and keeping track of all of these changes has always been a really labour intensive job. If we could get fresh sattelite images every day and use Deep Learning to immediatly update all of our maps, it would a big help for everyone working in this field!
In this blog we will use Image classification to detect roads in aerial images. To do this, First we need to get these aerial images, and get the data containing information on the location of roads (see section 2.1). After that we need to map these two layers on top each other, we will do this in section 3.1. After saving the prepared dataset (section 4.1) in the right format, we can feed it into our build convolutional neural network (section 4.3). We will conclude this blog by looking at the accuracy of this method, and discuss which other methods can be used to improve it.
The contents of this blog-post is as follows:
Getting the Data
2.1 Downloading image tiles with owslib
2.2 Reading the shapefile containing the roads of the Netherlands.
Mapping the two layers of data
3.2 Visualizing the Mapping results
Detecting roads with the convolutional neural network
4.1 Preparing a training, test and validation dataset
4.2 Saving the datasets as a pickle file
4.3 Training a convolutional neural network
4.5 Resulting Accuracy
Getting the Data
The first (and often the most difficult) step in any Data Science project is always obtaining the data. Luckily there are many open datasets containing satellite images in various forms. There is the Landsat dataset, ESA’s Sentinel dataset, MODIS dataset, the NAIP dataset, etc.Each dataset has different pro’s and con’s. Some like the NAIP dataset offer a high resolution (one meter resolution), but only cover the US. Others like Landsat cover the entire earth but have a lower (30 meter) resolution. Some of them show which type of land-cover (forest, water, grassland) there is, others contain atmospheric and climate data.
Since I am from the Netherlands, I would like to use aerial / satellite images covering the Netherlands, so I will use the aerial images provided by PDOK. These are not only are quite up to date, but they also have an incredible resolution of 25 cm.
Dutch governmental organizations have a lot open-data available which could form the second layer on top of these aerial images. With Pdokviewer you can view a lot of these open datasets online;
think of layers containing the infrastructure (various types of road, railways, waterways in the Netherlands (NWB wegenbestand),
layers containing the boundaries of municipalities and districts,
physical geographical regions,
locations of every governmental organizations,
electricity usage per block,
type of soil, geomorphological map,
number of residents per block,
surface usage, etc etc etc (even the living habitat of the brown long eared bat).
So there are many possible datasets you could use as the second layer, and use it to automatically detect these types of features in satellite images.
To read original blog, click here.
Link: Using Convolutional Neural Networks to detect features in sattelite images