- yolov5: https://github.com/ultralytics/yolov5
- get yolov5 weights from here: yolov5s, yolov5m, yolov5l, yolov5x.
git clone https://github.com/linghu8812/yolov5.git
python3 export.py ---weights weights/yolov5s.pt --batch-size 10 --imgsz 640 --include onnx --simplify
cd ../ # in project directory
mkdir build && cd build
cmake ..
make -j
- 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