• Stars
    star
    223
  • Rank 178,458 (Top 4 %)
  • Language
    Python
  • License
    Other
  • Created over 2 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Official PyTorch implementation of SynDiff described in the paper (https://arxiv.org/abs/2207.08208).

SynDiff

Official PyTorch implementation of SynDiff described in the paper.

Muzaffer Özbey, Onat Dalmaz, Salman UH Dar, Hasan A Bedel, Şaban Özturk, Alper Güngör, Tolga Çukur, "Unsupervised Medical Image Translation with Adversarial Diffusion Models", arXiv 2022.

Dependencies

python>=3.6.9
torch>=1.7.1
torchvision>=0.8.2
cuda=>11.2
ninja
python3.x-dev (apt install, x should match your python3 version, ex: 3.8)

Installation

  • Clone this repo:
git clone https://github.com/icon-lab/SynDiff
cd SynDiff

Dataset

You should structure your aligned dataset in the following way:

input_path/
  ├── data_train_contrast1.mat
  ├── data_train_contrast2.mat
  ├── data_val_contrast1.mat
  ├── data_val_contrast2.mat
  ├── data_test_contrast1.mat
  ├── data_test_contrast2.mat

where .mat files has shape of (#images, width, height) and image values are between 0 and 1.0.

Sample Data

Sample toy data can also found under 'SynDiff_sample_data' folder of the repository.

Train


python3 train.py --image_size 256 --exp exp_syndiff --num_channels 2 --num_channels_dae 64 --ch_mult 1 1 2 2 4 4 --num_timesteps 4 --num_res_blocks 2 --batch_size 1 --contrast1 T1 --contrast2 T2 --num_epoch 500 --ngf 64 --embedding_type positional --use_ema --ema_decay 0.999 --r1_gamma 1. --z_emb_dim 256 --lr_d 1e-4 --lr_g 1.6e-4 --lazy_reg 10 --num_process_per_node 1 --save_content --local_rank 0 --input_path /input/path/for/data --output_path /output/for/results

Pretrained Models

We have released pretrained diffusive generators for T1->PD and PD->T1 tasks in IXI and T1->T2 and T2->T1 tasks in BRATS datasets. You can save these weights in relevant checkpoints folder and perform inference.

Test


python test.py --image_size 256 --exp exp_syndiff --num_channels 2 --num_channels_dae 64 --ch_mult 1 1 2 2 4 4 --num_timesteps 4 --num_res_blocks 2 --batch_size 1 --embedding_type positional  --z_emb_dim 256 --contrast1 T1  --contrast2 T2 --which_epoch 50 --gpu_chose 0 --input_path /input/path/for/data --output_path /output/for/results


Citation

Preliminary versions of SynDiff are presented in NeurIPS Medical Imaging Meets and IEEE ISBI 2023. You are encouraged to modify/distribute this code. However, please acknowledge this code and cite the paper appropriately.

@misc{özbey2023unsupervised,
      title={Unsupervised Medical Image Translation with Adversarial Diffusion Models}, 
      author={Muzaffer Özbey and Onat Dalmaz and Salman UH Dar and Hasan A Bedel and Şaban Özturk and Alper Güngör and Tolga Çukur},
      year={2023},
      eprint={2207.08208},
      archivePrefix={arXiv},
      primaryClass={eess.IV}
}

For any questions, comments and contributions, please contact Muzaffer Özbey (muzafferozbey94[at]gmail.com )

(c) ICON Lab 2022


Acknowledgements

This code uses libraries from, pGAN, StyleGAN-2, and DD-GAN repositories.

More Repositories

1

ResViT

Official Implementation of ResViT: Residual Vision Transformers for Multi-modal Medical Image Synthesis
Python
126
star
2

pGAN-cGAN

Official implementations of the pixel-wise and cycle-consistency GAN models for multi-contrast MRI synthesis
Python
60
star
3

I2I-Mamba

Official implementation of I2I-Mamba, an image-to-image translation model based on selective state spaces
Python
54
star
4

AdaDiff

Official PyTorch implementation of AdaDiff described in the paper (https://arxiv.org/abs/2207.05876).
Python
48
star
5

SLATER

Official implementation of the paper: Unsupervised MRI Reconstruction via Zero-Shot Learned Adversarial Transformers
Python
36
star
6

BolT

Fused Window Transformers for fMRI Time Series Analysis (https://www.sciencedirect.com/science/article/pii/S1361841523001019)
Python
29
star
7

SelfRDB

Official PyTorch implementation of SelfRDB, a diffusion bridge model for multi-modal medical image synthesis
Python
27
star
8

FDB

Official implementation of the Fourier-constrained diffusion bridges (FDB) model for MRI reconstruction
Python
25
star
9

mrirecon

ICON Lab @ Bilkent University
18
star
10

pFLSynth

One Model to Unite Them All: Personalized Federated Learning of Multi-Contrast MRI Synthesis (pFLSynth)
Python
17
star
11

FedGIMP

Official TensorFlow implementation of Federated Learning of Generative Image Priors for MRI Reconstruction (FedGIMP)
Python
13
star
12

HST

Official implementation of Hierarchical Spectrogram Transformers (HST)
Python
13
star
13

A-LORAKS-CS

Automated Parameter Selection for Accelerated MRI Reconstruction via Low-Rank Modeling of Local k-Space Neighborhoods
MATLAB
5
star
14

ssGAN

Official implementation of the semi-supervised GAN model for MRI contrast translation
Python
5
star
15

ProvoGAN

Official Implementation of Progressively Volumetrized Deep Generative Models for Data-Efficient Contextual Learning of MR Image Recovery
Python
4
star
16

TranSMS

Official Implementation of Transformers for System Matrix Super-resolution (TranSMS)
Python
4
star
17

DreaMR

Diffusion-driven Counterfactual Explanation for Functional MRI (https://arxiv.org/abs/2307.09547)
Python
4
star
18

CELF

Constrained Ellipse Fitting for Efficient Parameter Mapping With Phase-Cycled bSSFP MRI
MATLAB
4
star
19

SSDiffRecon

Official implementation of Self-Supervised Diffusion Model for MRI Reconstruction
Python
3
star
20

FD-Net

Official repository for "FD-Net: An Unsupervised Deep Forward-Distortion Model for Susceptibility Artifact Correction in EPI"
Python
3
star
21

ReCaT

MATLAB
2
star
22

PP-MPI

Official repository for Plug-n-Play MPI Reconstruction
Python
2
star
23

SPIN-VM

MATLAB
2
star
24

PSFNet

Official implementation of "Parallel-stream fusion of scan-specific and scan-general priors for learning deep MRI reconstruction in low-data regimes"
Python
2
star
25

DEQ-MPI

Official implementation of DEQ-MPI: A deep equilibrium reconstruction model for magnetic particle imaging
Python
1
star
26

PESCaT

Projection onto epigraph sets for rapid self-tuning compressed-sensing MRI
MATLAB
1
star