Skip to main content

Active Learning Toolkit for Healthcare Imaging

Project description

MONAI Label

License CI Build Documentation Status PyPI version Azure DevOps tests (compact) Azure DevOps coverage codecov

MONAI Label is an intelligent open source image labeling and learning tool that enables users to create annotated datasets and build AI annotation models for clinical evaluation. MONAI Label enables application developers to build labeling apps in a serverless way, where custom labeling apps are exposed as a service through the MONAI Label Server.

MONAI Label is a server-client system that facilitates interactive medical image annotation by using AI. It is an open-source and easy-to-install ecosystem that can run locally on a machine with single or multiple GPUs. Both server and client work on the same/different machine. It shares the same principles with MONAI.

Refer to full MONAI Label documentations for more details or check out our MONAI Label Deep Dive videos series.

Refer to MONAI Label Tutorial series for application and viewer workflows with different medical image tasks. Notebook-like tutorials are created for detailed instructions.

Table of Contents

Overview

MONAI Label reduces the time and effort of annotating new datasets and enables the adaptation of AI to the task at hand by continuously learning from user interactions and data. MONAI Label allows researchers and developers to make continuous improvements to their apps by allowing them to interact with their apps at the user would. End-users (clinicians, technologists, and annotators in general) benefit from AI continuously learning and becoming better at understanding what the end-user is trying to annotate.

MONAI Label aims to fill the gap between developers creating new annotation applications, and the end users which want to benefit from these innovations.

Highlights and Features

  • Framework for developing and deploying MONAI Label Apps to train and infer AI models
  • Compositional & portable APIs for ease of integration in existing workflows
  • Customizable labeling app design for varying user expertise
  • Annotation support via 3DSlicer & OHIF for radiology
  • Annotation support via QuPath, Digital Slide Archive, and CVAT for pathology
  • Annotation support via CVAT for Endoscopy
  • PACS connectivity via DICOMWeb
  • Automated Active Learning workflow for endoscopy using CVAT

Supported Matrix

MONAI Label supports many state-of-the-art(SOTA) models in Model-Zoo, and their integration with viewers and monaibundle app. Please refer to monaibundle app page for supported models, including whole body segmentation, whole brain segmentation, lung nodule detection, tumor segmentation and many more.

In addition, you can find a table of the basic supported fields, modalities, viewers, and general data types. However, these are only ones that we've explicitly test and that doesn't mean that your dataset or file type won't work with MONAI Label. Try MONAI for your given task and if you're having issues, reach out through GitHub Issues.

Field Models Viewers Data Types Image Modalities/Target
Radiology
  • Segmentation
  • DeepGrow
  • DeepEdit
  • 3DSlicer
  • OHIF
  • NIfTI
  • NRRD
  • DICOM
  • CT
  • MRI
Pathology
  • DeepEdit
  • NuClick
  • Segmentation
  • Classification
  • Digital Slide Archive
  • QuPath
  • CVAT
  • TIFF
  • SVS
  • Nuclei Segmentation
  • Nuclei Classification
Video
  • DeepEdit
  • Tooltracking
  • InBody/OutBody
  • CVAT
  • JPG
  • 3-channel Video Frames
  • Endoscopy

Getting Started with MONAI Label

MONAI Label requires a few steps to get started:

Step 1 Installation

Current Stable Version

GitHub release (latest SemVer)

pip install -U monailabel

MONAI Label supports the following OS with GPU/CUDA enabled. For more details instruction, please see the installation guides.

GPU Acceleration (Optional Dependencies)

Following are the optional dependencies which can help you to accelerate some GPU based transforms from MONAI. These dependencies are enabled by default if you are using projectmonai/monailabel docker.

Development version

To install the latest features using one of the following options:

Git Checkout (developer mode) GitHub tag (latest SemVer)
  git clone https://github.com/Project-MONAI/MONAILabel
  pip install -r MONAILabel/requirements.txt
  export PATH=$PATH:`pwd`/MONAILabel/monailabel/scripts

