MONAILabel

Project-MONAIApache-2.0活跃维护

面向医学影像的智能标注与主动学习工具,在 3D Slicer 等客户端里边标注边训练模型,减少人工勾画工作量。

MONAI Label is an intelligent open source image labeling and learning tool.

0.8.5发布于 2023-10-18 15:08 UTC911star279fork同步于 2026-11-10 11:52 UTC

怎么上手

由 README 提炼,执行前请确认
pip install -U monailabel
硬件要求按 README 说明

README 说明可在单卡或多卡 GPU 的本地机器上运行,支持 Ubuntu 和 Windows 并启用 GPU/CUDA;未给出具体显存要求。

支持 Apple Silicon需要 CUDA有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用 AI 辅助医学影像标注的服务端-客户端系统,边标注边训练模型

面向医学影像的智能标注与主动学习工具,在 3D Slicer 等客户端里边标注边训练模型,减少人工勾画工作量。

核心能力

  • 服务端-客户端架构,通过 MONAI Label Server 把自定义标注应用暴露为服务
  • 支持主动学习,从用户交互中持续训练并改进 AI 标注模型
  • 提供 DeepGrow、DeepEdit、SAM2 等交互式与自动分割模型
  • 集成 3DSlicer、OHIF、QuPath、CVAT 等影像与病理查看器
  • 通过 DICOMWeb 连接 PACS,支持 NIfTI、DICOM、SVS 等格式

容易踩的坑

