This project integrates YOLOv8 (Object detection and pose estimation)and ByteTracker for real-time, TensorRT-optimized object detection and tracking, extending the existing TensorRT-YOLOv8 implementation.
- 1.Clone yolov8 and download yolov8s-pose.pt
- 2.Export onnx model
from ultralytics import YOLO
# Load a model
model = YOLO("yolov8s-pose.pt") # load an official model
# Export the model
model.export(format="onnx")
- 3.Convert model to trt
trtexec.exe --onnx=yolov8s-pose.onnx --saveEngine=yolov8s-pose.engine
- 4.Inference
cd build/release
yolov8-pose-bytetrack-trt.exe yolov8s-pose.engine test.mp4 # the video path
- Python(TensorRT)
CPP:
- Windows:
mkdir build
cd build
cmake ..
cmake --build . --config Release
- Linux(not tested):
mkdir build
cd build && mkdir out_dir
cmake ..
make
- TensorRT
- CUDA, CudaNN
- Eigen 3.3
- C++ compiler with C++17 or higher support
- CMake 3.14 or higher
- OpenCV
This project is based on the following awesome projects:
- YOLOv8 - YOLOv8: Ultralytics.
- ByteTrack - C++ implementation of ByteTrack algorithm.
- yolov9-bytetrack-tensorrt - C++ implementation of YOLOv9 and bytetrack using TensorRT API.