/Flood-Segmentation

The aim of this project was to build a deep learning model which will identify and segment flooded areas in aerial images

Primary LanguagePython

Project Title : Flood Segmentation

Flood segmentation is a deep learning model that segments flooded area from aerial images.

Model Output

Description

Semantic segmentation is the process of classifying each pixel of an image into distinct classes using deep learning. This aids in identifying regions in an image where certain objects reside.

The aim of this project is to build a deep learning model which will identify and segment flooded areas in aerial images. Flood segmentation in aerial images is a crucial process in the workflow of target based aerial image analysis. In the last decade, a lot of research has happened related to information extraction from aerial imagery. Still it remains a challenging task due to noise, complex image background and occlusions.

Contents

  1. Dataset
  2. Tools and libraries
  3. Data Preprcessing
  4. Model Architecture
  5. Training and evaluation
  6. References

1. Dataset

For this project, we have built our own custom dataset from Google Images. This dataset contains aerial images, along with the target masks. The dataset contains 290 aerial images of several flooded and their respective masks. Both the masks and the images are 224x224 in resolution and are present in .png format.

10% of the dataset was used for validation.

2. Tools and libraries

  • TensorFlow framework for model building.
  • Label Studio for annotation task.
  • Albumentations for data augmentation.
  • Segmentation Models for defining custom loss function.
  • Other secondary libraries mentioned in requirements.txt

3. Data Preprocessing

  1. Images were reshaped to 224x224 dimension and normalized between [0,1].
  2. tf.data.Dataset was used for building an efficient data pipeline.

4. Model Architecture

  1. We have used a standard fully convolutional UNet architecture with backbone model EfficientNetb2 that receives an RGB colour image as input and generates a same-size semantic segmentation map as output.
  2. The model has 4 downsampling blocks and 3 upsampling blocks.
    • The downsampling section, extracts feature information from the input by decreasing in spatial dimensions but increasing in feature dimensions.
    • The upsampling section, reduces the image in feature dimension while increasing the spatial dimensions. It uses skip connections that allow it to tap into the same-sized output of the contraction section, which allows it to use higher-level locality features in its upsampling.

5. Training and Evaluation

  1. The model was trained for 15 epochs using a batch size of 16. We have used a smaller batch size because of memory issues.
  2. Loss function used during training was binary cross-entropy loss and metrics used were BCE and IoU score.
  3. Adam was used as optimizer and learning rate was set to 5e-4.
  4. After training for 15 epochs, we obtained a training iou score of 0.7991 and validation iou score of 0.7103.

    Training and Evaluation Plot

6. References