FastWarp
FastWarp registers 3-D images on the GPU. It runs the rigid, affine and SyN registration of ANTs on a graphics card and writes the same transform files as ANTs, so the rest of an ANTs-based pipeline can stay as it is. It is meant for people who build or run neuroimaging pipelines, for example to normalize brain MRI onto a template.
- A full normalization (centre of mass, Rigid, Affine, SyN) in one call, with one or two channels such as T1w + T2w.
- Rigid and affine fits of one image pair, several in a row on images prepared once.
- Resampling and field composition like
antsApplyTransforms, on the CPU. - A command line,
fastwarp, for the same steps on NIfTI files. - Runs on Vulkan (Linux, Windows), Metal (macOS) and DirectX 12 (Windows) through wgpu. Before a normalization starts, it checks that a GPU is present and has enough memory, so a pipeline can fall back to ANTs.
Documentation: https://fastwarp.readthedocs.io
Install
pip install fastwarp
uv add fastwarp
The first line is for pip, the second for a uv project (uv pip install fastwarp installs into
an existing environment). Wheels are published on PyPI and attached to each
GitHub release for Linux (x86_64, aarch64),
macOS (Apple silicon, Intel) and Windows (x86_64), for Python 3.11 and later. FastWarp needs
NumPy 2.0 or later and a GPU; ANTsPy (pip install antspyx or
uv add antspyx; wheels for Python 3.11 to 3.13 on Linux x86_64, macOS and Windows) is optional.
The command line fastwarp comes with the Python package. uv tool install fastwarp installs
only the command and uvx fastwarp --help runs it without installing. From release 0.2.0 it
also comes as a standalone program without Python, with installer scripts for Linux, macOS and
Windows (Command line: install).
The command line needs release 0.2.0 or later;
uvx --from "git+https://github.com/WyssCenter/fastwarp.git" fastwarp --help runs the
development version from source.
Installation has the requirements
and the build from source.
Example
Register ANTsPy's ch2 sample brain onto its MNI template, then warp it with ANTsPy:
import ants
import fastwarp
fixed = ants.image_read(ants.get_ants_data("mni"))
moving = ants.image_read(ants.get_ants_data("ch2"))
if fastwarp.fits_gpu(fixed, moving, iso_mm=1.0):
info = fastwarp.register_syn(fixed, moving, "out/ch2_to_mni_")
warped = ants.apply_transforms(fixed, moving, ["out/ch2_to_mni_Composite.h5"])
print(info["adapter"], f"{info['total_s']:.1f} s")
else:
print("No GPU, or too little GPU memory: use ANTs instead.")
register_syn writes out/ch2_to_mni_Composite.h5, InverseComposite.h5 and
0GenericAffine.mat, which antsApplyTransforms, antsApplyTransformsToPoints and ANTsPy read
as they read ANTs' own files.
Output files says which file maps
points or images in which direction.
Command line
The package also installs the command fastwarp (the same as python -m fastwarp), which works
on NIfTI files and runs the same code as the Python functions:
fastwarp register tpl.nii.gz sub.nii.gz -o out/sub_
fastwarp apply -r tpl.nii.gz -i sub.nii.gz -o out/sub_in_tpl.nii.gz -t out/sub_Composite.h5
fastwarp bench
fastwarp bench times FastWarp on built-in synthetic volumes. Unlike register_syn, which
registers on a 1.0 mm grid unless told otherwise, fastwarp register uses the smallest voxel
spacing of the fixed image; --iso-mm sets it. The exit status tells a script what happened, for
example 4 for no usable GPU and 5 for a grid too large for the GPU. Reference:
Command line.
Learn more
- Quickstart: first registration, resampling and a rigid fit.
- User guide: images, output files, recipes, linear fits and GPU memory.
- API reference and environment variables.
- Performance and the accuracy benchmark: how speed and accuracy are measured against ANTs on public data. No benchmark results yet; earlier measurements on non-public data are on the Performance page, labelled as such.
- Troubleshooting: no GPU found, too little GPU memory.
Project
FastWarp was developed as the registration engine of Wyss DBS Localizer and is maintained by Richard Köhler (Wyss Center for Bio and Neuroengineering) and Jan Philipp Payonk (University of Rostock). It is research software; support is given on a best-effort basis through GitHub issues. Contributions are welcome: see CONTRIBUTING.md.
If you use FastWarp, please cite it as described in CITATION.cff and Citing FastWarp.
Licence: Apache-2.0. Parts of FastWarp are ports of ANTs and ITK, which are Apache-2.0 as well; their notices are in NOTICE and each ported file is listed in Third-party ports.
Metadata
Release files for fastwarp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fastwarp-0.2.0.tar.gz | 508.3 kB | With provenance | Details for fastwarp-0.2.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| fastwarp-0.2.0-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details for fastwarp-0.2.0-cp311-abi3-win_amd64.whl |
| fastwarp-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ x86-64 | Details for fastwarp-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl |
| fastwarp-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ ARM64 | Details for fastwarp-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl |
| fastwarp-0.2.0-cp311-abi3-macosx_11_0_x86_64.whl | CPython 3.11 | abi3 | macOS 11.0+ x86-64 | Details for fastwarp-0.2.0-cp311-abi3-macosx_11_0_x86_64.whl |
| fastwarp-0.2.0-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details for fastwarp-0.2.0-cp311-abi3-macosx_11_0_arm64.whl |
Total release size: 20.6 MB
Release files / fastwarp-0.2.0.tar.gz
| Download URL | fastwarp-0.2.0.tar.gz |
|---|---|
| Size | 508.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e87cbb74acd3ef8f2712a0056addaa4496a1a23c95c5fc7277c2b2f33de8a124
|
|
BLAKE2b-256 checksum How to use checksums |
49b3b75d610f371e30a91d756eaf6f4812ee33ea5c57b5dc156c984c764b1457
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / fastwarp-0.2.0-cp311-abi3-win_amd64.whl
| Download URL | fastwarp-0.2.0-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7f0d3adf476edc124a5ac0fd9d7dfb5f9800e7f660b6d7b75574d4ddbd590925
|
|
BLAKE2b-256 checksum How to use checksums |
8bfd5c37453b8bf9e4fcad54af270e219e486603ee7c98167e7f27bc8698f487
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / fastwarp-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | fastwarp-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.3 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0754898b650b3cc6528683f885dcec81bed5fcff23fa36fcc7b4baf33ef2c69f
|
|
BLAKE2b-256 checksum How to use checksums |
baeb9574cddfd8454c39b7d44032b987cffd141ba4ad4d48056cbce3ee10d530
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / fastwarp-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl
| Download URL | fastwarp-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
816abd536e65c19a5866c36ec9b8f76b95869971a07de35a707506655eeb421f
|
|
BLAKE2b-256 checksum How to use checksums |
06fc83b12bd3a2cbc6da148d11cac310ed444e36f248ef36d9d09f634ccb0638
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / fastwarp-0.2.0-cp311-abi3-macosx_11_0_x86_64.whl
| Download URL | fastwarp-0.2.0-cp311-abi3-macosx_11_0_x86_64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
31acdd835bcc789c13806682b649f3ade9d247ef893741d7e0be2e91bdd59c99
|
|
BLAKE2b-256 checksum How to use checksums |
fec0dbcc9908e238376b296c3c4c656d96b440f072a0075c8ae5f9a79efa5f01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / fastwarp-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | fastwarp-0.2.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
26f7273be47f2402ad95986a84616e5a79f5706b8de4fa2d1a3ab2c8e8e6abf3
|
|
BLAKE2b-256 checksum How to use checksums |
fda4052b4324eb398f53da25c26763bb0ded0d8780a34e00dd493d5dcb7d31d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logSecurity for fastwarp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for fastwarp-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.