microsoft / vision-explanation-methods

Methods for creating saliency maps for computer vision models.
https://vision-explanation-methods.readthedocs.io/en/latest/
MIT License
39 stars 13 forks source link

Returning b64encoded str from drise runner #36

Closed natalie-isak closed 1 year ago

natalie-isak commented 1 year ago

This PR changes the return type of drise runner from a matplotlib figure list, ... to a base64 encoded string list of images.

Previously, there was a bug in the figure_list return value because we were clearing the figure plot before actually returning it.

This PR gives greater flexibility to users: they can read in the figure from their local directory, or they can use the pre-encoded string from the return value.

codecov-commenter commented 1 year ago

Codecov Report

Merging #36 (a3fa51d) into main (2facb22) will increase coverage by 1.21%. The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
+ Coverage   74.25%   75.46%   +1.21%     
==========================================
  Files           6        6              
  Lines         268      269       +1     
==========================================
+ Hits          199      203       +4     
+ Misses         69       66       -3     
Flag Coverage Δ
unittests 75.46% <83.33%> (+1.21%) :arrow_up:

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

Impacted Files Coverage Δ
python/vision_explanation_methods/DRISE_runner.py 72.15% <83.33%> (+4.20%) :arrow_up: