All Projects → Vladkryvoruchko → Pspnet Keras Tensorflow

Vladkryvoruchko / Pspnet Keras Tensorflow

Licence: mit
TensorFlow implementation of original paper : https://github.com/hszhao/PSPNet

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pspnet Keras Tensorflow

Offsetanimator
Animations driven by finger movement
Stars: ✭ 317 (-16.8%)
Mutual labels:  scene
Reek
Code smell detector for Ruby
Stars: ✭ 3,693 (+869.29%)
Mutual labels:  parsing
Zines
Mirror of my favourite hacking Zines for the lulz, nostalgy, and reference
Stars: ✭ 370 (-2.89%)
Mutual labels:  scene
Maya
Datetimes for Humans™
Stars: ✭ 3,298 (+765.62%)
Mutual labels:  parsing
Como Lang Ng
como-lang-ng is now ana-lang, located at https://github.com/analang/ana
Stars: ✭ 342 (-10.24%)
Mutual labels:  parsing
Three.terrain
A procedural terrain generation engine for use with the Three.js 3D graphics library for the web.
Stars: ✭ 353 (-7.35%)
Mutual labels:  scene
Pom
PEG parser combinators using operator overloading without macros.
Stars: ✭ 310 (-18.64%)
Mutual labels:  parsing
Nlpnet
A neural network architecture for NLP tasks, using cython for fast performance. Currently, it can perform POS tagging, SRL and dependency parsing.
Stars: ✭ 379 (-0.52%)
Mutual labels:  parsing
Zwave2mqtt
Fully configurable Zwave to MQTT gateway and Control Panel using NodeJS and Vue
Stars: ✭ 352 (-7.61%)
Mutual labels:  scene
Scnlib
scanf for modern C++
Stars: ✭ 359 (-5.77%)
Mutual labels:  parsing
Clangkit
ClangKit provides an Objective-C frontend to LibClang. Source tokenization, diagnostics and fix-its are actually implemented.
Stars: ✭ 330 (-13.39%)
Mutual labels:  parsing
Atto
friendly little parsers
Stars: ✭ 340 (-10.76%)
Mutual labels:  parsing
Deform
A Python HTML form library.
Stars: ✭ 357 (-6.3%)
Mutual labels:  pyramid
Kgt
BNF wrangling and railroad diagrams
Stars: ✭ 312 (-18.11%)
Mutual labels:  parsing
See Phit
A C++ HTML template engine that uses compile time HTML parsing
Stars: ✭ 370 (-2.89%)
Mutual labels:  parsing
Tag
ID3, MP4 and OGG/FLAC metadata parsing in Go
Stars: ✭ 314 (-17.59%)
Mutual labels:  parsing
Vncorenlp
A Vietnamese natural language processing toolkit (NAACL 2018)
Stars: ✭ 354 (-7.09%)
Mutual labels:  parsing
Json Machine
Efficient, easy-to-use, and fast PHP JSON stream parser
Stars: ✭ 376 (-1.31%)
Mutual labels:  parsing
Serverless Wsgi
Serverless plugin to deploy WSGI applications (Flask/Django/Pyramid etc.) and bundle Python packages
Stars: ✭ 377 (-1.05%)
Mutual labels:  pyramid
Pyramid
Pyramid - A Python web framework
Stars: ✭ 3,615 (+848.82%)
Mutual labels:  pyramid

Keras implementation of PSPNet(caffe)

Implemented Architecture of Pyramid Scene Parsing Network in Keras.

For the best compability please use Python3.5

Setup

  1. Install dependencies:
    • Tensorflow (-gpu)
    • Keras
    • numpy
    • scipy
    • pycaffe(PSPNet)(optional for converting the weights)
    pip install -r requirements.txt --upgrade
    
  2. Converted trained weights are needed to run the network. Weights(in .h5 .json format) have to be downloaded and placed into directory weights/keras

Already converted weights can be downloaded here:

Convert weights by yourself(optional)

(Note: this is not required if you use .h5/.json weights)

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

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

Usage:

python pspnet.py -m <model> -i <input_image>  -o <output_path>
python pspnet.py -m pspnet101_cityscapes -i example_images/cityscapes.png -o example_results/cityscapes.jpg
python pspnet.py -m pspnet101_voc2012 -i example_images/pascal_voc.jpg -o example_results/pascal_voc.jpg

List of arguments:

 -m --model        - which model to use: 'pspnet50_ade20k', 'pspnet101_cityscapes', 'pspnet101_voc2012'
    --id           - (int) GPU Device id. Default 0
 -s --sliding      - Use sliding window
 -f --flip         - Additional prediction of flipped image
 -ms --multi_scale - Predict on multiscale images

Keras results:

Original New New New

Original New New New

Original New New New

Implementation details

  • The interpolation layer is implemented as custom layer "Interp"
  • Forward step takes about ~1 sec on single image
  • Memory usage can be optimized with:
    config = tf.ConfigProto()
    config.gpu_options.per_process_gpu_memory_fraction = 0.3 
    sess = tf.Session(config=config)
    
  • ndimage.zoom can take a long time
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].