Skip to content

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

License

Notifications You must be signed in to change notification settings

glisses/segmentation-and-uncertainty-estimation-on-CityScapes

Repository files navigation

segmentation and uncertainty estimation on CityScapes

  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 Prof. Alexander Amini.

Table of Contents

Install

git clone git@github.com:glisses/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_v7.ipynb is the main file of this software lab.

  • Ignore the first 4 cells in ./BayesianSegNet/main_segnet_v7.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_v7.ipynb.

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

Results(Bayesian SegNet)

image.png

Contributing

Team Member Contribution
Jialong Yuan Finish the exercises and implement a data loader.
Zhuoyuan Li Provide code of the UNet model structure using TensorFlow.
Yitong Luo Implement UNet for segmentation, including training and testing.
Kaiang Wen Assign tasks; Implement Bayesian SegNet for segmentation; Generate and visualize estimates of aleatoric and epistemic uncertainties with Yaqi Zhou.
Yaqi Zhou Generate and visualize estimates of aleatoric and epistemic uncertainties; Help train UNet and write comments for it.
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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages