/RoadSceneUnderstanding-ModifiedUNet

This project contains two experiments for semantic segmentation using a Modified Version of the U-Net model. The first experiment is semantic segmentation for one class, like cars, and the second experiment considers multiple classes.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Read Scene Understanding Using ModifiedUNet Model

This project contains two experiments for semantic segmentation using a Modified Version of the U-Net model. The first experiment is semantic segmentation for one class, like cars, and the second experiment considers multiple classes. The experiments run on the Pytorch platform and Python 3.7. Mapillary Vistas dataset is used during the experiments.

Required libraries

Important files

  • parameters.py: All project parameters are defined in this file, including input and output paths.
  • dataset.py: A helper class for training takes images and targets dataset, then provides pair-batches of the dataset during the training process.
  • models.py: This file contains an implementation of the U-Net modified version.
  • prediction.py: This file applies the saved trained semantic segmentation model to a video. It generates a new video with the segmentation results.
  • imageprocessing.py: This file generates semantic segmentation masks given a label segmentation image. The masks are provided in separated folders based on the class name.

Experiment (1): One-Class Semantic Segmentation.

In this experiment, a semantic segmentation for one class is done by approaching cars as a target class. The training is only applied on 5K8K images and 1.21.5K images as a validation dataset. The experiement code is provided in vehicle-segmentation folder. The pixel accuracy reachs to 87%. The trained model is applied on a video recorded in Dubai, UAE. alt text

Experiment (2): Multi-Classes Semantic Segmentation.

In this experiment, we consider five classes: road, sidewalk, curb, crosswalk, and lane line. The experiement code is provided in sidewalk-segmentation folder. The accuracy reaches 95% pixel accuracy. alt text