Open zzzzzyh111 opened 3 weeks ago
I am aware that Python-based TensorRT implementations are significantly slower than those based on C++. I have already made considerable progress on this and plan to open-source it on GitHub soon. Initially, I will be starting with YOLOv8, though I'm not yet certain if it will cover other models. Models with 10M parameters or fewer are expected to have an inference time under 10ms. Currently, YOLOv8n measures approximately 2ms. From what I can see, there doesn't appear to be any issues with your code. If you have cv2.imshow
enabled or any other unnecessary operations, try commenting those out and running it again. Thank you for your interest, and I appreciate the effort you've put into customizing the code! Sorry for the delayed response. I will make sure to keep a closer eye on issues going forward.
If you are interested in TensorRT, I recommend checking out the following repositories:
Thanks for your prompt reply! I will try to deploy it based on C++ and find any potential impacts on my inference speed. I will update you as soon as I have any new information.
Thank you for your excellent work! :satisfied: :satisfied: :satisfied:
Recently, I have been trying to use TensorRT to accelerate Depth Anything on Jetson Orin NX. However, I found that the inference speed of the converted TRT file does not significantly improve compared to the ONNX file, and it even decreases. Specifically:
The library versions are as follows:
The function to convert the .pth file to an ONNX file is as follows:
The function to convert the ONNX file to a TRT file is as follows:
The function to perform inference using the TRT file is as follows:
The code runs without any issues, except for some warnings during the ONNX conversion. However, the final results are still not satisfactory. Looking forward to your response! :heart: :heart: :heart: