Skip to content

Latest commit

 

History

History

fast-reid

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

fast-reid PyTorch=>ONNX=>TensorRT

1.Reference

2.Export ONNX Model

git clone https://github.com/JDAI-CV/fast-reid.git
cd fast-reid/tools/deploy
python onnx_export.py --config-file root-path/bagtricks_R50/config.yml --name baseline_R50 --output outputs/onnx_model --opts MODEL.WEIGHTS root-path/logs/market1501/bagtricks_R50/model_final.pth

3.Build tensorrt_inference Project

cd ../  # in project directory
mkdir build && cd build
cmake ..
make -j

4.run tensorrt_inference

cd ../../bin/
./tensorrt_inference fastreid ../configs/fast-reid/config.yaml ../samples/pedestrian_reid

results:

result image image image image image image image image image image
image 1 0.93663549 0.63691914 0.65447605 0.59582067 0.63569337 0.67968875 0.6704126 0.64113915 0.6652534
image 0.93663549 1 0.60606658 0.63805777 0.58507961 0.62270737 0.65357053 0.64495277 0.65284139 0.67049634
image 0.63691914 0.60606658 1 0.85554099 0.64959818 0.65541494 0.63463104 0.58980453 0.64554667 0.63664776
image 0.65447605 0.63805777 0.85554099 1 0.65920269 0.64546573 0.64599162 0.59834015 0.66127765 0.65907228
image 0.59582067 0.58507961 0.64959818 0.65920269 1 0.87445605 0.72793484 0.7426371 0.68983912 0.69091672
image 0.63569337 0.62270737 0.65541494 0.64546573 0.87445605 1 0.77302706 0.77868611 0.69440424 0.70926988
image 0.67968875 0.65357053 0.63463104 0.64599162 0.72793484 0.77302706 1 0.91233504 0.65651429 0.66451794
image 0.6704126 0.64495277 0.58980453 0.59834015 0.7426371 0.77868611 0.91233504 1 0.63502818 0.64097649
image 0.64113915 0.65284139 0.64554667 0.66127765 0.68983912 0.69440424 0.65651429 0.63502818 1 0.92471766
image 0.6652534 0.67049634 0.63664776 0.65907228 0.69091672 0.70926988 0.66451794 0.64097649 0.92471766 1