Skip to content

ONNX model, dependency to pytorch #381

Answered by zhiqwang
joihn asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @joihn , it depends on your needs here, the C++ interface https://github.com/zhiqwang/yolov5-rt-stack/tree/main/deployment/tensorrt doesn't rely on PyTorch, but we use some functions of PyTorch to implement the pre-processing part of the Python inference interface
https://github.com/zhiqwang/yolov5-rt-stack/blob/0c88e4f44646092078d5d55caed575dc2d26823d/yolort/runtime/y_tensorrt.py#L193-L194

So you can totally remove the PyTorch dependencies if you use the OpenCV and pycuda to do the pre-processing. In other words, it actually means that you need to rewrite the pre-processing of PredictorTRT with OpenCV and pycuda, which is a relatively minor effort. Check TensorRT samples here https://…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zhiqwang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants