torchio: a PyTorch-based toolkit for preprocessing and augmenting 3D medical images with domain-specific artifacts

torchio: a PyTorch-based toolkit for preprocessing and augmenting 3D medical images with domain-specific artifacts

What it solves

TorchIO simplifies the process of preparing 3D medical images for deep learning. It addresses the challenges of efficiently reading, preprocessing, sampling, and augmenting large 3D medical datasets, which often require specialized transformations that standard computer vision libraries do not provide.

How it works

Built as a Python package for PyTorch, TorchIO provides a suite of tools to handle 3D medical images. It implements both general computer vision operations (like random affine transformations) and domain-specific transforms that simulate real-world medical imaging artifacts, such as MRI magnetic field inhomogeneity and k-space motion artifacts. It also includes a Queue system to facilitate patch-based training, allowing for more efficient sampling of data.

Who it’s for

Researchers and developers building deep learning applications for 3D medical imaging using PyTorch.

Highlights

  • 3D Medical Image Support: Specialized tools for reading, preprocessing, and writing 3D medical data.
  • Domain-Specific Augmentation: Simulates MRI-specific artifacts like bias fields, ghosting, and spikes.
  • Patch-Based Sampling: Includes a Queue system to optimize the sampling of image patches for training.
  • PyTorch Integration: Designed to work seamlessly within the PyTorch ecosystem.

Sources