Skip to content

Example of how to use MATLAB to produce post-hoc explanations (using Grad-CAM) for image classification tasks.

License

Notifications You must be signed in to change notification settings

ogemarques/xai-image-classification

Repository files navigation

Explainable AI for Image Classification

View xai-image-classification on File Exchange

This repository shows an example of how to use MATLAB to produce post-hoc explanations -- using Grad-CAM -- for two image classification tasks.

Requirements

Suggested steps

  1. Download or clone the repository.
  2. Open MATLAB.
  3. Run the example.mlx script and inspect results.

Additional remarks

  • You are encouraged to expand and adapt the example to your needs.
  • The choice of pretrained network and hyperparameters (learning rate, mini-batch size, number of epochs, etc.) is merely illustrative.
  • You are encouraged to (use Experiment Manager app to) tweak those choices and find a better solution.