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

scale images to [0,1] range #1664

Merged
merged 12 commits into from Feb 29, 2024
Merged

scale images to [0,1] range #1664

merged 12 commits into from Feb 29, 2024

Conversation

AleksanderWWW
Copy link
Contributor

@AleksanderWWW AleksanderWWW commented Feb 27, 2024

Before submitting checklist

  • Did you update the CHANGELOG? (not for test updates, internal changes/refactors or CI/CD setup)
  • Did you ask the docs owner to review all the user-facing changes?

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.13%. Comparing base (a581193) to head (97a08fa).

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     
Flag Coverage Δ
e2e-management ?
e2e-s3 ?
e2e-s3-gcs ?
e2e-standard ?
macos 74.40% <100.00%> (-5.87%) ⬇️
py3.7 74.67% <100.00%> (-5.32%) ⬇️
py3.9 ?
ubuntu 74.54% <100.00%> (-5.37%) ⬇️
unit 74.67% <100.00%> (-0.05%) ⬇️
windows 73.58% <96.66%> (-6.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

szysad
szysad previously approved these changes Feb 27, 2024
Copy link
Contributor

@szysad szysad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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)
Copy link
Contributor

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]

@SiddhantSadangi
Copy link
Member

@normandy7 - this would need a docs change (all instances where an image array is divided by 255 for logging to Neptune)

@Raalsky
Copy link
Contributor

Raalsky commented Feb 27, 2024

@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

@SiddhantSadangi
Copy link
Member

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.

CHANGELOG.md Outdated Show resolved Hide resolved
@AleksanderWWW AleksanderWWW merged commit d1061cc into master Feb 29, 2024
4 checks passed
@AleksanderWWW AleksanderWWW deleted the aw/scale-imgs branch February 29, 2024 07:58
AleksanderWWW added a commit that referenced this pull request Feb 29, 2024
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

4 participants