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

modify default value of stride to 64 in the function letterbox #13146

Closed
wants to merge 1 commit into from

Conversation

TommeyChang
Copy link

@TommeyChang TommeyChang commented Jun 29, 2024

I have read the CLA Document and I sign the CLA.

When the default value of stride is 32, it confronts an error when the width or height of the image is resized to 864.
I fix the bug from setting the stride to 64. Thus, I suggest to change the default value.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

This PR modifies the letterbox function within the image augmentation utilities to adapt image dimensions according to a new stride value.

πŸ“Š Key Changes

  • Adjusted Stride Value: Changes the stride parameter in the letterbox function from 32 to 64.

🎯 Purpose & Impact

  • Improved Performance: Increasing the stride value can enhance processing efficiency by reducing the number of calculations needed for image resizing.
  • Consistency with Larger Models: This adjustment aligns the image preprocessing steps better with larger YOLO models, potentially improving compatibility and performance for larger-scale applications.
  • Impact on Image Output: Users may notice changes in image padding and resizing, which should now better preserve aspect ratio and structure for models expecting larger strides. πŸš€

Copy link
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link
Contributor

@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 @TommeyChang, 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 running git pull and git 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

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.

None yet

1 participant