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

(WIP) Integration of gradcam #feature36 #123

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

jasminziegler
Copy link

Motivation

As a data scientist, I want to know why a model makes a certain prediction. A heatmap can help me understand where the model is looking at in the input image. This can serve as a sanity check for our models.

Goal

Integrate gradcam code in cgm-rg height workflow and display results in tagging tool.

Implementation

  • create height results along with gradcam heatmap
    _generate height results + gradcam in test notebook (like in cgm-rg)
    _use second gradcam implementation from here: https://gist.github.com/RaphaelMeudec/e9a805fa82880876f8d89766f0690b54, to better understand it, read here: https://www.sicara.ai/blog/2019-08-28-interpretability-deep-learning-tensorflow
    _write function that returns name of last conv layer
    _write own function to overlay depthmap and heatmap for debugging

  • integrate in cgm-rg
    _re-write function to take on numpy_array only
    _make grad_model global in cgm-rg
    _adapt all relevant files
    _add extract_last_conv_layer_name function
    _add get_height_prediction_and_heatmap_local
    _add/adapt json file in src/workflows
    _complete actual workflow code in src/result_generation/height/height_plaincnn.py

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests
  • New and existing unit tests pass locally with my changes
  • My Code is review by 1 People

@jasminziegler jasminziegler marked this pull request as draft October 13, 2021 08:27
@jasminziegler jasminziegler self-assigned this Oct 13, 2021
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.

2 participants