This repository contains a C++ implementation of YOLOv11, optimized with TensorRT for fast and efficient real-time inference.
-
C++:
- OpenCV
- TensorRT
-
Python:
pip install --upgrade ultralytics
git clone https://github.com/fbasatemur/yolov11-trt.git
cd yolov11-trt*
mkdir build && cd build
cmake ..
cmake --build . --config Release
Modify the export.py script for the desired model name, then run it to export the YOLOv11 model to ONNX.
python export.py
Convert the ONNX model to a TRT engine:
./yolov11-trt yolo11.onnx "yolov11.engine"
Perform object detection on an image:
./yolov11-trt yolo11.engine "img1.jpg"
Perform object detection on a video:
./yolov11-trt yolo11.engine "vid1.mp4"