Skip to the content.

DAPI

This website holds data and information to reproduce the results presented in the publication Discriminative Attribution from Paired Images (DAPI). For the project repository, click here.

DAPI

Installation

git clone https://github.com/dapi-method/dapi.git
cd dapi
conda create --name dapi --file conda_requirements.txt
conda activate dapi
pip install -r pip_requirements.txt
pip install .

DAPI Data

Download DAPI Data here.

Contents:

Instructions

Visualize and calculate DAPI scores

This reproduces main results shown in Fig. 4 & Table 1.

python dapi/experiments/scripts/plot_dapi.py --result_dir dapi_data/results/<experiment>/<net> --experiment <experiment> --net <net>

Plots will be stored at

./dapi_plot_<experiment>_<net>.png

DAPI AUC for each method shown in console (Table 1).

Visualize and calculate DAPI scores for Goyal et al.

This reproduces Fig. 5 & Goyal column in Table 1

python dapi/experiments/scripts/plot_goyal.py --dset <dset_name> --goyal_dset_path dapi_data/results/goyal_<net>/<dset> --dapi_dset_path dapi_data/results/<experiment>/<net> --dapi_method <method>

method must be one of dl, ig, gc, ggc, ingrad, residual.

Plots will be stored at

./<experiment>_goyal_<net>.png

DAPI AUC for each method shown in console (Table 1, GOYAL column).

See dapi/experiments/goyal for instructions on how to reproduce the Goyal data.

Rerun attribution & mask extraction on already translated images

This reproduces the data in dapi_data/results.

python dapi/experiments/scripts/run_dapi.py --config experiments/configs/<experiment>.ini --net <net>

For experiment in {synapses, mnist, disc_a, disc_b, horses_zebras, apples_oranges, summer_winter}, net in {VGG, RES}. Results will be stored in

dapi/experiments/results/<experiment>

Default behaviour is to run the script locally using 20 workers. This can be changed via editing the submit command and num_workers in the respective experiment config file at:

dapi/experiments/configs/<experiment>.ini

Retrain cycle GANs and generate translated datasets from scratch