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

Update cv2.imread() patch with flags argument #7287

Merged
merged 1 commit into from
Apr 5, 2022
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Apr 5, 2022

Possible solution to #7285

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancement of the image reading function for better flexibility.

πŸ“Š Key Changes

  • Updated the imread function definition to accept an additional argument (flags).
  • Allowed users to specify image read mode by passing flags directly to the function.

🎯 Purpose & Impact

  • πŸ›  Purpose: To enable the customization of how images are read by providing an optional parameter. This allows developers to specify different modes like grayscale, unchanged, etc., when reading images.
  • πŸ“ˆ Impact to Users: Users now have more control over image processing. This can be particularly useful when working with various types of images that may require different handling (e.g., grayscale for training specific types of neural networks). It enhances the versatility of the YOLOv5 library for different image processing tasks.

@glenn-jocher glenn-jocher linked an issue Apr 5, 2022 that may be closed by this pull request
2 tasks
@glenn-jocher
Copy link
Member Author

Passes #7285 reproduction code.

Screenshot 2022-04-05 at 11 48 40

@glenn-jocher glenn-jocher merged commit 2181ef3 into master Apr 5, 2022
@glenn-jocher glenn-jocher deleted the update/cv2 branch April 5, 2022 09:49
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
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.

Monkey patching cv2 methods crashes own scripts
1 participant