# TensorRT-YOLOv6
This repo provides the C++ implementation of [YOLOv6](https://github.com/meituan/YOLOv6) based on TensorRT for performing object detection in real-time.
<p align="center">
<img src="result.gif" />
</p>
## Environment
- Windows 10
- Visual Studio 2017
- RTX 3070 GPU
- TensorRT 7.2.1.6
- CUDA 11.1, Cudnn 8
- OpenCV 4.5.1 with CUDA
## Benchmark
The following result was obtained after performing inference 1000 iterations. It includes image pre-processing, model inference and post-processing (non-max suppression) times. The resolution of the test [video](https://www.mediafire.com/file/kwxxa772ly4yy2t/test.mp4/file) was 1280x720.
| Model | Device | Mode | Input Shape(HxW) | FPS |
|-|-|:-:|:-:|:-:|
| YOLOv6-n | RTX3070 | FP16 | 640x640 | 214 |
| YOLOv6-n | RTX3070 | FP32 | 640x640 | 165 |
| YOLOv6-tiny | RTX3070 | FP16 | 640x640 | 193 |
| YOLOv6-tiny | RTX3070 | FP32| 640x640 | 128 |
| YOLOv6-s | RTX3070 | FP16 | 640x640 | 130 |
| YOLOv6-s | RTX3070 | FP32 | 640x640 | 115 |
## Tutorial
- Step1: Download a pretrained onnx model from the YOLOv6 [release](https://github.com/meituan/YOLOv6/releases/tag/0.1.0)
- Step2: Open the solution with Visual Studio and select `x64` and `Release` for the configuration
- Step3: Go to where function `initializeSampleParams()` is defined and modify the parameters
```cpp
// The engine file to generate or to load
// The engine file does not exist:
// This program will try to load onnx file and convert onnx into engine
// The engine file exists:
// This program will load the engine file directly
params.engingFileName = "yolov6s.engine";
// The onnx file to load
params.onnxFileName = "yolov6s.onnx";
// Number of classes (usually 80, but can be other values)
params.outputClsSize = 80;
// Input video filename
params.inputVideoName = "test.mp4";
// Model class filename
params.cocoClassNamesFileName = "coco.names";
// Threshold values
params.confThreshold = 0.3;
params.nmsThreshold = 0.5;
// Floating point precision
// By default, fp32
params.fp16 = true;
```
## Todo
- [x] Benchmark Test with different yolov6 versions
- [x] Documentation
- [x] Fix arguments
## Reference
- [yolov4_deepstream](https://github.com/NVIDIA-AI-IOT/yolov4_deepstream/tree/master/tensorrt_yolov4)
- [yolov6](https://github.com/meituan/YOLOv6)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论





























收起资源包目录




















共 16 条
- 1
资源评论


智慧安全方案
- 粉丝: 3927
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 电子商务产业园企业入驻协议样板.doc
- 深度学习的来源与应用.pptx
- 电子商务平台核心技术复习题.doc
- Unit5IntothewildUnderstandingideas分层练习高一英语(2019).x.docx
- 在游戏Valorant中实现Yolov CUDA GPU使用Arduino Leonardo R USB主机屏蔽,并使用
- 基于android环境的俄罗斯方块-毕业(论文)设计.doc
- 开拓网络电话话务业务合作协议.docx
- 中小企业网络规划与.doc
- excel表格编辑器在excel表格怎样设置禁止编辑图文教程.doc
- 基于嵌入式画图板的设计与实现.doc
- 网络产品代理销售协议范本最新整理版.doc
- 课时5PresentingideasReflection.pptx
- 智慧城市建设方案(最全版).pptx
- 基于Yolo的汽车检测,然后在OpenCV C上使用自定义算法进行跟踪_Yolo based car detection
- 数学新设计湘教版必修五讲义第十一章算法初步11-2-2.docx
- 基于51单片机的数字温度计毕业(设计)论文.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
