rex-xai


Namerex-xai JSON
Version 0.4.1 PyPI version JSON
download
home_pageNone
Summarycausal Responsibility-based eXplanations of black-box-classifiers
upload_time2025-07-22 08:31:23
maintainerNone
docs_urlNone
authorDavid Kelly
requires_python>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ReX: Causal *R*esponsibility *EX*planations for image classifiers

![ReX logo with dinosaur](https://raw.githubusercontent.com/ReX-XAI/ReX/main/assets/rex_logo.png "ReX Logo with dinosaur")

<!--- BADGES: START --->

[![Docs](https://readthedocs.org/projects/rex-xai/badge/?version=latest)](https://rex-xai.readthedocs.io/en/latest/)
[![Tests](https://github.com/ReX-XAI/ReX/actions/workflows/test-package-and-comment.yml/badge.svg)](https://github.com/ReX-XAI/ReX/actions/workflows/test-package-and-comment.yml)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/ReX-XAI/ReX.jl/blob/main/LICENSE)

<!--- BADGES: END --->

---

ReX is a causal explainability tool for image classifiers. It also works on tabular and 3D data.

Given an input image and a classifier, ReX calculates a causal responsibility map across the data and identifies a minimal, sufficient, explanation.

![ladybird](https://raw.githubusercontent.com/ReX-XAI/ReX/main/tests/test_data/ladybird.jpg "Original Image") ![responsibility map](https://raw.githubusercontent.com/ReX-XAI/ReX/main/assets/ladybird_rm.png "Responsibility Map") ![minimal explanation](https://raw.githubusercontent.com/ReX-XAI/ReX/main/assets/ladybird_301.png "Explanation")

ReX is black-box, that is, agnostic to the internal structure of the classifier.
ReX finds single explanations, non-contiguous explanations (for partially obscured images), multiple independent explanations, contrastive explanations and lots of other things!
It has a host of options and parameters, allowing you to fine tune it to your data.

For background information and detailed usage instructions, see our [documentation](https://rex-xai.readthedocs.io/en/latest/).

<!--inclusion-marker-start-do-not-remove-->

## Installation

ReX can be installed using `pip`.
We recommend creating a virtual environment to install ReX.
ReX has been tested using versions of Python >= 3.10.
The following instructions assume `conda`:

```bash
conda create -n rex python=3.13
conda activate rex
pip install rex_xai
```

This should install an executable `rex` in your path.
To check that ReX is installed correctly, run:

```bash
ReX --help
```

To build from source, clone the repository and run:

```bash
git clone git@github.com:ReX-XAI/ReX.git
cd ReX
conda create -n rex python=3.13
conda activate rex
pip install .
```

> **Note:**
>
> By default, `onnxruntime` will be installed.
> If you wish to use a GPU, you should uninstall `onnxruntime` and install `onnxruntime-gpu` instead.
> You can alternatively clone the project and edit the `pyproject.toml` to read "onnxruntime-gpu >= 1.17.0" rather than "onnxruntime >= 1.17.0".

If you want to use ReX with 3D data, you will need to install some optional extra dependencies:

```bash
pip install 'rex_xai[3D]'
```

<!--inclusion-marker-end-do-not-remove-->

## Feedback

Bug reports, questions, and suggestions for enhancements are welcome - please [check the GitHub Issues](https://github.com/ReX-XAI/ReX/issues) to see if there is already a relevant issue, or [open a new one](https://github.com/ReX-XAI/ReX/issues/new)!

## How to Contribute

Your contributions are highly valued and welcomed. To get started, please review the guidelines outlined in the [CONTRIBUTING.md](/CONTRIBUTING.md) file. We look forward to your participation!


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rex-xai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "David Kelly",
    "author_email": "dkellino@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5e/af/b36be9d41665cd80143ec3da941c0ec4b2e45e57eb00a647b358b67d9fe5/rex_xai-0.4.1.tar.gz",
    "platform": null,
    "description": "# ReX: Causal *R*esponsibility *EX*planations for image classifiers\n\n![ReX logo with dinosaur](https://raw.githubusercontent.com/ReX-XAI/ReX/main/assets/rex_logo.png \"ReX Logo with dinosaur\")\n\n<!--- BADGES: START --->\n\n[![Docs](https://readthedocs.org/projects/rex-xai/badge/?version=latest)](https://rex-xai.readthedocs.io/en/latest/)\n[![Tests](https://github.com/ReX-XAI/ReX/actions/workflows/test-package-and-comment.yml/badge.svg)](https://github.com/ReX-XAI/ReX/actions/workflows/test-package-and-comment.yml)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/ReX-XAI/ReX.jl/blob/main/LICENSE)\n\n<!--- BADGES: END --->\n\n---\n\nReX is a causal explainability tool for image classifiers. It also works on tabular and 3D data.\n\nGiven an input image and a classifier, ReX calculates a causal responsibility map across the data and identifies a minimal, sufficient, explanation.\n\n![ladybird](https://raw.githubusercontent.com/ReX-XAI/ReX/main/tests/test_data/ladybird.jpg \"Original Image\") ![responsibility map](https://raw.githubusercontent.com/ReX-XAI/ReX/main/assets/ladybird_rm.png \"Responsibility Map\") ![minimal explanation](https://raw.githubusercontent.com/ReX-XAI/ReX/main/assets/ladybird_301.png \"Explanation\")\n\nReX is black-box, that is, agnostic to the internal structure of the classifier.\nReX finds single explanations, non-contiguous explanations (for partially obscured images), multiple independent explanations, contrastive explanations and lots of other things!\nIt has a host of options and parameters, allowing you to fine tune it to your data.\n\nFor background information and detailed usage instructions, see our [documentation](https://rex-xai.readthedocs.io/en/latest/).\n\n<!--inclusion-marker-start-do-not-remove-->\n\n## Installation\n\nReX can be installed using `pip`.\nWe recommend creating a virtual environment to install ReX.\nReX has been tested using versions of Python >= 3.10.\nThe following instructions assume `conda`:\n\n```bash\nconda create -n rex python=3.13\nconda activate rex\npip install rex_xai\n```\n\nThis should install an executable `rex` in your path.\nTo check that ReX is installed correctly, run:\n\n```bash\nReX --help\n```\n\nTo build from source, clone the repository and run:\n\n```bash\ngit clone git@github.com:ReX-XAI/ReX.git\ncd ReX\nconda create -n rex python=3.13\nconda activate rex\npip install .\n```\n\n> **Note:**\n>\n> By default, `onnxruntime` will be installed.\n> If you wish to use a GPU, you should uninstall `onnxruntime` and install `onnxruntime-gpu` instead.\n> You can alternatively clone the project and edit the `pyproject.toml` to read \"onnxruntime-gpu >= 1.17.0\" rather than \"onnxruntime >= 1.17.0\".\n\nIf you want to use ReX with 3D data, you will need to install some optional extra dependencies:\n\n```bash\npip install 'rex_xai[3D]'\n```\n\n<!--inclusion-marker-end-do-not-remove-->\n\n## Feedback\n\nBug reports, questions, and suggestions for enhancements are welcome - please [check the GitHub Issues](https://github.com/ReX-XAI/ReX/issues) to see if there is already a relevant issue, or [open a new one](https://github.com/ReX-XAI/ReX/issues/new)!\n\n## How to Contribute\n\nYour contributions are highly valued and welcomed. To get started, please review the guidelines outlined in the [CONTRIBUTING.md](/CONTRIBUTING.md) file. We look forward to your participation!\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "causal Responsibility-based eXplanations of black-box-classifiers",
    "version": "0.4.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/ReX-XAI/ReX/issues",
        "Documentation": "https://rex-xai.readthedocs.io/",
        "Homepage": "https://rex-xai.readthedocs.io//",
        "Repository": "https://github.com/ReX-XAI/ReX"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "657ba83c304d13edecb85420bc152b9db33fafd50eabbf12657d01ef3ca8f76f",
                "md5": "136d1382a633ac4ac6fcf7bae4e8e79b",
                "sha256": "62b30b3f7e7e17c6f3e1c8c04c6233449c4057a0c8b6be917b3020e1395e2ae9"
            },
            "downloads": -1,
            "filename": "rex_xai-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "136d1382a633ac4ac6fcf7bae4e8e79b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 58667,
            "upload_time": "2025-07-22T08:31:21",
            "upload_time_iso_8601": "2025-07-22T08:31:21.344746Z",
            "url": "https://files.pythonhosted.org/packages/65/7b/a83c304d13edecb85420bc152b9db33fafd50eabbf12657d01ef3ca8f76f/rex_xai-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5eafb36be9d41665cd80143ec3da941c0ec4b2e45e57eb00a647b358b67d9fe5",
                "md5": "828593e3f70634294c0e51f707d3fc2d",
                "sha256": "e2cb9d97e6b85cad0c3c9ae02b5d6079c0e2d6fe5997924970ecbdb9c29d9762"
            },
            "downloads": -1,
            "filename": "rex_xai-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "828593e3f70634294c0e51f707d3fc2d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 49793,
            "upload_time": "2025-07-22T08:31:23",
            "upload_time_iso_8601": "2025-07-22T08:31:23.222293Z",
            "url": "https://files.pythonhosted.org/packages/5e/af/b36be9d41665cd80143ec3da941c0ec4b2e45e57eb00a647b358b67d9fe5/rex_xai-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-22 08:31:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ReX-XAI",
    "github_project": "ReX",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "rex-xai"
}
        
Elapsed time: 0.66169s