ChargedMonk/Social-Distancing-using-YOLOv5

How to convert to model TensorRT

Falconpunchzz opened this issue · 1 comments

Hello, I want to optimize model by convert model to TensorRT

But I'm not familiar with pytorch, so I don't know how to do it.

Do I need to modify the entire code to apply tensorrt optimization to the current source code?

And I wonder what I would do if I could accelerate with tensorrt.

Thank you for your good code! :)

Hello, I read your question and it seems I have the solution for you, basically you need to convert this PyTorch based model into ONNX.
ONNX stands for Open Neural Network Exchange. It is an open format built to represent machine learning models. all major ML platforms such as TensorRT or Pytorch supports this, developing in ONNX has many advantages such as your model can be converted to any platform. For your help I found a quick reference to a link which may give you a head start to achieve what you want!