Giter Site home page Giter Site logo

lupus83 / keepthefaith Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ai-med/keepthefaith

0.0 0.0 0.0 69 KB

Code of "Keep the Faith: Faithful Explanations in Convolutional Neural Networks for Case-Based Reasoning", published at AAAI24

License: GNU General Public License v3.0

Python 100.00%

keepthefaith's Introduction

Keep the Faith: Faithful Explanations in Convolutional Neural Networks for Case-Based Reasoning

Conference Paper Preprint License

This repository contains the to the paper "Keep the Faith: Faithful Explanations in Convolutional Neural Networks for Case-Based Reasoning"

If you use this code, please cite the following:

@inproceedings{wolf2024keep,
  title={Keep the Faith: Faithful Explanations in Convolutional Neural Networks for Case-Based Reasoning},
  author={Wolf, Tom Nuno and Bongratz, Fabian and Rickmann, Anne-Marie and P{\"o}lsterl, Sebastian and Wachinger, Christian},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={38},
  number={6},
  pages={5921--5929},
  year={2024}
}

Installation

First, create and activate the conda environment

conda env create --file requirements.yaml
pip install --no-deps -e .
conda activate ktf

Usage

In order to train a model, hydra requires the data_dir variable to be set to the folder which contains the data, e.g. /home/datasets:

python train.py data_dir=/home/datasets

Other config variables, e.g. learning rate, model, etc., can be set by appending them to above command call.

Testing a model is done via the test script, which requires the ckpt_path variable to be set. This variable is the path to the pytorch lightning checkpoint of a trained model, e.g. /home/model/checkpoints/epoch=99-bacc.ckpt:

python test.py data_dir=/home/datasets ckpt_path='/home/model/checkpoints/epoch\=99-bacc.ckp'

Utility functions for explanations are available in explain.py.

keepthefaith's People

Contributors

lupus83 avatar sebp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.