Open-source project
laugh12321/TensorRT-YOLO avatar
laugh12321/TensorRT-YOLO

TensorRT-YOLO: a C++ and Python deployment toolkit for YOLO models on NVIDIA GPUs

🚀 Easier & Faster YOLO Deployment Toolkit for NVIDIA 🛠️

1,887 stars195 forksC++GPL-3.0

At a glance

What is it?
TensorRT-YOLO wraps TensorRT plugins, CUDA kernels and CUDA graphs around YOLO inference, with a frozen community edition at 6.4 and a closed-source professional edition announced but not yet purchasable.
Who is it for?
Adopt TensorRT-YOLO if you are deploying YOLO detectors, segmenters, pose or OBB models on NVIDIA hardware and want a single-header C++ API plus matching Python bindings, and if GPL-3.0 fits your distribution. Skip it if you need an actively evolving runtime API, since the README states the community edition's inference interface is frozen and new runtime architecture will not be merged, or if you cannot accept a copyleft licence in a closed product.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 8 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap TensorRT-YOLO fills between an ONNX file and a running YOLO service

Getting a YOLO model onto an NVIDIA GPU is not one problem, it is four. You need a TensorRT engine built from the right ONNX graph, pre-processing that matches the training pipeline pixel for pixel, post-processing that turns raw tensors into boxes, masks, keypoints or rotated rectangles, and a runtime that does not rebuild that engine on every start. TensorRT-YOLO targets the last three. Its README positions it as an inference deployment toolkit for the YOLO family on NVIDIA devices, with C++ and Python APIs and example directories for detect, segment, classify, pose, obb and VideoPipe, plus examples/mutli_thread and examples/nndeploy. The audience is engineers who already have a trained model and now have to ship it, not researchers comparing architectures. The project's own description is "Easier & Faster YOLO Deployment Toolkit for NVIDIA", and the scope is deliberately narrow: NVIDIA only, TensorRT 10.x, Linux recommended with Windows supported. Model coverage is broad rather than deep in any single variant. The README claims support from YOLOv3 through YOLO26, plus YOLO-World, YOLOE, YOLO-Master and YOLO12, with a separate model support list in the trtyolo-export repository. That breadth is the selling point and also the maintenance surface.

How the inference path is actually assembled

The architecture visible from the repository is layered. A TensorRT engine carries the network; custom TensorRT plugins carry the post-processing that would otherwise run as Python or CPU code; CUDA kernels handle pre-processing, and the release notes state that LetterBox was reimplemented in CUDA with pixel error of zero in most cases. CUDA graphs are used to accelerate the inference call itself. The C++ side is deliberately thin: since 2025-06-09 the README says C++ pulls in a single header, trtyolo.hpp, with no third-party dependencies, and that linking CUDA and TensorRT is unnecessary when using the module. Python bindings are generated with pybind11 and are described as reaching the same inference speed as C++ when BUILD_PYTHON is enabled. Two runtime facilities stand out. Multi-context inference lets several execution contexts run in parallel, which the README frames as maximizing hardware utilization. Memory optimization includes architecture-specific modes such as Zero Copy on Jetson. The data flow is therefore: trtyolo-export converts an ONNX model into the output structure this project expects and builds a TensorRT engine; the engine is loaded by TRTYOLO; pre-processing runs on CUDA; inference runs under a CUDA graph; plugins produce the task-specific output. Everything between the engine file and the result tensor is the project's responsibility.

Building TensorRT-YOLO and running a first detection

The README lists CUDA 11.0.1 or newer, TensorRT 8.6.1 or newer, and Linux x86_64 or ARM as recommended, with Windows supported and two linked blog posts for Windows environment setup. Clone the repository and configure with CMake, pointing TRT_PATH at your TensorRT install and enabling the Python bindings:

bash
git clone https://github.com/laugh12321/TensorRT-YOLO
cd TensorRT-YOLO
pip install "pybind11[global]"
cmake -S . -B build -D TRT_PATH=/your/tensorrt/dir -D BUILD_PYTHON=ON -D CMAKE_INSTALL_PREFIX=/your/tensorrt-yolo/install/dir
cmake --build build -j$(nproc) --config Release --target install

After the install target completes, the prefix contains include/ with the headers and lib/ with the trtyolo and custom_plugins shared libraries. The README notes that custom_plugins is only needed when building OBB, segment or pose models with trtexec. If BUILD_PYTHON was on, Python binding files land under trtyolo/libs. Then build and install the wheel:

bash
pip install --upgrade build
python -m build --wheel
pip install dist/trtyolo-6.*-py3-none-any.whl

Before any of this, the model has to be converted. The README points at the companion trtyolo-export toolkit, which takes an already-exported YOLO ONNX model, reshapes it into the output structure TensorRT-YOLO expects, and builds the TensorRT engine. The Python example in the README then loads that engine and predicts:

python
import cv2
from trtyolo import TRTYOLO

model = TRTYOLO("yolo11n-with-plugin.engine", task="detect", profile=True, swap_rb=True)
image = cv2.imread("test_image.jpg")
result = model.predict(image)
print(f"==> result: {result}")

The README warns that the task argument must match the task type used at export time, one of "detect", "segment", "classify", "pose" or "obb". With profile=True, model.profile() returns throughput, CPU latency and GPU latency. A mismatch between task and engine is the most likely first failure, and the README does not describe what error surfaces when it happens.

The frozen community interface is the decision point

The most consequential fact in the README is not a feature. It is the notice that this repository is the community edition at version 6.4, licensed GPL-3.0, and that the community edition's inference interface is frozen: no new runtime architecture will be merged into it. A professional edition is announced as closed source, delivered separately, with the purchase entry not yet open; the README says it will be written there when it opens and links a comparison section on throughput and capability. For anyone planning a multi-year deployment, that changes the calculus. Bug fixes and model support may continue, but the API you build against today is the API you keep. The second constraint is licensing. GPL-3.0 is a copyleft licence, and the pyproject.toml classifier confirms GNU General Public License v3. The project does not offer a separate commercial licence for the community code in this repository, so linking the trtyolo or custom_plugins shared libraries into a distributed closed-source product is a question for your own legal review, not something this article can settle. The third constraint is hardware and version coupling: NVIDIA GPUs only, TensorRT 10.x in the badge, CUDA and TensorRT minimums that must be satisfied before anything compiles. If your target is a CPU-only edge box, an AMD or Intel accelerator, or a runtime that must avoid TensorRT entirely, this project has nothing to offer.

Where trtyolo-export ends and TensorRT-YOLO begins

The split between this repository and trtyolo-export is worth understanding before you plan work. TensorRT-YOLO does not take a stock Ultralytics ONNX export and run it. The README states that trtyolo-export converts an exported YOLO ONNX model into an output structure compatible with TensorRT-YOLO inference and builds the TensorRT engine. That means the post-processing plugins on the inference side are matched to a graph shape produced on the export side. If you build an engine with a different export path, the task-specific outputs will not line up, which is why the README insists the task argument match the export. The upside is that post-processing moves out of Python and into TensorRT plugins, which is where most of the latency saving comes from. The trade-off is a two-repository dependency: model support is really a property of trtyolo-export, and the model support list lives there rather than here. Anyone evaluating coverage for a specific variant should read that list, not the feature bullets in this README.

TensorRT-YOLO versus the Ultralytics Python path

