HieuPhan33 / MaskGAN

MaskGAN for unpaired MR-to-CT synthesis. Official implementation of MICCAI 2023
27 stars 6 forks source link
attentiongan cyclegan medical-image-synthesis segmentation unpaired-image-translation

MaskGAN for Unpaired MR-to-CT Translation [MICCAI2023]

arXiv cite

πŸ“’ Updates!

πŸ† MaskGAN Framework

A novel unsupervised MR-to-CT synthesis method that:

Framework

Comparison with State-of-the-Art Methods on Paediatric MR-CT Synthesis

Result

The repository offers the official implementation of our paper in PyTorch. The next reflects some results of using MaskGAN in different benchmarks. Results are shown over original values on radiometric values for MRI and Hounsfield unit (HU) for CT scans. In addition, the best weights obtained during the training stage are shared to be used for inference or retraining.

Unpaired Pediatric brain MRI-CT images (Private dataset) Methods Type MRI→CT CT→MRI
MAE ↓ PSNR ↑ SSIM (%) ↑ MAE ↓ PSNR ↑ SSIM (%) ↑
CycleGAN [Zhu2017,ICCV] 2D 80.86 21.33 75.07 118.15 15.04 65.26
AttentionGAN [Tang2021,TNNLS] 2D 81.67 21.24 75.94 115.30 16.22 67.13
QS-Attn-Seg [Liu2023,arxiv] 3D 63.55 22.32 81.42 113.82 16.71 67.97
MaskGAN (w/o Shape) 2D 62.28 22.56 82.36 112.88 16.83 68.34
MaskGAN (Ours) 2D 62.13 22.89 82.50 112.75 16.95 68.44

Unpaired Adult brain MRI/CT images. Original dataset are paired (Link)

Methods Type MRI→CT CT→MRI
MAE ↓ PSNR ↑ SSIM (%) ↑ MAE ↓ PSNR ↑ SSIM (%) ↑
CycleGAN [Zhu2017,ICCV] 2D 52.10 21.43 84.12 71.57 19.67 62.07
AttentionGAN [Tang2021,TNNLS] 2D 51.41 21.48 84.15 72.23 19.88 63.75
QS-Attn-Seg [Liu2023,arxiv] 3D 46.71 22.29 86.01 63.98 20.08 66.23
MaskGAN (w/o Shape) 2D 46.26 22.32 86.05 63.60 20.12 67.68
MaskGAN (Ours) 2D 45.11 22.45 86.31 62.95 20.53 67.87

πŸ› οΈ Installation

Option 1: Directly use our Docker image

Option 2: Install environments locally

πŸ“š Dataset Preparation and Mask Generations

Refer to preprocess/README.md file.

πŸš€ Model Testing

python test.py --dataroot dataroot --name exp_name --gpu_ids 0 --model mask_gan --netG att 
--dataset_mode unaligned --no_dropout --load_size 150 --pad_size 225 --crop_size 224 --preprocess resize_pad_crop --no_flip
--batch_size 4

The results will be saved at ./results/exp_name. Use --results_dir {directory_path_to_save_result} to specify the results directory. There will be four folders fake_A, fake_B, real_A, real_B created in results.

πŸ’Ύ Use of pretrained weights

This zip file contains trained weights of MaskGAN run over MRI/CT pediatric brain dataset. To use them, unzip the contents in the folder pretrained_weights. You can use them as pretrained weights during your training step or using directly for testing with the defaults parameters. Just add the next parameter.

--use_pretrained_weights True

You can use other pretrained weights, which are shown in the first table of this page.

πŸ” Evaluate results

python evaluation.py --results_folder exp_name

Results for MRI-to-CT synthesis generation and CT-to-MRI are shown.

πŸš€ MaskGAN Training

πŸ“œ Citation

If you use this code for your research, please cite our papers.

@inproceedings{phan2023structure,
  title={Structure-preserving synthesis: {MaskGAN} for unpaired mr-ct translation},
  author={Phan, Vu Minh Hieu and Liao, Zhibin and Verjans, Johan W and To, Minh-Son},
  booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
  pages={56--65},
  year={2023},
  organization={Springer}
}

πŸ™ Acknowledgments

This source code is inspired by CycleGAN and AttentionGAN.