This is a pipeline in Tensorflow
framework to preprocess the OCMR (Open-Access Multi-Coil k-Space Dataset for Cardiovascular Magnetic Resonance Imaging)
dataset into the .tfrecord
files.
You can attach the details of the OCMR
dataset by the following materials.
Paper:
Chen, Chong, et al. "OCMR (v1. 0)--Open-Access Multi-Coil k-Space Dataset for Cardiovascular Magnetic Resonance Imaging." arXiv preprint arXiv:2008.03410 (2020).
GitHub:
Homepage:
We note that the num
of fully sampled data of OCMR
is 204, and we divide the data into 124 for training; 40 for validation; and 40 for test, see devide_info.md for the definition of num
and more info. The ratio of train, validation and test is about 7:2:2.
We use ESPIRiT method to estimate the coil sensitivity maps of the multi-coil images and then merge them into single-coil images.
We perform the data augmentation for the training data, i.e., crop the single-coil data into 128×128×16 (x,y,t)
with the step of 32×32×8
. Eventually, we get 1848 training images.
You can download the preprocessed tfrecord files via my onedrive
run main-bart.py
after the following steps done. u may change the dirs
by yourself.
click HERE to download the original full data
u can get more info in the OCMR Homepage https://ocmr.info/, also the download link.
see devide_info.md
-
if you are using
Docker
, you can easily pull the image and create a container viadocker pull yhaoz/tf:2.9.0-bart
-
else
-
install
bart
We use bart to estimate the coil sensitivity maps (csm) to combine the multi-coil image into a single-coil image
For more info,
GitHub: mrirecon/bart: BART: Toolbox for Computational Magnetic Resonance Imaging (github.com)
Homepage: BART Toolbox (mrirecon.github.io)
-
pip install -r requirements.txt
ismrmrd==1.12.5 matplotlib==3.5.2 numpy==1.22.3 tensorflow==2.9.0
-
u may also need to install the
ismrmrd-python-tools
manuallyGitHub: ismrmrd/ismrmrd-python-tools: ISMRMRD Python Toolbox (github.com)
git clone https://github.com/ismrmrd/ismrmrd-python-tools.git pip install ismrmrd-python-tools-master
-
Except bart
, u should install other requirements, requiements.txt
& ismrmrd-python-tools
. Then, u should finetune the code main-bart.py
-
remove the
bart
corresponding codes -
comment the line using
bart
calculate the coil sensitivity maps# csm = bart(1, 'ecalib -m1', k[..., 0])
-
use the espirit implementation in python via
csm = espirit_csm(k[..., 0])
ESPIRiT is a method to estimate the coil sensitivity maps (csm)
For more info,
Paper: Uecker, Martin, et al. "ESPIRiT—an eigenvalue approach to autocalibrating parallel MRI: where SENSE meets GRAPPA." Magnetic resonance in medicine 71.3 (2014): 990-1001.
GitHub:
mikgroup/espirit-python: Python ESPIRiT implementation. (github.com)
-
Note that using
bart
to calculate the csm takes 1 second while using the python implementation of espirit takes more than 100 seconds
We thank the following GitHub repos referred to which we finally complete the preprocessing code.
Keziwen/SLR-Net: Code for our work: "Learned Low-rank Priors in Dynamic MR Imaging" (github.com)
mrirecon/bart: BART: Toolbox for Computational Magnetic Resonance Imaging (github.com)
mikgroup/espirit-python: Python ESPIRiT implementation. (github.com)
This repo is with the GPL-3.0 license.