Add your description here
Project description
Framework for the evaluation of XAI algorithms (XAIEV)
Installation (work in progress)
- clone the repo
pip install -e .- ask the authors for the dataset
Usage
General Notes on Paths
Many scripts and notebooks in this repo depend on paths. To ensure that the code runs on different machines (local development machines, HPC, etc) we use a .env file. This file is machine-specific and is expected to define the necessary paths in environment variables.
Example (see also .env-example):
# Note: This directory might contain several GB of (auto-generated) data
XAIEV_BASE_DIR="/home/username/xaiev/data"
This file is evaluated by utils.read_paths_from_dotenv(). Note: The package opencv-python has to be installed (see requirements.txt)
The expected path structure is as follows:
<BASE_DIR> specified in .env file
├── atsds_large/
│ ├── test/
│ │ ├── 0001/ class directory
│ │ │ ├── 000000.png individual image of this class
│ │ │ └── ... more images
│ │ └── ... more classes
│ └── train/
│ └── <class dirs with image files>
│
├── atsds_large_background/... background images with same structure
│ as in atsds_large (test/..., train/...)
│
├── atsds_large_mask/... corresponding mask images with same structure
│ as in atsds_large (test/..., train/...)
├── model_checkpoints/
│ ├── convnext_tiny_1_1.tar
│ ├── resnet50_1_1.tar
│ ├── simple_cnn_1_1.tar
│ └── vgg16_1_1.tar
│
├── XAI_evaluation
│ ├── simple_cnn/gradcam/test/ same structure as `XAI_results`
│ │ ├── revelation
│ │ └── occlusion
│ └── ... other XAI methods and models
│
└── XAI_results
├── simple_cnn/ cnn model directory
│ ├── gradcam/ xai method
│ │ ├── test/ split fraction (train/test)
│ │ │ ├── mask/
│ │ │ │ ├── 000000.png.npy
│ │ │ │ └── ...
│ │ │ ├── mask_on_image/
│ │ │ │ ├── 000000.png
│ │ │ │ └── ...
│ … … …
├── vgg16/...
├── resnet50/..
├── convnext_tiny/..
Contributing
Code Style
- We (aim to) use
black -l 110 ./to ensure coding style consistency, see also: code style black. - We recommend using typing hints
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xaiev-0.0.1.tar.gz.
File metadata
- Download URL: xaiev-0.0.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7d75d224bdab68fa5a4a70416c910255524293f857bd4039013b0646e27b7ed
|
|
| MD5 |
4c791005b3df4e4586a1f4849ebf8d2f
|
|
| BLAKE2b-256 |
365714b86c602acea96415d96c193fdf5a87d8b0e93e8e39ec3f250d7d1de854
|
File details
Details for the file xaiev-0.0.1-py3-none-any.whl.
File metadata
- Download URL: xaiev-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45e7c0f6e39ecc84d95dc898bc087876908aa56c013b31f1c3d631be457e6f04
|
|
| MD5 |
f478c43229196ee0a8a97abd32067544
|
|
| BLAKE2b-256 |
4c38ef43c17976a60d896e85da40737f0223c6204a53789277a471420f5d8f4c
|