kvnptl / Bayesian-Segmentation-and-Uncertainty-estimation-on-CityScapes

Implement a network for semantic segmentation in image data, and also generate estimates of aleatoric and epistemic uncertainties associated with the segmentation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation-and-Uncertainty-estimation-on-CityScapes/Bayesian-SegNet

  1. Implement Bayesian SegNet for semantic segmentation with Pytorch, and also generate estimates of aleatoric and epistemic uncertainties associated with the segmentation. Relevant codes and files are stored in ./Bayesian,

  2. Implement UNet for semantic segmentation with TensorFlow. Stop training due to a lack of GPUs. Relevant codes and files are stored in ./UNet.

    For more information on the dataset please refer to: CityScapes dataset. This is also a team project for Deep Learning for Computer Vision course, lectured by MIT Prof. Alexander Amini.

Table of Contents

Install

git clone git@github.com:kasating/Bayesian-Segmentation-and-Uncertainty-estimation-on-CityScapes.git

Usage(Bayesian SegNet)

1. Requirements

pip install -r requirements.txt   

2. Pre-train Weights

Downloaded vgg16_bn-6c64b313.pth from https://download.pytorch.org/models/vgg16_bn-6c64b313.pth and put it in the same folder as './BayesianSegNet/'.

3. Dataset

Put lab2_train_data.h5 and lab2_test_data.h5 in './BayesianSegNet/'.

4. Training and Testing

  • ./BayesianSegNet/main_segnet.ipynb is the main file of this software lab.

  • Ignore the first 4 cells in ./BayesianSegNet/main_segnet.ipynb if you're not using Google Colab.

  • To train the model, change the parameter MODE to 'TRAIN' and run all cells in ./BayesianSegNet/main_segnet.ipynb.

  • To test the model only, change the parameter MODE to TEST and run all cells in ./BayesianSegNet/main_segnet.ipynb. Model parameters are stored in ./BayesianSegNet/weights/model.pth.

Results(Bayesian SegNet)

image.png

Contributing

Team Member Contribution
Wentao Cao Assign tasks; Implement Bayesian SegNet for segmentation; Generate and visualize estimates of aleatoric and epistemic uncertainties.
Kaiang Wen Provide code of the UNet model structure using TensorFlow,Help train Bayesian SegNet and write comments for it.
Cheng Dai Finish the exercises and implement a data loader.
Yaqi Zhou Implement UNet for segmentation, including training and testing.
ALL Check through the team project.

License

MIT License

About

Implement a network for semantic segmentation in image data, and also generate estimates of aleatoric and epistemic uncertainties associated with the segmentation.

License:MIT License


Languages

Language:Jupyter Notebook 98.7%Language:Python 1.3%