This repository is the official implementation of An Improved Deep Learning Framework for MR-to-CT Image Synthesis with a New Hybrid Objective Function.
- Download or clone this repo to your computer.
- Run
pip install -r requirements.txt
to install the required Python packages. - The code was developed and tested on Python 3.6.13 and Ubuntu 16.04.
- Note that this codebase runs on PyTorch Lightning library.
- Create a custom Dataset class for your own data. Follow the official PyTorch tutorial if you are unfamiliar with this step.
- Integrate your custom Dataset class into
main_train.get_training_dataloaders()
. - Run
python main_train.py --gpus 1
to start training and testing the APS model on 1 GPU. Executepython main_train.py --help
for the available input arguments.
- Ensure that the data are normalized using min-max formula and resized to the
expected input image size (default is 288x288). The expected input image size
is set via
--image_size
input argument ofmain_train.py
. - The
__getitem__()
of your custom Dataset class has to return a dict with the following keys:- ct: the CT image tensor.
- in_phase: the MR in-phase image tensor.
- ct_min: the smallest CT's HU value before the min-max normalization. This is needed for metric computations.
- ct_max. the biggest CT's HU value before the min-max normalization. This is needed for metric computations.
If you use this code for your research, please cite our paper.
@inproceedings{ang2022,
title={An improved deep learning framework for MR-to-CT image synthesis with a new hybrid objective function},
author={Ang, Sui Paul and Phung, Son Lam and Field, Matthew and Schira, Mark Matthias},
booktitle={Proceedings of the IEEE International Symposium on Biomedical Imaging},
year={2022}
}
Some parts of our code are inspired by F-LSeSim and CycleGAN.