Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

simplify loading RGBA images #946

Merged
merged 9 commits into from
Nov 8, 2021
Merged

simplify loading RGBA images #946

merged 9 commits into from
Nov 8, 2021

Conversation

Borda
Copy link
Member

@Borda Borda commented Nov 8, 2021

What does this PR do?

when you load accidentally PNG image including alpha channel it is quite confusing to debug the error message
in principle we use mostly just RGB images, the alpha is not needed so lets drop it by default

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@Borda Borda added bug / fix Something isn't working enhancement New feature or request labels Nov 8, 2021
Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

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

LGTM 😃

flash/core/data/utils.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 8, 2021

Codecov Report

Merging #946 (339bb67) into master (2260d53) will increase coverage by 1.65%.
The diff coverage is 89.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #946      +/-   ##
==========================================
+ Coverage   82.94%   84.60%   +1.65%     
==========================================
  Files         243      243              
  Lines       13049    13059      +10     
==========================================
+ Hits        10824    11049     +225     
+ Misses       2225     2010     -215     
Flag Coverage Δ
unittests 84.60% <89.28%> (+1.65%) ⬆️

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

Impacted Files Coverage Δ
flash/image/face_detection/data.py 43.66% <50.00%> (ø)
flash/image/segmentation/data.py 89.75% <83.33%> (+8.38%) ⬆️
flash/core/data/utils.py 95.16% <90.90%> (-0.42%) ⬇️
flash/audio/classification/data.py 95.55% <100.00%> (-0.19%) ⬇️
flash/core/integrations/labelstudio/data_source.py 81.00% <100.00%> (+4.89%) ⬆️
flash/image/data.py 86.84% <100.00%> (+13.50%) ⬆️
flash/core/data/data_pipeline.py 95.69% <0.00%> (+0.30%) ⬆️
flash/core/data/process.py 86.89% <0.00%> (+0.43%) ⬆️
flash/image/classification/adapters.py 82.58% <0.00%> (+0.44%) ⬆️
flash/core/classification.py 94.15% <0.00%> (+0.64%) ⬆️
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2260d53...339bb67. Read the comment docs.

@Borda Borda enabled auto-merge (squash) November 8, 2021 13:38
@Borda Borda merged commit bc09c64 into master Nov 8, 2021
@Borda Borda deleted the fix/load-rgba branch November 8, 2021 14:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug / fix Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants