/yolov5-trt

YOLO5 inference with TensorRT (C++)

Primary LanguageC++GNU General Public License v3.0GPL-3.0

yolov5-trt

Minimal code for YOLO v5 inference with TensorRT (C++).

Prerequisites

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

Install

Clone this repo:

git clone https://github.com/yinguobing/yolov5-trt.git

Build

Build with cmake:

cd yolov5-trt
mkdir build && cd build
cmake ..
make

Run

Run inference with a sample image:

yolov5 yolov5s.engine input.jpg

.. then checkout the output image.

Authors

Yin Guobing (尹国冰) - yinguobing

License

This project is licensed under the GPL-3.0 license - see the LICENSE file for details

Acknowledgments