Add tool to visualize prototypes after extraction
Currently, prototypes are "extracted" (ie attribution + viewing method from visualization.yml) once during the epilogue (after projection) and saved in the prototypes/ directory. For the demo, we may wish to show multiple methods for proto attribution and visualization without going through the entire epilogue (especially since the projection_database is now saved). It would be nice to have a tool that takes something like:
- the projection database
- a visualization.yml
- a dataset.yml (to load the projection database)
and (re)generates the visualization for the prototypes. Additional questions that we should answer now:
- since the content of prototypes/ is eminently related to the final model (in the final/ or imported/ directory), wouldn't it make sens to save them there inside the final/imported directory?
-
during prototype extraction, we currently save only the prototype image after post-processing (crop, bbox or heatmap) but not the original image from the projection set. If we saved the original image without post-processing, we would not need the "dataset.yml".Actually never mind, we would still need the preprocessing function (resize, normalization). Or we could also save the preprocessing function in a dedicated yml file with the same format as dataset.yml