Project 5: Image segmentation

The goal is to use SegNet neural network in order to do image segmentation.

What is image segmentation?

In digital image processing and computer vision, image segmentation is the process of partitioning a digital image into multiple image segments, also known as image regions or image objects (sets of pixels). The goal of segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze. Image segmentation is typically used to locate objects and boundaries (lines, curves, etc.) in images. More precisely, image segmentation is the process of assigning a label to every pixel in an image such that pixels with the same label share certain characteristics.

What is SegNet?

SegNet is a semantic segmentation model. This core trainable segmentation architecture consists of an encoder network, a corresponding decoder network followed by a pixel-wise classification layer. You can find more information here.

In this case, there are 13 classes: Sky, Building, Pole, Road_marking, Road, Pavement, Tree, SignSymbol, Fence, Car, Pedestrian, Bicyclist, Unlabelled.

To begin, the images are download from their files (one for train and one for test). Repeat the step for the labels.

The colors are then chosen for each labels. After this, the model has been trained.

Results

You can find the code used for this project here as a python notebook.

Here is an example of the images I worked with:

And here is the result after segmentation:

The black part is the unlabelled one. It means that the neural network can't describe it. The bicyclist is in cyan, the sidewalk in blue and the cars are in purple.