Skip to content

This repository is the implementation of the CT to MR synthesis using TensorFlow

Notifications You must be signed in to change notification settings

ChengBinJin/MRGAN-TensorFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

MRGAN-TensorFlow

This repository is a TensorFlow implementation of the paper "Deep CT to MR Synthesis Using Paired and Unpaired Data," Sensors, 2019, 19(10), 2361.

Requirements

  • tensorflow 1.14.0
  • numpy 1.16.2
  • opencv 4.1.0.25
  • scipy 1.2.1
  • matplotlib 3.0.3

CT-Based Synthetic MRI Generation Results

The following figure shows a qualitative comparison between the paired training, unpaired training, and the approach presented herein.

The figure shows an input CT image, and the corresponding synthesized MR images from the CycleGAN and MR-GAN. It also shows their reconstructed CT images and their relative difference maps.

Implementations

Related Works

Documentation

Directory Hierarchy

MRGAM
├── src
│   ├── DC2Anet
│   │   ├── build_data.py
│   │   ├── cycle_gan.py
│   │   ├── data_preprocess.py
│   │   ├── dataset.py
│   │   ├── DB05_data_preprocessing.py
│   │   ├── dcgan.py
│   │   ├── eval.py
│   │   ├── experiments.py
│   │   ├── gan_repository.py
│   │   ├── laplotter.py
│   │   ├── main.py
│   │   ├── mnist_dataset.py
│   │   ├── mrigan.py
│   │   ├── mrigan_01.py
│   │   ├── mrigan_02.py
│   │   ├── mrigan01_lsgan.py
│   │   ├── mrigan02.py
│   │   ├── mrigan02_lsgan.py
│   │   ├── mrigan03.py
│   │   ├── mrigan03_lsgan.py
│   │   ├── pix2pix.py
│   │   ├── pix2pix_patch.py
│   │   ├── reader.py
│   │   ├── solver.py
│   │   ├── TensorFlow_utils.py
│   │   ├── test.py
│   │   ├── test_main.py
│   │   ├── test_solver.py
│   │   ├── utils.py
│   │   ├── vanila_gan.py
│   │   └── wgan.py
Data
├── brain01
│   └── raw
└── brain02
│   ├── CT.tfrecords
│   └── MRI.tfrecords

Training MR-GAN

Under the folder of the src, using main.py train a DC2Anet model. Example usage:

python main.py 
  • gan_model: select gan model, default: pix2pix
  • is_train: training or inference mode, default: False
  • is_continue: continue training, default: False
  • gpu_index: gpu index if you have multiple gpus, default: 0
  • dataset: dataset name, default: brain01
  • which_direction: AtoB (0) or BtoA (1), default: 0
  • sample_batch: sample batch size, default: 4
  • batch_size: batch size, default: 4
  • learning_rate: initial learning rate for Adam, default: 2e-4
  • z_dim: dimension of z vector, default: 100
  • beta1: momentum term of Adam, default: 0.5
  • iters: number of iterations, default: 200000
  • save_freq: save frequency for model, default: 10000
  • print_freq: print frequency for loss, default: 100
  • sample_freq: sample frequency for saving image, default: 500
  • load_model: folder of saved model that you wish to continue training, (e.g. 20181127-2116), default: None

Test MR-GAN

Use main.py to test the MR-GAN model. Example usage:

python main.py --load_model=folder/you/wish/to/test/e.g./20181127-2116

please refer to the above arguments.

Tensorboard Visualization

Tensorboard collects all of the loss terms. Under the folder src\logs, using the following command:

tensorboard --logdir=folder/you/wish/to/test/e.g./20181127-2116

Algorithm

The MR-GAN procedure is described in the following Algorithm:

Comparison with Baselines

Table 1 shows a quantitative evaluation using MAE and PSNR to compare the different methods in the test set. The proposed method is compared with the independent training using the paired and unpaired data.

Citation

  @misc{chengbinjin2019MRGAN,
    author = {Cheng-Bin Jin},
    title = {MRGAN-Tensorflow},
    year = {2019},
    howpublished = {\url{https://github.com/ChengBinJin/MRGAN-TensorFlow},
    note = {commit xxxxxxx}
  }

License

Copyright (c) 2018 Cheng-Bin Jin. Contact me for commercial use (or rather any use that is not academic research) (email: [email protected]). Free for research use, as long as proper attribution is given and this copyright notice is retained.

About

This repository is the implementation of the CT to MR synthesis using TensorFlow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages