Open-source project
FeiYull/TensorRT-Alpha avatar
FeiYull/TensorRT-Alpha

TensorRT-Alpha for CUDA vision inference

🔥🔥🔥TensorRT for YOLOv8、YOLOv8-Pose、YOLOv8-Seg、YOLOv8-Cls、YOLOv7、YOLOv6、YOLOv5、YOLONAS......🚀🚀🚀CUDA IS ALL YOU NEED.🍎🍎🍎

1,464 stars199 forksC++License varies

At a glance

What is it?
TensorRT-Alpha is a C++ collection of TensorRT deployment examples for YOLO, face detection, segmentation, pose estimation, and other computer vision models. It suits developers who need model-specific preprocessing, inference, decoding, and NMS, but its documented environment is tied to older CUDA, cuDNN, TensorRT, and build-tool versions.
Who is it for?
TensorRT-Alpha is appropriate for C++ developers who already work with CUDA 11.3, TensorRT 8.4.2.4, and the documented model export paths. It is a poor fit for users seeking a current cross-platform package, managed release process, or framework-neutral inference API.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly C++, according to GitHub's language statistics.

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

Editorial analysis

TensorRT-Alpha's CUDA deployment scope

TensorRT-Alpha addresses a specific engineering problem: deploying computer vision models through NVIDIA TensorRT while keeping the surrounding image pipeline in CUDA C++. The repository is aimed at developers working on Windows or Linux who need examples for multiple YOLO generations and variants, EfficientDet, RT-DETR, U2Net, libfacedetection, face mesh, and human segmentation. It is a collection of model projects rather than a single general-purpose inference server. Top-level directories such as `yolov8/`, `yolov8-pose/`, `yolov8-seg/`, `yolov7/`, `yolox/`, `u2net/`, and `libfacedetection/` separate implementations and provide model-specific documentation.

The README states that the CUDA C++ code supports multi-batch image preprocessing, inference, decoding, and NMS. That scope matters because a TensorRT engine alone does not define every operation needed by a detector. Input dimensions, normalization, tensor layout, output binding interpretation, confidence filtering, box decoding, and suppression can all differ by model. TensorRT-Alpha places those operations into C++ examples instead of presenting TensorRT only as a library that executes a serialized network.

The repository description positions CUDA as the central requirement, but the documentation remains tied to a specific stack. Its tested Ubuntu environment lists CUDA 11.3, cuDNN 8.2.0, GCC 7.5.0, TensorRT 8.4.2.4, OpenCV 3.x or 4.x, and CMake 3.10.2. The Windows list covers Windows 10, CUDA 11.3, cuDNN 8.2.0, Visual Studio 2017, 2019, or 2022, and TensorRT 8.4.2.4. These are documented combinations, not evidence that other current releases are supported.

The ONNX-to-TensorRT conversion path

Most model examples use the path `torch -> onnx -> tensorrt`. The repository does not describe these files as a unified managed conversion service. Instead, model directories contain the C++ deployment projects, while model README files explain how a particular example is prepared and run. The main README says a direct `pth -> trt` flow is planned, but that section currently says `coming soon`. Consequently, an adopter should not assume that a PyTorch checkpoint can be passed directly through a finished repository workflow.

There are two documented ways to obtain ONNX files. First, the README links shared model files through Weiyun and Google Drive. Second, a developer can follow instructions associated with the relevant upstream training framework and export ONNX manually. That second route places responsibility on the developer to match the source model, export settings, input shape, and output format expected by the selected TensorRT-Alpha example.

The main README lists model artifacts for YOLOv3 through YOLOv8, YOLOX, YOLOR, U2Net, libfacedetection, facemesh, pphumanseg, EfficientDet, YOLOv8 Pose, YOLOv8 Seg, and YOLONAS. It also says the repository implements more than 30 models. However, the visible top-level layout does not list every name referenced in the description or topics. This distinction matters during evaluation: topic labels and the repository description should not be treated as proof that each has a complete, current, documented executable project.

Model portability is another boundary. TensorRT engines are sensitive to the execution environment and engine construction path, while ONNX exports can differ in operator sets and tensor naming. The README does not document a general cross-machine engine compatibility procedure. The safer interpretation is to treat an existing ONNX file as a model artifact that still needs validation against the selected C++ implementation.

Installing the documented Ubuntu environment

The repository offers an optional Conda environment for Python-based preparation work. Miniconda must be installed first. The following commands are copied from the README and create the documented Python 3.8 environment, clone the project, enter its directory, and install `requirements.txt`.

bash
conda create -n tensorrt-alpha python==3.8 -y
conda activate tensorrt-alpha
git clone https://github.com/FeiYull/TensorRT-Alpha
cd tensorrt-alpha
pip install -r requirements.txt  

After installation, the reader should see the `tensorrt-alpha` Conda environment activated and the repository present in the current directory. The Python environment is optional according to the README. The listed packages are `torch==1.9.0`, `onnx== 1.9.0`, `torchvision==0.10.1`, `onnx-simplifier==0.4.8`, `onnxruntime==1.8.0`, and `opencv-python==4.6.0`.

Those fixed package versions reinforce the project's older documented toolchain. They should not be silently replaced with current versions while following the repository's guide, because ONNX export behavior and dependency compatibility can change. The repository also points to `Install_For_Ubuntu18.04/Install_For_Ubuntu18.04.md` for the native installation tutorial and `docker/README.md` for its Linux Docker instructions. Those files are the appropriate sources for CUDA, cuDNN, TensorRT, and compiler setup because the main README does not reproduce those installation commands.

