This repository represents the code of the paper Typicality Excels Likelihood for Unsupervised Out-of-Distribution Detection in Medical Imaging.
The code is adapted from here.
The datasets used in this work can be accessed below:
Dataset name | Imaging modality | Download link |
---|---|---|
ISIC | Dermoscopic RGB images | Link |
COVID-19 | Chest X-Ray | Link |
Pneumonia | Chest X-Ray | Link |
HeadCT | Brain CT (2D) | Link |
Setup the conda environment with environment.yml
:
conda env create -f environment.yml
Active the typicalmood
conda environment:
source activate
conda activate typicalmood
Train the model on the ISIC dataset:
python train.py --data isic --batch_size 8 --alpha 2.0 --patience 10
Other arguments can be seen by calling:
python train.py -h
.
The configuration of the GLOW model can be adjusted in config_glow.py
. The hyperparameters used to train on ISIC can be adjusted in isic.py
.