Skip to content

Methods

xai_dict = {'gradcam': GradCAM, 'GradCAM': GradCAM, 'gc': GradCAM, 'gradcam++': GradCAMpp, 'GradCAM++': GradCAMpp, 'GradCAMpp': GradCAMpp, 'gc++': GradCAMpp, 'GuidedGradCAM': GuidedGradCAM, 'ggc': GuidedGradCAM, 'saliency': SaliencyMap, 'SaliencyMap': SaliencyMap, 'sm': SaliencyMap, 'guidedbackprop': GuidedBackpropagation, 'GuidedBackpropagation': GuidedBackpropagation, 'gb': GuidedBackpropagation, 'IntegratedGradients': IntegratedGradients, 'ig': IntegratedGradients, 'OcclusionSensitivity': OcclusionSensitivity, 'os': OcclusionSensitivity, 'LimePro': LimePro, 'lp': LimePro, 'LimeCon': LimeCon, 'lc': LimeCon} module-attribute ยค

Dictionary of implemented XAI Methods in AUCMEDI.

A key (str) or an initialized XAI Method can be passed to the aucmedi.xai.decoder.xai_decoder function as method parameter.

Example
# Select desired XAI Methods
xai_list = ["gradcam", "gc++", OcclusionSensitivity(model), xai_dict["LimePro"](model), "lc"]

# Iterate over each method
for m in xai_list:
    # Compute XAI heatmaps with method m
    heatmaps = xai_decoder(datagen, model, preds, method=m)

XAI Methods are based on the abstract base class aucmedi.xai.methods.xai_base.