Skip to content

jmtatsch/PSPNet-Keras-tensorflow

 
 

Repository files navigation

A Keras implementation of Pyramid Scene Parsing Networks PSPNet

Codacy Badge

Original Paper and implementation:

@inproceedings{zhao2017pspnet,
  author = {Hengshuang Zhao and
            Jianping Shi and
            Xiaojuan Qi and
            Xiaogang Wang and
            Jiaya Jia},
  title = {Pyramid Scene Parsing Network},
  booktitle = {Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  year = {2017}
}

Installation:

python3 setup.py install

Usage:

python3 pspnet.py
python3 pspnet.py -m pspnet101_cityscapes -i ../example_images/munster_000013_000019_leftImg8bit.png -o ../example_results/munster_000013_000019_leftImg8bit.png -s -f
python3 pspnet.py -m pspnet101_cityscapes -i $CITYSCAPES_DATASET/leftImg8bit/val -o $CITYSCAPES_RESULTS -s -ms -f
python3 pspnet.py -m pspnet101_voc2012 -i ../example_images/000129.jpg -o ../example_results/000129.png -s -f
python3 pspnet.py -m pspnet50_ade20k -i ../example_images/ADE_val_00000435.jpg -o ../example_results/ADE_val_00000435.png -s -f
python3 pspnet.py -m pspnet50_ade20k -i ../example_images/ade20k.jpg -o ../example_results/ade20k.png -s -f

Results:

ADE20K:

InputSegmentation KerasSegmentation Original Pycaffe implementationUncertainty

InputSegmentation KerasGroundtruthUncertainty

CityScapes

InputSegmentation KerasGroundtruthUncertainty

Pascal Voc 2012

InputSegmentation KerasGroundtruth Uncertainty

Converting caffe weights

Converted trained weights are needed to run the network and will be downloaded from dropbox the first time you use a model. The weights of the original caffemodel were converted with weight_converter.py as follows:

python3 weight_converter.py <path to .prototxt> <path to .caffemodel>

Running the converter needs the compiled original PSPNet caffe code and pycaffe.

About

A Keras implementation of Pyramid Scene Parsing Networks

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%