torchio 0.20.23


pip install torchio

  Latest version

Released: Oct 08, 2025


Meta
Author: TorchIO contributors
Maintainer: Fernando Perez-Garcia
Requires Python: >=3.9

Classifiers

Development Status
  • 4 - Beta

Environment
  • Console

Intended Audience
  • Science/Research

License
  • OSI Approved :: Apache Software License

Natural Language
  • English

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3
  • Python :: 3 :: Only
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Topic
  • Scientific/Engineering
  • Scientific/Engineering :: Artificial Intelligence
  • Scientific/Engineering :: Image Processing
  • Scientific/Engineering :: Medical Science Apps.

Typing
  • Typed

TorchIO logo

Tools like TorchIO are a symptom of the maturation of medical AI research using deep learning techniques.

Jack Clark, Policy Director at OpenAI (link).


Package PyPI downloads PyPI version Conda version
CI Tests status Documentation status Coverage status
Code Code style Code quality pre-commit
Tutorials Google Colab
Community YouTube All Contributors

Progressive artifacts

Augmentation


Original Random blur
Original Random blur
Random flip Random noise
Random flip Random noise
Random affine transformation Random elastic transformation
Random affine transformation Random elastic transformation
Random bias field artifact Random motion artifact
Random bias field artifact Random motion artifact
Random spike artifact Random ghosting artifact
Random spike artifact Random ghosting artifact

Queue

(Queue for patch-based training)


TorchIO is a Python package containing a set of tools to efficiently read, preprocess, sample, augment, and write 3D medical images in deep learning applications written in PyTorch, including intensity and spatial transforms for data augmentation and preprocessing. 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 or k-space motion artifacts.

This package has been greatly inspired by NiftyNet, which is not actively maintained anymore.

Credits

If you like this repository, please click on Star!

If you use this package 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 entry:

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

Getting started

See Getting started for installation instructions and a Hello, World! example.

Longer usage examples can be found in the tutorials.

Read the documentation for more information.

Please create an issue if you think something is missing.

Contributors

Thanks goes to all these people (emoji key):

Fernando Pérez-García
Fernando Pérez-García

💻 📖
valabregue
valabregue

🤔 👀 💻 💬 🐛
GFabien
GFabien

💻 👀 🤔
G.Reguig
G.Reguig

💻
Niels Schurink
Niels Schurink

💻
Ibrahim Hadzic
Ibrahim Hadzic

🐛
ReubenDo
ReubenDo

🤔
Julian Klug
Julian Klug

🤔
David Völgyes
David Völgyes

🤔 💻
Jean-Christophe Fillion-Robin
Jean-Christophe Fillion-Robin

📖
Suraj Pai
Suraj Pai

🤔
Ben Darwin
Ben Darwin

🤔
Oeslle Lucena
Oeslle Lucena

🐛
Soumick Chatterjee
Soumick Chatterjee

💻
neuronflow
neuronflow

📖
Jan Witowski
Jan Witowski

📖
Derk Mus
Derk Mus

📖 💻 🐛
Christian Herz
Christian Herz

🐛
Cory Efird
Cory Efird

💻 🐛
Esteban Vaca C.
Esteban Vaca C.

🐛
Ray Phan
Ray Phan

🐛
Akis Linardos
Akis Linardos

🐛 💻
Nina Montana-Brown
Nina Montana-Brown

📖 🚇
fabien-brulport
fabien-brulport

🐛
malteekj
malteekj

🐛
Andres Diaz-Pinto
Andres Diaz-Pinto

🐛
Sarthak Pati
Sarthak Pati

📦 📖
GabriellaKamlish
GabriellaKamlish

🐛
Tyler Spears
Tyler Spears

🐛
DaGuT
DaGuT

📖
Xiangyu Zhao
Xiangyu Zhao

🐛
siahuat0727
siahuat0727

📖 🐛
Svdvoort
Svdvoort

💻
Albans98
Albans98

💻
Matthew T. Warkentin
Matthew T. Warkentin

💻
glupol
glupol

🐛
ramonemiliani93
ramonemiliani93

📖 🐛 💻
Justus Schock
Justus Schock

💻 🐛 🤔 👀
Stefan Milorad Radonjić
Stefan Milorad Radonjić

🐛
Sajan Gohil
Sajan Gohil

🐛
Ikko Ashimine
Ikko Ashimine

📖
laynr
laynr

📖
Omar U. Espejel
Omar U. Espejel

🔊
James Butler
James Butler

🐛
res191
res191

🔍
nengwp
nengwp

🐛 📖
susanveraclarke
susanveraclarke

🎨
nepersica
nepersica

