Skip to main content

Visual saliency map generation interfaces and baseline implementations for explainable AI.

Project description

xaitk-logo


PyPI - Python Version PyPI - Python Version Documentation Status

codecov

XAITK - Saliency

The xaitk-saliency package is an open source, Explainable AI (XAI) framework for visual saliency algorithm interfaces and implementations, built for analytics and autonomy applications.

See here for a more formal introduction to the topic of XAI and visual saliency explanations.

This framework is a part of the Explainable AI Toolkit (XAITK).

Supported Algorithms

The xaitk-saliency package provides saliency algorithms for a wide range of image understanding tasks, including image classification, image similarity, object detection, and reinforcement learning. The current list of supported saliency algorithms can be found here.

Target Audience

This toolkit is intended to help data scientists and developers who want to add visual saliency explanations to their workflow or product. Functionality provided here is both directly accessible for targeted experimentation, and through Strategy and Adapter patterns to allow for modular integration into systems and applications.

Installation

xaitk-saliency installation has been tested on Unix and Linux systems.

To install the current version via pip:

pip install xaitk-saliency[<extra1>,<extra2>,...]

To install the current version via conda-forge:

conda install -c conda-forge xaitk-saliency

Certain plugins may require additional runtime dependencies. Details on these requirements can be found here.

For more detailed installation instructions, visit the installation documentation.

Getting Started

Explore usage examples of the xaitk-saliency package in various contexts using the Jupyter notebooks provided in the ./docs/examples/ directory.

Documentation

Documentation for both release snapshots and the latest main branch is available on ReadTheDocs.

To build the Sphinx-based documentation locally for the latest reference:

# Install dependencies
poetry sync --with main,linting,tests,docs
# Navigate to the documentation root
cd docs
# Build the documentation
poetry run make html
# Open the generated documentation in your browser
firefox _build/html/index.html

Contributing

Contributions are encouraged!

The following points help ensure contributions follow development practices.

Developer Tools

Ensure the source tree is acquired locally before proceeding.

Poetry Install

You can install using Poetry:

[!WARNING] Users unfamiliar with Poetry should use caution. See installation documentation for more information.

poetry install --with main,linting,tests,docs --extras "<extra1> <extra2> ..."

Pre-commit Hooks

Pre-commit hooks ensure that code complies with required linting and formatting guidelines. These hooks run automatically before commits but can also be executed manually. To bypass checks during a commit, use the --no-verify flag.

To install and use pre-commit hooks:

# Install required dependencies
poetry sync --with main,linting,tests,docs
# Initialize pre-commit hooks for the repository
poetry run pre-commit install
# Run pre-commit checks on all files
poetry run pre-commit run --all-files

Example: A First Look at xaitk-saliency

This associated project provides a local web-application that provides a demonstration of visual saliency generation in a user-interface. This provides an example of how visual saliency, as generated by this package, can be utilized in a user-interface to facilitate model and results exploration. This tool uses the trame framework.

image1 image2 image3 image4

License

Apache 2.0

All development prior to Nov 19, 2024 falls under BSD-3-Clause

Contacts

Principal Investigator: Brian Hu (Kitware) @brian.hu

Project Manager / Product Owner: Keith Fieldhouse (Kitware) @keith.fieldhouse

Scrum Master / Maintainer: Brandon RichardWebster (Kitware) @b.richardwebster

Deputy Scrum Master / Deputy Maintainer: Emily Veenhuis (Kitware) @emily.veenhuis

Program Representative: Austin Whitesell (MITRE) @awhitesell

Acknowledgment

This material is based upon work supported by the Chief Digital and Artificial Intelligence Office under Contract No. 519TC-23-9-2032. The views and conclusions contained herein are those of the author(s) and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xaitk_saliency-0.15.0.tar.gz (48.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xaitk_saliency-0.15.0-py3-none-any.whl (77.5 kB view details)

Uploaded Python 3

File details

Details for the file xaitk_saliency-0.15.0.tar.gz.

File metadata

  • Download URL: xaitk_saliency-0.15.0.tar.gz
  • Upload date:
  • Size: 48.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1018-azure

File hashes

Hashes for xaitk_saliency-0.15.0.tar.gz
Algorithm Hash digest
SHA256 211bc7ed58fa82cef2066ae24e42dcf24b08298bccef500953155a28ecad12d4
MD5 5ebcbcf5480340ee08c6cbd49dcc5ab4
BLAKE2b-256 7ae97a3869d57898df3f6292b7a93ba286892d14abe4aa2011836b20b1695310

See more details on using hashes here.

File details

Details for the file xaitk_saliency-0.15.0-py3-none-any.whl.

File metadata

  • Download URL: xaitk_saliency-0.15.0-py3-none-any.whl
  • Upload date:
  • Size: 77.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1018-azure

File hashes

Hashes for xaitk_saliency-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d98eb828daaa0ef85c872f9df9db171e3eccf4d447ff5860ea524542424d858a
MD5 07a6fc56adb37498599e6e15aa91078c
BLAKE2b-256 e7d9ec4e85195693153f726c9955bdc01569a81c68e2ff7596f6c893c62a7998

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page