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 Yolo 8.0.206 scale bug #7821

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Fix Yolo 8.0.206 scale bug #7821

merged 1 commit into from
Jan 25, 2024

Conversation

Alarmod
Copy link
Contributor

@Alarmod Alarmod commented Jan 25, 2024

Fix this bug: #6226

I have read the CLA Document and I sign the CLA

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Refinement of image and mask scaling logic in Ultralytics utility functions.

📊 Key Changes

  • Removed rounding with subtraction/addition of 0.1 when calculating padding in scale_image and scale_masks functions.
  • Simplified the calculation of top, left, bottom, and right by directly using integer casted padding values.

🎯 Purpose & Impact

  • The changes aim to streamline the process of calculating padding, ensuring it's more straightforward and less error-prone.
  • Users can expect more consistent scaling behavior of images and masks, which may positively influence the performance of models that rely on these utility functions.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improved accuracy in image padding logic for machine learning operations.

📊 Key Changes

  • Removed the rounding operation with a subtracted 0.1 when calculating padding for image and mask scaling.
  • Standardized the use of integer conversion for top, left, bottom, and right variables.

🎯 Purpose & Impact

  • Ensures more precise image and mask scaling by avoiding small discrepancies caused by rounding operations.
  • This could result in more accurate object detection and segmentation when using Ultralytics tools and frameworks, potentially improving the performance of AI models for end-users.

Copy link

github-actions bot commented Jan 25, 2024

CLA Assistant Lite bot All Contributors have signed the CLA. ✅

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Hello @Alarmod, thank you for submitting an Ultralytics YOLOv8 🚀 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/ultralytics main branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • ✅ Verify all YOLOv8 Continuous Integration (CI) checks are passing.
  • ✅ Update YOLOv8 Docs for any new or updated features.
  • ✅ 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

See our Contributing Guide for details and let us know if you have any questions!

Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (62742c2) 76.93% compared to head (367a929) 76.94%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7821   +/-   ##
=======================================
  Coverage   76.93%   76.94%           
=======================================
  Files         117      117           
  Lines       14411    14411           
=======================================
+ Hits        11087    11088    +1     
+ Misses       3324     3323    -1     
Flag Coverage Δ
Benchmarks 36.46% <0.00%> (ø)
GPU 39.38% <50.00%> (-0.02%) ⬇️
Tests 71.95% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Alarmod
Copy link
Contributor Author

Alarmod commented Jan 25, 2024

I have read the CLA Document and I sign the CLA

@Alarmod
Copy link
Contributor Author

Alarmod commented Jan 25, 2024

recheck

@glenn-jocher
Copy link
Member

@Alarmod hi, thanks for letting us know about this. Yes I this original change in f2f5ed2

@glenn-jocher glenn-jocher merged commit 1a04cd3 into ultralytics:main Jan 25, 2024
12 checks passed
gkinman pushed a commit to Octasic/ultralytics that referenced this pull request May 30, 2024
puzhiyuan pushed a commit to puzhiyuan/ultralytics that referenced this pull request Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants