-
Notifications
You must be signed in to change notification settings - Fork 63
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
scale images to [0,1] range #1664
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1664 +/- ##
==========================================
- Coverage 80.48% 77.13% -3.36%
==========================================
Files 302 302
Lines 15456 15461 +5
==========================================
- Hits 12440 11926 -514
- Misses 3016 3535 +519
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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!
src/neptune/internal/utils/images.py
Outdated
scaled_array = (array - min_value) / (max_value - min_value) | ||
|
||
# Ensure that values outside [0, 1] are clipped to [0, 1] | ||
return np.clip(scaled_array, 0, 1) |
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.
this seems redundant. scaled_array
is already in range [0, 1]
@normandy7 - this would need a docs change (all instances where an image array is divided by 255 for logging to Neptune) |
But, isn't it optional? If I understand, this not going to have an impact on cases that the user provied already correctly scaled image and docs could be just updated anytime |
@Raalsky - yeah, updating docs is not a blocker for the client release. |
Before submitting checklist