Exploring PartitionShap on raster datasets of an arbitrary number of bands/channels
These notebooks use our SHAP fork with modifications to make it easier to use and visualize multi-channel explanations. The EuroSAT notebooks use TorchSat, a library for working with PyTorch models whose inputs are rasters with arbitrary number of channels.
@inproceedings{krell2022explaining,
title={Explaining Complex 3D Atmospheric CNNs Using SHAP-Based Channel-wise XAI Techniques with Interactive 3D Visualization},
author={Krell, Evan and Kamangir, Hamid and Friesen, Josh and Judge, Julianna and Collins, Waylon G and King, Scott Alan and Tissot, Philippe E},
booktitle={102nd American Meteorological Society Annual Meeting},
year={2022},
organization={AMS}
}
PartitionSHAP
: ImageNet (RGB) demoPartitionSHAP
: EuroSAT (RGB) demoPartitionSHAP
: EuroSAT (13-band) demoPartitionSHAP
: Tornado (4-band) demo
A simple prototype of the viewer is included for completeness. Further development of this tool occurs in the xai-raster-vis-tools repo.
python SHAP_3D_viewer.py --help
Usage: SHAP_3D_viewer.py [options]
Options:
-h, --help show this help message and exit
-f FILE, --file=FILE Path to 3D SHAP values (.npz)
-d DATA_NAME, --data_name=DATA_NAME
Name of SHAP values in the input SHAP values (.npz)
file.
-e, --show_edges Show edges of grid elements
- Evan: Use test instead of validation data for XAI runs in notebooks -> not currently repoducable since will choose a random validation case
- Josh: Add colab notebook with RGB & RGB+NIR model train, test, PartitionShap results (other XAI not is not for this repo!)