Home

Awesome

ERFNET-PyTorch

A PyTorch implementation for ERFNet, for Semantic Segmentation on Pascal VOC.

Table of Contents:

<!-- Table of contents generated generated by http://tableofcontent.eu -->

Project Structure:

├── agents
|  └── erfnet.py # the main training agent 
├── graphs
|  └── models
|  |  └── erfnet.py  # model definition for semantic segmentation
|  |  └── erfnet_imagenet.py  # model definition for imagenet
|  └── losses
|  |  └── loss.py # contains the cross entropy 
├── datasets  # contains all dataloaders for the project
|  └── voc2012.py # dataloader for Pascal Voc dataset
├── data
├── utils # utilities folder containing metrics , config parsing, etc
|  └── assets
├── main.py
├── run.sh

Data Preparation:

We used Pascal Voc 2012 data; to prepare them for training, do the following:

Model:

We are using the same model architecture as given in the paper.

alt text

Experiment Configs:

We used the pretrained model on imagenet for ERFNet encoder and trained the model on Pascal VOC for 70 epochs only.

- Input size: 256x256x3
- Batch size: 64
- Learning rate: 5e-4
- learning_rate_patience: 100
- Betas for Adam: 0.5 and 0.999
- Number of epochs: 70

Usage:

Results:

We only ran a single experiment and got the following results:

MetricReproduced
Accuracy88.75%
Mean-IOU55.50%

Segmented Images after training:

alt text alt text alt text alt text alt text alt text alt text alt text

Requirements:

Check requirements.txt.

Future Work:

References:

License:

This project is licensed under MIT License - see the LICENSE file for details.