Home

Awesome

Semantic-segmentation-with-PyTorch-Satellite-Imagery

<!-- <a href="#"><img src="https://img.shields.io/badge/PyTorch-v1.9.0-red.svg?logo=PyTorch&style=for-the-badge" /></a> <a href="#"><img src="https://img.shields.io/badge/python-v3.6+-blue.svg?logo=python&style=for-the-badge" /></a> -->

This project has been developed for Kaggle Competition organised by CentraleSupelec Deep Learning course.

Final ranking: 1st place

Project description

The task was to utilise deep learning to perform semantic segmentation on satellite imagery. The training dataset consisted of 261 images taken by small UAV in the area of Houston, Texas to assess the damages after Hurricane Harvey. Each pixel was segmented to one of 25 classes such as roof, trees, road, swimming pool, vehicle or flooded (full list at the end of the file). Final score was calculated using the Dice Coefficient. The image below shows an example of an original image (left), corresponding mask (middle) and the model's prediction (right).

Alt text

Tags

Deep Learning, Semantic Segmentation, Satellite Imagery, UNet from scratch, PyTorch, custom DataLoaders, DeepLabv3+, PSPNet, Dice coefficient, Focal Loss, Transfer Learning

Dataset

The dataset can be downloaded here.

Project contents:

  1. Pre-processing I - new samples have been created for under represented classes
  2. Pre-processing II - images and corresponding masks have been resized from 4000x3000 to 368x368 for faster processing
  3. DataLoader - a custom implementation of DataLoaders allowed for uniform application of transformations (flips, rotations, altering brightness) to the images and corresponding masks
  4. Model I - UNet has been built from scratch as a benchmark model
  5. Model II - DeepLabv3+ architecture implemented from segmentation models library
  6. Model II - PSPNet architecture implemented from the same segmentation models library
  7. Training - models have been trained using Google Colab GPUs
  1. Evaluation - model performance was evaluated using Dice Score and Accuracy
  2. Results - the best model, DeepLabv3+, achieved Dice Score of 0.775 on 112 test images

Full list of classes

All classes in the dataset: