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

Refactor: use PIL as default image format #1319

Merged
merged 10 commits into from
Sep 5, 2022
Merged

Conversation

Borda
Copy link
Member

@Borda Borda commented Apr 28, 2022

What does this PR do?

follow-up to #1313 as the Tensor formating is not very friendly to other general augmentation packages

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 🙃

Copy link
Contributor

@krshrimali krshrimali left a comment

Choose a reason for hiding this comment

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

Part-1 of my review. I'll appreciate it if you can briefly explain why this was required, and what was the problem before (it will be easier to review and land if all looks good). :)

Co-authored-by: Kushashwa Ravi Shrimali <[email protected]>
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.

Awesome! Few comments. Let's merge this before updating #1313 so that it can work directly with the PIL image

@ethanwharris ethanwharris added this to the 0.8.0 milestone May 5, 2022
@krshrimali
Copy link
Contributor

Hi, @Borda - Would you mind adding tests to this PR? Just a sample test will work, even if it fails, I'll take it from there. Thanks!

@krshrimali krshrimali removed this from the 0.8.0 milestone Jul 29, 2022
@krshrimali
Copy link
Contributor

Hi, @Borda - Would you mind adding tests to this PR? Just a sample test will work, even if it fails, I'll take it from there. Thanks!

Hi, @Borda - Just a gentle ping, if you can write a test (as I mentioned before - no need to ensure that it passes, just a template test that helps me understand what you are trying to achieve here will help) - that will be great! Please ping me once you are done, also don't worry about the merge conflicts. I'll take care of it, just force push the test. :)

@ethanwharris ethanwharris added this to the 0.8.0 milestone Sep 1, 2022
@Borda
Copy link
Member Author

Borda commented Sep 2, 2022

@krshrimali @ethanwharris may pls get your help on this collision resolution... 🐰

@mergify mergify bot removed the has conflicts label Sep 5, 2022
@codecov
Copy link

codecov bot commented Sep 5, 2022

Codecov Report

Merging #1319 (4eea743) into master (f26e3df) will decrease coverage by 6.01%.
The diff coverage is 96.29%.

@@            Coverage Diff             @@
##           master    #1319      +/-   ##
==========================================
- Coverage   92.29%   86.28%   -6.02%     
==========================================
  Files         287      287              
  Lines       13056    13047       -9     
==========================================
- Hits        12050    11257     -793     
- Misses       1006     1790     +784     
Flag Coverage Δ
pytest 13.30% <0.00%> (+<0.01%) ⬆️
tpu 13.30% <0.00%> (+<0.01%) ⬆️
unittests 86.78% <96.29%> (-6.06%) ⬇️

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

Impacted Files Coverage Δ
flash/core/data/transforms.py 94.73% <ø> (-1.76%) ⬇️
flash/image/segmentation/input.py 82.71% <92.30%> (-17.29%) ⬇️
flash/image/data.py 100.00% <100.00%> (ø)
flash/image/segmentation/input_transform.py 95.55% <100.00%> (+0.96%) ⬆️
flash/image/segmentation/model.py 94.04% <100.00%> (ø)
flash/image/segmentation/viz.py 89.83% <100.00%> (+1.89%) ⬆️
...lash/image/embedding/vissl/transforms/utilities.py 15.15% <0.00%> (-84.85%) ⬇️
flash/image/embedding/heads/vissl_heads.py 35.29% <0.00%> (-64.71%) ⬇️
flash/image/embedding/losses/vissl_losses.py 37.50% <0.00%> (-62.50%) ⬇️
flash/image/embedding/vissl/adapter.py 31.63% <0.00%> (-62.25%) ⬇️
... and 42 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ethanwharris ethanwharris merged commit 95ae65f into master Sep 5, 2022
@ethanwharris ethanwharris deleted the refactor/img-load branch September 5, 2022 12:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants