FastMRI
A large-scale dataset of both raw MRI measurements and clinical MRI images.
Install / Use
/learn @facebookresearch/FastMRIREADME
fastMRI
Website | Dataset | GitHub | Publications
Accelerating Magnetic Resonance Imaging (MRI) by acquiring fewer measurements has the potential to reduce medical costs, minimize stress to patients and make MR imaging possible in applications where it is currently prohibitively slow or expensive.
fastMRI is a collaborative research project from Facebook AI Research (FAIR) and NYU Langone Health to investigate the use of AI to make MRI scans faster. NYU Langone Health has released fully anonymized knee and brain MRI datasets that can be downloaded from the fastMRI dataset page. Publications associated with the fastMRI project can be found at the end of this README.
This repository contains convenient PyTorch data loaders, subsampling functions, evaluation metrics, and reference implementations of simple baseline methods. It also contains implementations for methods in some of the publications of the fastMRI project.
Documentation
The fastMRI Dataset
There are multiple publications describing different subcomponents of the data (e.g., brain vs. knee) and associated baselines. All of the fastMRI data can be downloaded from the fastMRI dataset page.
-
Project Summary, Datasets, Baselines: fastMRI: An Open Dataset and Benchmarks for Accelerated MRI ({J. Zbontar*, F. Knoll*, A. Sriram*} et al., 2018)
-
Brain Dataset Properties: Supplemental Material of Results of the 2020 fastMRI Challenge for Machine Learning MR Image Reconstruction ({M. Muckley*, B. Riemenschneider*} et al., 2021)
Code Repository
For code documentation, most functions and classes have accompanying docstrings
that you can access via the help function in IPython. For example:
from fastmri.data import SliceDataset
help(SliceDataset)
Dependencies and Installation
Note: Contributions to the code are continuously tested via GitHub actions.
If you encounter an issue, the best first thing to do is to try to match the
tests environment in setup.cfg, e.g., pip install --editable ".[tests]"
when installing from source.
Note: As documented in Issue 215,
there is currently a memory leak when using h5py installed from pip and
converting to a torch.Tensor. To avoid the leak, you need to use h5py with
a version of HDF5 before 1.12.1. As of February 16, 2022, the conda version
of h5py 3.6.0 used HDF5 1.10.6, which avoids the leak.
First install PyTorch according to the directions at the PyTorch Website for your operating system and CUDA setup. Then, run
pip install fastmri
pip will handle all package dependencies. After this you should be able to
run most of the code in the repository.
Installing Directly from Source
If you want to install directly from the GitHub source, clone the repository,
navigate to the fastmri root directory and run
pip install -e .
Package Structure & Usage
The repository is centered around the fastmri module. The following breaks
down the basic structure:
fastmri: Contains a number of basic tools for complex number math, coil
combinations, etc.
fastmri.data: Contains data utility functions from originaldatafolder that can be used to create sampling masks and submission files.fastmri.models: Contains reconstruction models, such as the U-Net and VarNet.fastmri.pl_modules: PyTorch Lightning modules for data loading, training, and logging.
Examples and Reproducibility
The fastmri_examples and banding_removal folders include code for
reproducibility. The baseline models were used in the arXiv paper.
A brief summary of implementions based on papers with links to code follows. For completeness we also mention work on active acquisition, which is hosted in another repository.
-
Baseline Models
-
Sampling, Reconstruction and Artifact Correction
- Offset Sampling Improves Deep Learning based Accelerated MRI Reconstructions by Exploiting Symmetry (A. Defazio, 2019)
- End-to-End Variational Networks for Accelerated MRI Reconstruction ({A. Sriram*, J. Zbontar*} et al., 2020)
- MRI Banding Removal via Adversarial Training (A. Defazio, et al., 2020)
- Deep Learning Reconstruction Enables Prospectively Accelerated Clinical Knee MRI (P. Johnson et al., 2023)
- Accelerated MRI reconstructions via variational network and feature domain learning (I. Giannakopoulos et al., 2024)
-
Active Acquisition
- (external repository) Reducing uncertainty in undersampled MRI reconstruction with active acquisition (Z. Zhang et al., 2019)
- (external repository) Active MR k-space Sampling with Reinforcement Learning (L. Pineda et al., 2020)
- On learning adaptive acquisition policies for undersampled multi-coil MRI reconstruction (T. Bakker et al., 2022)
-
Prostate Data
Testing
Run pytest tests. By default integration tests that use the fastMRI data are
skipped. If you would like to run these tests, set SKIP_INTEGRATIONS to
False in the conftest.
Training a model
The data README has a bare-bones example for how to load data and incorporate data transforms. This jupyter notebook contains a simple tutorial explaining how to get started working with the data.
Please look at this U-Net demo script for an example of how to train a model using the PyTorch Lightning framework.
Submitting to the Leaderboard
NOTICE: As documented in Discussion 293, the fastmri.org domain was transferred from Meta ownership to NYU ownership on 2023-04-17, and NYU has not yet rebuilt the site. Until the site and leaderbaords are rebuilt by NYU, leaderboards will be unavailable. Mitigations are presented in Discussion 293.
License
fastMRI is MIT licensed, as found in the LICENSE file.
Cite
If you use the fastMRI data or code in your project, please cite the arXiv paper:
@misc{zbontar2018fastMRI,
title={{fastMRI}: An Open Dataset and Benchmarks for Accelerated {MRI}},
author={Jure Zbontar and Florian Knoll and Anuroop Sriram and Tullie Murrell and Zhengnan Huang and Matthew J. Muckley and Aaron Defazio and Ruben Stern and Patricia Johnson and Mary Bruno and Marc Parente and Krzysztof J. Geras and Joe Katsnelson and Hersh Chandarana and Zizhao Zhang and Michal Drozdzal and Adriana Romero and Michael Rabbat and Pascal Vincent and Nafissa Yakubova and James Pinkerton and Duo Wang and Erich Owens and C. Lawrence Zitnick and Michael P. Recht and Daniel K. Sodickson and Yvonne W. Lui},
journal = {ArXiv e-prints},
archivePrefix = "arXiv",
eprint = {1811.08839},
year={2018}
}
If you use the fastMRI prostate data or code in your project, please cite that paper:
@misc{ti
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
API
A learning and reflection platform designed to cultivate clarity, resilience, and antifragile thinking in an uncertain world.
openclaw-plugin-loom
Loom Learning Graph Skill This skill guides agents on how to use the Loom plugin to build and expand a learning graph over time. Purpose - Help users navigate learning paths (e.g., Nix, German)
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
