Skip to content

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.

1 participant