aai-institute / ProtoTree

Fork of ProtoTrees: Neural Prototype Trees for Interpretable Fine-grained Image Recognition, published at CVPR2021
Other
3 stars 1 forks source link

Add multi patch images from explanation #24

Closed Clifford-appliedAI-GmbH closed 1 year ago

Clifford-appliedAI-GmbH commented 1 year ago

Renders the original image, as well as copies of it with:

  1. A heatmap of average similarity for all the prototypes in an explanation.
  2. Bounding boxes from all prototypes overlaid (green is for patches similar enough to be considered present, red is for absent).
  3. Bounding boxes from present prototypes overlaid.

See examples below, but note that these are from mocked data.

This PR also includes some minor refactoring to aid with future multi patch visualizations.

original im_with_present_bboxs im_with_heatmap im_with_bboxs