Awesome Semantic Segmentation on PyTorch
This project aims at providing a concise, easy-to-use, modular reference implementation for semantic segmentation models using PyTorch.
Update
- Move backbones to
./base_models
- Change resnetv1_b to resnetv1_s
- Add parallel training
- Update MultiLoss
Requisites
- PyTorch 1.0
- Python 3.x
Usage
Train
python train.py --model fcn32s --backbone vgg16 --dataset pascal_voc
Evaluation
python eval.py --model fcn32s --backbone vgg16 --dataset pascal_voc
Run Demo
python demo.py --model fcn32s_vgg16_voc --input-pic ./datasets/test.jpg
Model Zoo & Datasets
Supported Model
Supported Dataset
You can run script to download dataset, such as:
cd ./datasets
python ade20k.py --download-dir ./datasets/ade
Result
Note: The parameter settings of each method are different, including crop_size, learning rata, epochs, etc. For specific parameters, please see paper.
PASCAL VOC 2012
Methods | Backbone | TrainSet | EvalSet | crops_size | epochs | Mean IoU | pixAcc |
---|---|---|---|---|---|---|---|
FCN32s | vgg16 | train | val | 480 | 60 | 47.50% | 85.39% |
FCN16s | vgg16 | train | val | 480 | 60 | 49.16% | 85.98% |
FCN8s | vgg16 | train | val | 480 | 60 | 48.87% | 85.02% |
PSPNet | resnet50 | train | val | 480 | 60 | 63.44% | 89.78% |
DeepLabv3 | resnet50 | train | val | 480 | 60 | 60.15% | 88.36% |
To Do
- Test fcn_resnet101_voc
- Test DataParallel
- Add more semantic segmentation models (in process)
- Train and evaluate
- Add DataParallelModel and DataParallelCriterion
- Add Synchronized BN (Why SyncBN?)