Official implementation of DISYRE and DISYRE v2.
git clone https://github.com/snaval/disyre.git
cd disyre
- We use the Brain MRI preprocessing pipeline from the UPD Study. Follow the link to download the data and preprocess it.
- Modify
environment_defaults.py
to point to the correct data folders. - The specific files used for training and validation are specified in the json files
that can be found in the
experiments
folder. These should be already setup inenvironment_defaults.py
- Random shapes are used for anomaly generation. The shapes that we used are in
experiments/shapes/
folder.
- Setup accelerate (we used
bf16
in our latest experiments):
accelerate config
- Experiment configuration
Training datasets (with synthetically generated anomalies) and testing datasets configurations are stored in the experiments/dconf
folder.
experiments/dconf/
bratst2.json
dag2D_camcant2.json
fpi2D_camcant2.json
...
Experiments are configured in the experiments/002D
folder.
experiments/002D/
dag01_t2.json
fpi01_t2.json
...
- Train the models with DAG configuration:
accelerate launch trainer_disyre.py --json "experiments/002D/dag01_t1.json"
accelerate launch trainer_disyre.py --json "experiments/002D/dag01_t2.json"
After our MICCAI'24 paper we re-implemented the synthetic anomaly generation process and augmentations using the amazing batchgenerators library. The current implementation achieves slightly improved results in the ATLAS Brain MRI dataset.
While training, models are evaluated using only randomly sampled patches of the test set (i.e. without sliding window methodology).
Full evaluation and visualizations can be run using the jupyter notebook notebooks/evaluation.ipynb
.
If you use this implementation or build on our methods, please cite our papers:
@inproceedings{disyre,
title={DISYRE: Diffusion-Inspired SYnthetic REstoration for Unsupervised Anomaly Detection},
author={Naval Marimont, Sergio and Baugh, Matthew and Siomos, Vasilis and Tzelepis, Christos and Kainz, Bernhard and Tarroni, Giacomo},
booktitle={Proceedings/IEEE International Symposium on Biomedical Imaging: from nano to macro. IEEE International Symposium on Biomedical Imaging},
year={2024},
organization={IEEE}
}
@inproceedings{disyre_v2,
title={Ensembled Cold-Diffusion Restorations for Unsupervised Anomaly Detection},
author={Naval Marimont, Sergio and Baugh, Matthew and Siomos, Vasilis and Tzelepis, Christos and Kainz, Bernhard and Tarroni, Giacomo},
booktitle={Proceedings/Medical Image Computing and Computer Assisted Intervention (MICCAI)},
year={2024},
organization={Springer}
}