yolov5-onnxruntime icon indicating copy to clipboard operation
yolov5-onnxruntime copied to clipboard

Integrate with TensorRT?

Open rtrahms opened this issue 2 years ago • 1 comments

I tried out your sample - very cool! I get 110 FPS with a YOLOv5s running CUDA 11.5 on my 1080ti. I am curious what it would take to evaluate performance with TensorRT. Have you tried this? Any pointers? Thanks.

rtrahms avatar Dec 28 '21 21:12 rtrahms

There are two ways to integrate the TensorRT to this project

  1. Use the TensorRT-ExecutionProvider provided by ONNX Runtime, this is simple and can be integrated into this project seamlessly.
  2. Use the vanilla TensorRT-OSS, we can also use ONNX and the TRT Engine exported by YOLOv5.

For the second option, we can also embed the post-processing plugin provided by TRT-OSS with the onnx-graphsurgeon at the end of the exported ONNX graph, we have done some experiments on yolort. And this can reduce the difficulties of deploying. The remaining things that need to do is to implement the pre-processing transformation already available in this project.

zhiqwang avatar Dec 29 '21 16:12 zhiqwang