TorchIO

PyPI downloads PyPI version Google Colab notebooks Documentation status Build status Coverage status Code quality Maintainability pre-commit Slack

TorchIO is a Python library for efficient loading, preprocessing, augmentation and patch-based sampling of 3D medical images in deep learning, following the design of PyTorch.

It includes multiple intensity and spatial transforms for data augmentation and preprocessing. These transforms include typical computer vision operations such as random affine transformations and also domain-specific ones such as simulation of intensity artifacts due to MRI magnetic field inhomogeneity (bias) or k-space motion artifacts.

TorchIO is part of the official PyTorch Ecosystem, and it was featured at the PyTorch Ecosystem Day 2021.

Many groups have used TorchIO for their research. The complete list of citations is available on Google Scholar.

The code is available on GitHub. If you like TorchIO, please give the repo a star!

Star

See Getting started for installation instructions and a usage overview.

Contributions are more than welcome. Please check our contributing guide if you would like to contribute.

If you have questions, feel free to ask in the discussions tab:

Discuss

If you found a bug or have a feature request, please open an issue:

Issue

Credits

If you use this library for your research, please cite our preprint:

Pérez-García, F., Sparks, R., Ourselin, S.: TorchIO: a Python library for efficient loading, preprocessing, augmentation and patch-based sampling of medical images in deep learning. Computer Methods and Programs in Biomedicine (Jun 2021), https://doi.org/10.1016/j.cmpb.2021.106236

BibTeX:

@article{perez-garcia_torchio_2021,
   title = {TorchIO: a Python library for efficient loading, preprocessing, augmentation and patch-based sampling of medical images in deep learning},
   journal = {Computer Methods and Programs in Biomedicine},
   pages = {106236},
   year = {2021},
   issn = {0169-2607},
   doi = {https://doi.org/10.1016/j.cmpb.2021.106236},
   url = {https://www.sciencedirect.com/science/article/pii/S0169260721003102},
   author = {P{\'e}rez-Garc{\'i}a, Fernando and Sparks, Rachel and Ourselin, S{\'e}bastien},
   keywords = {Medical image computing, Deep learning, Data augmentation, Preprocessing},
}

This project is supported by the Wellcome / EPSRC Centre for Interventional and Surgical Sciences (WEISS) (University College London) and the School of Biomedical Engineering & Imaging Sciences (BMEIS) (King’s College London).

Wellcome / EPSRC Centre for Interventional and Surgical Sciences School of Biomedical Engineering & Imaging Sciences

This package has been greatly inspired by NiftyNet which is no longer maintained.

See also

PyTorch implementations of 2D and 3D network architectures: