tf-fastmri-data
Built around the tf.data API, tf-fastmri-data offers reliable, unit-tested, datasets for the fastMRI dataset.
Installation
Currently, you need to install the package from source:
git clone https://github.com/zaccharieramzi/tf-fastmri-data.git
cd tf-fastmri-data
pip install .
Example use
from tf_fastmri_data.datasets.cartesian import CartesianFastMRIDatasetBuilder
train_dataset = CartesianFastMRIDatasetBuilder(path='/path/to/singlecoil_train').preprocessed_ds
Data
To download the data, you need to consent to the fastMRI terms listed here. Afterwards, you should receive an email with data download links.
You can then use the environment variable FASTMRI_DATA_DIR to indicate where your fastMRI is.
This will allow you to not have to specify the path when instantiating a FastMRIDatasetBuilder.
PyTorch
The PyTorch equivalent of this library is simply the official fastMRI repository. In particular, the data folder is where you find the data utils.
Benchmark
You can run the benchmark script with the following command:
FASTMRI_DATA_DIR=/path/to/fastmri python benchmark.py
Currently the benchmark gives the following output:
Multi coil with tfio loading (random slice): 0.369743709564209s per-file.
Single coil with tfio loading (random slice): 0.02855397939682007s per-file.
Multi coil with h5py loading (random slice, without preprocessing): 0.010439331208042165s per-file.
Single coil with h5py loading (random slice, without preprocessing): 0.0015996736497735258s per-file.
Single coil training with tfio loading: 0.04578723907470703s per-step.
You can also see the recommendation of TensorBoard regarding the single coil dataset (with a very simple model):
Citation
If you use the fastMRI data or this code in your research, please consider citing the fastMRI dataset paper:
@inproceedings{zbontar2018fastMRI,
title={{fastMRI}: An Open Dataset and Benchmarks for Accelerated {MRI}},
author={Jure Zbontar and Florian Knoll and Anuroop Sriram and Matthew J. Muckley and Mary Bruno and Aaron Defazio 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 James Pinkerton and Duo Wang and Nafissa Yakubova 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}
}
Metadata
Release files for tf-fastmri-data 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tf-fastmri-data-0.0.6.tar.gz | 18.0 kB | Without provenance | Details for tf-fastmri-data-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tf_fastmri_data-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for tf_fastmri_data-0.0.6-py3-none-any.whl |
Total release size: 40.6 kB
Release files / tf-fastmri-data-0.0.6.tar.gz
| Download URL | tf-fastmri-data-0.0.6.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa00f7f09e8249d768f9213bd12d24edf7c6adf36b3f0155a157dd35c2e9639e
|
|
BLAKE2b-256 checksum How to use checksums |
2e1bf423ee5cd13c32471b605c1ace1d91de8200cba5c2d4eaf9bb0cc8a62f94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|
Release files / tf_fastmri_data-0.0.6-py3-none-any.whl
| Download URL | tf_fastmri_data-0.0.6-py3-none-any.whl |
|---|---|
| Size | 22.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93321da0a0a0ba980df0124b8257a71f6ddaecdf4c36dce99e530a23deb6a4ed
|
|
BLAKE2b-256 checksum How to use checksums |
fe3a77af6477546c90286890d13852336b9a91ce334839a4ebeec78bda1f0d92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|
Security for tf-fastmri-data 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.