-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix bug for trt inference #12209
base: master
Are you sure you want to change the base?
fix bug for trt inference #12209
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Hello @AllenZYJ, thank you for submitting a YOLOv5 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to:
- ✅ Verify your PR is up-to-date with
ultralytics/yolov5
master
branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by runninggit pull
andgit merge master
locally. - ✅ Verify all YOLOv5 Continuous Integration (CI) checks are passing.
- ✅ Reduce changes to the absolute minimum required for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee
@AllenZYJ thanks for bringing this to our attention! We'll review the proposed changes and assess their compatibility with our general code structure. It's great to see the community actively working to improve the YOLOv5 codebase for various inference and deployment scenarios. We appreciate your effort and contribution to making YOLOv5 more versatile. |
thanks, it just a simple modified,and I tested it locally. |
@AllenZYJ your contribution is appreciated, AllenZYJ. We value your testing and input, which helps ensure the stability and functionality of YOLOv5 across diverse deployment scenarios. |
hello,@glenn-jocher,I was wondering if you've been able to complete testing this PR and if everything passed? |
@AllenZYJ Thanks for your patience. I have not been able to test the PR yet, but I will definitely do so at the earliest opportunity. Your effort and the community's support are invaluable in maintaining the stability and functionality of YOLOv5 in diverse deployment scenarios. |
All Contributors have signed the CLA. ✅ |
I have read the CLA Document and I sign the CLA |
@glenn-jocher please review this merge,thank you very much. |
@AllenZYJ Thank you for your contribution! We'll review the merge as soon as possible. Your patience and efforts are much appreciated! 🙌 |
@glenn-jocher hello,can you merged and closed this pr ? or it always in my notifacation list,thank you very much. |
Hi @AllenZYJ, Thank you for your patience and for bringing this to our attention. We understand the importance of keeping your notifications manageable. We will prioritize the review of your PR and aim to merge it as soon as possible if it meets all the necessary criteria. In the meantime, please ensure that your changes are compatible with the latest versions of the dependencies and that the issue is reproducible with the most recent updates. This will help expedite the review process. We appreciate your contribution and understanding. If you have any further questions or updates, feel free to share them here. |
When I was doing inference with ”engine“ on “Nvidia agx” device, I found that ”segment/predict.py“ would report a dimension mismatch error. The reason was that the output branch selection was wrong. This simple change fixes that error, and allows smooth inference on trt devices.
🤖 Generated by Copilot at 19c8663
Summary
🐛🚀🧠
Fix output order bug in
models/common.py
for TensorRT. Hardcode output names to match YOLOv5 output layers.Walkthrough
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
📊 Key Changes
forward
method during TensorRT inference.🎯 Purpose & Impact
🌟 Summary
Fixed a crucial bug in YOLOv5's TensorRT inference to ensure correct output tensors are retrieved, bolstering performance and reliability. 🐛➡️🔧