Unofficial implementation of "Pyramid Scene Parsing Network" (https://arxiv.org/abs/1612.01105). This repository is just for caffe to pytorch model conversion and evaluation.
Instead of building the author's caffe implementation, you can convert off-the-shelf caffemodels to pytorch models via the caffe.proto
.
caffe.proto
for Python APIThis step can be skipped. FYI.
Download the author's caffe.proto
into the libs
, not the one in the original caffe.
# For protoc command
pip install protobuf
# This generates ./caffe_pb2.py
protoc --python_out=. caffe.proto
data/models/
directory..pth
file.python convert.py -c <PATH TO YAML>
python demo.py -c <PATH TO YAML> -i <PATH TO IMAGE>
--no-cuda
option, this runs on CPU.--crf
option, you can perform a CRF postprocessing.PASCAL VOC2012 only. Please set the dataset path in config/voc12.yaml
.
python eval.py -c config/voc12.yaml
88.1% mIoU (SS) and 88.6% mIoU (MS) on validation set.
NOTE: 3 points lower than caffe implementation. WIP