Skip to content
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 TFLite Segment inference #13488

Merged
merged 2 commits into from
Jan 12, 2025
Merged

Conversation

Y-T-G
Copy link
Contributor

@Y-T-G Y-T-G commented Jan 11, 2025

Reported ultralytics/ultralytics#18632

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced model output handling and minor code readability improvements for error messages.

πŸ“Š Key Changes

  • Fixed potential output order issues in model segmentation results when using reversed (det, proto) output order. πŸ› οΈ
  • Improved code readability by adjusting how error/assertion messages are written throughout various files. πŸ“œ

🎯 Purpose & Impact

  • Purpose: The segmentation fix ensures the correct interpretation of model outputs in all scenarios, improving reliability during inference. Error message changes make code easier to read and debug.
  • Impact: Users benefit from more robust model behavior and clearer error handling, especially during debugging or when dealing with incorrect input data.

@UltralyticsAssistant UltralyticsAssistant added bug Something isn't working exports Model exports (ONNX, TensorRT, TFLite, etc.) segment Instance Segmentation issues, PR's labels Jan 11, 2025
@UltralyticsAssistant
Copy link
Member

πŸ‘‹ Hello @Y-T-G, thank you for submitting your ultralytics/yolov5 πŸš€ PR! We appreciate your efforts and contributions to improving the project. To facilitate the review process and ensure a smooth integration, please review the following checklist:

  • βœ… Clearly Define the Purpose: Please provide a detailed explanation of the problem your PR solves or the feature it introduces. If this relates to a reported issue, ensure it is linked, as you've done here with issue #18632. Commit messages should be clear, concise, and descriptive.
  • βœ… Sync with Latest Code: Ensure your branch is based on and up-to-date with the main branch of the repository. If needed, run git pull and resolve any conflicts locally.
  • βœ… Pass CI Tests: Verify that all CI checks pass. You can find more about our Continuous Integration (CI) process. Should any tests fail, please investigate and address the errors accordingly.
  • βœ… Update Documentation: If your code introduces new features or changes existing ones, ensure that related documentation is updated to reflect these changes.
  • βœ… Add or Update Tests: Include tests that validate your implementation and confirm all tests pass successfully.
  • βœ… Sign the CLA: If you haven’t done so, please sign the Contributor License Agreement (CLA) by commenting "I have read the CLA Document and I sign the CLA" in this pull request.

Request for Clarification

Since this PR fixes an important issue in TFLite segmentation inference, we’d like to confirm that it addresses all use cases. If possible, could you provide a minimum reproducible example (MRE) showcasing how the issue occurs and is resolved by your changes? This ensures the robustness of the proposed solution for current and future use cases. 😊

For additional guidance, refer to our Contributing Guide. Please don't hesitate to comment if you need any assistanceβ€”an Ultralytics engineer will review your PR soon. πŸš€ Thank you for being a part of the Ultralytics community! πŸŽ‰

@glenn-jocher glenn-jocher merged commit 6420a1d into ultralytics:master Jan 12, 2025
7 checks passed
@UltralyticsAssistant
Copy link
Member

πŸŽ‰ Your PR has officially been merged, @Y-T-G – thank you for your amazing contributions! πŸ™Œ

By improving model output handling and sharpening code readability, you've paved the way for better reliability and clarity for everyone who relies on these tools. Your work ensures that even in the face of errors, understanding and debugging become a smoother journey for all.

As Marcus Aurelius once said, "What stands in the way becomes the way." Your thoughtful improvements transform challenges into opportunities, making the tools we build together stronger and more effective. πŸš€

Keep up the incredible work – your code is making a real difference! ❀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exports Model exports (ONNX, TensorRT, TFLite, etc.) segment Instance Segmentation issues, PR's
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants