Metadata-Version: 2.4
Name: virelay
Version: 0.5.0
Summary: ViRelAy is a web-based XAI tool for analyzing classifiers and their datasets by visualizing the source-data, attributions, clusterings, and embeddings as generated by tools like CoRelAy.
Project-URL: Documentation, https://virelay.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/virelay/virelay.git
Project-URL: Issues, https://github.com/virelay/virelay/issues
Project-URL: Changelog, https://github.com/virelay/virelay/blob/master/CHANGELOG.md
Author-email: "Christopher J. Anders" <contact@cjanders.de>, David Neumann <david.neumann@lecode.de>, Talmaj Marinc <talmaj@gmail.com>, Sebastian Lapuschkin <sebastian.lapuschkin@hhi.fraunhofer.de>, Pattarawat Chormai <pat.chormai@gmail.com>
Maintainer-email: David Neumann <david.neumann@lecode.de>, "Christopher J. Anders" <contact@cjanders.de>
License-Expression: AGPL-3.0-or-later
Keywords: Artificial Intelligence,Deep Learning,Explainable AI,Interpretability,Machine Learning,SpRAy,Spectral Relevance Analysis,ViRelAy,Visual Analytics,XAI
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: flask-cors<6.0.0,>=5.0.0
Requires-Dist: flask<4.0.0,>=3.0.3
Requires-Dist: gunicorn<24.0.0,>=23.0.0
Requires-Dist: h5py<4.0.0,>=3.12.1
Requires-Dist: matplotlib<4.0.0,>=3.9.2
Requires-Dist: numpy<3.0.0,>=2.1.1
Requires-Dist: pillow<11.0.0,>=10.4.0
Requires-Dist: pyyaml<7.0.0,>=6.0.2
Requires-Dist: typing-extensions<5.0.0,>=4.12.2
Description-Content-Type: text/markdown


<table align="center">
<tbody>
<tr>
<td align="center" width="1182px">

<img src="design/virelay-logo-with-title.png" alt="ViRelAy Logo"/>

# Visualizing Relevance Analyses

[![License](https://img.shields.io/pypi/l/virelay)](https://github.com/virelay/virelay?tab=License-1-ov-file)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/virelay/virelay/tests.yaml)](https://github.com/virelay/virelay/actions)
[![GitHub Release](https://img.shields.io/github/v/release/virelay/virelay)](https://github.com/virelay/virelay/releases/latest)

**ViRelAy** is an XAI visualization tool for the analysis of the results of spectral relevance analysis (SpRAy) pipelines, as generated by **[CoRelAy](https://github.com/virelay/corelay)**. It runs a small web application to view, explore, and interact with the source data, its attributions, clusterings, and embeddings. ViRelAy is designed to simplify the analysis of classifiers and their underlying datasets. Findings can be imported, exported, and shared with others for easy collaboration. Currently, only image data is supported and attributions are expected to have the same shape as the corresponding input data.

</td>
</tr>
</tbody>
</table>

![ViRelAy Light Mode UI](design/virelay-light-mode-ui.png#gh-light-mode-only)
![ViRelAy Dark Mode UI](design/virelay-dark-mode-ui.png#gh-dark-mode-only)

For more information about ViRelAy, getting started guides, in-depth tutorials, and API documentation, please refer to the [documentation](https://virelay.readthedocs.io/en/latest/).

If you find ViRelAy useful for your research, why not cite our related [paper](https://arxiv.org/abs/2106.13200):

```bibtex
@article{anders2021software,
  author  = {Anders, Christopher J. and
             Neumann, David and
             Samek, Wojciech and
             Müller, Klaus-Robert and
             Lapuschkin, Sebastian},
  title   = {Software for Dataset-wide XAI: From Local Explanations to Global Insights with {Zennit}, {CoRelAy}, and {ViRelAy}},
  journal = {CoRR},
  volume  = {abs/2106.13200},
  year    = {2021},
}
```

## Features

- Visually inspect analyses generated using tools like [CoRelAy](https://github.com/virelay/corelay)
- Open multiple projects side-by-side
- Collaborate using export, import, and share functionality
- Easily find outlier classification strategies by visualizing classifications using different clustering methods
- Understand the classification strategies of your model by viewing attribution data as heatmaps
- Easily run ViRelAy locally or on a server

## Getting Started

To get started, you first have to install ViRelAy on your system. The recommended and easiest way to install ViRelAy is to use [pipx](https://pipx.pypa.io), which is a tool for installing Python applications from the [Python package index (PyPI)](https://pypi.org/) in isolated environments:

```shell
$ pipx install virelay
```

Alternatively, you can also install ViRelAy using [pip](https://pip.pypa.io), although it is recommended to create a virtual environment to avoid conflicts with other Python packages:

```shell
$ python3 -m venv virelay-env
$ source virelay-env/bin/activate
$ pip install virelay
```

ViRelAy uses a custom file format, which usually comprises a project file in [YAML](https://yaml.org/) format, a dataset either in [HDF5](https://www.hdfgroup.org/solutions/hdf5/) format or in a directory structure, one or more attribution databases in HDF5 format, and one or more analyses databases for various analyses methods in HDF5 format. For more information on the project file format, please refer to the [project file format documentation](https://virelay.readthedocs.io/en/latest/contributors-guide/project-file-format.html) and for more information on the formats for the dataset, attribution, and analyses databases, see the [database specifications](https://virelay.readthedocs.io/en/latest/contributors-guide/database-specification.html).

ViRelAy projects can be generated using [CoRelAy](https://github.com/virelay/corelay), but if you want to get a fast first glimpse at ViRelAy, you can also create a randomly generated [example project](https://virelay.readthedocs.io/en/latest/getting-started/example-project.html).

When you have a project ready, you can open it in ViRelAy using the following command:

```shell
$ virelay <project-file> [<project-file> ...]
```

This will start the server at [http://localhost:8000](http://localhost:8000) and automatically open your default browser. Optionally, you can specify an alternative host and port using the `--host` and `--port` command-line arguments. For more in-depth instructions, please refer to our [getting started guide](https://virelay.readthedocs.io/en/latest/getting-started/index.html).

Please note that starting ViRelAy using the command-line interface, will start a simple built-in HTTP server. While this built-in server is suitable for small projects and testing purposes, it may not provide the performance and scalability required for larger-scale deployments, such as required when installing ViRelAy on a remote server for collaborative work.

To unlock faster performance and scalability, we recommend running ViRelAy with [Gunicorn](https://gunicorn.org/), a WSGI-compliant HTTP server that provides robust features and configuration options. To find out how to run ViRelAy using Gunicorn, please refer to our ["Using ViRelAy with Gunicorn" guide](https://virelay.readthedocs.io/en/latest/user-guide/using-virelay-with-gunicorn.html).

## Contributing

If you would like to contribute, there are multiple ways you can help out. If you find a bug or have a feature request, please feel free to [open an issue on GitHub](https://github.com/virelay/virelay/issues). If you want to contribute code, please [fork the repository](https://github.com/virelay/virelay/fork) and use a feature branch. Pull requests are always welcome. Before forking, please open an issue where you describe what you want to do. This helps to align your ideas with ours and may prevent you from doing work, that we are already planning on doing. If you have contributed to the project, please add yourself to the [contributors list](CONTRIBUTORS.md).

To help speed up the merging of your pull request, please comment and document your code extensively, try to emulate the coding style of the project, and update the documentation if necessary.

For more information on how to contribute, please refer to our [contributor's guide](https://virelay.readthedocs.io/en/latest/contributors-guide/index.html).

## License

ViRelAy is licensed under the [GNU Affero General Public License Version 3 (AGPL v3)](https://www.gnu.org/licenses/agpl-3.0.html) later. For more information see the [license](COPYING). For licenses of bundled third party software packages please refer to the [3rd party license list](/source/frontend/distribution/3rdpartylicenses.txt), which is available after [building the frontend](https://virelay.readthedocs.io/en/latest/contributors-guide/frontend.html#building-the-frontend).
