cyrusbehr/YOLOv8-TensorRT-CPP
YOLOv8 TensorRT C++ Implementation
What it solves
This project provides a high-performance C++ implementation for running YOLOv8 models. It allows developers to move away from Python-based inference to a compiled language for better speed and efficiency, specifically targeting NVIDIA GPUs using the TensorRT API.
How it works
The project converts PyTorch models (.pt) to ONNX format and then uses the TensorRT C++ API to generate an optimized engine file for the GPU. It handles the necessary preprocessing and post-processing (such as bounding box decoding and Non-Maximum Suppression) externally in C++ rather than inside the model itself. It supports multiple precision modes, including FP32, FP16, and INT8 (which requires calibration data to maintain accuracy).
Who it’s for
It is designed for developers and engineers who need to deploy YOLOv8 for real-time object detection, semantic segmentation, or body pose estimation on Ubuntu systems with NVIDIA hardware.
Highlights
- Multi-task Support: Works with object detection, segmentation, and pose estimation models.
- Hardware Optimization: Leverages TensorRT for GPU-accelerated inference.
- C++ Implementation: Reduces overhead compared to Python implementations.
- Precision Flexibility: Supports FP32, FP16, and INT8 quantization for varying speed-accuracy trade-offs.
- Real-time Capability: Includes executables for image processing and live webcam feeds.