Paper accepted at BMVC 2021
Code for the paper: "looking at the whole picture: constrained unsupervised anomaly segmentation", freely available at https://arxiv.org/abs/2109.00482
Software minimum requirements:
- torch==1.7.0
- nibabel==3.2.1
- numpy==1.18.4
- cv2==4.2.0
In this work, we benchmark the proposed method on unsueprvised anomaly segmentation using the popular Brats19' dataset of brain MRI images. You can find it in the following link: https://drive.google.com/file/d/1NgHMcIcfVGcoAYWd0ABI6AEZCkpFpvJ8/view?usp=sharing Download the MRI volumes and allocate then in ./data/ folder.
MRI volumes are preprocessed to satisfy the unsupervied paradigm. The full process is described in the manuscript. We provide the following function to process the previously downloaded dataset, including train/val/test splits.
cd code
python adecuate_BRATS.py --dir_datasets ../data/MICCAI_BraTS_2019_Data_Training/ --dir_out ../data/BRATS_5slices/ --scan flair --nSlices 5
Preprocessing and further training functions work using the different MRI modalities in Brats. The variable nSlices indicates the number of sliced around the center of each MRI scan used.
You can train the proposed models for unsupervised anomaly localization as follows:
cd code
python main.py --dir_datasets ../data/BRATS_5slices/ --dir_out ../data/results/proposed/ --method proposed
Note that baselines (e.g. ae, vae, anovaegan, etc.) used in this paper are also trainable using the main.py file, by inspecting the variable '--method'.
For further questions or details, please directly reach out to Julio Silva-Rodríguez ([email protected])
