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.04TensorRT 5.0.2.6/4.0.1.6CUDA 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.04TensorRT 5.0.2.6/4.0.1.6CUDA 9.2

About Wraper

you can use the wrapper like this:

//normalstd::vector<std::vector> calibratorData;trtNet net(“vgg16.prototxt”,“vgg16.caffemodel”,{“prob”},calibratorData);//fp16trtNet net_fp16(“vgg16.prototxt”,“vgg16.caffemodel”,{“prob”},calibratorData,RUN_MODE:FLOAT16);//int8trtNet net_int8(“vgg16.prototxt”,“vgg16.caffemodel”,{“prob”},calibratorData,RUN_MODE:INT8); //run inference:net.doInference(input_data.get(), outputData.get()); //can print time costnet.printTime(); //can write to engine and load From enginenet.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 classificationcd samplemkdir buildcd build && cmake … && make && make installcd …/install/runNet --caffemodel=CAFFEMODELNAME−−prototxt={CAFFE_MODEL_NAME} --prototxt=CAFFEM​ODELN​AME−−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. 基于Yolo-V3对卫星图像进行储油罐容积占用率的研究

    点击上方"3D视觉工坊",选择"星标" 干货第一时间送达 在1957年以前,地球上只有一颗天然卫星:月球.1957年10月4日,苏联发射了世界上第一颗人造卫星, ...

  5. 基于yolov3的行人目标检测算法在图像和视频中识别检测

    资源下载地址:https://download.csdn.net/download/sheziqiong/85772186 资源下载地址:https://download.csdn.net/downl ...

  6. 为什么您应该使用基于标准的开发实践

    为什么您应该使用基于标准的开发实践 Why you should use standards-based development practices (even if you don't have t ...

  7. 应用基于资产的开发到 SOA 的服务中1

    SOA 的主要原则之一是在整个 SOA 生命周期中将服务视为可重用资产.因此,务必在 SOA 中对服务应用正式的资产开发流程和指南.本文可帮助 IT 架构师.项目经理和 SOA 管理员全面了解一些主要 ...

  8. mysql for循环_基于Swoole扩展开发异步高性能的MySQL代理服务器

    MySQL数据库对每个客户端连接都会分配一个线程,所以连接非常宝贵.开发一个异步的MySQL代理服务器,PHP应用服务器可以长连接到这台Server,既减轻MYSQL的连接压力,又使PHP保持长连接减 ...

  9. 基于.Net Core开发现代化Web应用程序系列课程和文章

    这个系列课程是Anduin2017在B站上传的: 基于.Net Core开发现代化Web应用程序系列课程第1课之:课程简介 基于.Net Core开发现代化Web应用程序系列课程第2课之:.Net平台 ...

最新文章

  1. springboot配置Redis哨兵主从服务 以及 Redis 集群
  2. oracle 优化逻辑读过高,详述逻辑读与arraysize的关系
  3. Ubuntu上安装显卡驱动
  4. 昨天又写到个结构体排序,用多种cmp
  5. python正则表达式匹配模式屠夫之桥_Python 编程快速上手 第 7章 模式匹配与正则表达式...
  6. RabbitMQ集群、镜像部署配置
  7. logo自动旋转 html,HTML/CSS3 Logo选择器
  8. http --- 路由器缓存与常见的状态码
  9. Mybatis入门(一)
  10. iptables说明(转)
  11. 20151209小问题
  12. 【Landsat 8】遥感影像文件内容及命名规则
  13. paip.c#图片裁剪
  14. BZOJ5294 BJOI2018 二进制 线段树
  15. SR-IOV虚拟出来的网卡如何被VPP(DPDK)接管
  16. Ureal:用ue4做出游戏中的爆炸特效真实感和力量感
  17. 文本生成 | 一篇带风格的标题生成的经典工作
  18. ESP8266 NodeMCU Web 服务器:在仪表盘中显示传感器读数
  19. 培养自己的核心竞争力
  20. VLAN网络支持ipv6的交换机和虚机配置

热门文章

  1. 2022-2028年中国数字乡村建设深度调研及投资前景预测报告
  2. 面向过程(或者叫结构化)分析方法与面向对象分析方法到底区别在哪里?
  3. LeetCode简单题之数组异或操作
  4. LeetCode简单题之到目标元素的最小距离
  5. ONNX MLIR应用示例(含源码链接)
  6. AIFramework框架Jittor特性(上)
  7. KITTI数据集上MaskRCNN检测效果示例
  8. Linux内存技术分析(上)
  9. 如何评估两张图片的差异
  10. python 往excel 里面写数据