🐛
Sebastian Penhouet
Sebastian Penhouet

🤔
Bigsealion
Bigsealion

🐛
Dženan Zukić
Dženan Zukić

👀
vasl12
vasl12

🐛
François Rousseau
François Rousseau

🐛
snavalm
snavalm

💻
Jacob Reinhold
Jacob Reinhold

💻
Hsu
Hsu

🐛
snipdome
snipdome

🐛
SmallY
SmallY

🐛
guigautier
guigautier

🤔
AyedSamy
AyedSamy

🐛
J. Miguel Valverde
J. Miguel Valverde

🤔 💻 🐛
José Guilherme Almeida
José Guilherme Almeida

🤔
Asim Usman
Asim Usman

🐛
cbri92
cbri92

🐛
Markus J. Ankenbrand
Markus J. Ankenbrand

🐛
Ziv Yaniv
Ziv Yaniv

📖
Luca Lumetti
Luca Lumetti

💻 📖
chagelo
chagelo

🐛
mueller-franzes
mueller-franzes

💻 🐛
Abdelwahab Kawafi
Abdelwahab Kawafi

🐛
Arthur Masson
Arthur Masson

🐛 📖
양현식
양현식

💻
nicoloesch
nicoloesch

💻 🐛 🎨 🚧 💬 👀
Amund Vedal
Amund Vedal

📖
Alabamagan
Alabamagan

🐛
sbdoherty
sbdoherty

📖
Zhack47
Zhack47

🐛
Blake Dewey
Blake Dewey

📖
Doyeon Kim
Doyeon Kim

🐛
KonoMaxi
KonoMaxi

🐛
Laurent Chauvin
Laurent Chauvin

🐛
Christian Hinge
Christian Hinge

🐛
zzz123xyz
zzz123xyz

🐛
Amin Alam
Amin Alam

📖
marius-sm
marius-sm

🤔
haarisr
haarisr

💻
Chris Winder
Chris Winder

🐛
Ricky Walsh
Ricky Walsh

💻
Keerthi Sravan Ravi
Keerthi Sravan Ravi

🐛
Rahul Kurian Jacob
Rahul Kurian Jacob

📖
Ethan Rooke
Ethan Rooke

📖
David Kucher
David Kucher

💻
StijnvWijn
StijnvWijn

💻 🐛
Toufiq
Toufiq

💻
bcrobo
bcrobo

🐛
Emmanuel Ferdman
Emmanuel Ferdman

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

