Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Plotting heatmap and thumbnails for test PANDA slides #634

Merged
merged 25 commits into from
Jan 19, 2022

Conversation

harshita-s
Copy link
Contributor

In this PR:

  • The concept of slides is added to the Lightening Container that currently takes in input only the tiles dataset for PANDA.
  • Slides of interest are selected from the test set using top/bottom attention tiles for TP/FN.
  • Thumbnails are plotted for slides of interest.
  • Attention heatmaps are plotted for the selected tiles in the bag for the slides of interest. The heatmaps are overlay on the slides.
  • The thumbnails and attention heatmaps are saved as standard outputs in outputs/fig folder. The filenames contain slide identifier (slide ID), with _thumbnail and _heatmap suffixes, respectively.

@harshita-s harshita-s changed the title Plotting Heatmap and Thumbnails for test PANDA slides Plotting heatmap and thumbnails for test PANDA slides Jan 13, 2022
Copy link
Contributor

@ant0nsc ant0nsc left a comment

Choose a reason for hiding this comment

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

Looking good!
You can simplify setting up the callbacks. Also, I would find it prudent to add a small set of tests to ensure that your plotting really does what you think it does.

InnerEye/ML/Histopathology/models/deepmil.py Outdated Show resolved Hide resolved
InnerEye/ML/Histopathology/models/deepmil.py Outdated Show resolved Hide resolved
InnerEye/ML/Histopathology/models/deepmil.py Outdated Show resolved Hide resolved
InnerEye/ML/Histopathology/utils/heatmap_utils.py Outdated Show resolved Hide resolved
InnerEye/ML/Histopathology/utils/heatmap_utils.py Outdated Show resolved Hide resolved
InnerEye/ML/Histopathology/utils/metrics_utils.py Outdated Show resolved Hide resolved
@vale-salvatelli
Copy link
Contributor

Reviewed. Major comment: I think we can reduce the number of parameters we pass around by making get_slide_dataset a method implemented in each child class. Agreed with Anton that some tests would help

ant0nsc
ant0nsc previously approved these changes Jan 17, 2022
InnerEye/ML/Histopathology/models/deepmil.py Outdated Show resolved Hide resolved
InnerEye/ML/Histopathology/utils/heatmap_utils.py Outdated Show resolved Hide resolved
InnerEye/ML/Histopathology/utils/heatmap_utils.py Outdated Show resolved Hide resolved
InnerEye/ML/Histopathology/utils/heatmap_utils.py Outdated Show resolved Hide resolved
InnerEye/ML/Histopathology/models/deepmil.py Outdated Show resolved Hide resolved
InnerEye/ML/Histopathology/models/deepmil.py Outdated Show resolved Hide resolved
@harshita-s harshita-s merged commit 0b8fe32 into main Jan 19, 2022
@harshita-s harshita-s deleted the hsharma/heatmap_panda branch January 19, 2022 07:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants