Giter VIP home page Giter VIP logo

mrigan's Introduction

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]')

mrigan's People

Contributors

shubham-sri avatar

Stargazers

 avatar Shubham Srivastava avatar Ajay Chauhan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.