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 install --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:

[!IMPORTANT] XAITK-Saliency currently requires poetry<2.0

[!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 install --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.14.2.tar.gz (50.2 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.14.2-py3-none-any.whl (77.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xaitk_saliency-0.14.2.tar.gz
  • Upload date:
  • Size: 50.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.19 Linux/6.11.0-1018-azure

File hashes

Hashes for xaitk_saliency-0.14.2.tar.gz
Algorithm Hash digest
SHA256 ff870803e6e27303af24f41b6fc4b80fe2152b37e8243581018f2516da6cd2d9
MD5 b787bc4c5e19c98d69d023ccec1b1477
BLAKE2b-256 e00e4ea68ab834f92da7bfd8aa90cef25ab340c43870c0c341ed47f7e1c63880

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for xaitk_saliency-0.14.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f4db11c6ac2258cf084f435bf14664a1f7576ca48c4ae534ac76877013b26ac0
MD5 cd9c5629a10d61264984f2f4c96b02a8
BLAKE2b-256 062f11b75d17355f6fc9086c2f2ccf4793ad80da161c262ec83220b367fe4efa

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