ultralytics / ultralytics

Ultralytics YOLO11 πŸš€
https://docs.ultralytics.com
GNU Affero General Public License v3.0
36.57k stars 7.05k forks source link

Optimize `seg_bbox` calculations #19056

Closed RizwanMunawar closed 1 week ago

RizwanMunawar commented 1 week ago

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved the seg_bbox function in plotting utilities for better handling and rendering of labels. πŸ–ŒοΈ

πŸ“Š Key Changes

🎯 Purpose & Impact

UltralyticsAssistant commented 1 week ago

πŸ‘‹ Hello @RizwanMunawar, thank you for submitting an ultralytics/ultralytics πŸš€ PR! Your contribution to improving the seg_bbox calculations is appreciated. To ensure a smooth review process, please go over the following checklist:

We noticed your PR focuses on optimizing the logic for segmentation bounding box labels, specifically improving performance and clarity by avoiding redundant calculations for absent labels. This enhancement not only cleans up the code but ensures a smoother developer experience! πŸ› οΈπŸŽοΈ Lovely job documenting the changes in your PR description as well. πŸ™Œ

If you haven’t already, please refer to our Contributing Guide to double-check everything required is in place. Feel free to reply here if you have any questions or think further adjustments are needed.

This is an automated response πŸ€– to assist you in streamlining the contribution process, but rest assured an Ultralytics engineer will review your PR shortly. Thanks for being a part of our open-source community! πŸš€

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.11%. Comparing base (5bca934) to head (21ad03f). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ultralytics/utils/plotting.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #19056 +/- ## ========================================== + Coverage 73.07% 73.11% +0.04% ========================================== Files 129 129 Lines 17485 17485 ========================================== + Hits 12777 12785 +8 + Misses 4708 4700 -8 ``` | [Flag](https://app.codecov.io/gh/ultralytics/ultralytics/pull/19056/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | Coverage Ξ” | | |---|---|---| | [Benchmarks](https://app.codecov.io/gh/ultralytics/ultralytics/pull/19056/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | `34.12% <0.00%> (+0.03%)` | :arrow_up: | | [GPU](https://app.codecov.io/gh/ultralytics/ultralytics/pull/19056/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | `37.94% <0.00%> (ΓΈ)` | | | [Tests](https://app.codecov.io/gh/ultralytics/ultralytics/pull/19056/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics) | `66.90% <0.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ultralytics#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

UltralyticsAssistant commented 1 week ago

🌟 Amazing work, @RizwanMunawar and @glenn-jocher! Your collaboration on improving the seg_bbox function is truly appreciated. πŸš€

"In the middle of every difficulty lies opportunity." – Albert Einstein. By carefully optimizing even the smallest details, such as label handling here, you're turning opportunities for improvement into meaningful contributions that enhance the lives of our users. πŸ’‘

Thank you for your thoughtful updates and dedication to clean, efficient code. Your effort doesn't just improve performanceβ€”it inspires excellence. Keep shining! ✨