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的开发的更多相关文章

  1. TensorRT 7.2.1开发初步

    TensorRT 7.2.1开发初步 TensorRT 7.2.1开发人员指南演示了如何使用C ++和Python API来实现最常见的深度学习层.它显示了如何采用深度学习框架构建现有模型,并使用该模 ...

  2. TensorRT 7.2.1 开发概要(下)

    TensorRT 7.2.1 开发概要(下) 1.2. Where Does TensorRT Fit? 一般来说,开发和部署深度学习模型的工作流要经过三个阶段. Phase 1 is trainin ...

  3. TensorRT 7.2.1 开发概要(上)

    TensorRT 7.2.1 开发概要(上) Abstract 这个TysRR7.2.1开发者指南演示了如何使用C++和Python API来实现最常用的深层学习层.它展示了如何使用深度学习框架构建现 ...

  4. [Open Source]基于YOLOv3与Django框架的Web应用-YOLOv3_Detect_Web

    YOLOv3_Detect_Web Use Yolov3 detect on Web 使用 YOLOv3(PyTorch 和 Django 实现)的对象检测应用程序. 网页和 REST API由Dja ...

  5. 基于Laravel+Swoole开发智能家居后端

    基于Laravel+Swoole开发智能家居后端 在上一篇<Laravel如何优雅的使用Swoole>中我已经大概谈到了Laravel结合Swoole的用法. 今天,我参与的智能家居项目基 ...

  6. 优分享VR开源啦,优分享VR是基于Google VR开发的一款手机VR视频资源的聚合软件

    欢迎来到优分享VR开源项目 优分享VR 开源中国Git地址: http://git.oschina.net/xumingwang/youkes_vr 优分享VR是 优分享安卓APP VR视频播放开源部 ...

  7. SCADESuite嵌入式软件基于模型的开发

    SCADE Suite®产品是针对高安全性嵌入式软件的基于模型的开发环境 SCADE Suite是高安全性嵌入式软件的开发标准,其应用领域涵盖航空.国防.轨道交通.能源和重工业.专为最高等级的质量和安 ...

  8. 与众不同 windows phone (31) - Communication(通信)之基于 Socket UDP 开发一个多人聊天室

    原文:与众不同 windows phone (31) - Communication(通信)之基于 Socket UDP 开发一个多人聊天室 [索引页][源码下载] 与众不同 windows phon ...

  9. 与众不同 windows phone (30) - Communication(通信)之基于 Socket TCP 开发一个多人聊天室

    原文:与众不同 windows phone (30) - Communication(通信)之基于 Socket TCP 开发一个多人聊天室 [索引页][源码下载] 与众不同 windows phon ...

随机推荐

  1. [CTF]ROT5/13/18/47位移密码

    [CTF]ROT5/13/18/47位移密码 ---------------转换网站 https://www.qqxiuzi.cn/bianma/ROT5-13-18-47.php ROT5:只对数字 ...

  2. [CTF]ACSII码

    [CTF]ACSII码 ----------转自百度百科 https://baike.baidu.com/item/ASCII/309296?fromtitle=ascii码&fromid=9 ...

  3. SqlServer数据库主从同步

    分发/订阅模式实现SqlServer主从同步 在文章开始之前,我们先了解一下几个关键的概念: 分发服务器分发服务器是负责存储在同步过程中所用复制信息的服务器.可以比喻成报刊发行商. 分发数据库分发数据 ...

  4. angr脚本——以angrctf解题记录为参考

    angr脚本--以angrctf解题记录为参考 ​ angr是用于逆向工程中进行二进制分析的一个python框架 ​ 符号执行 (Symbolic Execution)是一种程序分析技术.其可以通过分 ...

  5. 【实用小技巧】Access denied for user 'root'@'localhost' 报错解决

    到mysql安装目录修改my.ini文件,在文件末尾追加一句 skip-grant-tables 然后重启mysql服务即可

  6. 【SpringMVC】数据校验时,抛出javax.validation.UnexpectedTypeException: HV000030: No validator could be found for type: java.util.Date.

    老魏原创,转载请留言. 原因:给Javabean中的字段注解多余或者错误导致. @NotEmpty @Past @DateTimeFormat(pattern="yyyy-MM-dd&quo ...

  7. MongoDB评论管理

    MongoDB简介 文章评论数据分析 相较于一般数据,文章评论一般有如下特点: 数据量巨大.通常评论量要比帖子.文章大很多 写入操作频繁. 价值较低.一般来说,我们的主要目标还是在帖子(文章)本身. ...

  8. 逆向工程初步160个crackme-------3

    这个Crackme3 涉及到浮点指令以及浮点数的存储与运算,我没学习过浮点指令,不得不从网上恶补了1个小时,一边看汇编指令一边百度其指令含义. 回头得好好补补这方面的知识了,太菜了! 我大致了解了一下 ...

  9. 看完这篇包你进大厂,实战即时聊天,一文说明白:聊天服务器+聊天客户端+Web管理控制台。

    一.前言 说实话,写这个玩意儿是我上周刚刚产生的想法,本想写完后把代码挂上来赚点积分也不错.写完后发现这东西值得写一篇文章,授人予鱼不如授人以渔嘛(这句话是这么说的吧),顺便赚点应届学生MM的膜拜那就 ...

  10. 2020中国大学生程序设计竞赛(CCPC) - 网络选拔赛总结

    1003 Express Mail Taking 题意:有n个柜子(编号1-n),m封信,k号位置有钥匙,现在需要取信封,并且每取一次信封都要从k号位置进行领取一次钥匙,再去有信封的位置领取信封,问最 ...