Skip to content

Commit 7c2ccef

Browse files
authored
Update README.md
1 parent 7d2f83a commit 7c2ccef

File tree

1 file changed

+45
-16
lines changed

1 file changed

+45
-16
lines changed

README.md

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ by Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, Jiaya Jia, details
44

55
### Introduction
66

7-
This repository is modified from Caffe version of [yjxiong](https://github.com/yjxiong/caffe/tree/mem) and [DeepLab v2](https://bitbucket.org/aquariusjay/deeplab-public-ver2) for testing. Results are tested on Ubuntu 14.04. Trainable code will be available later.
7+
This repository is modified from Caffe version of [yjxiong](https://github.com/yjxiong/caffe/tree/mem) and [DeepLab v2](https://bitbucket.org/aquariusjay/deeplab-public-ver2) 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](https://github.com/CSAILVision/sceneparsing).
8+
9+
## Installation
10+
11+
For installation, please follow the instructions of [Caffe](https://github.com/BVLC/caffe) and [DeepLab v2](https://bitbucket.org/aquariusjay/deeplab-public-ver2). To enable cuDNN for GPU acceleration, cuDNN v5 is needed as required in 'yjxiong'. If you meet error related with 'matio', please please download and install [matio](matio) as required in 'DeepLab v2'.
12+
13+
The code has been tested successfully on Ubuntu 14.04 and 12.04 with CUDA 7.0.
814

915
### Usage
1016

@@ -14,44 +20,67 @@ This repository is modified from Caffe version of [yjxiong](https://github.com/y
1420
git clone https://github.com/hszhao/PSPNet.git
1521
```
1622

17-
2. Build Caffe and matcaffe
23+
2. Build Caffe and matcaffe:
1824

1925
```shell
2026
cd $PSPNET_ROOT
27+
cp Makefile.config.example Makefile.config
28+
vim Makefile.config
2129
make -j8 && make matcaffe
2230
```
2331

24-
3. Testing
25-
26-
Evaluation code is in folder 'evaluation'.
27-
28-
Download trained models and put it in folder 'evaluation/model/':
29-
30-
pspnet50_ADE20K.caffemodel: [link](https://drive.google.com/open?id=0BzaU285cX7TCN1R3QnUwQ0hoMTA)
31-
32-
pspnet101_VOC2012.caffemodel: [link](https://drive.google.com/open?id=0BzaU285cX7TCNVhETE5vVUdMYk0)
32+
3. Evaluation:
3333

34-
pspnet101_cityscapes.caffemodel: [link](https://drive.google.com/open?id=0BzaU285cX7TCT1M3TmNfNjlUeEU)
35-
36-
Modify the related paths in 'eval_all.m':
34+
- Evaluation code is in folder 'evaluation'.
35+
- Download trained models and put them in folder 'evaluation/model':
36+
- pspnet50\_ADE20K.caffemodel: [GoogleDrive](https://drive.google.com/open?id=0BzaU285cX7TCN1R3QnUwQ0hoMTA)
37+
- pspnet101\_VOC2012.caffemodel: [GoogleDrive](https://drive.google.com/open?id=0BzaU285cX7TCNVhETE5vVUdMYk0)
38+
- pspnet101\_cityscapes.caffemodel: [GoogleDrive](https://drive.google.com/open?id=0BzaU285cX7TCT1M3TmNfNjlUeEU)
39+
- Modify the related paths in 'eval_all.m':
40+
- Mainly variables 'data_root' and 'eval_list', and your image list for evaluation should be similarity to that in folder 'evaluation/samplelist' if you use this evaluation code structure.
41+
- Matlab 'parfor' evaluation is used and the default GPUs are with ID [0:3]. Modify variable 'gpu_id_array' if needed. We assume that number of images can be divided by number of GPUs; if not, you can just pad your image list or switch to single GPU evaluation by set 'gpu_id_array' be length of one, and change 'parfor' to 'for' loop.
3742

3843
```shell
3944
cd evaluation
4045
vim eval_all.m
4146
```
4247

43-
Run the testing scripts:
48+
- Run the evaluation scripts:
4449

4550
```
4651
./run.sh
4752
```
4853

49-
4. Results: (single scale testing denotes as 'ss' and multiple scale testing denotes as 'ms')
54+
4. Results:
55+
56+
Prediction results will show in folder 'evaluation/mc_result' and the expected scores are:
57+
58+
(single scale testing denotes as 'ss' and multiple scale testing denotes as 'ms')
5059

5160
- PSPNet50 on ADE20K valset (mIoU/pAcc): 41.68/80.04 (ss) and 42.78/80.76 (ms)
5261
- PSPNet101 on VOC2012 testset (mIoU): 85.41 (ms)
5362
- PSPNet101 on cityscapes valset (mIoU/pAcc): 79.70/96.38 (ss) and 80.91/96.59 (ms)
5463

64+
5. Demo video:
65+
66+
Video processed by PSPNet101 on cityscapes dataset: [Youtube](https://youtu.be/gdAVqJn_J2M)
67+
68+
## Citation
69+
70+
If PSPNet is useful for your research, please consider citing:
71+
72+
@article{zhao2016pspnet,
73+
author = {Hengshuang Zhao and
74+
Jianping Shi and
75+
Xiaojuan Qi and
76+
Xiaogang Wang and
77+
Jiaya Jia},
78+
title = {Pyramid Scene Parsing Network},
79+
journal = {CoRR},
80+
volume = {abs/1612.01105},
81+
year = {2016},
82+
url = {https://arxiv.org/abs/1612.01105},
83+
}
5584
### Questions
5685

5786
Please contact 'hszhao@cse.cuhk.edu.hk'

0 commit comments

Comments
 (0)