[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-laugh12321--TensorRT-YOLO":3,"similar-laugh12321--TensorRT-YOLO":150},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":8,"readme_en":9,"readme_zh":10,"quickstart_zh":11,"use_case_zh":12,"hero_image_url":13,"owner_login":14,"owner_name":15,"owner_avatar_url":16,"owner_bio":17,"owner_company":18,"owner_location":19,"owner_email":20,"owner_twitter":18,"owner_website":21,"owner_url":22,"languages":23,"stars":48,"forks":49,"last_commit_at":50,"license":51,"difficulty_score":52,"env_os":53,"env_gpu":54,"env_ram":55,"env_deps":56,"category_tags":65,"github_topics":68,"view_count":84,"oss_zip_url":18,"oss_zip_packed_at":18,"status":85,"created_at":86,"updated_at":87,"faqs":88,"releases":89},2299,"laugh12321\u002FTensorRT-YOLO","TensorRT-YOLO","🚀 Easier & Faster YOLO Deployment Toolkit for NVIDIA 🛠️","TensorRT-YOLO 是一款专为 NVIDIA 设备打造的高效 YOLO 系列模型推理部署工具。它旨在解决开发者在将 YOLO 模型从训练环境迁移到实际生产时面临的部署复杂、推理速度慢以及环境配置繁琐等痛点。\n\n无论是从事计算机视觉算法研究的科研人员，还是需要将目标检测、实例分割、姿态估计等功能落地到边缘设备或服务器的工程师，都能通过 TensorRT-YOLO 获得“开箱即用”的体验。该工具不仅支持从 YOLOv3 到最新 YOLO26 及 YOLO-World 等多种变体，还覆盖了分类、旋转检测等丰富场景。\n\n其核心技术亮点在于深度集成了 TensorRT 插件以加速后处理，并利用自定义 CUDA 核函数与 CUDA 图技术优化前处理和整体推理流程，显著提升了运行效率。此外，TensorRT-YOLO 提供了简洁的 C++ 和 Python 接口，支持多 Context 并行推理，且在 C++ 端实现了零第三方依赖的单头文件调用，极大简化了集成难度。配合完善的 Docker 支持和跨平台兼容性（涵盖 x86 与 ARM 架构），它能帮助用户轻松实现高性能、低延迟的模型部署。","[English](README.en.md) | 简体中文\n\n\u003Cdiv align=\"center\">\n  \u003Cimg width=\"75%\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_1c0f59e5bd19.png\">\n\n  \u003Cp align=\"center\">\n      \u003Ca href=\".\u002FLICENSE\">\u003Cimg alt=\"GitHub License\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Flaugh12321\u002FTensorRT-YOLO?style=for-the-badge&color=0074d9\">\u003C\u002Fa>\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Freleases\">\u003Cimg alt=\"GitHub Release\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Flaugh12321\u002FTensorRT-YOLO?style=for-the-badge&color=0074d9\">\u003C\u002Fa>\n      \u003Cimg alt=\"GitHub Repo Stars\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Flaugh12321\u002FTensorRT-YOLO?style=for-the-badge&color=3dd3ff\">\n      \u003Cimg alt=\"Linux\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLinux-FCC624?style=for-the-badge&logo=linux&logoColor=black\">\n      \u003Cimg alt=\"Arch\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FArch-x86%20%7C%20ARM-0091BD?style=for-the-badge&logo=cpu&logoColor=white\">\n      \u003Cimg alt=\"NVIDIA\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNVIDIA-%2376B900.svg?style=for-the-badge&logo=nvidia&logoColor=white\">\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n---\n\n🚀 TensorRT-YOLO 是一款专为 NVIDIA 设备设计的**易用灵活**、**极致高效**的**YOLO系列**推理部署工具。项目不仅集成了 TensorRT 插件以增强后处理效果，还使用了 CUDA 核函数以及 CUDA 图来加速推理。TensorRT-YOLO 提供了 C++ 和 Python 推理的支持，旨在提供📦**开箱即用**的部署体验。包括 [目标检测](examples\u002Fdetect\u002F)、[实例分割](examples\u002Fsegment\u002F)、[图像分类](examples\u002Fclassify\u002F)、[姿态识别](examples\u002Fpose\u002F)、[旋转目标检测](examples\u002Fobb\u002F)、[视频分析](examples\u002FVideoPipe)等任务场景，满足开发者**多场景**的部署需求。\n\n\u003Cdiv align=\"center\">\n\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_aa73504cfa29.png' width=\"800px\">\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_9148e6071fd1.gif' width=\"800px\">\n\n\u003C\u002Fdiv>\n\n## \u003Cdiv align=\"center\">🌠 近期更新\u003C\u002Fdiv>\n\n- 🔥 **实战课程｜TensorRT × Triton Inference Server 模型部署**\n  - **平台**: [BiliBili 课堂](https:\u002F\u002Fwww.bilibili.com\u002Fcheese\u002Fplay\u002Fss193350134) | [微信公众号](https:\u002F\u002Fmp.weixin.qq.com\u002Fs\u002FDVEo6RB-Wt4yDIX_3u-7Gw) 🚀 **HOT**\n  - **团队**: [laugh12321](https:\u002F\u002Fspace.bilibili.com\u002F86034462) | [不归牛顿管的熊猫](https:\u002F\u002Fspace.bilibili.com\u002F393625476)\n  - 🛠 **硬核专题**:  \n    ▸ **自定义插件开发**（含Plugin注册全流程）  \n    ▸ **CUDA Graph 原理与工程实践**  \n    ▸ **Triton Inference Server 部署技巧**  \n\n- 2026-03-20: 添加对 [YOLO26](https:\u002F\u002Fdocs.ultralytics.com\u002Fzh\u002Fmodels\u002Fyolo26\u002F) 的支持，包括分类、定向边界框、姿态估计以及实例分割。🌟 NEW\n\n- 2026-01-07: 添加对 [YOLO-Master](https:\u002F\u002Fgithub.com\u002FTencent\u002FYOLO-Master) 的支持，包括分类、定向边界框、姿态估计以及实例分割。🌟 NEW\n\n- 2025-10-05：精度完美对齐，CUDA 完美复刻 LetterBox，绝大多数情况下像素误差为 0。Python 模块重大重构，易用性大幅提升。🌟 NEW\n\n- 2025-06-09: C++仅引单头文件 `trtyolo.hpp`，零第三方依赖（使用模块时无需链接 CUDA 和 TensorRT），增加对带图像间距（Pitch）数据结构的支持，详见 [B站](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1e2N1zjE3L)。🌟 NEW\n\n- 2025-04-19: 添加对 [YOLO-World](https:\u002F\u002Fdocs.ultralytics.com\u002Fzh\u002Fmodels\u002Fyolo-world\u002F),  [YOLOE](https:\u002F\u002Fdocs.ultralytics.com\u002Fzh\u002Fmodels\u002Fyoloe\u002F) 的支持，包括分类、定向边界框、姿态估计以及实例分割，详见 [B站](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV12N5bzkENV)。🌟 NEW\n\n- 2025-03-29: 添加对 [YOLO12](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12) 的支持，包括分类、定向边界框、姿态估计以及实例分割，详见 [issues](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Fissues\u002F22)。🌟 NEW\n\n- [性能飞跃！TensorRT-YOLO 6.0 全面升级解析与实战指南](https:\u002F\u002Fwww.cnblogs.com\u002Flaugh12321\u002Fp\u002F18693017) 🌟 NEW\n\n\n## \u003Cdiv align=\"center\">✨ 主要特性\u003C\u002Fdiv>\n\n### 🎯 多样化的 YOLO 支持\n- **全面兼容**：支持 YOLOv3 至 YOLO26，以及 YOLO-World、YOLO-Master 等多种变体，满足多样化需求，详见 [🖥️ 模型支持列表](https:\u002F\u002Fgithub.com\u002Flaugh12321\u002Ftrtyolo-export\u002Fblob\u002Fmain\u002FREADME.cn.md#%EF%B8%8F-%E6%A8%A1%E5%9E%8B%E6%94%AF%E6%8C%81%E5%88%97%E8%A1%A8)。\n- **灵活切换**：提供简洁易用的接口，支持不同版本 YOLO 模型的快速切换。🌟 NEW\n- **多场景应用**：提供丰富的示例代码，涵盖[Detect](examples\u002Fdetect\u002F)、[Segment](examples\u002Fsegment\u002F)、[Classify](examples\u002Fclassify\u002F)、[Pose](examples\u002Fpose\u002F)、[OBB](examples\u002Fobb\u002F)等多种应用场景。\n\n### 🚀 性能优化\n- **CUDA 加速**：通过 CUDA 核函数优化前处理流程，并采用 CUDA 图技术加速推理过程。\n- **TensorRT 集成**：深度集成 TensorRT 插件，显著加速后处理，提升整体推理效率。\n- **多 Context 推理**：支持多 Context 并行推理，最大化硬件资源利用率。🌟 NEW\n- **显存管理优化**：适配多架构显存优化策略（如 Jetson 的 Zero Copy 模式），提升显存效率。🌟 NEW\n\n### 🛠️ 易用性\n- **开箱即用**：提供全面的 C++ 和 Python 推理支持，满足不同开发者需求。\n- **CLI 工具**：命令行界面简洁直观，并支持自动识别模型结构，无需复杂配置。\n- **Docker 支持**：提供 Docker 一键部署方案，简化环境配置与部署流程。\n- **无第三方依赖**：全部功能使用标准库实现，无需额外依赖，简化部署流程。\n- **部署便捷**：提供动态库编译支持，方便调用和部署。\n\n### 🌐 兼容性\n- **多平台支持**：全面兼容 Windows、Linux、ARM、x86 等多种操作系统与硬件平台。\n- **TensorRT 兼容**：完美适配 TensorRT 10.x 版本，确保与最新技术生态无缝衔接。\n\n### 🔧 灵活配置\n- **预处理参数自定义**：支持多种预处理参数灵活配置，包括 **通道交换 (SwapRB)**、**归一化参数**、**边界值填充**。🌟 NEW\n\n## \u003Cdiv align=\"center\">💨 快速开始\u003C\u002Fdiv>\n\n### 1. 前置依赖\n\n- **CUDA**：推荐版本 ≥ 11.0.1\n- **TensorRT**：推荐版本 ≥ 8.6.1\n- **操作系统**：Linux (x86_64 或 arm)（推荐）；Windows 亦可支持\n\n> [!NOTE]  \n> 如果您在 Windows 下进行开发，可以参考以下配置指南：\n>\n> - [Windows 开发环境配置——NVIDIA 篇](https:\u002F\u002Fwww.cnblogs.com\u002Flaugh12321\u002Fp\u002F17830096.html)\n> - [Windows 开发环境配置——C++ 篇](https:\u002F\u002Fwww.cnblogs.com\u002Flaugh12321\u002Fp\u002F17827624.html)\n\n### 2. 编译安装\n\n首先，克隆 TensorRT-YOLO 仓库：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\ncd TensorRT-YOLO\n```\n\n然后使用 CMake，可以按照以下步骤操作：\n\n```bash\npip install \"pybind11[global]\" # 安装 pybind11，用于生成 Python 绑定\ncmake -S . -B build -D TRT_PATH=\u002Fyour\u002Ftensorrt\u002Fdir -D BUILD_PYTHON=ON -D CMAKE_INSTALL_PREFIX=\u002Fyour\u002Ftensorrt-yolo\u002Finstall\u002Fdir\ncmake --build build -j$(nproc) --config Release --target install\n```\n\n执行上述指令后，`tensorrt-yolo` 库将被安装到指定的 `CMAKE_INSTALL_PREFIX` 路径中。其中，`include` 文件夹中包含头文件，`lib` 文件夹中包含 `trtyolo` 动态库和 `custom_plugins` 动态库（仅在使用 `trtexec` 构建 OBB、Segment 或 Pose 模型时需要）。如果在编译时启用了 `BUILD_PYTHON` 选项，则还会在 `trtyolo\u002Flibs` 路径下生成相应的 Python 绑定文件。\n\n> [!NOTE]  \n> 在使用 C++ 动态库之前，请确保将指定的 `CMAKE_INSTALL_PREFIX` 路径添加到环境变量中，以便 CMake 的 `find_package` 能够找到 `tensorrt-yolo-config.cmake` 文件。可以通过以下命令完成此操作：\n>\n> ```bash\n> export PATH=$PATH:\u002Fyour\u002Ftensorrt-yolo\u002Finstall\u002Fdir # linux\n> $env:PATH = \"$env:PATH;C:\\your\\tensorrt-yolo\\install\\dir;C:\\your\\tensorrt-yolo\\install\\dir\\bin\" # windows\n> ```\n\n如果您希望在 Python 上体验与 C++ 相同的推理速度，则编译时需开启 `BUILD_PYTHON` 选项，然后再按照以下步骤操作：\n\n```bash\npip install --upgrade build\npython -m build --wheel\npip install dist\u002Ftrtyolo-6.*-py3-none-any.whl\n```\n\n### 3. 模型转换\n\n- 使用项目配套的 [`trtyolo-export`](https:\u002F\u002Fgithub.com\u002Flaugh12321\u002Ftrtyolo-export) 工具包，将已经导出的 YOLO 系列 ONNX 模型转换为兼容 TensorRT-YOLO 推理的输出结构并构建为 TensorRT 引擎。\n\n### 4. 推理示例\n\n- 使用 Python 进行推理：\n\n  ```python\n  import cv2\n  import supervision as sv\n\n  from trtyolo import TRTYOLO\n\n  # -------------------- 初始化模型 --------------------\n  # 注意：task参数需与导出时指定的任务类型一致（\"detect\"、\"segment\"、\"classify\"、\"pose\"、\"obb\"）\n  # profile参数开启后，会在推理时计算性能指标，调用 model.profile() 可获取\n  # swap_rb参数开启后，会在推理前交换通道顺序（确保模型输入时RGB）\n  model = TRTYOLO(\"yolo11n-with-plugin.engine\", task=\"detect\", profile=True, swap_rb=True)\n\n  # -------------------- 加载测试图片并推理 --------------------\n  image = cv2.imread(\"test_image.jpg\")\n  result = model.predict(image)\n  print(f\"==> result: {result}\")\n\n  # -------------------- 可视化结果 --------------------\n  box_annotator = sv.BoxAnnotator()\n  annotated_frame = box_annotator.annotate(scene=image.copy(), detections=result)\n\n  # -------------------- 性能评估 --------------------\n  throughput, cpu_latency, gpu_latency = model.profile()\n  print(throughput)\n  print(cpu_latency)\n  print(gpu_latency)\n\n  # -------------------- 克隆模型 --------------------\n  # 克隆模型实例（适用于多线程场景）\n  cloned_model = model.clone()  # 创建独立副本，避免资源竞争\n  # 验证克隆模型推理一致性\n  cloned_result = cloned_model.predict(input_img)\n  print(f\"==> cloned_result: {cloned_result}\")\n  ```\n\n- 使用 C++ 进行推理：\n\n  ```cpp\n  #include \u003Cmemory>\n  #include \u003Copencv2\u002Fopencv.hpp>\n\n  #include \"trtyolo.hpp\"\n\n  int main() {\n      try {\n          \u002F\u002F -------------------- 初始化配置 --------------------\n          trtyolo::InferOption option;\n          option.enableSwapRB();  \u002F\u002F BGR->RGB转换\n\n          \u002F\u002F 特殊模型参数设置示例\n          \u002F\u002F const std::vector\u003Cfloat> mean{0.485f, 0.456f, 0.406f};\n          \u002F\u002F const std::vector\u003Cfloat> std{0.229f, 0.224f, 0.225f};\n          \u002F\u002F option.setNormalizeParams(mean, std);\n\n          \u002F\u002F -------------------- 模型初始化 --------------------\n          \u002F\u002F ClassifyModel、DetectModel、OBBModel、SegmentModel 和 PoseModel 分别对应于图像分类、检测、方向边界框、分割和姿态估计模型\n          auto detector = std::make_unique\u003Ctrtyolo::DetectModel>(\n              \"yolo11n-with-plugin.engine\",  \u002F\u002F 模型路径\n              option                         \u002F\u002F 推理设置\n          );\n\n          \u002F\u002F -------------------- 数据加载 --------------------\n          cv::Mat cv_image = cv::imread(\"test_image.jpg\");\n          if (cv_image.empty()) {\n              throw std::runtime_error(\"无法加载测试图片\");\n          }\n\n          \u002F\u002F 封装图像数据（不复制像素数据）\n          trtyolo::Image input_image(\n              cv_image.data,     \u002F\u002F 像素数据指针\n              cv_image.cols,     \u002F\u002F 图像宽度\n              cv_image.rows     \u002F\u002F 图像高度\n          );\n\n          \u002F\u002F -------------------- 执行推理 --------------------\n          trtyolo::DetectRes result = detector->predict(input_image);\n          std::cout \u003C\u003C result \u003C\u003C std::endl;\n\n          \u002F\u002F -------------------- 结果可视化（示意） --------------------\n          \u002F\u002F 实际开发需实现可视化逻辑，示例：\n          \u002F\u002F cv::Mat vis_image = visualize_detections(cv_image, result);\n          \u002F\u002F cv::imwrite(\"vis_result.jpg\", vis_image);\n\n          \u002F\u002F -------------------- 模型克隆演示 --------------------\n          auto cloned_detector = detector->clone();  \u002F\u002F 创建独立实例\n          trtyolo::DetectRes cloned_result = cloned_detector->predict(input_image);\n\n          \u002F\u002F 验证结果一致性\n          std::cout \u003C\u003C cloned_result \u003C\u003C std::endl;\n\n      } catch (const std::exception& e) {\n          std::cerr \u003C\u003C \"程序异常: \" \u003C\u003C e.what() \u003C\u003C std::endl;\n          return EXIT_FAILURE;\n      }\n      return EXIT_SUCCESS;\n  }\n  ```\n\n### 5.推理流程图\n\n以下是`predict`方法的流程图，展示了从输入图片到输出结果的完整流程：\n\n\u003Cdiv>\n  \u003Cp>\n      \u003Cimg width=\"100%\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_a4db866f3dbf.png\">\u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n只需将待推理的图片传递给 `predict` 方法，`predict` 内部会自动完成预处理、模型推理和后处理，并输出推理结果，这些结果可进一步应用于下游任务（如可视化、目标跟踪等）。\n\n\n> 更多部署案例请参考[模型部署示例](examples) .\n\n## \u003Cdiv align=\"center\">🌟 赞助与支持\u003C\u002Fdiv>\n\n开源不易，如果本项目对你有所帮助，欢迎通过赞助支持作者。你的支持是开发者持续维护的最大动力！\n\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fafdian.com\u002Fa\u002Flaugh12321\">\n    \u003Cimg width=\"200\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_e8793412e802.png\" alt=\"赞助我\">\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n---\n\n🙏 **衷心感谢以下支持者与赞助商的无私支持**：\n\n> [!NOTE]\n>\n> 以下是 GitHub Actions 自动生成的赞助者列表，每日更新 ✨。\n\n\u003Cdiv align=\"center\">\n  \u003Ca target=\"_blank\" href=\"https:\u002F\u002Fafdian.com\u002Fa\u002Flaugh12321\">\n    \u003Cimg alt=\"赞助者列表\" src=\"https:\u002F\u002Fgithub.com\u002Flaugh12321\u002Fsponsor\u002Fblob\u002Fmain\u002Fsponsors.svg?raw=true\">\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n## \u003Cdiv align=\"center\">📄 许可证\u003C\u002Fdiv>\n\nTensorRT-YOLO采用 **GPL-3.0许可证**，这个[OSI 批准](https:\u002F\u002Fopensource.org\u002Flicenses\u002F)的开源许可证非常适合学生和爱好者，可以推动开放的协作和知识分享。请查看[LICENSE](https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fblob\u002Fmaster\u002FLICENSE) 文件以了解更多细节。\n\n感谢您选择使用 TensorRT-YOLO，我们鼓励开放的协作和知识分享，同时也希望您遵守开源许可的相关规定。\n\n## \u003Cdiv align=\"center\">📞 联系方式\u003C\u002Fdiv>\n\n对于 TensorRT-YOLO 的错误报告和功能请求，请访问 [GitHub Issues](https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fissues)！\n\n给项目点亮 ⭐ Star 可以帮助我们优先关注你的需求，加快响应速度～\n\n## \u003Cdiv align=\"center\">🙏 致谢\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n\u003Ca href=\"https:\u002F\u002Fhellogithub.com\u002Frepository\u002F942570b550824b1b9397e4291da3d17c\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fapi.hellogithub.com\u002Fv1\u002Fwidgets\u002Frecommend.svg?rid=942570b550824b1b9397e4291da3d17c&claim_uid=2AGzE4dsO8ZUD9R&theme=neutral\" alt=\"Featured｜HelloGitHub\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" \u002F>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n## \u003Cdiv align=\"center\">🌟 Star History\u003C\u002Fdiv>\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_f2030e75758f.png)](https:\u002F\u002Fwww.star-history.com\u002F#laugh12321\u002FTensorRT-YOLO&type=date&legend=top-left)\n","[English](README.en.md) | 简体中文\n\n\u003Cdiv align=\"center\">\n  \u003Cimg width=\"75%\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_1c0f59e5bd19.png\">\n\n  \u003Cp align=\"center\">\n      \u003Ca href=\".\u002FLICENSE\">\u003Cimg alt=\"GitHub License\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Flaugh12321\u002FTensorRT-YOLO?style=for-the-badge&color=0074d9\">\u003C\u002Fa>\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Freleases\">\u003Cimg alt=\"GitHub Release\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Flaugh12321\u002FTensorRT-YOLO?style=for-the-badge&color=0074d9\">\u003C\u002Fa>\n      \u003Cimg alt=\"GitHub Repo Stars\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Flaugh12321\u002FTensorRT-YOLO?style=for-the-badge&color=3dd3ff\">\n      \u003Cimg alt=\"Linux\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLinux-FCC624?style=for-the-badge&logo=linux&logoColor=black\">\n      \u003Cimg alt=\"Arch\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FArch-x86%20%7C%20ARM-0091BD?style=for-the-badge&logo=cpu&logoColor=white\">\n      \u003Cimg alt=\"NVIDIA\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNVIDIA-%2376B900.svg?style=for-the-badge&logo=nvidia&logoColor=white\">\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n---\n\n🚀 TensorRT-YOLO 是一款专为 NVIDIA 设备设计的**易用灵活**、**极致高效**的**YOLO系列**推理部署工具。项目不仅集成了 TensorRT 插件以增强后处理效果，还使用了 CUDA 核函数以及 CUDA 图来加速推理。TensorRT-YOLO 提供了 C++ 和 Python 推理的支持，旨在提供📦**开箱即用**的部署体验。包括 [目标检测](examples\u002Fdetect\u002F)、[实例分割](examples\u002Fsegment\u002F)、[图像分类](examples\u002Fclassify\u002F)、[姿态识别](examples\u002Fpose\u002F)、[旋转目标检测](examples\u002Fobb\u002F)、[视频分析](examples\u002FVideoPipe)等任务场景，满足开发者**多场景**的部署需求。\n\n\u003Cdiv align=\"center\">\n\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_aa73504cfa29.png' width=\"800px\">\n\u003Cimg src='https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_9148e6071fd1.gif' width=\"800px\">\n\n\u003C\u002Fdiv>\n\n## \u003Cdiv align=\"center\">🌠 过去更新\u003C\u002Fdiv>\n\n- 🔥 **实战课程｜TensorRT × Triton Inference Server 模型部署**\n  - **平台**: [BiliBili 课堂](https:\u002F\u002Fwww.bilibili.com\u002Fcheese\u002Fplay\u002Fss193350134) | [微信公众号](https:\u002F\u002Fmp.weixin.qq.com\u002Fs\u002FDVEo6RB-Wt4yDIX_3u-7Gw) 🚀 **HOT**\n  - **团队**: [laugh12321](https:\u002F\u002Fspace.bilibili.com\u002F86034462) | [不归牛顿管的熊猫](https:\u002F\u002Fspace.bilibili.com\u002F393625476)\n  - 🛠 **硬核专题**:  \n    ▸ **自定义插件开发**（含Plugin注册全流程）  \n    ▸ **CUDA Graph 原理与工程实践**  \n    ▸ **Triton Inference Server 部署技巧**  \n\n- 2026-03-20: 添加对 [YOLO26](https:\u002F\u002Fdocs.ultralytics.com\u002Fzh\u002Fmodels\u002Fyolo26\u002F) 的支持，包括分类、定向边界框、姿态估计以及实例分割。🌟 NEW\n\n- 2026-01-07: 添加对 [YOLO-Master](https:\u002F\u002Fgithub.com\u002FTencent\u002FYOLO-Master) 的支持，包括分类、定向边界框、姿态估计以及实例分割。🌟 NEW\n\n- 2025-10-05：精度完美对齐，CUDA 完美复刻 LetterBox，绝大多数情况下像素误差为 0。Python 模块重大重构，易用性大幅提升。🌟 NEW\n\n- 2025-06-09: C++仅引单头文件 `trtyolo.hpp`，零第三方依赖（使用模块时无需链接 CUDA 和 TensorRT），增加对带图像间距（Pitch）数据结构的支持，详见 [B站](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1e2N1zjE3L)。🌟 NEW\n\n- 2025-04-19: 添加对 [YOLO-World](https:\u002F\u002Fdocs.ultralytics.com\u002Fzh\u002Fmodels\u002Fyolo-world\u002F),  [YOLOE](https:\u002F\u002Fdocs.ultralytics.com\u002Fzh\u002Fmodels\u002Fyoloe\u002F) 的支持，包括分类、定向边界框、姿态估计以及实例分割，详见 [B站](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV12N5bzkENV)。🌟 NEW\n\n- 2025-03-29: 添加对 [YOLO12](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12) 的支持，包括分类、定向边界框、姿态估计以及实例分割，详见 [issues](https:\u002F\u002Fgithub.com\u002Fsunsmarterjie\u002Fyolov12\u002Fissues\u002F22)。🌟 NEW\n\n- [性能飞跃！TensorRT-YOLO 6.0 全面升级解析与实战指南](https:\u002F\u002Fwww.cnblogs.com\u002Flaugh12321\u002Fp\u002F18693017) 🌟 NEW\n\n\n## \u003Cdiv align=\"center\">✨ 主要特性\u003C\u002Fdiv>\n\n### 🎯 多样化的 YOLO 支持\n- **全面兼容**：支持 YOLOv3 至 YOLO26，以及 YOLO-World、YOLO-Master 等多种变体，满足多样化需求，详见 [🖥️ 模型支持列表](https:\u002F\u002Fgithub.com\u002Flaugh12321\u002Ftrtyolo-export\u002Fblob\u002Fmain\u002FREADME.cn.md#%EF%B8%8F-%E6%A8%A1%E5%9E%8B%E6%94%AF%E6%8C%81%E5%88%97%E8%A1%A8)。\n- **灵活切换**：提供简洁易用的接口，支持不同版本 YOLO 模型的快速切换。🌟 NEW\n- **多场景应用**：提供丰富的示例代码，涵盖[Detect](examples\u002Fdetect\u002F)、[Segment](examples\u002Fsegment\u002F)、[Classify](examples\u002Fclassify\u002F)、[Pose](examples\u002Fpose\u002F)、[OBB](examples\u002Fobb\u002F)等多种应用场景。\n\n### 🚀 性能优化\n- **CUDA 加速**：通过 CUDA 核函数优化前处理流程，并采用 CUDA 图技术加速推理过程。\n- **TensorRT 集成**：深度集成 TensorRT 插件，显著加速后处理，提升整体推理效率。\n- **多 Context 推理**：支持多 Context 并行推理，最大化硬件资源利用率。🌟 NEW\n- **显存管理优化**：适配多架构显存优化策略（如 Jetson 的 Zero Copy 模式），提升显存效率。🌟 NEW\n\n### 🛠️ 易用性\n- **开箱即用**：提供全面的 C++ 和 Python 推理支持，满足不同开发者需求。\n- **CLI 工具**：命令行界面简洁直观，并支持自动识别模型结构，无需复杂配置。\n- **Docker 支持**：提供 Docker 一键部署方案，简化环境配置与部署流程。\n- **无第三方依赖**：全部功能使用标准库实现，无需额外依赖，简化部署流程。\n- **部署便捷**：提供动态库编译支持，方便调用和部署。\n\n### 🌐 兼容性\n- **多平台支持**：全面兼容 Windows、Linux、ARM、x86 等多种操作系统与硬件平台。\n- **TensorRT 兼容**：完美适配 TensorRT 10.x 版本，确保与最新技术生态无缝衔接。\n\n### 🔧 灵活配置\n- **预处理参数自定义**：支持多种预处理参数灵活配置，包括 **通道交换 (SwapRB)**、**归一化参数**、**边界值填充**。🌟 NEW\n\n## \u003Cdiv align=\"center\">💨 快速开始\u003C\u002Fdiv>\n\n### 1. 前置依赖\n\n- **CUDA**：推荐版本 ≥ 11.0.1\n- **TensorRT**：推荐版本 ≥ 8.6.1\n- **操作系统**：Linux (x86_64 或 arm)（推荐）；Windows 亦可支持\n\n> [!NOTE]  \n> 如果您在 Windows 下进行开发，可以参考以下配置指南：\n>\n> - [Windows 开发环境配置——NVIDIA 篇](https:\u002F\u002Fwww.cnblogs.com\u002Flaugh12321\u002Fp\u002F17830096.html)\n> - [Windows 开发环境配置——C++ 篇](https:\u002F\u002Fwww.cnblogs.com\u002Flaugh12321\u002Fp\u002F17827624.html)\n\n### 2. 编译安装\n\n首先，克隆 TensorRT-YOLO 仓库：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\ncd TensorRT-YOLO\n```\n\n然后使用 CMake，可以按照以下步骤操作：\n\n```bash\npip install \"pybind11[global]\" # 安装 pybind11，用于生成 Python 绑定\ncmake -S . -B build -D TRT_PATH=\u002Fyour\u002Ftensorrt\u002Fdir -D BUILD_PYTHON=ON -D CMAKE_INSTALL_PREFIX=\u002Fyour\u002Ftensorrt-yolo\u002Finstall\u002Fdir\ncmake --build build -j$(nproc) --config Release --target install\n```\n\n执行上述指令后，`tensorrt-yolo` 库将被安装到指定的 `CMAKE_INSTALL_PREFIX` 路径中。其中，`include` 文件夹中包含头文件，`lib` 文件夹中包含 `trtyolo` 动态库和 `custom_plugins` 动态库（仅在使用 `trtexec` 构建 OBB、Segment 或 Pose 模型时需要）。如果在编译时启用了 `BUILD_PYTHON` 选项，则还会在 `trtyolo\u002Flibs` 路径下生成相应的 Python 绑定文件。\n\n> [!NOTE]  \n> 在使用 C++ 动态库之前，请确保将指定的 `CMAKE_INSTALL_PREFIX` 路径添加到环境变量中，以便 CMake 的 `find_package` 能够找到 `tensorrt-yolo-config.cmake` 文件。可以通过以下命令完成此操作：\n>\n> ```bash\n> export PATH=$PATH:\u002Fyour\u002Ftensorrt-yolo\u002Finstall\u002Fdir # linux\n> $env:PATH = \"$env:PATH;C:\\your\\tensorrt-yolo\\install\\dir;C:\\your\\tensorrt-yolo\\install\\dir\\bin\" # windows\n> ```\n\n如果您希望在 Python 上体验与 C++ 相同的推理速度，则编译时需开启 `BUILD_PYTHON` 选项，然后再按照以下步骤操作：\n\n```bash\npip install --upgrade build\npython -m build --wheel\npip install dist\u002Ftrtyolo-6.*-py3-none-any.whl\n```\n\n### 3. 模型转换\n\n- 使用项目配套的 [`trtyolo-export`](https:\u002F\u002Fgithub.com\u002Flaugh12321\u002Ftrtyolo-export) 工具包，将已经导出的 YOLO 系列 ONNX 模型转换为兼容 TensorRT-YOLO 推理的输出结构并构建为 TensorRT 引擎。\n\n### 4. 推理示例\n\n- 使用 Python 进行推理：\n\n  ```python\n  import cv2\n  import supervision as sv\n\n  from trtyolo import TRTYOLO\n\n  # -------------------- 初始化模型 --------------------\n  # 注意：task参数需与导出时指定的任务类型一致（\"detect\"、\"segment\"、\"classify\"、\"pose\"、\"obb\"）\n  # profile参数开启后，会在推理时计算性能指标，调用 model.profile() 可获取\n  # swap_rb参数开启后，会在推理前交换通道顺序（确保模型输入时RGB）\n  model = TRTYOLO(\"yolo11n-with-plugin.engine\", task=\"detect\", profile=True, swap_rb=True)\n\n  # -------------------- 加载测试图片并推理 --------------------\n  image = cv2.imread(\"test_image.jpg\")\n  result = model.predict(image)\n  print(f\"==> result: {result}\")\n\n  # -------------------- 可视化结果 --------------------\n  box_annotator = sv.BoxAnnotator()\n  annotated_frame = box_annotator.annotate(scene=image.copy(), detections=result)\n\n  # -------------------- 性能评估 --------------------\n  throughput, cpu_latency, gpu_latency = model.profile()\n  print(throughput)\n  print(cpu_latency)\n  print(gpu_latency)\n\n  # -------------------- 克隆模型 --------------------\n  # 克隆模型实例（适用于多线程场景）\n  cloned_model = model.clone()  # 创建独立副本，避免资源竞争\n  # 验证克隆模型推理一致性\n  cloned_result = cloned_model.predict(input_img)\n  print(f\"==> cloned_result: {cloned_result}\")\n  ```\n\n- 使用 C++ 进行推理：\n\n  ```cpp\n  #include \u003Cmemory>\n  #include \u003Copencv2\u002Fopencv.hpp>\n\n  #include \"trtyolo.hpp\"\n\n  int main() {\n      try {\n          \u002F\u002F -------------------- 初始化配置 --------------------\n          trtyolo::InferOption option;\n          option.enableSwapRB();  \u002F\u002F BGR->RGB转换\n\n          \u002F\u002F 特殊模型参数设置示例\n          \u002F\u002F const std::vector\u003Cfloat> mean{0.485f, 0.456f, 0.406f};\n          \u002F\u002F const std::vector\u003Cfloat> std{0.229f, 0.224f, 0.225f};\n          \u002F\u002F option.setNormalizeParams(mean, std);\n\n          \u002F\u002F -------------------- 模型初始化 --------------------\n          \u002F\u002F ClassifyModel、DetectModel、OBBModel、SegmentModel 和 PoseModel 分别对应于图像分类、检测、方向边界框、分割和姿态估计模型\n          auto detector = std::make_unique\u003Ctrtyolo::DetectModel>(\n              \"yolo11n-with-plugin.engine\",  \u002F\u002F 模型路径\n              option                         \u002F\u002F 推理设置\n          );\n\n          \u002F\u002F -------------------- 数据加载 --------------------\n          cv::Mat cv_image = cv::imread(\"test_image.jpg\");\n          if (cv_image.empty()) {\n              throw std::runtime_error(\"无法加载测试图片\");\n          }\n\n          \u002F\u002F 封装图像数据（不复制像素数据）\n          trtyolo::Image input_image(\n              cv_image.data,     \u002F\u002F 像素数据指针\n              cv_image.cols,     \u002F\u002F 图像宽度\n              cv_image.rows     \u002F\u002F 图像高度\n          );\n\n          \u002F\u002F -------------------- 执行推理 --------------------\n          trtyolo::DetectRes result = detector->predict(input_image);\n          std::cout \u003C\u003C result \u003C\u003C std::endl;\n\n          \u002F\u002F -------------------- 结果可视化（示意） --------------------\n          \u002F\u002F 实际开发需实现可视化逻辑，示例：\n          \u002F\u002F cv::Mat vis_image = visualize_detections(cv_image, result);\n          \u002F\u002F cv::imwrite(\"vis_result.jpg\", vis_image);\n\n          \u002F\u002F -------------------- 模型克隆演示 --------------------\n          auto cloned_detector = detector->clone();  \u002F\u002F 创建独立实例\n          trtyolo::DetectRes cloned_result = cloned_detector->predict(input_image);\n\n          \u002F\u002F 验证结果一致性\n          std::cout \u003C\u003C cloned_result \u003C\u003C std::endl;\n\n      } catch (const std::exception& e) {\n          std::cerr \u003C\u003C \"程序异常: \" \u003C\u003C e.what() \u003C\u003C std::endl;\n          return EXIT_FAILURE;\n      }\n      return EXIT_SUCCESS;\n  }\n  ```\n\n### 5.推理流程图\n\n以下是`predict`方法的流程图，展示了从输入图片到输出结果的完整流程：\n\n\u003Cdiv>\n  \u003Cp>\n      \u003Cimg width=\"100%\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_a4db866f3dbf.png\">\u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n只需将待推理的图片传递给 `predict` 方法，`predict` 内部会自动完成预处理、模型推理和后处理，并输出推理结果，这些结果可进一步应用于下游任务（如可视化、目标跟踪等）。\n\n\n> 更多部署案例请参考[模型部署示例](examples) .\n\n## \u003Cdiv align=\"center\">🌟 赞助与支持\u003C\u002Fdiv>\n\n开源不易，如果本项目对你有所帮助，欢迎通过赞助支持作者。你的支持是开发者持续维护的最大动力！\n\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fafdian.com\u002Fa\u002Flaugh12321\">\n    \u003Cimg width=\"200\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_e8793412e802.png\" alt=\"赞助我\">\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n---\n\n🙏 **衷心感谢以下支持者与赞助商的无私支持**：\n\n> [!NOTE]\n>\n> 以下是 GitHub Actions 自动生成的赞助者列表，每日更新 ✨。\n\n\u003Cdiv align=\"center\">\n  \u003Ca target=\"_blank\" href=\"https:\u002F\u002Fafdian.com\u002Fa\u002Flaugh12321\">\n    \u003Cimg alt=\"赞助者列表\" src=\"https:\u002F\u002Fgithub.com\u002Flaugh12321\u002Fsponsor\u002Fblob\u002Fmain\u002Fsponsors.svg?raw=true\">\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n## \u003Cdiv align=\"center\">📄 许可证\u003C\u002Fdiv>\n\nTensorRT-YOLO采用 **GPL-3.0许可证**，这个[OSI 批准](https:\u002F\u002Fopensource.org\u002Flicenses\u002F)的开源许可证非常适合学生和爱好者，可以推动开放的协作和知识分享。请查看[LICENSE](https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fblob\u002Fmaster\u002FLICENSE) 文件以了解更多细节。\n\n感谢您选择使用 TensorRT-YOLO，我们鼓励开放的协作和知识分享，同时也希望您遵守开源许可的相关规定。\n\n## \u003Cdiv align=\"center\">📞 联系方式\u003C\u002Fdiv>\n\n对于 TensorRT-YOLO 的错误报告和功能请求，请访问 [GitHub Issues](https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fissues)！\n\n给项目点亮 ⭐ Star 可以帮助我们优先关注你的需求，加快响应速度～\n\n## \u003Cdiv align=\"center\">🙏 致谢\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n\u003Ca href=\"https:\u002F\u002Fhellogithub.com\u002Frepository\u002F942570b550824b1b9397e4291da3d17c\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fapi.hellogithub.com\u002Fv1\u002Fwidgets\u002Frecommend.svg?rid=942570b550824b1b9397e4291da3d17c&claim_uid=2AGzE4dsO8ZUD9R&theme=neutral\" alt=\"Featured｜HelloGitHub\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" \u002F>\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n## \u003Cdiv align=\"center\">🌟 Star History\u003C\u002Fdiv>\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_readme_f2030e75758f.png)](https:\u002F\u002Fwww.star-history.com\u002F#laugh12321\u002FTensorRT-YOLO&type=date&legend=top-left)","# TensorRT-YOLO 快速上手指南\n\nTensorRT-YOLO 是一款专为 NVIDIA 设备设计的高效 YOLO 系列推理部署工具，支持 C++ 和 Python，具备开箱即用的特性，涵盖目标检测、实例分割、姿态识别等多种任务。\n\n## 1. 环境准备\n\n### 系统要求\n- **操作系统**：Linux (x86_64 或 ARM) 推荐；Windows 亦支持\n- **硬件平台**：NVIDIA GPU (支持 CUDA)\n\n### 前置依赖\n请确保已安装以下基础环境：\n- **CUDA**：版本 ≥ 11.0.1\n- **TensorRT**：版本 ≥ 8.6.1\n- **CMake**：用于编译构建\n- **Python** (可选)：如需使用 Python 接口，建议 Python 3.8+\n\n> **注意**：Windows 用户可参考 [Windows 开发环境配置指南](https:\u002F\u002Fwww.cnblogs.com\u002Flaugh12321\u002Fp\u002F17830096.html) 进行详细设置。\n\n## 2. 安装步骤\n\n### 步骤一：克隆仓库\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\ncd TensorRT-YOLO\n```\n\n### 步骤二：编译安装 (C++ & Python)\n首先安装 Python 绑定依赖，然后使用 CMake 进行编译：\n\n```bash\n# 安装 pybind11 (用于生成 Python 绑定)\npip install \"pybind11[global]\"\n\n# 配置编译选项\n# 请将 \u002Fyour\u002Ftensorrt\u002Fdir 替换为实际 TensorRT 安装路径\n# 请将 \u002Fyour\u002Ftensorrt-yolo\u002Finstall\u002Fdir 替换为您希望安装到的目标路径\ncmake -S . -B build \\\n    -D TRT_PATH=\u002Fyour\u002Ftensorrt\u002Fdir \\\n    -D BUILD_PYTHON=ON \\\n    -D CMAKE_INSTALL_PREFIX=\u002Fyour\u002Ftensorrt-yolo\u002Finstall\u002Fdir\n\n# 编译并安装\ncmake --build build -j$(nproc) --config Release --target install\n```\n\n### 步骤三：配置环境变量\n为了让系统找到编译好的库文件，请将安装路径添加到环境变量中：\n\n**Linux:**\n```bash\nexport PATH=$PATH:\u002Fyour\u002Ftensorrt-yolo\u002Finstall\u002Fdir\n```\n\n**Windows (PowerShell):**\n```powershell\n$env:PATH = \"$env:PATH;C:\\your\\tensorrt-yolo\\install\\dir;C:\\your\\tensorrt-yolo\\install\\dir\\bin\"\n```\n\n### 步骤四：安装 Python 包 (可选)\n如果启用了 `BUILD_PYTHON`，需额外执行以下步骤以在 Python 中直接使用：\n\n```bash\npip install --upgrade build\npython -m build --wheel\npip install dist\u002Ftrtyolo-6.*-py3-none-any.whl\n```\n\n## 3. 基本使用\n\n在使用前，请先使用 [`trtyolo-export`](https:\u002F\u002Fgithub.com\u002Flaugh12321\u002Ftrtyolo-export) 工具将 YOLO 模型的 ONNX 文件转换为带有插件的 TensorRT 引擎文件 (`.engine`)。\n\n### Python 示例\n以下是最简单的目标检测推理流程：\n\n```python\nimport cv2\nfrom trtyolo import TRTYOLO\n\n# 1. 初始化模型\n# task 需与导出时的任务类型一致 (detect, segment, classify, pose, obb)\n# swap_rb=True 表示自动进行 BGR 到 RGB 的通道转换\nmodel = TRTYOLO(\"yolo11n-with-plugin.engine\", task=\"detect\", swap_rb=True)\n\n# 2. 加载图片并推理\nimage = cv2.imread(\"test_image.jpg\")\nresult = model.predict(image)\n\n# 3. 输出结果\nprint(f\"检测到的目标数量：{len(result)}\")\nfor det in result:\n    print(f\"类别：{det.cls}, 置信度：{det.conf}, 坐标：{det.xyxy}\")\n```\n\n### C++ 示例\nC++ 接口仅需引入单个头文件即可使用：\n\n```cpp\n#include \u003Ciostream>\n#include \u003Copencv2\u002Fopencv.hpp>\n#include \"trtyolo.hpp\"\n\nint main() {\n    try {\n        \u002F\u002F 1. 配置选项\n        trtyolo::InferOption option;\n        option.enableSwapRB(); \u002F\u002F 开启 BGR->RGB 转换\n\n        \u002F\u002F 2. 加载模型 (DetectModel 对应目标检测)\n        auto detector = std::make_unique\u003Ctrtyolo::DetectModel>(\n            \"yolo11n-with-plugin.engine\", \n            option\n        );\n\n        \u002F\u002F 3. 读取图片\n        cv::Mat cv_image = cv::imread(\"test_image.jpg\");\n        if (cv_image.empty()) {\n            throw std::runtime_error(\"无法加载图片\");\n        }\n\n        \u002F\u002F 4. 封装图像数据 (零拷贝)\n        trtyolo::Image input_image(cv_image.data, cv_image.cols, cv_image.rows);\n\n        \u002F\u002F 5. 执行推理\n        trtyolo::DetectRes result = detector->predict(input_image);\n        \n        \u002F\u002F 6. 输出结果\n        std::cout \u003C\u003C result \u003C\u003C std::endl;\n\n    } catch (const std::exception& e) {\n        std::cerr \u003C\u003C \"错误：\" \u003C\u003C e.what() \u003C\u003C std::endl;\n        return EXIT_FAILURE;\n    }\n    return EXIT_SUCCESS;\n}\n```\n\n> **提示**：更多高级用法（如实例分割、姿态估计、视频流处理）请参考项目 `examples` 目录下的完整示例代码。","某智慧交通团队需要在 NVIDIA Jetson Orin 边缘设备上部署实时车辆检测系统，以监控路口违章行为并即时报警。\n\n### 没有 TensorRT-YOLO 时\n- **推理延迟高**：直接使用 PyTorch 原生模型推理，帧率仅维持在 15 FPS 左右，无法满足 30 FPS 的实时流畅监控需求，导致关键违章瞬间漏检。\n- **开发配置繁琐**：手动编写 CUDA 核函数优化 LetterBox 预处理和后处理 NMS 算法耗时数周，且难以保证与训练端的像素级精度对齐，偶发检测框偏移。\n- **资源调度困难**：缺乏多路视频流并行处理能力，单卡只能勉强支撑一路高清视频分析，硬件算力利用率极低，无法规模化部署。\n- **环境依赖复杂**：项目强依赖特定版本的第三方库，跨设备迁移时常因环境冲突导致部署失败，运维成本高昂。\n\n### 使用 TensorRT-YOLO 后\n- **性能极致飞跃**：利用 TensorRT-YOLO 集成的 CUDA 图技术和自定义插件，推理速度飙升至 65+ FPS，延迟降低 70%，轻松实现多路视频实时无卡顿分析。\n- **精度完美对齐**：内置复刻的 LetterBox 预处理确保像素误差为 0，后处理由高效插件自动完成，无需手动调优即可复现训练端精度，检测框稳定可靠。\n- **并发能力增强**：通过多 Context 并行推理机制，单张 Orin 板卡可同时处理 4 路 1080P 视频流，最大化挖掘硬件潜能，显著降低单路监控成本。\n- **部署开箱即用**：仅需引入单个 `trtyolo.hpp` 头文件或调用 Python 模块，零第三方依赖即可完成集成，配合 Docker 一键部署，将原本数周的工程化周期缩短至半天。\n\nTensorRT-YOLO 通过将复杂的底层加速技术封装为极简接口，让开发者在边缘端也能轻松获得服务器级的推理性能与稳定性。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flaugh12321_TensorRT-YOLO_1c0f59e5.png","laugh12321","Laugh","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Flaugh12321_fc6e32cb.png","如箭离弦，永不回头\r\n",null,"Xi'an, China","laugh12321@vip.qq.com","https:\u002F\u002Fwww.cnblogs.com\u002Flaugh12321","https:\u002F\u002Fgithub.com\u002Flaugh12321",[24,28,32,36,40,44],{"name":25,"color":26,"percentage":27},"C++","#f34b7d",63.7,{"name":29,"color":30,"percentage":31},"Cuda","#3A4E3A",26.7,{"name":33,"color":34,"percentage":35},"Python","#3572A5",4.2,{"name":37,"color":38,"percentage":39},"CMake","#DA3434",3.7,{"name":41,"color":42,"percentage":43},"C","#555555",0.9,{"name":45,"color":46,"percentage":47},"Dockerfile","#384d54",0.8,1750,189,"2026-04-02T14:38:59","GPL-3.0",4,"Linux, Windows","需要 NVIDIA GPU (支持 x86 和 ARM 架构)，需安装 CUDA Toolkit ≥ 11.0.1 和 TensorRT ≥ 8.6.1","未说明",{"notes":57,"python":58,"dependencies":59},"该项目专为 NVIDIA 设备设计，提供 C++ 和 Python 接口。编译 Python 绑定需安装 pybind11。Windows 用户需参考特定配置指南。模型转换需使用配套的 trtyolo-export 工具将 ONNX 转为 TensorRT 引擎。支持多种 YOLO 变体及任务（检测、分割、姿态等）。","未说明 (需支持 pybind11)",[60,61,37,62,63,64],"CUDA >= 11.0.1","TensorRT >= 8.6.1","pybind11","OpenCV","supervision (示例依赖)",[66,67],"图像","开发框架",[69,70,71,72,73,74,75,76,77,78,79,80,81,82,83],"tensorrt","tensorrt-inference","tensorrt10","computer-vision","image-classification","instance-segmentation","object-detection","pose-estimation","rotated-object-detection","ultralytics","yolo","yolo11","yolov5","yolov8","yolo26",2,"ready","2026-03-27T02:49:30.150509","2026-04-06T08:45:14.293434",[],[90,95,100,105,110,115,120,125,130,135,140,145],{"id":91,"version":92,"summary_zh":93,"released_at":94},71106,"v6.4.0","## What's Changed\r\n* feat(nndeploy): adapt TensorRT-YOLO for nndeploy workflow by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F249\r\n* feat(trtyolo): add coordinate transformation methods for Box and RotatedBox by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F257\r\n* refactor(trtyolo): replace affine with letterbox and optimize mask logic by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F258\r\n* feat(trtyolo, #206): add image channel support and refactor Python bindings by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F259\r\n* refactor(trtyolo): restructure project and optimize code by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F260\r\n* refactor (examples): refactor all example code to use the new interface by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F261\r\n* feat(nndeploy): update config file to the new version by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F262\r\n* fix(trtyolo): fix conf type conversion error and add batch attribute by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F263\r\n* docs: update documentation for changes by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F264\r\n* build: update build configuration by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F265\r\n* fix(#272): prevent mask mis-alignment from out-of-bounds bbox by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F273\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcompare\u002Fv6.3.2...v6.4.0","2025-12-12T01:20:13",{"id":96,"version":97,"summary_zh":98,"released_at":99},71107,"v6.3.2","## What's Changed\r\n* docs: update model structure images and modify README accordingly by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F235\r\n* fix(warpaffine): correct affine matrix center-shift & remove redundant ops by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F237\r\n* fix(#229): `enableSwapRB` ignored causing color-swap failure by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F238\r\n* build: update build configuration by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F239\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcompare\u002Fv6.3.1...v6.3.2","2025-09-25T09:09:50",{"id":101,"version":102,"summary_zh":103,"released_at":104},71108,"v6.3.1","## What's Changed\r\n* fix: move operator\u003C\u003C implementations to header to fix printing failure by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F230\r\n* fix(#214): force overwrite CUDA arch list to remove default 5.2 and resolve __half ambiguity by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F231\r\n* fix(#212): switch CUDA device before inference by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F232\r\n* build: update build configuration by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F233\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcompare\u002Fv6.3.0...v6.3.1","2025-09-10T10:09:29",{"id":106,"version":107,"summary_zh":108,"released_at":109},71109,"v6.3.0","## What's Changed\r\n* fix: correct width and height confusion by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F189\r\n* feat: Add support for data with pitch by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F190\r\n* move: move plugin code to modules\u002Fplugin by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F191\r\n* move: move python\u002Ftensorrt_yolo code to tensorrt_yolo by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F192\r\n* refactor: refactor and move deploy code to trtyolo by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F193\r\n* feat: update CMakeLists and add install, fix undefined symbol by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F194\r\n* feat: update tensorrt_yolo Python module by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F195\r\n* fix(#186): switch to class-aware NMS as the default behavior by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F196\r\n* feat: update examples code by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F197\r\n* docs: update documentation for changes by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F198\r\n* fix(#188): resolve typing compatibility issues by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F199\r\n* fix: initialize nmsIndicesOutput buffer to avoid undefined behavior by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F201\r\n* build: update the default list of supported CUDA architectures by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F202\r\n* build: update build configuration by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F203\r\n* chore: update gitignore by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F204\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcompare\u002Fv6.2.0...v6.3.0","2025-07-14T05:06:56",{"id":111,"version":112,"summary_zh":113,"released_at":114},71110,"v6.2.0","## What's Changed\r\n* refactor: optimize export module for better maintainability by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F163\r\n* feat(#29): add support for YOLO-World by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F164\r\n* feat: add support for YOLOE by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F165\r\n* refactor: optimize Python CLI code by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F166\r\n* build: update build configuration by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F167\r\n* docs: update documentation for changes by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F168\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcompare\u002Fv6.1.0...v6.2.0","2025-05-30T06:32:13",{"id":116,"version":117,"summary_zh":118,"released_at":119},71111,"v6.1.0","## What's Changed\r\n* docs: Update README with performance benchmarks, badges, and new features by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F84\r\n* fix(#85): Fix compilation errors on Windows by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F86\r\n* fix(#88): Fix linking deploy library failed on Windows by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F89\r\n* feat: Add 爱发电 sponsorship link to FUNDING.yml by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F96\r\n* feat(#98): support using the project as a Git submodule by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F99\r\n* docs(sponsor): add sponsorship section with supporter list and sponso… by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F106\r\n* fix(buffer.cpp): correct invalid argument at line 93 by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F107\r\n* fix(#100): Fix duplicate plugin registration for multi-model usage by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F109\r\n* fix(#113): Fix linking deploy library failed on Windows by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F114\r\n* fix: Correct pointer reference logic for `option.cuda_mem` by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F122\r\n* docs(course): update promotion for TensorRT & Triton deployment course by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F130\r\n* v6.1.0: Remove xmake build system, optimize CMake configuration and add YOLO12 support by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F146\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcompare\u002Fv6.0.0...v6.1.0","2025-04-25T07:41:09",{"id":121,"version":122,"summary_zh":123,"released_at":124},71112,"v6.0.0","## What's Changed\r\n* Fix failed to build TensorRT Engine with Custom Plugins on Windows by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F70\r\n* Fix Duplicate Oriented Bounding Boxes in RotatedNMS Plugin under FP16 Precision by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F72\r\n* Corrected spelling errors in the code by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F73\r\n* Add Ultralytics Classify Support by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F77\r\n* Fixes for Documentation and Comments - Non-critical issue by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F78\r\n* Refactor tensorrt_yolo.infer module and remove deprecated typing types (Tuple, List, Set, Dict) by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F79\r\n* Major Refactor and Optimizations by @laugh12321 in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F83\r\n\r\n## New Contributors\r\n* @laugh12321 made their first contribution in https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fpull\u002F70\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcompare\u002Fv5.0.0...v6.0.0","2025-01-26T11:44:00",{"id":126,"version":127,"summary_zh":128,"released_at":129},71113,"v5.0.0","## Breaking Changes\r\n\r\n- Add EfficientRotatedNMS Plugin for OBB Model Inference (0caaf27925b44be28b3b96692f9edd27b744418f)\r\n- Add Support for YOLO OBB Export and Inference with EfficientRotatedNMS Plugin (c2686cc38ad6e7b8effbb290486b988b51aca46a)\r\n- Add Support for YOLO11 Detect and OBB Detect (01c8eb45fcacbdba420ccacf60651dc2c6b2f759)\r\n- Refactor: Enable plugin compilation as a dynamic library independently of TensorRT-OSS (4506565208bf286f93293dad71829f86e218e090)\r\n- Add EfficientIdxNMS Plugin for Segmentation Model Inference (72324ed43d474f6a76dd3a6d9b7b767f8e45ebee)\r\n- feat(YOLOv10): Update detect head to reduce ONNX size (701e2111212c0028ce450d1bcb1385e66ef3a3ca)\r\n- feat(cli): Removed YOLOv6\u002F7\u002F9 export options and directed to official repositories (af0783b0faff02236e2e69c3c076116d24537505)\r\n- feat(Segment): Add support for exporting YOLOv3 and YOLOv5 segmentation models to ONNX using the EfficientIdxNMS Plugin (efe18ab317ac9acb407ebd644a0653c0d52c0d56)\r\n- refactor: Simplify inference with templates, separate OBB, update bindings (5af55b1887698fb1861f3f26bbba046e22b944e6)\r\n- feat(Segment): Add support YOLO Segmentation inference module with C++ and Python bindings (ee3e2f99ae1a31cb2394b579173a14a582a742af)\r\n- build(Dockerfile): Update to use newer base image (7cf37eef65ecdb214aee1aa9719174f6e7b0074a)\r\n- feat(Segment): Add example for YOLO Segmentation (135d2137e2533ee0055b4f87113cc565eecc1ea5)\r\n- feat(Pose): Add support for exporting Ultralytics Pose models to ONNX using the EfficientIdxNMS Plugin (5fedc5fd5576495d3fbabd6cb7e6027c3eb9d8ee)\r\n- feat(Pose): Add YOLO Pose Estimation inference module with C++ and Python bindings, include example (687b8ea49e9964811cf2c3904623d8f036892a39)\r\n\r\n## Bug Fixes\r\n\r\n- Fix TypeError: milliseconds(): incompatible function arguments. (931e8b120bffc7dbc041ca223f9de63a99c2f30c)\r\n- Fix: Aligned precision (12ea4dad8cbbcd538552b856448785bc9c6c41c9)\r\n- fix: Correct syntax error in xmake.lua (f85339acde65f812c514b29e691ff6d76af66590)\r\n- fix: Fix type mismatch in YOLOv10 detect head (b2900a2aebeb35b23ac6c9e4d81e3636323e9188)\r\n- fix: Corrected the torch.hub.load function to use _verbose=False instead of verbose=False to properly silence the output. (9f2c52e5551799d3ca3bd2a2d267713ec37057e6)\r\n- fix: Address missing imports, dependency issues, and default settings in CLI (05e635521d78a4c1a1199c6bf5a7ed76df802d17)\r\n- fix: Correct rgbPtr comment from BGR to RGB (9488e10ae0b845a3698e61378e391cba64a14aeb)\r\n- fix: Corrected the description of the cudaMem parameter in the comments (d71214120766f8c6a78bda5ab50032281ec1f5cf)\r\n- fix: Replace raise with sys.exit(1) for consistent exception handling (9316089831d064d2e81a198bf870eee62b1fa59f)\r\n- fix(https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fissues\u002F59): Resolved Custom Plugin Error with trtexec for TensorRT versions 10.0.x to 10.1.x (758da3bf07fa18494561097480fc10c2cc10736e)\r\n- fix: Ensure output directory creation is conditional on args.output presence (06a577cc5c82dff77be945193f05732b15cec9f3)\r\n- fix: Resolve metadata inconsistency in onnx-simplifier package installation (1d9a7a42089a5af4f6634bac73082d470a6b53f7)\r\n- feat(Pose): Adapt code to support 2D and 3D keypoint coordinates (7922d89e89c7933db13b944439991be18379a822)\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcompare\u002Fv4.0...v5.0.0","2024-11-21T06:27:06",{"id":131,"version":132,"summary_zh":133,"released_at":134},71114,"v4.0","## Breaking Changes\r\n\r\n- Add Dockerfile for building project Docker image (73060db40af205aeb2fd81d144294f2efd09f95f)\r\n- Add support for YOLOv3 and Ultralytics model export (8f2af943b058cd143647658acdcc26eb31648503)\r\n- Added Support for YOLOv10 (62071cb0993b87220243b8f9aaa35fe98b6917d1)\r\n- Refactor deploy library (8a4df3369e6e35fec2ce0baf8a3758457f45642f)\r\n- Use CUDA Graph to Accelerate Static Model Inference (3576c78d5063a8d1a00544a9e0472b4a8af45389)\r\n- Refactor: Add BaseDet base class, refactor DeployDet and DeployCGDet (416e77b64748d3f69159e6674ea13b90283c3716)\r\n- Add streaming video support using VideoPipe (https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fissues\u002F17, https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fissues\u002F19)\r\n- feat: major update with pybind11 integration and new 4.0 tag (3244eeaf69b69a5db7d7f6458cfe8e707809c70e)\r\n\r\n## Bug Fixes\r\n\r\n- Fix incorrect time interval calculation (a3dee2a16f2ac2635970f5c68d168de292768b03)\r\n- Fix: Include `\u003Ccstring>` to resolve \"memcpy is not a member of std\" error in Linux (1b763d97bed8eb3e19b70e4aa96a497149a3efed)\r\n- Update detection output variable names for clarity (fe67b018e946b18a123f1b0b4468cb28abcd5d39)\r\n- Add `cstdint` to resolve Linux compilation issue (f602dc424547e66e7bffe747def81c31f6a61519)\r\n- Fix: Graph input and output tensors must include dtype information. (2cacb7d1cc3dbbc4cb8a0ddc581a2cccc7a6b783)\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcompare\u002Fv3.0...v4.0","2024-07-05T14:39:16",{"id":136,"version":137,"summary_zh":138,"released_at":139},71115,"v3.0","## Breaking Changes\r\n\r\n- Add TensorRT INT8 PTQ support (87f67ffbfffe002cbed5d1a42afd0f55f744faa2)\r\n- Add C++ inference implementation (0f3069f8955e3ce2f20be5a85498efded1e8aeec)\r\n- Implemented parallel preprocessing with multiple streams (86d6175a21c9ed87d1dcf46ef65e18e3f8b5cd5a)\r\n- Refactor C++ inference code to support dynamic and static libraries (425a1a48e2c3d56529837951eddd98c0b89c170a)\r\n- Refactored Python code related to TensorRT-YOLO and packaged it as tensorrt_yolo. (a10ebc87973b3fa925d4bc1d7e8d4dc397d500c1)\r\n\r\n## Bug Fixes\r\n\r\n- Fix batch visualize bug (9125219ea8ea02adf16d3a3fd4d16bbb056a50b4)\r\n- Remove deleted move constructor and move assignment operator (e287342884285d406a0985d6ec03f13475b2a9b9)\r\n- Fix duplicate imports (1237e21c458c43e00aa7fd3938fd9d42b91b4cde)\r\n- Fix bug (24ea950b31f6c73ff9bd853034310da45d45c02b)\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcompare\u002Fv2.0...v3.0","2024-04-23T11:33:13",{"id":141,"version":142,"summary_zh":143,"released_at":144},71116,"v2.0","## Breaking Changes\r\n\r\n- Implement YOLOv9 Export to ONNX and TensorRT with EfficientNMS Plugin (249bfab3e5ca59d6ab3a05491955fcf26adaf6ae)\r\n- Remove FLOAT16 ONNX export and add support for Dynamic Shape export (9ec1f291f9fb417827b10228c6c7cb8f2e944f43)\r\n- Enable dynamic shape inference with CUDA Python and TensorRT 8.6.1 for inference (328645029f3b86c1f733e35c269b6cd673f88212)\r\n\r\n## Bug Fixes\r\n\r\n- Fix bounding boxes rescales bug (0f90cd0a77117b7923a7c4c8b70b828bccf153f6)\r\n- Fix AttributeError in YOLOv9 Model Export (#8)\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcompare\u002Fv1.0...v2.0","2024-03-23T05:06:31",{"id":146,"version":147,"summary_zh":148,"released_at":149},71117,"v1.0","## Breaking Changes\r\n\r\n- Supports FLOAT32, FLOAT16 ONNX export, and TensorRT inference\r\n- Supports YOLOv5, YOLOv8, PP-YOLOE, and PP-YOLOE+\r\n- Integrates EfficientNMS TensorRT plugin for accelerated post-processing\r\n- Utilizes CUDA kernel functions to accelerate preprocessing\r\n- Supports Python inference\r\n\r\n## Bug Fixes\r\n\r\n- Fix pycuda.driver.CompileError on Jetson (#1)\r\n- Fix Engine Deserialization Failed using YOLOv8 Exported Engine (#2)\r\n- Fix Precision Anomalies in YOLOv8 FP16 Engine (#3)\r\n- Fix YOLOv8 EfficientNMS output shape abnormality (0e542ee732b176590732fa013693cfc2417a8c5c)\r\n- Fix trtexec Conversion Failure for YOLOv5 and YOLOv8 ONNX Models on Linux) (#4)\r\n- Fix Inference Anomaly Caused by preprocess.cu on Linux (#5)\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Flaugh12321\u002FTensorRT-YOLO\u002Fcommits\u002Fv1.0","2024-02-28T13:35:30",[151,161,170,178,186,199],{"id":152,"name":153,"github_repo":154,"description_zh":155,"stars":156,"difficulty_score":157,"last_commit_at":158,"category_tags":159,"status":85},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[67,66,160],"Agent",{"id":162,"name":163,"github_repo":164,"description_zh":165,"stars":166,"difficulty_score":84,"last_commit_at":167,"category_tags":168,"status":85},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,"2026-04-05T23:32:43",[67,160,169],"语言模型",{"id":171,"name":172,"github_repo":173,"description_zh":174,"stars":175,"difficulty_score":84,"last_commit_at":176,"category_tags":177,"status":85},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[67,66,160],{"id":179,"name":180,"github_repo":181,"description_zh":182,"stars":183,"difficulty_score":84,"last_commit_at":184,"category_tags":185,"status":85},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[67,169],{"id":187,"name":188,"github_repo":189,"description_zh":190,"stars":191,"difficulty_score":84,"last_commit_at":192,"category_tags":193,"status":85},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[66,194,195,196,160,197,169,67,198],"数据工具","视频","插件","其他","音频",{"id":200,"name":201,"github_repo":202,"description_zh":203,"stars":204,"difficulty_score":157,"last_commit_at":205,"category_tags":206,"status":85},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[160,66,67,169,197]]