0.20.23 Oct 08, 2025
0.20.22 Sep 03, 2025
0.20.21 Aug 09, 2025
0.20.20 Aug 06, 2025
0.20.19 Jul 19, 2025
0.20.18 Jul 09, 2025
0.20.17 Jul 03, 2025
0.20.16 Jul 02, 2025
0.20.15 Jun 28, 2025
0.20.14 Jun 24, 2025
0.20.13 Jun 24, 2025
0.20.12 Jun 24, 2025
0.20.11 Jun 22, 2025
0.20.10 Jun 15, 2025
0.20.9 Jul 03, 2025
0.20.8 Apr 27, 2025
0.20.7 Apr 15, 2025
0.20.6 Mar 31, 2025
0.20.5 Mar 12, 2025
0.20.4 Jan 27, 2025
0.20.3 Dec 05, 2024
0.20.2 Nov 17, 2024
0.20.1 Oct 05, 2024
0.20.0 Sep 20, 2024
0.19.9 Jul 24, 2024
0.19.8 Jun 28, 2024
0.19.7 Jun 14, 2024
0.19.6 Feb 19, 2024
0.19.5 Jan 28, 2024
0.19.4 Jan 28, 2024
0.19.3 Nov 24, 2023
0.19.2 Nov 04, 2023
0.19.1 Aug 03, 2023
0.19.0 Jul 25, 2023
0.18.92 Jun 14, 2023
0.18.91 Apr 17, 2023
0.18.90 Mar 04, 2023
0.18.89 Mar 04, 2023
0.18.88 Mar 01, 2023
0.18.87 Jan 27, 2023
0.18.86 Nov 19, 2022
0.18.85 Nov 08, 2022
0.18.84 Aug 02, 2022
0.18.83 Jul 16, 2022
0.18.82 Jul 04, 2022
0.18.81 Jul 04, 2022
0.18.80 Jun 25, 2022
0.18.79 Jun 18, 2022
0.18.78 Jun 08, 2022
0.18.77 May 15, 2022
0.18.76 Apr 09, 2022
0.18.75 Mar 11, 2022
0.18.74 Feb 26, 2022
0.18.73 Jan 30, 2022
0.18.72 Jan 25, 2022
0.18.71 Dec 07, 2021
0.18.70 Nov 29, 2021
0.18.69 Nov 28, 2021
0.18.68 Nov 19, 2021
0.18.67 Nov 18, 2021
0.18.66 Nov 18, 2021
0.18.65 Nov 14, 2021
0.18.64 Nov 11, 2021
0.18.63 Nov 08, 2021
0.18.62 Nov 01, 2021
0.18.61 Oct 25, 2021
0.18.57 Sep 22, 2021
0.18.56 Sep 13, 2021
0.18.55 Sep 13, 2021
0.18.54 Sep 08, 2021
0.18.53 Sep 05, 2021
0.18.52 Sep 05, 2021
0.18.51 Sep 02, 2021
0.18.50 Aug 31, 2021
0.18.49 Aug 31, 2021
0.18.48 Aug 27, 2021
0.18.47 Aug 16, 2021
0.18.46 Aug 04, 2021
0.18.45 Jul 09, 2021
0.18.44 Jul 08, 2021
0.18.43 Jul 05, 2021
0.18.42 Jul 01, 2021
0.18.41 Jun 26, 2021
0.18.40 Jun 01, 2021
0.18.39 May 12, 2021
0.18.38 May 11, 2021
0.18.37 May 10, 2021
0.18.36 Apr 29, 2021
0.18.35 Apr 27, 2021
0.18.34 Apr 21, 2021
0.18.33 Apr 13, 2021
0.18.32 Apr 08, 2021
0.18.31 Mar 26, 2021
0.18.30 Mar 18, 2021
0.18.29 Feb 12, 2021
0.18.28 Feb 10, 2021
0.18.27 Feb 08, 2021
0.18.26 Feb 07, 2021
0.18.25 Feb 04, 2021
0.18.24 Feb 03, 2021
0.18.23 Jan 29, 2021
0.18.22 Jan 28, 2021
0.18.21 Jan 25, 2021
0.18.20 Jan 24, 2021
0.18.19 Jan 24, 2021
0.18.18 Jan 19, 2021
0.18.17 Jan 19, 2021
0.18.16 Jan 12, 2021
0.18.15 Jan 01, 2021
0.18.14 Jan 01, 2021
0.18.13 Dec 29, 2020
0.18.12 Dec 27, 2020
0.18.11 Dec 22, 2020
0.18.10 Dec 18, 2020
0.18.9 Dec 18, 2020
0.18.8 Dec 15, 2020
0.18.7 Dec 13, 2020
0.18.6 Dec 12, 2020
0.18.4 Dec 11, 2020
0.18.3 Dec 10, 2020
0.18.2 Dec 10, 2020
0.18.1 Dec 02, 2020
0.18.0 Nov 29, 2020
0.17.53 Nov 05, 2020
0.17.52 Nov 05, 2020
0.17.51 Oct 30, 2020
0.17.50 Oct 21, 2020
0.17.49 Oct 20, 2020
0.17.48 Oct 16, 2020
0.17.47 Oct 07, 2020
0.17.46 Sep 29, 2020
0.17.45 Sep 28, 2020
0.17.44 Sep 24, 2020
0.17.43 Sep 24, 2020
0.17.42 Sep 21, 2020
0.17.41 Sep 21, 2020
0.17.40 Sep 21, 2020
0.17.39 Sep 21, 2020
0.17.38 Sep 18, 2020
0.17.37 Sep 18, 2020
0.17.36 Sep 17, 2020
0.17.35 Sep 17, 2020
0.17.34 Aug 20, 2020
0.17.33 Aug 19, 2020
0.17.32 Aug 19, 2020
0.17.30 Aug 18, 2020
0.17.29 Aug 18, 2020
0.17.28 Aug 17, 2020
0.17.27 Aug 12, 2020
0.17.26 Aug 11, 2020
0.17.25 Aug 10, 2020
0.17.24 Aug 10, 2020
0.17.23 Aug 10, 2020
0.17.22 Aug 10, 2020
0.17.21 Aug 05, 2020
0.17.20 Aug 05, 2020
0.17.19 Aug 05, 2020
0.17.18 Aug 03, 2020
0.17.17 Aug 03, 2020
0.17.15 Aug 03, 2020
0.17.14 Jul 31, 2020
0.17.13 Jul 31, 2020
0.17.12 Jul 21, 2020
0.17.11 Jul 19, 2020
0.17.10 Jul 11, 2020
0.17.9 Jul 09, 2020
0.17.8 Jul 08, 2020
0.17.7 Jul 01, 2020
0.17.6 Jul 01, 2020
0.17.5 Jul 01, 2020
0.17.4 Jun 30, 2020
0.17.2 Jun 26, 2020
0.17.1 Jun 26, 2020
0.17.0 Jun 22, 2020
0.16.30 Jun 22, 2020
0.16.29 Jun 20, 2020
0.16.28 Jun 20, 2020
0.16.27 Jun 20, 2020
0.16.26 Jun 19, 2020
0.16.25 Jun 11, 2020
0.16.24 Jun 10, 2020
0.16.23 Jun 10, 2020
0.16.22 Jun 07, 2020
0.16.21 Jun 05, 2020
0.16.20 Jun 04, 2020
0.16.19 Jun 03, 2020
0.16.18 Jun 02, 2020
0.16.17 May 30, 2020
0.16.16 May 30, 2020
0.16.15 Jun 02, 2020
0.16.14 May 28, 2020
0.16.13 May 27, 2020
0.16.12 May 27, 2020
0.16.11 May 27, 2020
0.16.10 May 26, 2020
0.16.9 May 23, 2020
0.16.8 May 20, 2020
0.16.7 May 05, 2020
0.16.6 May 05, 2020
0.16.5 May 05, 2020
0.16.4 Apr 27, 2020
0.16.3 Apr 24, 2020
0.16.2 Apr 23, 2020
0.16.1 Apr 22, 2020
0.16.0 Apr 21, 2020
0.15.5 Apr 08, 2020
0.15.4 Apr 08, 2020
0.15.3 Apr 08, 2020
0.15.1 Apr 08, 2020
0.15.0 Apr 07, 2020
0.14.3 Apr 06, 2020
0.14.1 Apr 01, 2020
0.14.0 Mar 31, 2020
0.13.24 Mar 25, 2020
0.13.23 Mar 23, 2020
0.13.22 Mar 23, 2020
0.13.21 Mar 21, 2020
0.13.19 Mar 21, 2020
0.13.18 Mar 20, 2020
0.13.17 Mar 20, 2020
0.13.16 Mar 15, 2020
0.13.14 Mar 12, 2020
0.13.13 Mar 11, 2020
0.13.12 Mar 11, 2020
0.13.11 Mar 09, 2020
0.13.10 Mar 09, 2020
0.13.9 Mar 03, 2020
0.13.8 Mar 01, 2020
0.13.7 Mar 01, 2020
0.13.6 Feb 28, 2020
0.13.5 Feb 28, 2020
0.13.4 Feb 26, 2020
0.13.3 Mar 01, 2020
0.13.2 Feb 24, 2020
0.13.1 Feb 24, 2020
0.13.0 Feb 24, 2020
0.12.13 Feb 12, 2020
0.12.12 Feb 08, 2020
0.12.11 Feb 05, 2020
0.12.10 Jan 30, 2020
0.12.9 Jan 28, 2020
0.12.8 Jan 26, 2020
0.12.7 Jan 25, 2020
0.12.6 Jan 25, 2020
0.12.5 Jan 25, 2020
0.12.4 Jan 24, 2020
0.12.3 Jan 24, 2020
0.12.2 Jan 24, 2020
0.12.1 Jan 24, 2020
0.12.0 Jan 21, 2020
0.11.6 Jan 20, 2020
0.11.5 Jan 18, 2020
0.11.4 Jan 17, 2020
0.11.3 Jan 16, 2020
0.11.2 Jan 15, 2020
0.11.0 Jan 15, 2020
0.10.0 Jan 14, 2020
0.9.0 Jan 14, 2020
0.8.3 Jan 10, 2020
0.8.2 Jan 09, 2020
0.8.1 Jan 09, 2020
0.8.0 Jan 09, 2020
0.7.8 Jan 08, 2020
0.7.7 Jan 08, 2020
0.7.6 Jan 07, 2020
0.7.5 Jan 07, 2020
0.7.4 Jan 07, 2020
0.7.3 Jan 07, 2020
0.7.2 Jan 07, 2020
0.7.0 Jan 06, 2020
0.6.0 Jan 02, 2020
0.5.0 Jan 01, 2020
0.4.0 Dec 31, 2019
0.3.0 Dec 21, 2019
0.1.0 Nov 26, 2019

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
deprecated (>=1.2)
einops (>=0.3)
humanize (>=0.1)
nibabel (>=3)
numpy (>=1.20)
packaging (>=20)
rich (>=10)
scipy (>=1.7)
simpleitk (!=2.0.*,!=2.1.1.1,>=1.3)
torch (>=1.9)
tqdm (>=4.40)
typer (>=0.1)