-
Notifications
You must be signed in to change notification settings - Fork 121
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 support for numpy images #1376
Conversation
6ff40f5
to
9511165
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's document the kinds of images this supports, but its a nice start!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the change to reference numpy in the image metric, we need to add numpy as a dependency of the whylogs image extra in the pyproject.toml file
the changes are otherwise fine.
This supports both numpy images and regular nested lists that represent images in the image metric by converting that image data into PIL format and then doing exactly what was happening before.
9511165
to
9a914c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
This supports both numpy images and regular nested lists that represent images in the image metric by converting that image data into PIL format and then doing exactly what was happening before.
One thing I need feedback on: is there any loss of information/functionality from logging images in this way? I assume PIL might have modeled some image metadata or manually assigned tags and that wouldn't come through on the np/list log variants of course.