Skip to main content

Add your description here

Project description

Code style: black PyPI version

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

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

xaiev-0.0.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xaiev-0.0.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file xaiev-0.0.2.tar.gz.

File metadata

  • Download URL: xaiev-0.0.2.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

Hashes for xaiev-0.0.2.tar.gz
Algorithm Hash digest
SHA256 caa7caa786530ffb57b88621b7514defcaac99eaa334531efb5b4bc69396080f
MD5 dd435ba2cc91416b079b426c4057678a
BLAKE2b-256 7584d698062f471f068255384542e379b2a22fe967c8bdaa0b447baace893276

See more details on using hashes here.

File details

Details for the file xaiev-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: xaiev-0.0.2-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

Hashes for xaiev-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9358b622d891d5d5de182357272f5df3b667c0e4c0b89f6b09ff95a33c87b803
MD5 7884aed8c9c45c58ae48d19850bd53bc
BLAKE2b-256 fa492fdec6ed950930efdc204b7af98e2bda15d6c50c0afc4caec4e321c8acc5

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