TensorRT 基于Yolov3的开发
TensorRT 基于Yolov3的开发
Models
Desc
tensorRT for Yolov3
https://github.com/lewes6369/TensorRT-Yolov3
Test Enviroments
Ubuntu 16.04
TensorRT 5.0.2.6/4.0.1.6
CUDA 9.2
下载官方模型转换的caffe模型:
百度云pwd:gbue
谷歌drive
如果运行模型是自己训练的,注释“upsample_param”块,并将最后一层的prototxt修改为:
Download the caffe model converted by official model:
Baidu Cloud here pwd: gbue
Google Drive here
If run model trained by yourself, comment the "upsample_param" blocks, and modify the prototxt the last layer as:
layer {
#the bottoms are the yolo input layers
bottom: "layer82-conv"
bottom: "layer94-conv"
bottom: "layer106-conv"
top: "yolo-det"
name: "yolo-det"
type: "Yolo"
}
如果不同的内核,还需要更改“YoloConfigs.h”中的yolo配置。
Run Sample
#build source code
git submodule update --init --recursive
mkdir build
cd build && cmake .. && make && make install
cd ..
#for yolov3-608
./install/runYolov3 --caffemodel=./yolov3_608.caffemodel --prototxt=./yolov3_608.prototxt --input=./test.jpg --W=608 --H=608 --class=80
#for fp16
./install/runYolov3 --caffemodel=./yolov3_608.caffemodel --prototxt=./yolov3_608.prototxt --input=./test.jpg --W=608 --H=608 --class=80 --mode=fp16
#for int8 with calibration datasets
./install/runYolov3 --caffemodel=./yolov3_608.caffemodel --prototxt=./yolov3_608.prototxt --input=./test.jpg --W=608 --H=608 --class=80 --mode=int8 --calib=./calib_sample.txt
#for yolov3-416 (need to modify include/YoloConfigs for YoloKernel)
./install/runYolov3 --caffemodel=./yolov3_416.caffemodel --prototxt=./yolov3_416.prototxt --input=./test.jpg --W=416 --H=416 --class=80
Desc
tensorRT for Yolov3
Test Enviroments
Ubuntu 16.04
TensorRT 5.0.2.6/4.0.1.6
CUDA 9.2
Performance

Eval Result
用appending附件编译上面的模型模型--evallist=labels.txt
从val2014中选择的200张图片制作的int8校准数据(见脚本目录)

