DiamondGAN

DiamondGAN: GAN used for multimodal translation in medical imaging from MRI T1, T2 to MRI FLAIR, DIR


Keywords
CycleGAN, multimodal, translation, MRI
License
MIT
Install
pip install DiamondGAN==1.5

Documentation

DiamondGAN

Tensorflow implementation of DiamondGAN.

The pre-trained generator is provided, which is trained to translate the MRI brain from T1&T2 to FLAIR&DIR. DiamondGAN

Requirement

numpy

tensorflow

tensorflow_addons

SimpleITK

Usage

Command line

python model.py --input_dir INPUT_DIR --output_dir OUTPUT_DIR --model_path MODEL_PATH

  • The INPUT_DIR contains a collection of directories. Each directory should contain t1.nii.gz, t1_bet_mask.nii.gz, t2.nii.gz.
  • The generated FLAIR and DIR images would store in the OUTPUT_DIR and named as syn_flair.nii.gz and syn_dir.nii.gz
  • The MODEL_PATH should be the pre-trained model file, which can be downloaded in the link

Python

from DiamondGAN.model import Generator

Generator(input_dir=INPUT_DIR, output_dir=OUTPUT_DIR, model_path=MODEL_PATH)

Notice

If you download the repository through PyPI, you may need to download the pre-trained model under the link and put it under the sys.prefix