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

Revert "cv2.imread(img, -1) for IMREAD_UNCHANGED" #1778

Merged
merged 1 commit into from
May 31, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 31, 2021

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Optimized image loading in data processing pipeline.

πŸ“Š Key Changes

  • Revised the image reading option in cv2.imread() from -1 (IMREAD_UNCHANGED) to default for datasets.py.

🎯 Purpose & Impact

  • 🎨 Ensures consistent color channel loading by removing the IMREAD_UNCHANGED flag, which could potentially lead to unexpected behavior if images with alpha channels or non-standard color spaces are loaded.
  • πŸš€ Potentially improves compatibility across different image types, leading to fewer errors during image preprocessing.
  • β˜‘οΈ Might impact users dealing with special image formats, but will make the process more robust for the majority of standard RGB/BGR images.

@glenn-jocher glenn-jocher merged commit ab7ff9d into master May 31, 2021
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-2 branch May 31, 2021 08:40
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