Yolov-1-TX2上用YOLOv3训练自己数据集的流程(VOC2007-TX2-GPU)
Yolov--2--一文全面了解深度学习性能优化加速引擎---TensorRT
Yolov--3--TensorRT中yolov3性能优化加速(基于caffe)
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
- If you are more familiar with Chinese, you can refer to this blog(https://www.cnblogs.com/justcoder/), which has more details.
一、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可参考:
三、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 可参考官方指导:
若加微信请备注下姓名_公司/学校,相遇即缘分,感谢您的支持,愿真诚交流,共同进步,谢谢~