Skip to content

yanzhou-li/Semantic-Segmentation-Models

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

File Structure

Code

Prototxt files (network structure)

Scripts (training and testing)

Hit: The file_root of all scripts needs to be modified to real file directory.

Result

There are some trained model (caffemodel) with parameters and saved predicted segmentation (.png).

Due to limited size of uploaded file, I uploaded the required caffemodel to the Baidu web disk, which can be downloaded from here, password is ajqj.

Demo

A short demo video. Please click here to download, password is rf2m.

Environment

The code is developed or applied under the following configurations.

Hardware 2-8 GPUs (with at least 12G GPU memories)

Software Ubuntu 16.04.3 LTS, CUDA 8.0, caffe, python, and OpenCV

Dataset ADE20K

Run

Train

Before training, please prepare model structure (.prototxt), hyper parameter setting file (solver.prototxt) and model training script (train.sh). Modify them to suit actual condition of the hardware.

Makesure the names of all training set image are including in the ade_sceneparsing_train_im2cate.txt.

Prepare the ImageNet-pre-trained caffemodel when fine-tuning. Download here, password is 8m8q.

Enter the command in the terminal to train a model:

sh train.sh

Evaluate and Test

Prepare the corresponding deploy.prototxt (network structure when testing) and validation.txt (names of test dataset).

Enter the command in the terminal to evaluate the model on test set:

python evaluate_seg.py

It will produce a folder named ‘predict’, which contains the predicted segmentation result.

To visualize the grayscale result in different colors, run:

python color.py

For determine the score of mIOU, pixel accuracy and mean accuracy, run:

python score.py

Reference

Dataset ADE20K

Research works of BUPT-PRIV Lab caffe-model

About

Caffe models: PSPNet/DeepLabV3/SAN based on SE-ResNet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.1%
  • Shell 0.9%