-
Notifications
You must be signed in to change notification settings - Fork 16
Fix multi-channel handling #451
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
base: main
Are you sure you want to change the base?
Fix multi-channel handling #451
Conversation
for more information, see https://pre-commit.ci
…n-4-channels-in-render_images
@Sonja-Stockhaus did we discuss this at one point? I've been ignoring that warning for a long time because it's thrown my matplotlib and doesn't fail |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Nope. I also don't remember ever trying to render sth with 3+ channels |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #451 +/- ##
==========================================
+ Coverage 84.92% 85.71% +0.79%
==========================================
Files 8 8
Lines 1784 1869 +85
==========================================
+ Hits 1515 1602 +87
+ Misses 269 267 -2
🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
I think the current implementation doesn't correctly handle images with 3+ channels, for example resulting in the following warning when rendering a 5 channel image:
Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [0.01870049980776624..2.4537485582468284].
This PR proposes an alternative in which PCA is used to reduce an arbitrary amount of channels to 3 so that we can treat them as RGB: