# MONAI

> PyTorch-based deep learning framework for healthcare imaging

- Category: Science & Biomedical AI / Medical Imaging
- Language: Python
- Repository: https://github.com/Project-MONAI/MONAI
- Website: https://project-monai.github.io/
- Canonical page: https://ai-tldr.dev/tools/monai/

## In short

MONAI is a PyTorch-based, open-source framework for deep learning in healthcare imaging, and it is part of the PyTorch Ecosystem. It gives medical imaging researchers and engineers building blocks for working with multidimensional scans instead of writing that plumbing from scratch. It sits in the Medical Imaging category of the Science & Biomedical AI tools and is open-source, written in Python.

## Overview

MONAI is a PyTorch-based, open-source framework for deep learning in healthcare imaging, and it is part of the PyTorch Ecosystem. It gives medical imaging researchers and engineers building blocks for working with multidimensional scans instead of writing that plumbing from scratch.

The framework focuses on the parts of a workflow that are specific to medical data. It provides flexible preprocessing for multidimensional medical imaging data, domain-specific implementations of networks, losses, and evaluation metrics, and compositional, portable APIs that fit into existing PyTorch workflows.

MONAI is built to scale and to be shared. It supports multi-GPU and multi-node data parallelism for larger training runs, and it has a separate Model Zoo that uses the MONAI Bundle format so the community can package and reuse trained models.

## What it does

- Flexible preprocessing for multidimensional medical imaging data
- Compositional and portable APIs that integrate into existing PyTorch workflows
- Domain-specific implementations of networks, losses, and evaluation metrics
- Customizable design that suits varying levels of user expertise
- Multi-GPU and multi-node data parallelism support
- Model Zoo using the MONAI Bundle format for sharing community models

## Getting started

Install MONAI from PyPI with pip, then import it in Python to use its transforms, networks, and metrics.

1. Install MONAI

   Install the framework from PyPI. Other installation options, including Docker Hub and conda-forge, are described in the installation guide.

```bash
pip install monai
```

2. Import MONAI in Python

   Import the package to confirm the install and to access its modules.

```python
import monai

print(monai.__version__)
```

3. Follow the tutorials

   Work through the interactive tutorials, such as the MedNIST demo and MONAI for PyTorch Users, which run on Google Colab. The example notebooks live in the Project-MONAI/tutorials repository.

```bash
git clone https://github.com/Project-MONAI/tutorials
```

## When to use it

- Preprocess multidimensional medical imaging data for a training pipeline
- Train and evaluate models using domain-specific networks, losses, and metrics
- Scale training across multiple GPUs or nodes with data parallelism
- Package and share trained models through the Model Zoo using the MONAI Bundle format
