Skip to main content

FireANTs: Adaptive Riemannian Optimization for Multi-Scale Diffeomorphic Registration

Project description

:fire: FireANTs: Adaptive Riemannian Optimization for Multi-Scale Diffeomorphic Registration

FireANTs

The FireANTs library is a lightweight, general-purpose registration package for Riemannian diffeomorphic registration on GPUs. It is designed to be easy to use, fast, accurate, and extensible. The salient features of the library include:

  • Powerful optimization algorithms ⚡️🧠: FireANTs utilizes a novel Riemmanian Adaptive optimization algorithm to perform gradient descent on the space of diffeomorphisms. Diffeomorphisms are a deformable transforms that do not lie on a Euclidean manifold, and hence require specialized optimization algorithms.
  • Blazing fast inference 🚀: FireANTs is much faster at inference than most other registration libraries, including deep learning methods.
  • Lightweight 🧩: FireANTs consumes about 10x less memory than state-of-the-art deep learning methods, scaling easily to high resolution images.
  • Batched Registration 📚: Simultaneously register multiple image pairs with ease, which reduces runtime per image pair to upto 250ms per image pair on a single GPU.
Comparison of Dice Score vs Runtime Runtime vs Memory Tradeoff Amortized Runtime Plot
  • Composable transforms 🔗⚡️: FireANTs provides a simple API for composing transforms. You can easily compose multiple transforms and apply the composition to images directly. This avoids aliasing due to multiple resampling. Check out the documentation for more details.

FireANTs achieves up to 10x speedup compared to traditional registration methods and deep learning approaches while improving accuracy and runtime.

Installation

To use the FireANTs package, you can either

  • Use Docker (see docker/README.md, highly recommended)
  • Clone the repository and install the package locally
  • Install the package directly from PyPI.

If you do not want to use Docker, we recommend using a fresh Anaconda/Miniconda environment to install the package.

conda create -n fireants python=3.9

To install FireANTs locally:

git clone https://github.com/rohitrango/fireants
cd fireants
pip install .
cd fused_ops && python setup.py build_ext && python setup.py install && cd ..

By default, doing pip install . will NOT include the fused CUDA operations. I highly recommend installing the fused CUDA operations using the command above.

Or install from PyPI (does not install fused ops):

pip install fireants

🤷 Tutorial

To check out some of the tutorials, check out the tutorials/ directory for usage. Alternatively, to reproduce the results in the paper checkout the fireants/scripts/ directory.

🚀 Fused CUDA Operations

If you want to use the fast and memory efficient fused CUDA operations, you can install the fireants_fused_ops package. See fused_ops/README.md for a basic user guide.

👾 CLI Tools

FireANTs provides command-line interface tools similar to the original ANTs toolkit. For detailed instructions and available tools, see cli/README.md.

📚 Template building

FireANTs includes a powerful template builder for creating anatomical templates from medical images. For detailed instructions, configuration options, and usage examples, see fireants/scripts/template/README.md.

📖 Documentation

You can also check out the Documentation. Feel free to reach out to me for improvements in the documentation. To build the documentation locally, run the following command from the root of the repository:

mkdocs serve -f docs/mkdocs.yml

📊 Datasets

In the paper, we use the datasets as following:

  • Klein's evaluation of 14 non-linear registration algorithms: here
  • EMPIRE10 lung registration challenge: here
  • Expansion Microscopy dataset: here

🤝 Contributing

Feel free to add issues or pull requests to the repository. We welcome contributions to the package.

🧪 Tests

To run the tests, run the following command:

bash run_tests.sh

Feel free to report any issues with the tests to the issues page.

License

Please refer to the LICENSE file for the license details, especially pertaining to redistribution of code and derivative works.

Citation

If you use FireANTs in your research, please cite the following papers:

@article{jena2024fireants,
  title={FireANTs: Adaptive Riemannian Optimization for Multi-Scale Diffeomorphic Registration},
  author={Jena, Rohit and Chaudhari, Pratik and Gee, James C},
  journal={Nature Communications},
  year={2024}
}

@inproceedings{jena2025scalable,
  title={A Scalable Distributed Framework for Multimodal {GigaVoxel} Image Registration},
  author={Jena, Rohit and Zope, Vedant and Chaudhari, Pratik and Gee, James C},
  booktitle={The Fourteenth International Conference on Learning Representations},
  year={2026},
  url={https://openreview.net/forum?id=8dLexnao2h}
}

If you use FireANTs-as-a-layer (Deep Implicit Optimization, code), cite the following paper:

@article{jena2025deep,
  title={Deep implicit optimization enables robust learnable features for deformable image registration},
  author={Jena, Rohit and Chaudhari, Pratik and Gee, James C},
  journal={Medical Image Analysis},
  volume={103},
  pages={103577},
  year={2025},
  publisher={Elsevier}
}

The following evaluation studies validate FireANTs against other state-of-the-art methods:

@inproceedings{jena2026the,
  title={The LU-Mirage - An independent evaluation of the zero-shot claims in the {LUMIR} challenge},
  author={Jena, Rohit and Chaudhari, Pratik and Gee, James},
  booktitle={Medical Imaging with Deep Learning - Validation Papers},
  year={2026},
  url={https://openreview.net/forum?id=a46yLtToIK}
}

@inproceedings{jena2024deep,
  title={Deep Learning in Medical Image Registration: Magic or Mirage?},
  author={Jena, Rohit and Sethi, Deeksha and Chaudhari, Pratik and Gee, James C.},
  booktitle={Advances in Neural Information Processing Systems},
  volume={37},
  pages={108331--108353},
  year={2024},
  url={https://proceedings.neurips.cc/paper_files/paper/2024/file/c3fe2a07ec47b89c50e89706d2e23358-Paper-Conference.pdf}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fireants-1.5.0.tar.gz (92.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fireants-1.5.0-py3-none-any.whl (217.5 kB view details)

Uploaded Python 3

File details

Details for the file fireants-1.5.0.tar.gz.

File metadata

  • Download URL: fireants-1.5.0.tar.gz
  • Upload date:
  • Size: 92.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fireants-1.5.0.tar.gz
Algorithm Hash digest
SHA256 4167f109066860b0456c554199b9039645f623faf517a713ca08e02df2fbf3e8
MD5 d076503080fa822373396a8bd0996325
BLAKE2b-256 c824dd52ff7098993a0712cf9b6b9e178ec5bce98ee7f031a5ccf64d993ecb6f

See more details on using hashes here.

File details

Details for the file fireants-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: fireants-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 217.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fireants-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e5c72ea23490227e2c663fa0b8f6b610bf65947c399eb182d93369f6f5a7c7f
MD5 6c096df7f3fb48b991d2f134e47770fb
BLAKE2b-256 d51c3bbaf31893db79e40332bcebbc5759b660db73017828c9f4993021682184

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page