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

Added blending probability maps with original WSI #465

Merged
merged 24 commits into from
Aug 13, 2022

Conversation

sarthakpati
Copy link
Collaborator

@sarthakpati sarthakpati commented Aug 2, 2022

Fixes #464

Proposed Changes

  • blending option added with default alpha of 0.5 with option to specify in config with the option blending_alpha
  • added a new colormap agni that is pure red and black for easier visualization
  • includes Update data type for stride size #458

Checklist

  • I have read the CONTRIBUTING guide
  • My PR is based from the current GaNDLF master
  • Non-breaking change (does not break existing functionality): provide as many details as possible for any breaking change
  • Function/class source code documentation added/updated
  • Code has been blacked for style consistency
  • If applicable, version information has been updated in GANDLF/version.py
  • If adding a git submodule, add to list of exceptions for black styling in pyproject.toml file
  • Usage documentation has been updated, if appropriate
  • History has been updated, if appropriate
  • Tests added or modified to cover the changes; if coverage is reduced, please give explanation
  • If customized dependency installation is required (i.e., a separate pip install step is needed for PR to be functional), please ensure it is reflected in all the files that control the CI, namely: python-test.yml, and all docker files [1,2,3,4]

@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #465 (b101eff) into master (e8d21ac) will decrease coverage by 0.03%.
The diff coverage is 94.28%.

❗ Current head b101eff differs from pull request most recent head 84eda98. Consider uploading reports for the commit 84eda98 to get more accurate results

@@            Coverage Diff             @@
##           master     #465      +/-   ##
==========================================
- Coverage   92.46%   92.42%   -0.04%     
==========================================
  Files         105      105              
  Lines        6276     6287      +11     
==========================================
+ Hits         5803     5811       +8     
- Misses        473      476       +3     
Flag Coverage Δ
unittests 92.42% <94.28%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
GANDLF/data/inference_dataloader_histopath.py 95.08% <ø> (ø)
GANDLF/compute/inference_loop.py 84.21% <94.28%> (-0.19%) ⬇️
...NDLF/data/preprocessing/template_matching/utils.py 95.34% <0.00%> (-2.33%) ⬇️

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

@Geeks-Sid
Copy link
Collaborator

Hi @sarthakpati, have you tested this with svs or tiffs that are of the size 1GB+ in their original format?

@sarthakpati
Copy link
Collaborator Author

sarthakpati commented Aug 2, 2022

@Geeks-Sid unfortunately I have not, and I do not have access to such data right now. If you or @ujjwalbaid0408 could test it, it would be great!

@Geeks-Sid
Copy link
Collaborator

Yes, I believe this would require such testing because saving png images with the blended heat map and figuring out a way to read them in a multi-tiff manner is not that trivial from my experience. I will test this by end of the week. Also, great work!

@sarthakpati
Copy link
Collaborator Author

Yes, I believe this would require such testing because saving png images with the blended heat map and figuring out a way to read them in a multi-tiff manner is not that trivial from my experience. I will test this by end of the week. Also, great work!

Any update? @Geeks-Sid @ujjwalbaid0408

@Geeks-Sid
Copy link
Collaborator

This works for tiff as I tested a slide for the given condition. LGTM!

Geeks-Sid
Geeks-Sid previously approved these changes Aug 10, 2022
@sarthakpati
Copy link
Collaborator Author

Cool, I fixed a codacy issue, so this should be ready to merge, unless @ujjwalbaid0408 has objections?

@sarthakpati
Copy link
Collaborator Author

@ujjwalbaid0408 and I have verified results from this using testing data for the TIL prediction project. This is good to merge.

@ujjwalbaid0408 ujjwalbaid0408 merged commit 47d815b into mlcommons:master Aug 13, 2022
@sarthakpati sarthakpati deleted the wsi_inference_blend branch August 13, 2022 18:55
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.

Allow saving WSIs with the probability map blended with original image
3 participants