To create the environment, please install anaconda
/miniconda
and run the following command
conda env create -f env.yml
We select four public tasks as our experimental challenges, namely ACDC, Lits, BraTS'17, VIPCUP. We do the pre-processing on each dataset separetely. Please refer the following step to pre-process the corresponding dataset.
- Download ACDC dataset from here and save it at
ACDC_DIR
. - Generate the data split files for the cross validation
python src/preprocess/acdc_data_split.py {ACDC_DIR} {ACDC_DIR}/data_split
- Download LiTS dataset from here and save it at
LITS_DIR
. - Change the data directory structure
python src/preprocess/lits_directory_structure.py {LITS_DIR}
- Pre-process and save at
LITS_PROCESSED_DIR
python src/preprocess/lits_preprocessing.py.py {LITS_DIR} {LITS_PROCESSED_DIR}
- Generate the data split files for the cross validation
python src/preprocess/lits_data_split.py {LITS_PROCESSED_DIR} {LITS_PROCESSED_DIR}/data_split
- Download BraTS'17 dataset from here and save it at
BRATS_DIR
. - Pre-process and save at
BRATS_PROCESSED_DIR
python src/preprocess/brats17_preprocessing.py {BRATS_DIR} {BRATS_PROCESSED_DIR}
- Generate the data split files for the cross validation
python src/preprocess/brats17_data_split.py {BRATS_PROCESSED_DIR} {BRATS_PROCESSED_DIR}/data_split
- Download VIPCUP dataset and save it at
VIPCUP_DIR
. - Generate
.nii.gz
files from raw dicom files
python src/preprocess/vipcup_dicom2nifty.py {VIPCUP_DIR} {VIPCUP_NII_DIR}
- Pre-process and save at
VIPCUP_PROCESSED_DIR
python src/preprocess/vipcup_preprocessing.py {VIPCUP_DIR} {VIPCUP_PROCESSED_DIR}
- Generate the data split files for the cross validation
python src/preprocess/vipcup_preprocessing.py {VIPCUP_PROCESSED_DIR} {VIPCUP_PROCESSED_DIR}/data_split
We provide training and testing configurations for baselines and our proposed network. Please note that the paths in configurations should be modified.
To reproduce the proposed Network Alchemy
algorithm, please follow these commands. If you want to apply the method on another task, you can refer to the experimental configs.
python -m src.main configs/train/brats17_seg/network_alchemy_pre_trained_ct_fine_tuned/identification/data_split_{0/1/2}_config.yaml
python -m src.main configs/train/brats17_seg/network_alchemy_pre_trained_ct_fine_tuned/modification/data_split_{0/1/2}_config.yaml
python -m src.main configs/train/brats17_seg/network_alchemy_pre_trained_ct_fine_tuned/maximization/data_split_{0/1/2}_config.yaml
python -m src.main configs/train/vipcup_seg/network_alchemy_pre_trained_mr_fine_tuned/identification/data_split_{0/1/2}_config.yaml
python -m src.main configs/train/vipcup_seg/network_alchemy_pre_trained_mr_fine_tuned/modification/data_split_{0/1/2}_config.yaml
python -m src.main configs/train/vipcup_seg/network_alchemy_pre_trained_mr_fine_tuned/maximization/data_split_{0/1/2}_config.yaml
python -m src.main configs/test/brats17_seg/network_alchemy_pre_trained_ct_fine_tuned/data_split_{0/1/2}_config.yaml
python -m src.main configs/test/vipcup_seg/network_alchemy_pre_trained_mr_fine_tuned/data_split_{0/1/2}_config.yaml