Skip to content

Add LoadImages._cv2_rotate()#9249

Merged
glenn-jocher merged 2 commits intomasterfrom
update/cv2_rotate
Sep 1, 2022
Merged

Add LoadImages._cv2_rotate()#9249
glenn-jocher merged 2 commits intomasterfrom
update/cv2_rotate

Conversation

@glenn-jocher
Copy link
Copy Markdown
Member

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

Optional manual rotation code per iPhone rotation issue in #8493

Signed-off-by: Glenn Jocher glenn.jocher@ultralytics.com

🛠️ 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 <glenn.jocher@ultralytics.com>
@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 <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.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

Development

Successfully merging this pull request may close these issues.

1 participant