NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

MONAI: An open-source framework for deep learning in healthcare

M. Jorge Cardoso, Wenqi Li, Richard Brown, Nic Ma, Eric Kerfoot, Yiheng Wang, Benjamin Murray, Andriy Myronenko, Can Zhao, Dong Yang, Vishwesh Nath, Yufan He, Ziyue Xu, Ali Hatamizadeh, Wentao Zhu, Yun Liu, Mingxin Zheng, Yucheng Tang, Isaac Yang, Michael Zephyr, Behrooz Hashemian, Sachidanand Alle, Mohammad Zalbagi Darestani, Charlie Budd, Marc Modat, Tom Vercauteren, Guotai Wang, Yiwen Li, Yipeng Hu, Yunguan Fu, Benjamin Gorman, Hans J. Johnson, Brad W. Genereaux, Barbaros S. Erdal, Vikash Gupta, Andres Diaz-Pinto, Andre Dourson, Lena Maier-Hein, Paul F. Jaeger, Michael Baumgartner, Jayashree Kalpathy-Cramer, Mona Flores, Justin S. Kirby, Lee A. D. Cooper, Holger R. Roth, Daguang Xu, David Bericat, Ralf Floca, S. Kevin Zhou, Haris Shuaib, Keyvan Farahani, Klaus H. Maier-Hein, Stephen R. Aylward, Prerna Dogra, Sebastien Ourselin, Andrew FengarXiv 2022

Abstract

Artificial Intelligence (AI) is having a tremendous impact across most areas of science. Applications of AI in healthcare have the potential to improve our ability to detect, diagnose, prognose, and intervene on human disease. For AI models to be used clinically, they need to be made safe, reproducible and robust, and the underlying software framework must be aware of the particularities (e.g. geometry, physiology, physics) of medical data being processed. This work introduces MONAI, a freely available, community-supported, and consortium-led PyTorch-based framework for deep learning in healthcare. MONAI extends PyTorch to support medical data, with a particular focus on imaging, and provide purpose-specific AI model architectures, transformations and utilities that streamline the development and deployment of medical AI models. MONAI follows best practices for software-development, providing an easy-to-use, robust, well-documented, and well-tested software framework. MONAI preserves the simple, additive, and compositional approach of its underlying PyTorch libraries. MONAI is being used by and receiving contributions from research, clinical and industrial teams from around the world, who are pursuing applications spanning nearly every aspect of healthcare.

Introduction: Standardizing the "Wild West" of Medical AI

While general-purpose deep learning frameworks like PyTorch and TensorFlow have revolutionized AI, they often treat medical images like standard photographs. In reality, healthcare data is far more complex, involving high-dimensional volumes (3D/4D), specialized file formats (DICOM, NIfTI), and critical metadata such as voxel spacing, orientation, and physical units (e.g., Hounsfield units).

Before the advent of MONAI (Medical Open Network for AI), the medical AI landscape was fragmented. Research groups frequently built "siloed" tools, leading to code that was difficult to reproduce, hard to integrate into clinical workflows, and prone to errors when handling the subtle physics of medical acquisition. MONAI was created to unify these efforts into a single, high-quality, open-source standard that bridges the gap between general-purpose deep learning and specialized healthcare requirements.

Methods: The MONAI Architecture

MONAI is designed as an "opt-in" extension of PyTorch, maintaining a familiar ecosystem while adding specialized capabilities for medical data. The framework is divided into foundational components and high-level workflow engines.

Overview of MONAI's foundational components and workflow engines

Key Technical Pillars

  • MetaTensor: A specialized tensor that carries metadata (like image orientation) through the entire processing pipeline, ensuring that spatial information is preserved during transforms.
  • Flexible Transforms: MONAI offers both Array-based (simple) and Dictionary-based (complex) transforms. The latter allows researchers to apply the exact same random augmentation (e.g., a rotation) to both an image and its corresponding segmentation mask simultaneously.
  • Invertible Transforms: This feature allows users to "undo" spatial changes, which is vital for clinical use where an AI might process a resized image, but the final result must be mapped back to the original patient coordinates.
  • Optimized Data Handling: To manage massive medical volumes, MONAI includes CacheDataset and PersistentDataset to store intermediate results in RAM or on disk, significantly accelerating training by avoiding redundant preprocessing.
  • Engines and Handlers: Built on top of PyTorch Ignite, these provide high-level abstractions for training loops, making experiments cleaner and more reproducible.

