The idea of this repository is to have a way to rapidly benchmark new solutions against existing reconstruction algorithms on the fastMRI dataset single-coil track. The reconstruction algorithms implemented or adapted to the fastMRI dataset include to this day:
- zero filled reconstruction
- LORAKS, using the LORAKS Matlab toolbox
- Wavelet-based reconstruction (i.e. solving an L1-based analysis formulation optimisation problem with greedy FISTA), using pysap-mri
- U-net
- DeepCascade net
- KIKI net
- Learned Primal Dual, adapted to MRI reconstruction
- XPDNet, a modular unrolled reconstruction algorithm, in which you can plug your best denoiser.
- NCPDNet, an unrolled reconstruction algorithm for non-cartesian acquisitions, with density-compensation.
All the neural networks are implemented in TensorFlow with the Keras API. The older ones (don't judge this was the beginning of my thesis) are coded using the functional API. The more recent ones are coded in the subclassed API and are more modular. For the LORAKS reconstruction, you will not be able to reconstruct the proper fastMRI data because of the A/D oversampling.
The main reconstruction settings are cartesian single-coil and multi-coil 2D reconstruction with random and "periodic sampling". These settings are covered by almost all the networks in this repo, mainly because they are the settings of the fastMRI challenge.
Non-cartesian: you can reconstruct non-cartesian data using the NCPDNet.
It relies on the TensorFlow implementation of the NUFFT, tfkbnufft
.
This network will allow you to work on 2D single-coil and multi-coil data, as well as 3D single-coil data.
Deep Image Prior: you can also reconstruct non-cartesian data in an untrained fashion using the DIP model. This idea originated from the Deep Image Prior paper, and was later adapted to MRI reconstruction by different works (Accelerated MRI with untrained Neural networks, Time-Dependent Deep Image Prior for Dynamic MRI). It currently is only used for 2D non-cartesian data (primarily for computation time reasons), but you can extend it easily to 2D cartesian data and 3D (PRs welcome).
The scripts to train the neural networks are located in fastmri_recon/training_scripts/
.
You just need to install the package and its dependencies:
pip install . &&\
pip install -r requirements.txt
The simplest and most versatile way to write a neural network for reconstruction is to subclass the CrossDomainNet
class.
An example is the PDnet
To reproduce the results of the paper for the fastMRI dataset, run the following script (here for the PD contrast):
python fastmri_recon/evaluate/scripts/paper_eval.py --contrast CORPD_FBK
To reproduce the results of the paper for the OASIS dataset, run the following script (here for less samples):
python fastmri_recon/evaluate/scripts/paper_eval_oasis.py --n-samples 100
Finally to reproduce the figures of the paper, you will need to use the qualitative_validation_for_net
notebook.
The fastMRI data must be located in a directory whose path is stored in the FASTMRI_DATA_DIR
environment variable.
It can be downloaded on the official website after submitting a request (bottom of the page).
The package currently supports public single coil and multi coil knee data.
The OASIS data must be located in a directory whose path is stored in the OASIS_DATA_DIR
environment variable.
It can be downloaded on the XNAT store after creating an account.
You can for example use the ZIP download available on this page.
The project is OASIS3.
The whole list of sessions that need to be downloaded is available in OASIS_list.csv.
This work will be presented at the International Symposium on Biomedical Imaging (ISBI) in April 2020. An extended version has been published in MDPI Applied sciences. If you use this package or parts of it, please cite one of the following work:
- Benchmarking Deep Nets MRI Reconstruction Models on the FastMRI Publicly Available Dataset
- Benchmarking MRI Reconstruction Neural Networks on Large Public Datasets
- XPDNet for MRI Reconstruction: an Application to the fastMRI 2020 Brain Challenge
- Density Compensated Unrolled Networks for Non-Cartesian MRI Reconstruction
This package has been used to perform MRI reconstruction in the following projects (in addition to the ones mentioned above):