by Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, Jiaya Jia, details are in project page.
This repository is for 'Pyramid Scene Parsing Network', which ranked 1st place in ImageNet Scene Parsing Challenge 2016. The code is modified from Caffe version of DeepLab v2 and yjxiong for evaluation. We merge the batch normalization layer named 'bn_layer' in the former one into the later one while keep the original 'batch_norm_layer' in the later one unchanged for compatibility. The difference is that 'bn_layer' contains four parameters as 'slope,bias,mean,variance' while 'batch_norm_layer' contains two parameters as 'mean,variance'. Several evaluation code is borrowed from MIT Scene Parsing.
Highly optimized PyTorch codebases available for semantic segmentation in repo: semseg, including full training and testing codes for PSPNet and PSANet.
For installation, please follow the instructions of Caffe and DeepLab v2. To enable cuDNN for GPU acceleration, cuDNN v4 is needed. If you meet error related with 'matio', please download and install matio as required in 'DeepLab v2'.
The code has been tested successfully on Ubuntu 14.04 and 12.04 with CUDA 7.0.
Clone the repository:
git clone https://github.com/hszhao/PSPNet.git
Build Caffe and matcaffe:
cd $PSPNET_ROOT
cp Makefile.config.example Makefile.config
vim Makefile.config
make -j8 && make matcaffe
Evaluation:
cd evaluation
vim eval_all.m
./run.sh
Results:
Prediction results will show in folder 'evaluation/mc_result' and the expected scores are:
(single scale testing denotes as 'ss' and multiple scale testing denotes as 'ms')
Demo video:
Video processed by PSPNet101 on cityscapes dataset:
Merge with colormap on side: Video1
Alpha blending with value as 0.5: Video2
If PSPNet is useful for your research, please consider citing:
@inproceedings{zhao2017pspnet,
title={Pyramid Scene Parsing Network},
author={Zhao, Hengshuang and Shi, Jianping and Qi, Xiaojuan and Wang, Xiaogang and Jia, Jiaya},
booktitle={CVPR},
year={2017}
}
Please contact 'hszhao@cse.cuhk.edu.hk'