XAI method to explain distances in embedded spaces.
There are 2 ways to install distance_explainer. To install distance_explainer from PyPI (recommended) run:
pip install distance_explainer
To instead install distance_explainer from the GitHub repository, run:
git clone [email protected]:dianna-ai/distance_explainer.git
cd distance_explainer
python3 -m pip install .
See our tutorial how to use this package. In short:
image1 = np.random.random((100, 100, 3))
image2 = np.random.random((100, 100, 3))
image2_embedded = model(image2)
explainer = DistanceExplainer(axis_labels={2: 'channels'})
attribution_map = explainer.explain_image_distance(model, image1, image2_embedded)
If you want to contribute to the development of distance_explainer, have a look at the contribution guidelines.
This package was created with Cookiecutter and the NLeSC/python-template.