MONAI

Project-MONAIApache-2.0活跃维护

基于 PyTorch 的医学影像深度学习工具包,提供数据加载、预处理、网络结构和评估等组件,帮研究者快速搭建医疗影像 AI 流程。

AI Toolkit for Healthcare Imaging

1.6.1发布于 2026-09-27 19:34 UTC8,830star +4 / 7 天1,707fork同步于 2026-11-10 05:31 UTC

怎么上手

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

README 未说明具体显存或 GPU 型号要求;依赖 PyTorch,官方 Docker 镜像运行示例使用 --gpus all,说明可走 GPU 加速路线。

多卡 / 张量并行有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 PyTorch 的医疗影像深度学习开源框架,提供端到端训练流程

基于 PyTorch 的医学影像深度学习工具包,提供数据加载、预处理、网络结构和评估等组件,帮研究者快速搭建医疗影像 AI 流程。

核心能力

  • 灵活预处理多维医学影像数据
  • 提供可组合、可移植的 API 便于集成
  • 内置医疗影像专用网络、损失与评估指标
  • 支持多 GPU 多节点数据并行训练
  • 提供 MONAI Bundle 格式与 Model Zoo 共享模型

容易踩的坑

除 NumPy 和 PyTorch 外还有大量可选依赖,需按需自行安装;PyTorch 仅支持当前版本及前三个小版本,版本不匹配可能出问题;Docker 镜像需带 --gpus all 才能用 GPU。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README
这个条目还没有人工点评。如果它对你很有用,欢迎到 提交仓库 页写下你的使用经验。

用户点评

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

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

    最近发版

    5 个版本1.6.1
    1. 1.6.1MONAI 1.6.1最新正式版2026-09-27 · 2026-09-27 19:34 UTC

      What's Changed

    2. 1.6.02026-06-11 · 2026-06-11 01:51 UTC
      查看更新说明

      What's Changed

    3. 1.5.22026-01-29 · 2026-01-29 02:55 UTC
      查看更新说明

      What's Changed

      Fixed

      Full Changelog: https://github.com/Project-MONAI/MONAI/compare/1.5.1...1.5.2

    4. 1.5.12025-09-22 · 2025-09-22 18:00 UTC
      查看更新说明

      Added

      • PyTorch 2.7 and 2.8 support (#8429, #8530)
      • Create SECURITY.md (#8546)
      • Add kwargs in array and functional file (#8508)
      • Add .coderabbit.yaml File (#8513)
      • Add input validation to ImageStats class (#8501)
      • Add support for optional conditioning in PatchInferer, SliceInferer, and SlidingWindowInferer (#8400)
      • Add classifier free guidance unconditioned value (#8562)
      • Improved DiffusionModelEncoder to support output linear layers of different dimensions (#8578, #8580)

      Fixed

      • Fix for insecure zip file extraction to address GHSA-x6ww-pf9m-m73m (#8568)
      • Fix for insecure use of torch.load and pickle to address GHSA-6vm5-6jv9-rjpj and GHSA-p8cm-mm2v-gwjm (#8566)
      • Torchvision fix for loading pretrained weights using current syntax (#8563)
      • Fix bug in MAISI vae (#8517)
      • Throw exception on invalid images in retinanet detector (#8515)
      • Fix: HistogramNormalized doc (#8543)
      • Fix build failure by pinning pyamg to versions below 5.3.0 (#8548)
      • Fix hardcoded input dim in DiffusionModelEncoder (#8514)
      • Fix for gdown downloading fails (#8576)

      Changed

      • Update README badges to add research paper citations number (#8494)
      • CI: Add custom timeout to ci job in order to save resources (#8504)
      • Improve documentation on the datalist format (#8539)
      • Tests Cleanup and refactor (#8405, #8535)
      • Improve Orientation transform to use the "space" (LPS vs RAS) of a metatensor by default (#8473)
      • Updated supported version of Huggingface Transformers (#8574)

      New Contributors

      Full Changelog: https://github.com/Project-MONAI/MONAI/compare/1.5.0...1.5.1

    5. 1.5.02025-06-14 · 2025-06-14 05:34 UTC
      查看更新说明

      Added

      • Add platform-specific constraints to setup.cfg (#8260)
      • Add PythonicWorkflow (#8151)
      • Add SM architecture version check (#8199)
      • Add MedNext implementation (#8004)
      • Added a top button to CONSTRIBUTING.md (#8163)
      • Adding CODEOWNERS (#8457)
      • Restormer Implementation (#8312)
      • Add rectified flow noise scheduler for accelerated diffusion model (#8374)
      • Add prediction type for rflow scheduler (#8386)
      • Add Average Precision to metrics (#8089)
      • Implementation of a Masked Autoencoder for representation learning (#8152)
      • Implement TorchIO transforms wrapper analogous to TorchVision transfo… (#7579)
      • 8328 nnunet bundle integration (#8329)
      • Adding Support Policy + Doc Updates (#8458)
      • Classifier free guidance (#8460)

      Fixed

      • Fix Ruff Numpy2 deprecation rules (#8179)
      • Fix torch.load() frequently warning in PersistentDataset and GDSDataset (#8177)
      • Fix the logging of a nested dictionary metric in MLflow (#8169)
      • Fix ImageFilter to allow Gaussian filter without filter_size (#8189)
      • Fix fold_constants, test_handler switched to onnx (#8211)
      • Fix TypeError in meshgrid (#8252)
      • Fix PatchMerging duplicate merging (#8285)
      • Fix test load image issue (#8297)
      • Fix bundle download error from ngc source (#8307)
      • Fix deprecated usage in zarr (#8313, #8477)
      • Fix DataFrame subsets indexing in CSVDataset() (#8351)
      • Fix packaging imports in version comparison logic (#8347)
      • Fix CommonKeys docstring (#8342)
      • Fix: correctly apply fftshift to real-valued data inputs (#8407)
      • Fix OptionalImportError: required package openslide is not installed (#8419)
      • Fix cosine noise scheduler (#8427)
      • Fix AutoencoderKL docstrings. (#8445)
      • Inverse Threading Fix (#8418)
      • Fix normalize intensity (#8286)
      • Fix path at test onnx trt export (#8361)
      • Fix broken urls (#8481, #8483)

      Changed

      • [DOC] Update README.md (#8157)
      • Streamlined Rearrange in SpatialAttentionBlock (#8130)
      • Optimize VISTA3D (#8123)
      • Skip torch trt convert test with torch newer than or equal to 2.5.0 (#8165)
      • Enable redirection of all loggers by configuring a FileHandler within the bundle (#8142)
      • Apply pyupgrade fixes for Python 3.9+ syntax (#8150)
      • Update base image to 2410 (#8164)
      • TRT support for MAISI (#8153)
      • 8134 Add unit test for responsive inference (#8146)
      • SwinUNETR refactor to accept additional parameters (#8212)
      • Allow an arbitrary mask to be used in the self attention (#8235)
      • Bump codecov/codecov-action from 4 to 5 (#8245)
      • Docs: update brats classes description (#8246)
      • Change default value of patch_norm to False in SwinUNETR (#8249)
      • Modify Dice, Jaccard and Tversky losses (#8138)
      • Modify Workflow to Allow IterableDataset Inputs (#8263)
      • Enhance download_and_extract (#8216)
      • Relax gpu load check (#8282, #8275)
      • Using LocalStore in Zarr v3 (#8299)
      • Enable gpu load nifti (#8188)
      • update pydicom reader to enable gpu load (#8283)
      • Zarr compression tests only with versions before 3.0 (#8319)
      • Changing utils.py to test_utils.py (#8335)
      • Refactor testd (#8231)
      • Recursive Item Mapping for Nested Lists in Compose (#8187)
      • Bump min torch to 1.13.1 to mitigate CVE-2022-45907 unsafe usage of eval (#8296)
      • Inferer modification - save_intermediates clashes with latent shape adjustment in latent diffusion inferers (#8343)
      • Solves path problem in test_bundle_trt_export.py (#8357)
      • Modify ControlNet inferer so that it takes in context when the diffus… (#8360)
      • Update monaihosting download method (#8364)
      • Bump torch minimum to mitigate CVE-2024-31580 & CVE-2024-31583 and enable numpy 2 compatibility (#8368)
      • Auto3DSeg algo_template hash update (#8378)
      • Enable Pytorch 2.6 (#8309)
      • Auto3DSeg algo_template hash update (#8393, #8397)
      • Update Dice Metric Docs (#8388)
      • Auto3DSeg algo_template hash update (#8406)
      • Update bundle download API (#8403)
      • Add Skip test in TestTranschex (#8416)
      • Update get latest bundle version function (#8420)

    README 原文

    未翻译

    Medical Open Network for AI

    Supported Python versions License auto-commit-msg PyPI version docker conda

    premerge postmerge Documentation Status codecov monai Downloads Last Month

    MONAI is a PyTorch-based, open-source framework for deep learning in healthcare imaging, part of the PyTorch Ecosystem. Its ambitions are as follows:

    • Developing a community of academic, industrial and clinical researchers collaborating on a common foundation;
    • Creating state-of-the-art, end-to-end training workflows for healthcare imaging;
    • Providing researchers with the optimized and standardized way to create and evaluate deep learning models.

    Features

    Please see the technical highlights and What's New of the milestone releases.

    • flexible pre-processing for multi-dimensional medical imaging data;
    • compositional & portable APIs for ease of integration in existing workflows;
    • domain-specific implementations for networks, losses, evaluation metrics and more;
    • customizable design for varying user expertise;
    • multi-GPU multi-node data parallelism support.

    Requirements

    MONAI works with the currently supported versions of Python, and depends directly on NumPy and PyTorch with many optional dependencies.

    • Major releases of MONAI will have dependency versions stated for them. The current state of the dev branch in this repository is the unreleased development version of MONAI which typically will support current versions of dependencies and include updates and bug fixes to do so.
    • PyTorch support covers the current version plus three previous minor versions. If compatibility issues with a PyTorch version and other dependencies arise, support for a version may be delayed until a major release.
    • Our support policy for other dependencies adheres for the most part to SPEC0, where dependency versions are supported where possible for up to two years. Discovered vulnerabilities or defects may require certain versions to be explicitly not supported.
    • See the pyproject.toml file for dependency version information.

    Installation

    To install the current release, you can simply run:

    pip install monai
    

    Please refer to the installation guide for other installation options.

    Getting Started

    MedNIST demo and MONAI for PyTorch Users are available on Colab.

    Examples and notebook tutorials are located at Project-MONAI/tutorials.

    Technical documentation is available at monai.readthedocs.io.

    Docker

    The MONAI Docker image is available from Dockerhub, tagged as latest for the latest state of dev or with a release version. A slimmed down image can also be built locally using Dockerfile.slim, see that file for instructions.

    To get started with the latest MONAI, use docker run -ti --rm --gpus all projectmonai/monai:latest /bin/bash.

    Citation

    If you have used MONAI in your research, please cite us! The citation can be exported from: https://arxiv.org/abs/2211.02701.

    Model Zoo

    The MONAI Model Zoo is a place for researchers and data scientists to share the latest and great models from the community. Utilizing the MONAI Bundle format makes it easy to get started building workflows with MONAI.

    Contributing

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

    Community

    Join the conversation on Twitter/X @ProjectMONAI, LinkedIn, or join our Slack channel.

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

    Links