GithubHelp home page GithubHelp logo

poonono / cdr_mri Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kslav/cdr_mri

0.0 0.0 0.0 21.56 MB

This is the code corresponding to our publication introducing ConvDecoder with physics-based regularization (CD+r) for MRI

License: MIT License

Shell 0.25% Python 99.75%

cdr_mri's Introduction

ConvDecoder with Physics based regularization, implemented using DeepInPy.

DeepInPy is a package for training deep inverse problems in Python by Jonathan I. Tamir, located at https://github.com/utcsilab/deepinpy.git. The code in this repository is adapted from the original DeepInPy framework with slight modifications for the purpose of this project.

It is highly encouraged to review the getting_started.md document for DeepInPy, which explains data formatting and how to set up configurations.

The manuscript associated with this work can be at arxiv:xxxx and has been submitted to Magnetic Resonance in Medicine for review.

Purpose:

The purpose of this project is to apply physics-based regulization in training a modified ConvDecoder architecture (G(w))[Darestani et al. 2021. arXiv:2007.02471v3] for accelerated dynamic MRI.

The proposed regularization term provides an early stopping condition that does not require access to ground truth data. This allows for automated early stoping that yields reconstructed images and corresponding quantitative parameter maps at a high resolution. The proposed pipeline, along with cost function, are defined in the following figure.

Installation

conda install -c pytorch pytorch 
pip install -r requirements.txt

Test dataset

https://utexas.box.com/s/ynm4g740x3rrtiuzdsqma9bweqmonk6v

There are 8 available datasets in .h5 format: 4 raw k-space datasets and 4 simulated datasets from synthesizing the forward model and thus eliminating model error. There are four acceleration factors, R, available for testing: R = 8, 12, 18, 36.

Simulated dataset file names are formatted as follows: dataset_VFA_Sub8_brain_FA4_20_norm1000_noise_simData_bartMask_acc['R'].h5

Raw dataset file names are formatted as follows: dataset_VFA_Sub8_brain_FA4_20_norm1000_noisewhitened_rawData_bartMask_acc['R'].h5

The user may replace 'R' with any one of the four acceleration factors available.

Run an example reconstruction

Here we will reconstruct images from the raw data of a representative subject, whose fully-sampled raw data has been retrospectively accelerated by a factor R. All config files for this subject can be found under /configs and can be edited accordingly to ensure the correct file paths to the dictionary and dataset are used on the user's local machine. The data in h5py format is available for download at the link above under "Test dataset". This code is adapted to run on a GPU.

To run CD+r on reconstructing the raw dataset retrospectively accelerated by a factor of R = 36, one can run the following command in terminal:

python main.py --config Sub8_configs/Sub8_brain_VFA_raw_T1reg_sup_R36.json

For running ConvDecoder without regularization, the following modification is made to select the appropriate config file:

python main.py --config Sub8_configs/Sub8_brain_VFA_raw_T1reg_sup_R36.json

Visualizing reconstruction outputs

Tensorboard is the ideal way to view the training progress of the experiments in a browser window. Log files are saved under cdr_mri/logs and can then be opened using the following command:

tensorboard --logdir logs/[log file name] --port [port number]

cdr_mri's People

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.