-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
ultralytics 8.3.83
Revert saturation and value augmentation to relative shift
#19515
Conversation
Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com>
👋 Hello @Y-T-G, thank you for submitting an
For more guidance, please refer to our Contributing Guide. Don’t hesitate to leave a comment if you have any questions. The proposed change to revert the augmentation logic to relative shifts sounds promising for more natural image transformations! 🎨 If you have test results or usage examples that highlight the improvements, please consider including them in your description or PR summary. This will help us better understand the impact! Thank you for contributing to Ultralytics! 🌟 An Ultralytics engineer will review your PR shortly. 😊 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #19515 +/- ##
==========================================
+ Coverage 73.21% 73.23% +0.02%
==========================================
Files 129 129
Lines 17583 17583
==========================================
+ Hits 12873 12877 +4
+ Misses 4710 4706 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@glenn-jocher After some more tests on more images, we think it's better to revert the "fix" we made for |
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
ultralytics 8.3.83
Revert saturation and value augmentation to relative shift
Got it, thanks guys! PR merged. |
🎉 Awesome work, team! This merge is a testament to the brilliance of collaboration—thank you, @Y-T-G, @Laughing-q, and @glenn-jocher, for your efforts! 🙌 As Albert Einstein once said, "Strive not to be a success, but rather to be of value." Your contributions not only fixed a critical bug but also elevated the quality of our image augmentations, directly enhancing user experiences and model performance. 🚀 Version |
I think we can introduce two additional variables, sat_beta and val_beta, to accommodate both scenarios. lut_sat = np.clip(x * (r[1] + 1) + sat_beta, 0, 255).astype(dtype)
lut_val = np.clip(x * (r[2] + 1) + val_beta, 0, 255).astype(dtype) |
@chinakook thank you for the suggestion! After careful evaluation in our recent PR (#19311), we've determined that the current relative shift implementation for saturation/value adjustments produces the most natural augmentations while maintaining simplicity. For those interested in the technical details, the RandomHSV augmentation documentation explains our approach clearly. We appreciate community contributions and encourage you to explore different augmentation strategies in your projects while following our AGPL-3.0 license terms. |
Reverting changes from #19311 for saturation and value because the old approach with relative shift produces more natural looking images than using constant shifts.
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
This PR updates the version to
8.3.83
and refines the image augmentation logic for color transformations, fixing a bug and improving accuracy. 🎨✨📊 Key Changes
__version__
to8.3.83
. 🆕lut_sat[0] = 0
).🎯 Purpose & Impact