Baking NMS Into YOLOv8 TensorRT Engines
A collection of export scripts and C++ inference code that folds YOLOv8 post-processing into TensorRT engines so you can skip wiring up NMS by hand.

What it does
This repo is a deployment accelerator for YOLOv8 on NVIDIA hardware. It provides export scripts that fold bbox decoding and NMS into the ONNX graph, then build a TensorRT engine that ingests images and emits final detections without extra Python post-processing. It also ships C++ inference code and covers segmentation, pose, classification, and oriented bounding boxes alongside standard detection.
The interesting bit
Most deployment tutorials leave NMS as a post-processing homework assignment; this project bakes it into the engine via ONNX plugins, turning the model into a self-contained detection appliance. It also targets edge deployment with DeepStream and Jetson recipes, which is where TensorRT actually earns its keep.
Key highlights
- End-to-end ONNX export that embeds NMS and bbox decoding directly in the graph.
- Python and C++ inference paths, plus an experimental PyTorch-free mode using
cuda-pythonorpycuda. - Deployment recipes for DeepStream and Jetson (specifically tested on Jetson-NX 4GB).
- Covers multiple YOLOv8 tasks: detection, segmentation, pose, classification, and oriented bounding boxes.
- Includes an engine profiling script to measure whatever speedups you actually get.
Caveats
- The TensorRT API build path explicitly does not support YOLOv8-seg models at the moment.
- The PyTorch-free inference option is available but the README admits its performance is “much worse.”
- No benchmark numbers are published in the README, so you will need to run the included profiler to verify gains on your own hardware.
Verdict
Grab this if you are shipping YOLOv8 on NVIDIA GPUs or Jetson and want post-processing fused into the engine without writing the plugin boilerplate yourself. Look elsewhere if you are still training or tweaking architectures—this is strictly an export-and-run toolkit.
Frequently asked
- What is triple-mu/YOLOv8-TensorRT?
- A collection of export scripts and C++ inference code that folds YOLOv8 post-processing into TensorRT engines so you can skip wiring up NMS by hand.
- Is YOLOv8-TensorRT open source?
- Yes — triple-mu/YOLOv8-TensorRT is open source, released under the MIT license.
- What language is YOLOv8-TensorRT written in?
- triple-mu/YOLOv8-TensorRT is primarily written in Python.
- How popular is YOLOv8-TensorRT?
- triple-mu/YOLOv8-TensorRT has 1.8k stars on GitHub.
- Where can I find YOLOv8-TensorRT?
- triple-mu/YOLOv8-TensorRT is on GitHub at https://github.com/triple-mu/YOLOv8-TensorRT.