Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 1.44 KB

README.md

File metadata and controls

45 lines (38 loc) · 1.44 KB

YOLOv5 PyTorch=>ONNX=>TensorRT

1.Reference

2.Export ONNX Model

git clone https://github.com/linghu8812/yolov5.git
python3 export.py ---weights weights/yolov5s.pt --batch-size 10 --imgsz 640 --include onnx --simplify

3.Build tensorrt_inference Project

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

4.Run tensorrt_inference

  • inference with yolov5s
cd ../../bin/
./tensorrt_inference yolov5 ../configs/yolov5/config.yaml ../samples/detection_segmentation
  • inference with yolov5s6
cd ../../bin/
./tensorrt_inference yolov5 ../configs/yolov5/config_p6.yaml ../samples/detection_segmentation
  • inference with yolov5-cls
cd ../../bin/
./tensorrt_inference yolov5_cls ../configs/yolov5/config_cls.yaml ../samples/classification

For more information, please refer this blog: https://blog.csdn.net/linghu8812/article/details/109322729

5.Results: