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

Two dimensional size=(h,w) AutoShape support #9072

Merged
merged 3 commits into from
Aug 21, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 21, 2022

May resolve #9039

Signed-off-by: Glenn Jocher [email protected]

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhancements to YOLOv5's model compatibility and input handling.

📊 Key Changes

  • Added support for ClassificationModel in addition to DetectionModel.
  • Modified AutoShape for input handling to accommodate non-square image sizing.
  • Added a warning for cases when AutoShape is incompatible, particularly with the new ClassificationModel.
  • Adjusted image size handling, allowing the size parameter to accept an integer and expand it to a square size tuple.
  • Improved image resizing logic to maintain the aspect ratio.
  • Made the image resizing process more consistent, regardless of whether it is executed on a PyTorch model.

🎯 Purpose & Impact

  • These changes improve the flexibility of input data that can be passed to the models, including support for both square and non-square images.
  • The distinction between ClassificationModel and DetectionModel allows users to work with different model types more effectively.
  • The warning and input adjustments ensure users are aware of model compatibility issues, preventing potential errors.
  • These changes should enhance user experience by providing clearer feedback and more robust input handling, leading to improved performance in various use cases.

May resolve #9039

Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher merged commit 262187e into master Aug 21, 2022
@glenn-jocher glenn-jocher deleted the update/autoshape_hw_size branch August 21, 2022 21:26
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Two dimensional `size=(h,w)` AutoShape support

May resolve ultralytics#9039

Signed-off-by: Glenn Jocher <[email protected]>

* Update hubconf.py

Signed-off-by: Glenn Jocher <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Signed-off-by: Glenn Jocher <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant