Skip to content

shubham-sri/MRIGan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MRIGan

Dataset

Dataset is placed in the data folder. T1 and T2 dataset placed under respective folders. All path are defined under utils module in paths.py file.

Model

Model related code is placed under model folder. mri_gan.py contains the intialization, training and ploting code. generator.py and discriminator.py contains the generator and discriminator model respectively. conv_block.py contains the convolution block used in both generator and discriminator.

Architecture

Downsample block used skip connection from input to output. Upsample block used skip connection from input to output and from output to input. The skip connection is used to preserve the spatial information. The architecture is shown below.

Generator Architecture is U-Net like architecture. And discriminator is PatchGAN architecture.

Training

Training is done using mri_gan.py file. The training is done in two steps. First step is to train the generator and discriminator separately. Second step is to train the generator and discriminator together. The training is done for 260 epochs. The training is done using Adam optimizer with learning rate 0.0002 and beta1 0.5. The training is done on A6000 GPU.

Results

GIF of the results is shown below. GIF

Final epoch results are shown below.

Final Epoch

Model archive is below. Model Archive

To use pre-trained model

  • clone the repo
  • import the pre-trained helper function from model/pre_trained.py
from src.model.pre_trained import load_model

model = load_model(model_type='[T1 or T2]')

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published