Vladkryvoruchko / Pspnet Keras Tensorflow
Licence: mit
TensorFlow implementation of original paper : https://github.com/hszhao/PSPNet
Stars: ✭ 381
Programming Languages
python
139335 projects - #7 most used programming language
Projects that are alternatives of or similar to Pspnet Keras Tensorflow
Zines
Mirror of my favourite hacking Zines for the lulz, nostalgy, and reference
Stars: ✭ 370 (-2.89%)
Mutual labels: scene
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
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
See Phit
A C++ HTML template engine that uses compile time HTML parsing
Stars: ✭ 370 (-2.89%)
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
PSPNet(caffe)
Keras implementation ofImplemented Architecture of Pyramid Scene Parsing Network in Keras.
For the best compability please use Python3.5
Setup
- Install dependencies:
- Tensorflow (-gpu)
- Keras
- numpy
- scipy
- pycaffe(PSPNet)(optional for converting the weights)
pip install -r requirements.txt --upgrade
- Converted trained weights are needed to run the network.
Weights(in
.h5 .json
format) have to be downloaded and placed into directoryweights/keras
Already converted weights can be downloaded here:
- pspnet50_ade20k.h5 pspnet50_ade20k.json
- pspnet101_cityscapes.h5 pspnet101_cityscapes.json
- pspnet101_voc2012.h5 pspnet101_voc2012.json
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:
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].