This is the Pytorch implementation used in the MIDL 2023 paper entitled Sparse Activations for Interpretable Disease Grading.
All packages required for running the code in the repository are listed in the file requirements.txt
The code in this repository uses publicly available Kaggle dataset for the diabetic retinopathy detection challenge
Each image was preprocessed by tightly cropping the circular mask of the retinal fundus and resize to 512 x 512. Then an ensemble of EfficientNets trained on the ISBI2020 challenge dataset was used to filter out images with low qualities. The resulting dataset (csv files) used for model training and evaluation are as follows:
The images used for figures 2, 3, 4, 6 and 7 are provided in ./files/images
All experiments are fully specified by the configuration file located at ./configs/default.yaml
. Please adjust paths to dataset in configs/paths.yaml
.
The folder containing the log file and the final weights of the model can be deefined in the function ./utils/func.py -> load_save_paths(params)
-
Update the training configurations and hyperparameters in
./configs/default.yaml
-
Run a model with previously defined parameters
$ CUDA_VISIBLE_DEVICES=x python main.py
-
Monitor the training progress with tensorboard on 127.0.0.1:6006 by running:
$ tensorborad --logdir=/path/to/your/log --port=6006
- Code for figures 2, 3, 4, 6, and 7 may be available upon request.
- Annotation masks may be available upon request
The final models with the best validation weights used for all the experiments (also in Evaluations.ipynb
) are as follows:
- Binary referable denseBagNet model
- Binary referable sparseBagNet model
- Binary referable ResNet model
- Multiclass denseBagNet model
- Multiclass sparseBagNet model
- Multiclass resnet model
- This repository contains modified source code from yijinhuang/pytorch-classification by Yijin Huang, Li Lin, Pujin Cheng, Junyan Lyu, Roger Tam, and Xiaoying Tang
- We greatly thanks the reviews of MIDL 2023 for improving this work.
Donteu Kerol R. Djoumessi., Indu Ilanchezian, Laura Kuhlewein, Hanna Faber., Christian Baumgartner, Bubacarr Bah, Philipp Berens, Lisa Koch. Sparse activations for interpretable disease grading. In Medical Imaging with Deep Learning, Nashville, United States, July 2023.
@inproceedings{donteu2023sparse,
title={Sparse Activations for Interpretable Disease Grading},
author={Donteu, Kerol R Djoumessi and Ilanchezian, Indu and K{\"u}hlewein, Laura and Faber, Hanna and Baumgartner, Christian F and Bah, Bubacarr and Berens, Philipp and Koch, Lisa M},
booktitle={Medical Imaging with Deep Learning},
year={2023}
}