提示注意:
在yolo层和nms中,caffe的实现没有什么不同,应该与tensorRT fp32的结果相似。
Details About Wrapper
see
link TensorRTWrapper
https://github.com/lewes6369/tensorRTWrapper
TRTWrapper
Desc
a wrapper for tensorRT net (parser caffe)
Test Environments
Ubuntu 16.04
TensorRT 5.0.2.6/4.0.1.6
CUDA 9.2
About Wraper
you can use the wrapper like this:
//normal
std::vector<std::vector<float>> calibratorData;
trtNet net("vgg16.prototxt","vgg16.caffemodel",{"prob"},calibratorData);
//fp16
trtNet net_fp16("vgg16.prototxt","vgg16.caffemodel",{"prob"},calibratorData,RUN_MODE:FLOAT16);
//int8
trtNet net_int8("vgg16.prototxt","vgg16.caffemodel",{"prob"},calibratorData,RUN_MODE:INT8);
//run inference:
net.doInference(input_data.get(), outputData.get());
//can print time cost
net.printTime();
//can write to engine and load From engine
net.saveEngine("save_1.engine");
trtNet net2("save_1.engine");
when you need add new plugin ,just add the plugin code to pluginFactory
Run Sample
#for classification
cd sample
mkdir build
cd build && cmake .. && make && make install
cd ..
./install/runNet --caffemodel=${CAFFE_MODEL_NAME} --prototxt=${CAFFE_PROTOTXT} --input=./test.jpg
TensorRT 基于Yolov3的开发的更多相关文章
- TensorRT 7.2.1开发初步
TensorRT 7.2.1开发初步 TensorRT 7.2.1开发人员指南演示了如何使用C ++和Python API来实现最常见的深度学习层.它显示了如何采用深度学习框架构建现有模型,并使用该模 ...
- TensorRT 7.2.1 开发概要(下)
TensorRT 7.2.1 开发概要(下) 1.2. Where Does TensorRT Fit? 一般来说,开发和部署深度学习模型的工作流要经过三个阶段. Phase 1 is trainin ...
- TensorRT 7.2.1 开发概要(上)
TensorRT 7.2.1 开发概要(上) Abstract 这个TysRR7.2.1开发者指南演示了如何使用C++和Python API来实现最常用的深层学习层.它展示了如何使用深度学习框架构建现 ...
- [Open Source]基于YOLOv3与Django框架的Web应用-YOLOv3_Detect_Web
YOLOv3_Detect_Web Use Yolov3 detect on Web 使用 YOLOv3(PyTorch 和 Django 实现)的对象检测应用程序. 网页和 REST API由Dja ...
- 基于Laravel+Swoole开发智能家居后端
基于Laravel+Swoole开发智能家居后端 在上一篇<Laravel如何优雅的使用Swoole>中我已经大概谈到了Laravel结合Swoole的用法. 今天,我参与的智能家居项目基 ...
- 优分享VR开源啦,优分享VR是基于Google VR开发的一款手机VR视频资源的聚合软件
欢迎来到优分享VR开源项目 优分享VR 开源中国Git地址: http://git.oschina.net/xumingwang/youkes_vr 优分享VR是 优分享安卓APP VR视频播放开源部 ...
- SCADESuite嵌入式软件基于模型的开发
SCADE Suite®产品是针对高安全性嵌入式软件的基于模型的开发环境 SCADE Suite是高安全性嵌入式软件的开发标准,其应用领域涵盖航空.国防.轨道交通.能源和重工业.专为最高等级的质量和安 ...
- 与众不同 windows phone (31) - Communication(通信)之基于 Socket UDP 开发一个多人聊天室
原文:与众不同 windows phone (31) - Communication(通信)之基于 Socket UDP 开发一个多人聊天室 [索引页][源码下载] 与众不同 windows phon ...
- 与众不同 windows phone (30) - Communication(通信)之基于 Socket TCP 开发一个多人聊天室
原文:与众不同 windows phone (30) - Communication(通信)之基于 Socket TCP 开发一个多人聊天室 [索引页][源码下载] 与众不同 windows phon ...
随机推荐
- 获取中断描述符表IDT的信息
<pre name="code" class="cpp">//GetIDT.h文件 #ifndef _WIN32_WINNT // Allow us ...
- CentOS8 安装 MySQL8.0(yum)
1.Mysql 官网下载 RPM 包wget https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm2.检查是否已安装 ...
- POJ3160强连通+spfa最长路(不错)
题意: 给你一个有向图,每个点上有一个权值,可正可负,然后给你一些链接关系,让你找到一个起点,从起点开始走,走过的边可以在走,但是拿过权值的点就不能再拿了,问最多能拿到多少权值? 思路: ...
- UVA10763交换学生
题意: 给你N组关系,每组关系是a,b,最后问你所有的a,b出现的次数和所有的b,a出现的此时是否全部都一样. 思路: 水题,直接开了个二维的map标记,map<int ...
- CVE-2013-3346:十全九美的 Adobe Reader ToolButton UAF 漏洞
0x01 "Epic Turla" 网络间谍行动 在 2014 年 8 月,被誉为 "世界十大最危险的网络攻击行动" 之一的 "Epic Turla& ...
- <JVM下篇:性能监控与调优篇>补充:使用OQL语言查询对象信息
笔记来源:尚硅谷JVM全套教程,百万播放,全网巅峰(宋红康详解java虚拟机) 同步更新:https://gitee.com/vectorx/NOTE_JVM https://codechina.cs ...
- (邹博ML)数学分析与概率论
机器学习入门 深度学习和机器学习? 深度学习在某种意义上可以认为是机器学习的一个分支,只是这个分支非常全面且重要,以至于可以单独作为一门学科来进行研究. 回忆知识 求解S. 对数函数的上升速度 我们使 ...
- Redis数据结构—跳跃表
目录 Redis数据结构-跳跃表 跳跃表产生的背景 跳跃表的结构 利用跳跃表查询有序链表 Redis跳跃表图示 Redis跳跃表数据结构 小结 Redis数据结构-跳跃表 大家好,我是白泽,最近学校有 ...
- [敏杰开发]Beta阶段测试报告
[敏杰开发]Beta阶段测试报告 这是一篇软工课程博客 项目 内容 课程:北航-2020-春-软件工程 博客园班级博客 作业要求 Beta阶段测试报告 我们在这个课程的目标是 测试项目 这个作业在哪个 ...
- 什么是NPS 客户净推荐值?
客户忠诚是企业在客户服务方面的最高目标. 客户是否忠诚通过一个问题即可判断,那就是--你会把这家企业推荐给朋友的可能性有多大?这就是著名的NPS指标,本文希望能讲清NPS客户净推荐值是什么,用好客服系 ...