VoxelMorph
Open-source Python library for deformable medical image registration, with PyTorch and TensorFlow backends under the Apache 2.0 license.

VoxelMorph is a Python library for researchers and developers who need to align medical images using learned deformations. It provides registration networks and training components, including unsupervised methods, with PyTorch and TensorFlow backends. The code is open source under the Apache 2.0 license.
You can use pretrained models to register image pairs or train models on your own datasets. Registration can produce both an aligned image and the predicted deformation field, so you can examine the spatial changes the model applies. Training accepts NIfTI, MGZ and NumPy npz data, with optional segmentation labels for semi-supervised learning.
Its scope extends beyond aligning two scans. VoxelMorph supports warping annotations alongside images and constructing deformable templates or atlases. Its spatial transformation components handle affine and dense deformations in multiple dimensions, with interpolation choices suited to images and discrete labels.
SynthMorph is a distinctive part of the library's approach: it learns registration from synthetic images rather than requiring acquired imaging data for training. Available model variants use images generated from random shapes or brain label maps. The accompanying examples cover anatomy-aware affine registration and CT-to-MRI alignment, while HyperMorph addresses registration hyperparameter tuning.
The current PyTorch implementation is under active development and its interfaces may change. Users who need the stable TensorFlow implementation should use the documented dev-tensorflow branch.