The obvious alternative is staying inside the Ultralytics Python stack and exporting to TensorRT from there. The difference is where the work happens. Ultralytics keeps pre-processing, post-processing and visualization in Python and NumPy or PyTorch, which is convenient, easy to debug and portable across backends, but it puts Python in the hot path and gives you little control over memory layout or execution context reuse. TensorRT-YOLO moves pre-processing to CUDA kernels, post-processing to TensorRT plugins, and adds CUDA graphs and multi-context inference. The README's own framing of the 2025-10-05 change is that LetterBox was replicated in CUDA with precision aligned and near-zero pixel error in most cases, which is an admission that pre-processing fidelity against the training pipeline is a real source of accuracy drift when you reimplement it. The cost of the TensorRT-YOLO route is the build chain: CMake, a TensorRT path, pybind11, a separate export toolkit, and shared libraries to ship. If you are prototyping, the Python path is faster to a working demo. If you are shipping a fixed model on a fixed GPU with a latency budget, the extra build step is where the gains are.

Maintenance, releases and what an upgrade actually costs

The last push to the default branch was on 2026-09-10, and the repository is not archived, so the codebase is being touched. Releases tell a different story about pace: v6.4.0 landed on 2025-12-12, v6.3.2 on 2025-09-25 and v6.3.1 on 2025-09-10. The README's dated entries run through 2026-03-20, when YOLO26 support including classification, oriented bounding boxes, pose estimation and instance segmentation was added, and 2026-01-07 for YOLO-Master. So model coverage continues to expand even though the inference interface is frozen. Upgrade cost depends on which side of the split you sit on. Model additions are cheap: export a new engine with trtyolo-export and pass the matching task string. Runtime changes are the expensive kind, and the README has closed that door for the community edition. If your code links the trtyolo and custom_plugins shared libraries, an upgrade means rebuilding against the new prefix and re-verifying that your engines still load. The README does not document a rollback procedure or an ABI compatibility promise between 6.x releases, so plan to keep the previous install prefix until a new build is validated.

Editorial conclusion

Adopt TensorRT-YOLO if you are deploying YOLO detectors, segmenters, pose or OBB models on NVIDIA hardware and want a single-header C++ API plus matching Python bindings, and if GPL-3.0 fits your distribution. Skip it if you need an actively evolving runtime API, since the README states the community edition's inference interface is frozen and new runtime architecture will not be merged, or if you cannot accept a copyleft licence in a closed product. Before committing, verify three things: that your TensorRT and CUDA versions satisfy the stated minimums, that trtyolo-export can produce an engine for your exact model variant, and that your deployment can link the trtyolo and custom_plugins shared libraries where trtexec-built OBB, segment or pose engines are involved.

Frequently asked questions

What is TensorRT-YOLO from NVIDIA?

It is not an NVIDIA product. TensorRT-YOLO is a community project by laugh12321 that deploys YOLO models on NVIDIA GPUs using TensorRT, CUDA kernels and TensorRT plugins, with C++ and Python APIs. The README describes it as an easier and faster YOLO deployment toolkit for NVIDIA devices.

How do I install TensorRT-YOLO?

The README recommends CUDA 11.0.1 or newer and TensorRT 8.6.1 or newer, then a CMake configure and build with TRT_PATH pointing at your TensorRT directory and BUILD_PYTHON enabled for Python bindings. For Python you then build a wheel with python -m build --wheel and install the resulting trtyolo-6.* wheel.

How do I convert a YOLO model to a TensorRT engine for TensorRT-YOLO?

The README directs you to the companion trtyolo-export toolkit, which converts an already-exported YOLO ONNX model into the output structure TensorRT-YOLO expects and builds the TensorRT engine. The task argument passed to TRTYOLO must match the task type used at export time.

Is TensorRT-YOLO still actively developed?

The repository is not archived and the last push to the default branch was on 2026-09-10, with model support entries dated 2026-03-20 and 2026-01-07. However, the README states the community edition's inference interface is frozen and no new runtime architecture will be merged into it.

What licence does TensorRT-YOLO use?

The repository is licensed GPL-3.0, and the pyproject.toml classifier confirms GNU General Public License v3. The README also states that a closed-source professional edition will be provided separately, with its purchase entry not yet open.

Official sources

  1. Issues
  2. laugh12321/TensorRT-YOLO on GitHub
  3. License: GPL-3.0
  4. README
  5. Releases
Community notes

Community notes