This is a source code utilized for experiments of "A fair comparison in deep learning MRI reconstruction"
- Conda (https://docs.conda.io/en/latest/)
- MATLAB 2016b (https://www.mathworks.com/products/matlab.html)
- FSL (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSL)
- ANTs (https://github.com/ANTsX/ANTs)
- CUDA 10.0
- NVIDIA TITAN Xp GPU
- Create conda environment
conda env create -n qsmnet -f requirements.yaml
- Data: please organize the qsmnet data according to the format below
data
└ D111
└ train2
└ IMG.mat
└ train3
└ IMG.mat
└ ...
└ D113
└ ...
- Dataset generation & augmentation (matlab)
cd code_for_dataset_generation
matlab
final_run
- Generate patches for deep learning (python)
cd code_for_dataset_generation
conda activate qsmnet
python patch.py
- Activate conda environment
cd code_for_neural_network
conda activate qsmnet
- QSMnet training
If you want to change hyperparameters, please replace the default value in parser arguments of "train.py"
python train.py -g 0 -s ../save/qsmnet111
- QSMnet inference
If you want to change hyperparameters, please replace the default value in parser arguments of "test.py"
python test.py -g 0 -s ../save/qsmnet111/result -e 25
- Calculate evaluation metrics (NRMSE, SSIM, PSNR, HFEN) of inferenced maps
python testmetric.py -p ../network/qsmnet111/result