/PertMap

Python code for perturbation-based saliency map

Primary LanguageJupyter NotebookMIT LicenseMIT

PertMap

Sample codes for feature attribution (a.k.a. saliency map) based on data perturbation.

About PertMap

PertMap (Perturbation-based Saliency Map) highlights pixels in the input image that are relevant to the classification result of machine learning models (mostly, DNN/CNNs).

PertMap uses the size of the allowable data perturbation as the masure of relevance. It seeks the maximally invariant data perturbation that does not change the classification result. The details of the algorithms can be found in the following papers.

Sample Codes

Requirements

  • Python3.x
  • Numpy
  • Matplotlib
  • scikit-image
  • Tensorflow
  • CPLEX (only for linear programming)

The code also requires the VGG16 weight file in this repository.