37 lines
1.1 KiB
Markdown
37 lines
1.1 KiB
Markdown
# HRNet
|
|
|
|
The Pytorch implementation is [HRNet-Image-Classification](https://github.com/HRNet/HRNet-Image-Classification).
|
|
|
|
|
|
## How to Run
|
|
|
|
* 1. generate .wts
|
|
|
|
Download code and model from [HRNet-Image-Classification](https://github.com/HRNet/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.
|
|
|
|
* 2. 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:
|
|
|
|

|
|
|
|
TRT Result:
|
|
|
|
 |