Prototxt files (network structure)
Scripts (training and testing)
Hit: The file_root of all scripts needs to be modified to real file directory.
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.
A short demo video. Please click here to download, password is rf2m.
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
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.shPrepare 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.pyIt will produce a folder named ‘predict’, which contains the predicted segmentation result.
To visualize the grayscale result in different colors, run:
python color.pyFor determine the score of mIOU, pixel accuracy and mean accuracy, run:
python score.pyDataset ADE20K
Research works of BUPT-PRIV Lab caffe-model