当前位置: 移动技术网 > 科技>操作系统>Linux > 使用TensorRT加速yolo3

使用TensorRT加速yolo3

2019年02月25日  | 移动技术网科技  | 我要评论

石家庄求职,前任爹地妈咪好新鲜,混战学院2

一、tensorrt支持的模型: 

tensorrt 直接支持的modelonnxcaffetensorflow,其他常见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可参考:

 

三、tensorrt加速yolo3

yolo3cnn网络和detection模块组成,tensorrt只对cnn网络进行inference加速。即:

tensorrt input is608*608 image

tensorrt output isarray

  (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/cw-zero/tensorrt_yolo3

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

 

四、性能比较:

 

 

 

 

 

--------------------------------------------end~我是可爱的分割线~--------------------------------------

more about tensorrt 可参考官方指导:

 

 

 

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网