duan8/HRNetClassification
BaofengZan a65be9152a Revert "hrnet classification trt 加速"
This reverts commit 9e1c282158087e6d18217559ab66d1393ec3ad17.
2020-11-06 23:20:31 +08:00
..
CMakeLists.txt hrnet clasification trt 加速 2020-11-06 23:19:23 +08:00
demo.py hrnet clasification trt 加速 2020-11-06 23:19:23 +08:00
hrnet.cpp Revert "hrnet classification trt 加速" 2020-11-06 23:20:31 +08:00
logging.h hrnet clasification trt 加速 2020-11-06 23:19:23 +08:00
readme.md hrnet classification trt 加速 2020-11-06 23:19:23 +08:00

HRNet

The Pytorch implementation is HRNet-Image-Classification.

How to Run

    1. generate .wts

    Download code and model from HRNet-Image-Classification and config your environments.

    Put demo.py in the YOUR_ROOT_DIR\HRNet-Image-Classification\tools folder, set savewts in main() as True, and run, the .wts will be generated.

    1. cmake and make
    mkdir build
    cd build
    cmake ..
    make
    sudo ./dbnet -s             // serialize model to plan file i.e. 'DBNet.engine'
    sudo ./dbnet -d  ../samples // deserialize plan file and run inference, the images in samples will be processed.
    

Result

The test img:

Pytorch Result:

image-20200921115119593

TRT Result:

image-20200921114959069