Minimal code for YOLO v5 inference with TensorRT (C++).
To build and run this program, the following items are required.
- a CUDA compatible GPU card
- NVIDIA driver: 470.82.01 or higher
- NVIDIA CUDA: 11.4.3
- NVIDIA cuDNN: 8.2.1
- NVIDIA TensorRT: 8.2.5.1
- OpenCV: 4.5.4
- cmake: 3.16 or higher
- an exported yolov5s TensorRT engine file
Clone this repo:
git clone https://github.com/yinguobing/yolov5-trt.git
Build with cmake:
cd yolov5-trt
mkdir build && cd build
cmake ..
make
Run inference with a sample image:
yolov5 yolov5s.engine input.jpg
.. then checkout the output image.
Yin Guobing (尹国冰) - yinguobing
This project is licensed under the GPL-3.0 license - see the LICENSE file for details