duan8/psenet
2021-01-31 17:26:33 +08:00
..
CMakeLists.txt Fix a bug(wrong CMakeLists syntax) (#377) 2021-01-28 12:58:42 +08:00
gen_tf_wts.py fix network bug and rewrite post-processing pse algorithm (#367) 2021-01-22 19:44:29 +08:00
layers.cpp fix network bug and rewrite post-processing pse algorithm (#367) 2021-01-22 19:44:29 +08:00
layers.h Fix typo which causes "addConvRule not declared" (#387) 2021-01-31 17:26:33 +08:00
main.cpp fix network bug and rewrite post-processing pse algorithm (#367) 2021-01-22 19:44:29 +08:00
psenet.cpp fix network bug and rewrite post-processing pse algorithm (#367) 2021-01-22 19:44:29 +08:00
psenet.h fix network bug and rewrite post-processing pse algorithm (#367) 2021-01-22 19:44:29 +08:00
README.md add RepVGG, support all RepVGG predefined structures. (#384) 2021-01-31 10:57:30 +08:00
test.jpg create psenet project with weight from tensorflow (#321) 2020-12-04 22:32:27 +08:00
utils.cpp fix network bug and rewrite post-processing pse algorithm (#367) 2021-01-22 19:44:29 +08:00
utils.h fix network bug and rewrite post-processing pse algorithm (#367) 2021-01-22 19:44:29 +08:00

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 .wts from Tensorflow.
  • Dynamic batch and dynamic shape input.
  • Object-Oriented Programming.
  • Practice with C++ 11.

How to Run

    1. generate .wts

    Download pretrained model from https://github.com/liuheng92/tensorflow_PSENet and put model.ckpt.* to model dir. Add a file model/checkpoint with content

    model_checkpoint_path: "model.ckpt"
    all_model_checkpoint_paths: "model.ckpt"
    

    Then run

    python gen_tf_wts.py
    

    which will gengerate a psenet.wts.

    1. cmake and make
    mkdir build
    cd build
    cmake ..
    make
    
    1. 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 ExponentialMovingAverage weight.