Configuring common.cmake for the first YOLOv8 build

The first concrete Ubuntu 18.04 step is to set the local TensorRT installation path. Clone or enter the repository, open `cmake/common.cmake`, and change `TensorRT_ROOT` to the machine's TensorRT installation directory.

bash
git clone https://github.com/FeiYull/TensorRT-Alpha
cd tensorrt-alpha/cmake
vim common.cmake

The README identifies line 20 as the location to edit and gives this example value:

bash
# set(TensorRT_ROOT /home/feiyull/TensorRT-8.4.2.4)

The reader should replace the example user and directory with the location where TensorRT 8.4.2.4 is actually installed. This is a source-tree configuration change, not an environment variable. The main README then says to compile and run a project such as `yolov8`, linking to `yolov8/README.md`.

The provided documentation does not include a complete model-specific compile command, executable name, model argument, image path, or expected console output. Inventing those details would be misleading. A first real use therefore continues in the selected model's README after `TensorRT_ROOT` has been configured. Readers should not treat the Conda setup as sufficient to build the C++ project, because the repository's documented native prerequisites include CUDA, cuDNN, TensorRT, a compiler, OpenCV, and CMake.

Multi-batch YOLOv8 behavior documented by the README

The clearest quantitative example in the README concerns YOLOv8n. It lists a mobile RTX 2070m with 8 GB of memory, 1920x1080 source video, a model input shape of `8x3x640x640`, memory use of 1093 MiB out of 7982 MiB, and GPU utilization of 14%. The image caption describes this as the average time cost per frame within one batch, although the visible excerpt does not provide the numerical timing value.

This example demonstrates why batch shape and preprocessing are project concerns. The source video is 1920x1080, while each model input is resized or otherwise processed into a `3x640x640` tensor. A batch of eight means TensorRT receives eight such tensors together. The README does not state the exact resize interpolation, padding policy, normalization constants, host-to-device transfer method, stream count, or timing boundary, so those details must come from the selected model source.

The repository also includes visual comparisons between official implementations and TensorRT-Alpha for YOLOv8n and YOLOv7-tiny. These images support the project's stated focus on output alignment, but the README excerpt does not provide numerical precision metrics, tolerance definitions, dataset names, or a reproducible accuracy protocol. A technical buyer should therefore avoid translating the comparison images into a broad numerical accuracy claim.

For production adoption, the relevant questions are concrete: whether the selected output decode matches the expected TensorRT bindings, whether NMS operates on the intended coordinate space, and whether batching changes memory behavior. Those details need source-level or model-specific documentation beyond the main README.

TensorRT-Alpha limits, license, and maintenance state

The largest limitation is version coupling. The documented center of the project is CUDA 11.3 and TensorRT 8.4.2.4, with Ubuntu 18.04 and GCC 7.5.0 listed for one tested setup. The README does not document a migration procedure for newer CUDA or TensorRT releases. It also has no GitHub releases, so there is no release-note series explaining engine compatibility, migration notes, or versioned distribution artifacts.

The repository is not archived, and its last push was on 2026-10-15. That is the available repository maintenance fact, but it does not prove compatibility with current NVIDIA tooling. The README's model update log is older, ending with entries for YOLOv8 Pose, YOLOv8 Seg, and YOLONAS in December 2023. Maintenance activity and documentation freshness should therefore be evaluated separately.

TensorRT-Alpha is licensed under GPL-2.0. Any engineer considering incorporation into a larger distributed codebase must evaluate that license against the project's intended distribution and linking model. This is not legal advice, and the repository excerpt does not provide an exception or alternative commercial licensing path.

A real alternative is TensorRT's general C++ inference API used with a framework exporter such as the upstream YOLO project. That approach separates model export, preprocessing, inference, and postprocessing instead of supplying the combined CUDA examples found here. It offers more control, but the developer must assemble the pipeline. TensorRT-Alpha reduces that assembly work for its covered examples, while making adoption dependent on its model-specific code, documented environment, and GPL-2.0 terms.

Editorial conclusion

TensorRT-Alpha is appropriate for C++ developers who already work with CUDA 11.3, TensorRT 8.4.2.4, and the documented model export paths. It is a poor fit for users seeking a current cross-platform package, managed release process, or framework-neutral inference API. Before adoption, verify the selected model's input contract, output decoding, supported GPU and driver combination, ONNX provenance, and whether your platform matches the repository's documented build setup. For the documented route, the first project-specific check should be the model's README and `cmake/common.cmake`, because the main README does not provide a complete build-and-run command for every example.

Frequently asked questions

What environment does TensorRT-Alpha document for Ubuntu?

The documented Ubuntu setup is Ubuntu 18.04 with CUDA 11.3, cuDNN 8.2.0, GCC 7.5.0, TensorRT 8.4.2.4, OpenCV 3.x or 4.x, and CMake 3.10.2.

How does TensorRT-Alpha convert model files for deployment?

Most examples use `torch -> onnx -> tensorrt`. The README says a direct `pth -> trt` flow is planned, but it currently says `coming soon`.

Which configuration must be changed before building TensorRT-Alpha on Ubuntu?

Set `TensorRT_ROOT` in `cmake/common.cmake` to the local TensorRT installation directory. The README points to line 20 and gives `/home/feiyull/TensorRT-8.4.2.4` as an example.

Official sources

  1. FeiYull/TensorRT-Alpha on GitHub
  2. Issues
  3. License: GPL-2.0
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/feiyull-tensorrt-alpha.svg)](https://hysenlabs.com/projects/feiyull-tensorrt-alpha)

Was this useful?