石家庄求职,前任爹地妈咪好新鲜,混战学院2
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可参考:
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/cw-zero/tensorrt_yolo3
(注:本项目是对pytorch-yolo3进行改写加速的)
more about tensorrt 可参考官方指导:
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
linux下文本编辑器vim的使用方法(复制、粘贴、替换、行号、撤销、多文件操作)
网友评论