If you are using DICOM-Web + OHIF then you have to build OHIF package separate. Please refer [here](https://github.com/Project-MONAI/MONAILabel/tree/main/plugins/ohif#development-setup).

Docker Docker Image Version (latest semver)
docker run --gpus all --rm -ti --ipc=host --net=host projectmonai/monailabel:latest bash

Step 2 MONAI Label Sample Applications

Radiology

This app has example models to do both interactive and automated segmentation over radiology (3D) images. Including auto segmentation with the latest deep learning models (e.g., UNet, UNETR) for multiple abdominal organs. Interactive tools include DeepEdit and Deepgrow for actively improving trained models and deployment.

  • Deepedit
  • Deepgrow
  • Segmentation
  • Spleen Segmentation
  • Multi-Stage Vertebra Segmentation

Pathology

This app has example models to do both interactive and automated segmentation over pathology (WSI) images. Including nuclei multi-label segmentation for Neoplastic cells, Inflammatory, Connective/Soft tissue cells, Dead Cells, and Epithelial. The app provides interactive tools including DeepEdits for interactive nuclei segmentation.

  • Deepedit
  • Deepgrow
  • Segmentation
  • Spleen Segmentation
  • Multi-Stage Vertebra Segmentation

Video

The Endoscopy app enables users to use interactive, automated segmentation and classification models over 2D images for endoscopy usecase. Combined with CVAT, it will demonstrate the fully automated Active Learning workflow to train + fine-tune a model.

  • Deepedit
  • ToolTracking
  • InBody/OutBody

Bundles

The Bundle app enables users with customized models for inference, training or pre and post processing any target anatomies. The specification for MONAILabel integration of the Bundle app links archived Model-Zoo for customized labeling (e.g., the third-party transformer model for labeling renal cortex, medulla, and pelvicalyceal system. Interactive tools such as DeepEdits).

For a full list of supported bundles, see the MONAI Label Bundles README.

Step 3 MONAI Label Supported Viewers

Radiology

3D Slicer

3D Slicer, a free and open-source platform for analyzing, visualizing and understanding medical image data. In MONAI Label, 3D Slicer is most tested with radiology studies and algorithms, develpoment and integration.

3D Slicer Setup

OHIF

The Open Health Imaging Foundation (OHIF) Viewer is an open source, web-based, medical imaging platform. It aims to provide a core framework for building complex imaging applications.

OHIF Setup

Pathology

QuPath

Quantitative Pathology & Bioimage Analysis (QuPath) is an open, powerful, flexible, extensible software platform for bioimage analysis.

QuPath Setup

Digital Slide Archive

The Digital Slide Archive (DSA) is a platform that provides the ability to store, manage, visualize and annotate large imaging data sets. Digital Slide Archive Setup

Video

CVAT

CVAT is an interactive video and image annotation tool for computer vision. CVAT Setup

Step 4 Data Preparation

For data preparation, you have two options, you can use a local data store or any image archive tool that supports DICOMWeb.

Local Datastore for the Radiology App on single modality images

For a Datastore in a local file archive, there is a set folder structure that MONAI Label uses. Place your image data in a folder and if you have any segmentation files, create and place them in a subfolder called labels/final. You can see an example below:

dataset
│-- spleen_10.nii.gz
│-- spleen_11.nii.gz
│   ...
└───labels
    └─── final
        │-- spleen_10.nii.gz
        │-- spleen_11.nii.gz
        │   ...

If you don't have labels, just place the images/volumes in the dataset folder.

DICOMWeb Support

If the viewer you're using supports DICOMweb standard, you can use that instead of a local datastore to serve images to MONAI Label. When starting the MONAI Label server, we need to specify the URL of the DICOMweb service in the studies argument (and, optionally, the username and password for DICOM servers that require them). You can see an example of starting the MONAI Label server with a DICOMweb URL below:

monailabel start_server --app apps/radiology --studies http://127.0.0.1:8042/dicom-web --conf models segmentation

Step 5 Start MONAI Label Server and Start Annotating

You're now ready to start using MONAI Label. Once you've configured your viewer, app, and datastore, you can launch the MONAI Label server with the relevant parameters. For simplicity, you can see an example where we download a Radiology sample app and dataset, then start the MONAI Label server below:

monailabel apps --download --name radiology --output apps
monailabel datasets --download --name Task09_Spleen --output datasets
monailabel start_server --app apps/radiology --studies datasets/Task09_Spleen/imagesTr --conf models segmentation

Note: If you want to work on different labels than the ones proposed by default, change the configs file following the instructions here: https://youtu.be/KtPE8m0LvcQ?t=622

MONAI Label Tutorials

Content

Cite

If you are using MONAI Label in your research, please use the following citation:

@article{DiazPinto2022monailabel,
   author = {Diaz-Pinto, Andres and Alle, Sachidanand and Ihsani, Alvin and Asad, Muhammad and
            Nath, Vishwesh and P{\'e}rez-Garc{\'\i}a, Fernando and Mehta, Pritesh and
            Li, Wenqi and Roth, Holger R. and Vercauteren, Tom and Xu, Daguang and
            Dogra, Prerna and Ourselin, Sebastien and Feng, Andrew and Cardoso, M. Jorge},
    title = {{MONAI Label: A framework for AI-assisted Interactive Labeling of 3D Medical Images}},
  journal = {arXiv e-prints},
     year = 2022,
     url  = {https://arxiv.org/pdf/2203.12362.pdf}
}

@inproceedings{DiazPinto2022DeepEdit,
      title={{DeepEdit: Deep Editable Learning for Interactive Segmentation of 3D Medical Images}},
      author={Diaz-Pinto, Andres and Mehta, Pritesh and Alle, Sachidanand and Asad, Muhammad and Brown, Richard and Nath, Vishwesh and Ihsani, Alvin and Antonelli, Michela and Palkovics, Daniel and Pinter, Csaba and others},
      booktitle={MICCAI Workshop on Data Augmentation, Labelling, and Imperfections},
      pages={11--21},
      year={2022},
      organization={Springer}
}

Optional Citation: if you are using active learning functionality from MONAI Label, please support us:

@article{nath2020diminishing,
  title={Diminishing uncertainty within the training pool: Active learning for medical image segmentation},
  author={Nath, Vishwesh and Yang, Dong and Landman, Bennett A and Xu, Daguang and Roth, Holger R},
  journal={IEEE Transactions on Medical Imaging},
  volume={40},
  number={10},
  pages={2534--2547},
  year={2020},
  publisher={IEEE}
}

Contributing

For guidance on making a contribution to MONAI Label, see the contributing guidelines.

Community

Join the conversation on Twitter @ProjectMONAI or join our Slack channel.

Ask and answer questions over on MONAI Label's GitHub Discussions tab.

Additional Resources

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

monailabel-0.8.0-202310181512-py3-none-any.whl (11.9 MB view details)

Uploaded Python 3

File details

Details for the file monailabel-0.8.0-202310181512-py3-none-any.whl.

File metadata

File hashes

Hashes for monailabel-0.8.0-202310181512-py3-none-any.whl
Algorithm Hash digest
SHA256 64d84d9faaacaffa916affa47116e92c11caba29973c4fdb94311f8291e0873b
MD5 073c2aea6cf3f010bda1324ab674e74c
BLAKE2b-256 b6625824466ec98d7cfb130067516d9379419743dbb117b407601dfc95b03ec9

See more details on using hashes here.

Supported by

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