Yolov--3--TensorRT中yolov3性能优化加速(基于caffe)

Yolov-1-TX2上用YOLOv3训练自己数据集的流程(VOC2007-TX2-GPU)

Yolov--2--一文全面了解深度学习性能优化加速引擎---TensorRT

Yolov--3--TensorRT中yolov3性能优化加速(基于caffe)

yolov-5-目标检测:YOLOv2算法原理详解

yolov--8--Tensorflow实现YOLO v3

yolov--9--YOLO v3的剪枝优化

yolov--10--目标检测模型的参数评估指标详解、概念解析

yolov--11--YOLO v3的原版训练记录、mAP、AP、recall、precision、time等评价指标计算

yolov--12--YOLOv3的原理深度剖析和关键点讲解


一、TX2中TensorRT的安装

https://blog.csdn.net/haoqimao_hard/article/details/81001844

https://github.com/dusty-nv/jetson-inference

平台:英伟达NVIDIA TX2开发板  环境:Ubuntu16.04, python2.7,cuda8.0,cudnn6.0.2.  OpenCV 2.4.13.1

caffe安装教程:

https://www.jianshu.com/p/e78c5c321248?tdsourcetag=s_pcqq_aiomsg

https://github.com/Cw-zero/TensorRT_yolo3

Use TensorRT accelerate yolo3


1. How to run this project

  • a. Download yolo3.weight from this, and change the name to yolov3-608.weights.
  • b. python yolov3_to_onnx.py, you will have a file named yolov3-608.onnx
  • c. python onnx_to_tensorrt.py,you can get the result of detections.

2. Performance compare

  • a.You can download and run this project, which our project is changed from it. It detection speed is about 100ms per image.

  • b.Our project speed is about 62ms per image

3.Others

一、TensorRT支持的模型: 

TensorRT 直接支持的model有ONNX、Caffe、TensorFlow,其他常见model建议先转化成ONNX。总结如下:

1 ONNX(.onnx) 

2 Keras(.h5) --> ONNX(.onnx) (https://github.com/onnx/keras-onnx)

3 Caffe(.caffemodel)

4 Darknet(.cfg) --> ONNX(.onnx) (Our tutorial : yolo-v3)

5 TensorFlow(.uff)

 

二、TensorRT支持的常见运算:

 Activation(激活函数)、Convolution(卷积运算)、Deconvolution(反卷积运算)、FullConnected(全连接)、Padding(填充)、Pooling(池化)、RNN(递归神经网络)、SoftMax()等。

更详细的API可参考:

https://docs.nvidia.com/deeplearning/sdk/tensorrt-api/c_api/classnvinfer1_1_1_i_network_definition.html

 

三、TensorRT加速yolo3

yolo3由CNN网络和detection模块组成,TensorRT只对CNN网络进行Inference加速。即:

TensorRT input is:608*608 image

TensorRT output is:array

  (array[0].shape = 255 *19*19、

   array[1].shape = 255*38*38、

   array[2].shape = 255 *76*76)

具体实现过程:

 1 Darknet(.cfg) --> ONNX(.onnx)

 2 ONNX(.onnx) --> TensorRT model(.trt)

 3 TensorRT加速CNN部分,执行detection模块得到最终结果。

pytorch-yolo3:https://github.com/ayooshkathuria/pytorch-yolo-v3

本项目地址:https://github.com/Cw-zero/TensorRT_yolo3

(注:本项目是对pytorch-yolo3进行改写加速的)

 

四、性能比较:

More about TensorRT 可参考官方指导:

https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#python_example_unsupported


若加微信请备注下姓名_公司/学校,相遇即缘分,感谢您的支持,愿真诚交流,共同进步,谢谢

 


https://github.com/ayooshkathuria/pytorch-yolo-v3

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

明宇朗心

你的鼓励将是我创作的最大动力♥

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值