TorchIO

PyPI downloads PyPI version Conda version Google Colab notebooks Documentation status Tests status Code style: Ruff Coverage status Code quality Maintainability pre-commit Slack Twitter Twitter commits YouTube

TorchIO is an open-source 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 was featured at the PyTorch Ecosystem Day 2021 and the PyTorch Developer Day 2021.

Many groups have used TorchIO for their research. The complete list of citations is available on Google Scholar, and the dependents list is available on GitHub.

The code is available on GitHub. If you like TorchIO, please go to the repository and star it!

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 paper:

F. Pérez-García, R. Sparks, and S. Ourselin. 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 (June 2021), p. 106236. ISSN: 0169-2607.doi: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},
}

This project is supported by the following institutions:

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

See also

PyTorch implementations of 2D and 3D network architectures: