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

Add LoadImages._cv2_rotate() #9249

Merged
merged 2 commits into from
Sep 1, 2022
Merged

Add LoadImages._cv2_rotate() #9249

merged 2 commits into from
Sep 1, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 1, 2022

Optional manual rotation code per iPhone rotation issue in #8493

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

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved video loading orientations in YOLOv5 data loader.

πŸ“Š Key Changes

  • Renamed new_video method to _new_video to indicate it's for internal use.
  • Added _cv2_rotate method for rotating videos based on their orientation metadata.
  • Integrated video orientation metadata retrieval in _new_video.

🎯 Purpose & Impact

  • πŸ”„ Ensures correct video orientation during processing, which may prevent model training/testing errors.
  • πŸ›  Offers a manual video rotation option for instances where cv2 auto rotation is disabled.
  • πŸ”’ Internal use designation for video loading method to clarify its intended scope and use within the codebase.

The changes will result in better user experience by handling videos that have different orientations, thus facilitating smoother model training and evaluation with fewer manual adjustments.

Optional manual rotation code per iPhone rotation issue in #8493

Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher self-assigned this Sep 1, 2022
@glenn-jocher glenn-jocher merged commit 9da6d0f into master Sep 1, 2022
@glenn-jocher glenn-jocher deleted the update/cv2_rotate branch September 1, 2022 20:30
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
Optional manual rotation code per iPhone rotation issue in ultralytics#8493

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

Signed-off-by: Glenn Jocher <[email protected]>
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