Metadata-Version: 2.1
Name: easy_explain
Version: 0.4.0
Summary: A library that helps to explain AI models in a really quick & easy way
Home-page: https://github.com/stavrostheocharis/stavrostheocharis
Download-URL: https://github.com/stavrostheocharis/easy_explain/archive/refs/tags/v0.4.0.tar.gz
Author: Stavros Theocharis
Author-email: stavrostheocharis@yahoo.gr
License: MIT
Keywords: explainable ai,xai,easy explain
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: backports.weakref
Requires-Dist: captum
Requires-Dist: matplotlib
Requires-Dist: opencv-python
Requires-Dist: Pillow
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: torch
Requires-Dist: torchvision
Requires-Dist: ultralytics

<div align="center">
 
# Easy Explain

[![Python Version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10-green.svg)](#supported-python-versions) 
[![GitHub][github_badge]][github_link]
[![PyPI][pypi_badge]][pypi_link]
[![Download][download_badge]][download_link]
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Licence][licence_badge]][licence_link] 

**Simplify the Explanation of AI Models**
 
</div>

Unlock the "why" behind your AI models' decisions with `easy-explain`, a Python package designed to democratize access to advanced XAI algorithms. By integrating state-of-the-art explanation techniques with minimal code, we make AI transparency accessible to developers and researchers alike.

> [!IMPORTANT]
> The new version of `easy-explain` has breaking changes. We have changed the logic of different imports to support more models like YoloV8. Have a look at the provided [examples](https://github.com/stavrostheocharis/easy_explain/tree/main/examples).


## Requirements

### Python Versions Supported
- **Primary**: `3.10`
- **Also Supported**: `3.8`, `3.9`

Ensure one of these Python versions is installed on your system to use `easy-explain`.


### Install Environment & Dependencies

`easy-explain` can be seamlessly integrated into your projects with a straightforward installation process:


#### Installation as a Package

To incorporate `easy-explain` into your project as a dependency, execute the following command in your terminal:


```bash
pip install easy-explain
```

## Features and Functionality

`easy-explain` uses under the hood different packages based on the model to be used. [Captum](https://captum.ai/) is used for classification models and it aids to comprehend how the data properties impact the model predictions or neuron activations, offering insights on how the model performs. Captum comes together with [Pytorch library](https://pytorch.org/).
There are also other customade algorithms to support other models like the LRP implementation for YoloV8.


Currently, `easy-explain` specializes in two cutting-edge XAI methodologies for images:

- Occlusion: For deep insight into classification model decisions.
- Layer-wise Relevance Propagation (LRP): Specifically tailored for YoloV8 models, unveiling the decision-making process in object detection tasks.

## Quick Start

To begin unraveling the intricacies of your model's decisions, import and utilize the corresponding classes as follows:

```python
from easy_explain.methods.occlusion.occlusion import OcclusionExplain 

```

```python
from easy_explain.methods.lrp.yolov8.yolo import YOLOv8LRP

```

For more information about how to begin have a look at the [examples notebooks](https://github.com/stavrostheocharis/easy_explain/tree/main/examples).

## Examples

Explore how `easy-explain` can be applied in various scenarios:



![Use Case Example](easy_explain/images/lion-heat-map.png "Use Case Example")

![Use Case Example](easy_explain/images/siberian-positive.png "Use Case Example")

![Use Case Example](easy_explain/images/class-traffic.png "Use Case Example")

## How to contribute?

`easy-explain` thrives on community contributions, from feature requests and bug reports to code submissions. We encourage you to share your insights, improvements, and use cases to foster a collaborative environment for advancing XAI.

### Getting Involved

Submit Issues: Encounter a bug or have a feature idea? Let us know through our  [issues page](https://github.com/stavrostheocharis/easy_explain/issues).

Code Contributions: Interested in contributing code? Please refer to our  [`CONTRIBUTING`](https://github.com/stavrostheocharis/easy_explain/blob/main/CONTRIBUTING.md) guidelines for more information on how to get started..

Join us in making AI models more interpretable, transparent, and trustworthy with `easy-explain`.


[github_badge]: https://badgen.net/badge/icon/GitHub?icon=github&color=black&label

[github_link]: https://github.com/stavrostheocharis/easy_explain

[pypi_badge]: https://badge.fury.io/py/easy-explain.svg

[pypi_link]: https://pypi.org/project/easy-explain/

[download_badge]: https://badgen.net/pypi/dm/easy-explain

[download_link]: https://pypi.org/project/easy-explain/#files

[licence_badge]: https://img.shields.io/github/license/stavrostheocharis/streamlit-token-craft

[licence_link]: LICENSE
