| .. | ||
| gen_tf_wts.py | ||
| layers.cpp | ||
| layers.h | ||
| main.cpp | ||
| psenet.cpp | ||
| psenet.h | ||
| README.md | ||
| utils.cpp | ||
| utils.h | ||
PSENet
preprocessing + inference + postprocessing = 30ms with fp32 on Tesla P40. The original Tensorflow implementation is tensorflow_PSENet. A TensorRT Python api implementation is TensorRT-Python-PSENet.
Key Features
- Generating
.wtsfromTensorflow. - Dynamic batch and dynamic shape input.
- Object-Oriented Programming.
- Practice with C++ 11.
How to Run
-
- generate .wts
Download pretrained model from https://github.com/liuheng92/tensorflow_PSENet and put
model.ckpt.*tomodeldir. Add a filemodel/checkpointwith contentmodel_checkpoint_path: "model.ckpt" all_model_checkpoint_paths: "model.ckpt"Then run
python gen_tf_wts.pywhich will gengerate a
psenet.wts. -
- cmake and make
mkdir build cd build cmake .. make -
- build engine and run detection
cp ../psenet.wts ./ cp ../test.jpg ./ ./psenet -s // serialize model to plan file ./psenet -d // deserialize plan file and run inference
Known Issues
None
Todo
- use
ExponentialMovingAverageweight.