Giter Club home page Giter Club logo

dsc-to-perfusion's Introduction

Image-To-Image Generative Adversarial Networks for Synthesizing Perfusion Parameter Maps from DSC-MR Images In Cerebrovascular Disease

Aim

The aim of the project was to synthesize perfusion parameter maps from dynamic susceptibility contrast magnetic resonance imaging. For this, we implemented a pix2pix GAN as well as a pix2pix GAN with a temporal component, coined the temp-pix2pix GAN.

Files

  • config.py: configuration file
  • train.py: script for running both the pix2pix and temp-pix2pix GAN
  • model.py: GAN model file
  • evaluate.py: script for evaluating the generated perfusion maps
  • utils: folder containing all helper functions
  • dsc-perf.yml: conda environment to be able to run all scripts

How to run

  1. Install the conda environment using the dsc-perf.yml file
  2. Specify configurations and paths in config.py
  3. To run the GAN with differential privacy, specify the hyperparameters, e.g.:
    python3 train.py \
        --trial "GAN1" \               # trial name
        --data dataset1 \              # name of dataset
        --netG_type tmpandunet \       # Architecture of generator (tmpandunet or unet)
        --netD_type patch \            # Architecture of discriminator
        --inputseq DSC \               # input for G
        --outputseq Tmax \             # output for G
        --batch_size \                 # batch size
        --ngf 128 --ndf 64 \           # number of filters G and D
        --nr_layer_g 6 --nr_layer_d 2  # number of layers G and D
        --norm_layer_g batchnorm \     # type of normalization (G)
        --norm_layer_d batchnorm \     # type of normalization (D)
        --weight_init normal \         # weight initialization distribution
        --epochs 100 \                 # number of epochs
        --lrg 0.0001 --lrd 0.0001 \    # learning rate D and G
        --betas_g 0.5 0.999 \          # optimization parameters G
        --betas_d 0.5 0.999 \          # optimization parameters D
        --loss_g BCE --loss_d BCE \    # loss G and D
        --loss_reconstr l1 \           # reconstruction loss
        --loss_ratio \                 # ratio between adversarial and reconstruction loss for G
        --n_discr 1 \                  # number of D updates
        --upsampling True \            # Upsampling vs deconvolutional layer
        --seed 12                      # number for random seed                 
  4. For generating the perfusion maps and evaluate them, run evaluate.py e.g.:
    python3 evaluate.py \
        --trial "GAN1"                 # trial name 
        --database dataset1 \          # name of dataset
        --dataset test \               # dataset split
        --epoch 99  \                  # determine epoch for generation
        --netG_type \                  # architecture of G
        --upsampling True \            # Upsampling vs deconvolutional layer
        --norm_layer_g batchnorm \     # type of normalization (G)
        --nr_layer_g 6 \               # number of layers G
        --ngf 128 \                    # number of filters G
        --seed 12                      # number for random seed

How to cite

The preprint for this study will soon be available. As soon as the paper is published, this will be updated

dsc-to-perfusion's People

Contributors

tabeak avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

hxy-rose

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.