Datasets and Benchmarking

MONAI facilitates easy interfacing with standard medical benchmarks, reducing the overhead of data ingestion:

  • MedNIST: A "Hello World" dataset for medical AI, serving as an analogue to the classic MNIST handwritten digits.
  • Medical Segmentation Decathlon (MSD): A collection of 10 different challenges (brain, heart, liver, etc.) used to benchmark the robustness of segmentation models.
  • TCIA (The Cancer Imaging Archive): Built-in wrappers like TciaDataset allow for the automatic download and extraction of publicly accessible cancer datasets.

Key Insights: Physics-Aware and PyTorch-Native

  • Physics-Aware Augmentation: MONAI goes beyond standard image flips. It includes transforms like RandKSpaceSpikeNoise, which simulates artifacts specific to Magnetic Resonance (MR) imaging by manipulating data in the frequency domain.
  • The "PyTorch-Native" Philosophy: By mirroring PyTorch’s design, the framework minimizes the learning curve. If a researcher can write a PyTorch model, they can use MONAI.
  • Reproducibility as a Feature: By standardizing data loading and transformation, MONAI reduces the "hidden" variations between research labs that often make medical AI results difficult to replicate.
  • Decoupling Logic: The use of "Event Handlers" allows researchers to attach logic (like logging or checkpointing) to the training process without cluttering the core algorithmic code.

Results and Community Impact

MONAI provides comprehensive coverage of the medical AI field through:

  • Architectural Breadth: It includes state-of-the-art implementations for Segmentation (UNet, SwinUNETR), Classification (DenseNet, ResNet), and Registration.
  • Performance: Through GPU-optimized transforms and smart caching, MONAI significantly reduces the time-to-train for large 3D volumes compared to standard implementations.
  • Community Growth: With over 120 contributors and thousands of active users, the framework has successfully unified a previously fragmented field.

Future Directions

While MONAI Core is robust for imaging, healthcare is inherently multi-modal. Future development focuses on:

  • Non-Imaging Data: Expanding support for digital pathology, EEG signals, and tabular electronic health records (EHR).
  • Clinical Deployment: Moving beyond research via MONAI Deploy, which focuses on packaging and integrating models into hospital environments.
  • Active Learning: Improving MONAI Label to assist clinicians in annotating data more efficiently, addressing the bottleneck of high-quality labeled data in medicine.

Summary updated

BibTeX
@misc{cardoso2022monai,
  author = {M. Jorge Cardoso and Wenqi Li and Richard Brown and Nic Ma and Eric Kerfoot and Yiheng Wang and Benjamin Murray and Andriy Myronenko and Can Zhao and Dong Yang and Vishwesh Nath and Yufan He and Ziyue Xu and Ali Hatamizadeh and Wentao Zhu and Yun Liu and Mingxin Zheng and Yucheng Tang and Isaac Yang and Michael Zephyr and Behrooz Hashemian and Sachidanand Alle and Mohammad Zalbagi Darestani and Charlie Budd and Marc Modat and Tom Vercauteren and Guotai Wang and Yiwen Li and Yipeng Hu and Yunguan Fu and Benjamin Gorman and Hans J. Johnson and Brad W. Genereaux and Barbaros S. Erdal and Vikash Gupta and Andres Diaz-Pinto and Andre Dourson and Lena Maier-Hein and Paul F. Jaeger and Michael Baumgartner and Jayashree Kalpathy-Cramer and Mona Flores and Justin S. Kirby and Lee A. D. Cooper and Holger R. Roth and Daguang Xu and David Bericat and Ralf Floca and S. Kevin Zhou and Haris Shuaib and Keyvan Farahani and Klaus H. Maier-Hein and Stephen R. Aylward and Prerna Dogra and Sebastien Ourselin and Andrew Feng},
  title = {{MONAI: An open-source framework for deep learning in healthcare}},
  year = {2022},
  eprint = {2211.02701},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.02701},
}
Figure