duan8/HRNetClassification
2020-11-06 23:22:11 +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 hrnet classification trt 加速 2020-11-06 23:22:11 +08:00
logging.h hrnet clasification trt 加速 2020-11-06 23:19:23 +08:00
readme.md hrnet classification trt 加速 2020-11-06 23:22:11 +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. 'hrnet.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