pip 安装默认使用 SAM-2,如需 SAM-2.1 要改用 Docker 或开发模式;使用 DICOM-Web + OHIF 时需单独构建 OHIF 包;GPU 加速依赖 CUCIM、CUPY、CUDA Toolkit 等可选依赖,需自行安装。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本0.8.5
  1. 0.8.40.8.4 2024-10-17 · 2024-10-17 22:32 UTC
    查看更新说明

    What's New:

    • VISTA2D Dependencies Added:

      • Added dependencies for VISTA2D, ensuring enhanced compatibility and performance when using this feature.
    • Cellprofiler App and Plugin:

      • The Cellprofiler app has been integrated along with a corresponding plugin, enabling new workflows for image analysis.

    Enhancements:

    • Release Checks and Updates:

      • Updates and improvements made in preparation for the 0.8.4 release.
    • Allow Newer Versions of Dependencies:

      • Newer versions of key dependencies are now supported, improving compatibility across a wider range of environments.
    • Replace Deprecated IgniteMetric with IgniteMetricHandler:

      • The deprecated IgniteMetric has been replaced with IgniteMetricHandler to keep up with library updates and prevent potential issues.
    • MITK Platform Support:

      • MITK has been officially added as a supported platform, expanding the tool's versatility in medical image processing.

    Bug Fixes:

    • Fix Non-Standard English Double-Colons:

      • Addressed issues with non-standard English double colons, ensuring improved consistency in documentation and messaging.
    • Fix Bug with Nuclio Docker Container Directory:

      • Resolved a bug in the Nuclio Docker container that could cause directory-related errors, ensuring smoother execution in Docker environments.

    Dependency Updates:

    • Bump requests Library:

      • The requests library was updated from 2.31.0 to 2.32.2, addressing security and bug fixes.
    • Bump urllib3 Library:

      • The urllib3 library was updated from 2.2.1 to 2.2.2 to fix known issues and maintain security compliance.
    • Pre-commit Hooks Update:

      • Updated pre-commit hooks to the latest versions, ensuring consistency in code linting and formatting across the project.

    Other Changes:

    • Add Test Case for OpenCV Installation:

      • Introduced a test case to ensure both scenarios are enabled when OpenCV is installed, improving test coverage.
    • Fix cv2 Dependency Issues:

      • Resolved conflicts related to the cv2 library to ensure smooth functionality in different environments.
  2. 0.8.32024-07-23 · 2024-07-23 17:48 UTC
    查看更新说明

    What's Changed

    • Add no scribbles model
    • Mark translatable strings MONAILabel 3D Slicer Extension
    • Bump actions/setup-node
    • Fixing #1601 - missing server URL error when doing inference
    • Updated pydantic version
    • Bump github/codeql-action
    • Bump actions/upload-artifact
    • Bump actions/setup-python
    • Update version with remove requests and requests-toolbelt version limit
    • Adding save label function to xnat datastore
    • Bump actions/cache
    • Bump codecov/codecov-action
    • Update package dependencies
    • Fix response encoding to explicitly use UTF-8 for HTTP response data
    • Update fastapi version
    • update github monai model zoo config
    • Update blossom-ci list
    • Downgraded filelock version
    • Fixed cv2
    • Jwt package for 0.8.2
    • Update bundle versions to avoid conflicts
    • Update more bundle versions
  3. 0.8.5MONAI Label 0.8.5最新正式版2023-10-18 · 2023-10-18 15:08 UTC
    Added
    • SAM2 as base model (Inference only) for all Radiology/Pathology/Endoscopy usecases.

      • Updated 3D Slicer plugin to support ROI prompts for SAM2 1732541491294
    • OHIF V3 3.9+

      • Refactored Plugin to support latest OHIF V3 3.9+ version
      • Auto Segmentation
      • Point Prompts (Deepgrow/DeepEdit/SAM2) models
      • Class Prompts (Subset of classes as part of Auto Segmentation) 1732541491894
    • CVAT

      • Refactored Plugin to support latest CVAT version
      • SAM2 model via MONAI Label unnamed
    • Python 3.12 support

    Changed
    • CVAT Plugin - MONAI Label will serve the inference logic and nuclio function will only at as as wrapper.
    • Base Image for docker is ubuntu:22.04 (for saving the space)
    • Documentation Fixes
    Removed
    • Python 3.8 support
  4. 0.7.0MONAI Label 0.7.0 2023-06-10 · 2023-06-10 01:10 UTC
    查看更新说明
    Added
    • Multi Users authentication and KeyCloak Integration

      • MONAI Label APIs with Keycloak integration for user authentication and role based access.
      • Login support for 3D Slicer via MONAILabel + KeyClock.
    • Whole Body CT segmentation

      • Segmenting 104 anatomies in 4 seconds!
    • MONAI Bundle Support Improvements

      • Support visualization of bundle config option.
      • Enhancement of monai-zoo access.
      • Support bundle downloading from NGC.
      • Enhacement of multi-gpu training of bundles.
    • New MONAI Label Tutorial Series

      • Quickstart tutorials and installation instructions in notebooks.
    • Documentation enhancements

    Changed
    • Updated pretrained models:

      • segmentation
      • deepedit
    • CI/CD and tests

      • blossom CI/CD and pre-merge pipeline enabled.
      • Increased Unit tests coverage to 80%.
    Removed
  5. 0.6.0MONAI Label 0.6.02022-12-20 · 2022-12-20 05:20 UTC
    查看更新说明
    Added
    • Pathology Models
    • QuPath Extension: 0.3.1 | Demo
      • User experience enhancements
      • MONAI Label specific Toolbar actions
      • Drag and Drop ROI to run auto-segmentation models
      • Single click to run interaction models (NuClick)
      • Support Next Sample/ROI for Active Learning
    • Experiment Management
    • 3D Slicer: Detection model support in MONAI Bundle App for Radiology use-case
    • Multi-GPU/Multi-Threaded support for Batch Inference
    Changed
    • Support latest version of bundles in MONAI Bundle App
    • Upgrade vertebra pipeline
    • MONAI version >= 1.1.0
    Removed
    • DeepEdit model for Nuclei segmentation in Pathology

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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.

    Getting Started with MONAI Label

    MONAI Label requires a few steps to get started:

    Step 1 Installation

    Current Stable Version

    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:

    SAM-2

    By default, SAM2 model is included for all the Apps when python >= 3.10

    • sam_2d: for any organ or tissue and others over a given slice/2D image.
    • sam_3d: to support SAM2 propagation over multiple slices (Radiology/MONAI-Bundle).

    If you are using pip install monailabel by default it uses SAM-2 models. To use SAM-2.1 use one of following options.

    • Use monailabel Docker instead of pip package
    • Run monailabel in dev mode (git checkout)
    • If you have installed monailabel via pip then uninstall sam2 package pip uninstall sam2 and then run pip install -r requirements.txt or install latest SAM-2 from it's github.

    Step 2 MONAI Label Sample Applications

    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

    MITK

    The Medical imaging Interaction ToolKit (MITK) is an open source, standalone, medical imaging platform. MONAI Label is partially integrated to MITK Workbench, a powerful and free application to view, process, and segment medical images. The MONAI Label tool in MITK is mostly tested for inferencing using radiology and bundle apps allowing for Auto and Click-based interactive models.

    MITK 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