Tools for loading, augmenting and writing 3D medical images on PyTorch.
Project description
TorchIO
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 | |
Docs | |
Build | |
Coverage | |
Code | |
Notebook | |
Social |
(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 the paper:
BibTeX entry:
@article{perez-garcia_torchio_2020,
title = {{TorchIO}: a {Python} library for efficient loading, preprocessing, augmentation and patch-based sampling of medical images in deep learning},
shorttitle = {{TorchIO}},
url = {http://arxiv.org/abs/2003.04696},
urldate = {2020-03-11},
journal = {arXiv:2003.04696 [cs, eess, stat]},
author = {P{\'e}rez-Garc{\'i}a, Fernando and Sparks, Rachel and Ourselin, Sebastien},
month = mar,
year = {2020},
note = {arXiv: 2003.04696},
keywords = {Computer Science - Computer Vision and Pattern Recognition, Electrical Engineering and Systems Science - Image and Video Processing, Computer Science - Machine Learning, Computer Science - Artificial Intelligence, Statistics - Machine Learning},
}
Getting started
See Getting started for installation instructions, a Hello, World! example and a comprehensive Jupyter notebook tutorial on Google Colab.
All the documentation is hosted on Read the Docs.
Please open a new issue if you think something is missing.
Contributors
Thanks goes to all these people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
History
0.17.0 (23-06-2020)
- Add transforms history to
Subject
attributes to improve traceability - Add support to use an initial transformation in
Resample
- Add support to use an image file as target in
Resample
- Add
mean
argument toRandomNoise
- Add tensor support for transforms
- Add support to use strings as interpolation argument
- Add support for 2D images
- Add attribute access to
Subject
andImage
- Add MNI and 3D Slicer datasets
- Add
intensity
argument toRandomGhosting
- Add
translation
argument toRandomAffine
- Add shape, spacing and orientation attributes to
Image
andSubject
- Refactor samplers
- Refactor inference classes
- Add 3D Slicer extension
- Add ITK-SNAP datasets
- Add support to take NumPy arrays as transforms input
- Optimize cropping using PyTorch
- Optimizing transforms by reducing number of tensor copying
- Improve representation (
repr()
) ofImage
- Use lazy loading in
Image
0.16.0 (21-04-2020)
- Add advanced padding options for
RandomAffine
- Add reference space options in
Resample
- Add probability argument to all transforms
- Add
OneOf
andCompose
transforms to improve composability
0.15.0 (07-04-2020)
- Refactor
RandomElasticDeformation
transform - Make
Subject
inherit fromdict
0.14.0 (31-03-2020)
- Add
datasets
module - Add support for DICOM files
- Add documentation
- Add
CropOrPad
transform
0.13.0 (24-02-2020)
- Add
Subject
class - Add random blur transform
- Add lambda transform
- Add random patches swapping transform
- Add MRI k-space ghosting artefact augmentation
0.12.0 (21-01-2020)
- Add ToCanonical transform
- Add CenterCropOrPad transform
0.11.0 (15-01-2020)
- Add Resample transform
0.10.0 (15-01-2020)
- Add Pad transform
- Add Crop transform
0.9.0 (14-01-2020)
- Add CLI tool to transform an image from file
0.8.0 (11-01-2020)
- Add Image class
0.7.0 (02-01-2020)
- Make transforms use PyTorch tensors consistently
0.6.0 (02-01-2020)
- Add support for NRRD
0.5.0 (01-01-2020)
- Add bias field transform
0.4.0 (29-12-2019)
- Add MRI k-space motion artefact augmentation
0.3.0 (21-12-2019)
- Add Rescale transform
- Add support for multimodal data and missing modalities
0.2.0 (2019-12-06)
- First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file torchio-0.17.44.tar.gz
.
File metadata
- Download URL: torchio-0.17.44.tar.gz
- Upload date:
- Size: 23.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8756e103ed49f7d484de217a04f3afd662dd557137f7926eadc7cf35c462fed8 |
|
MD5 | 6ed39231f78846d65b4748fa5d68c5a5 |
|
BLAKE2b-256 | dd07a541b5c931d339d78e8cb10bdfb448c34df00e9cf4558223d6bd6d0c320d |
File details
Details for the file torchio-0.17.44-py2.py3-none-any.whl
.
File metadata
- Download URL: torchio-0.17.44-py2.py3-none-any.whl
- Upload date:
- Size: 107.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43c80810861262045826c86ec80100d0801925dfcaa1a5a1ec7c624c62e25607 |
|
MD5 | 9f4a34c77ff7876eb2caee8a969e7995 |
|
BLAKE2b-256 | a5596a81a8cb28e9b730f3270edfade84ca6ccc4df47ddbbb08de9c3729597c7 |