nnUNet

MIC-DKFZApache-2.0活跃维护

医学影像分割的深度学习工具箱,开箱即用,能自动配置训练流程,在 CT、MRI 等 3D 数据上达到竞赛级精度。

v2.4.1发布于 2024-04-21 19:10 UTC9,031star +11 / 7 天2,513fork同步于 2026-11-10 17:31 UTC

怎么上手

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

README 未说明具体显存与 GPU 型号要求,仅提示先按自身硬件安装对应 PyTorch 版本

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

自动适配数据集的语义分割框架,从预处理到推理端到端跑通

医学影像分割的深度学习工具箱,开箱即用,能自动配置训练流程,在 CT、MRI 等 3D 数据上达到竞赛级精度。

核心能力

  • 分析训练数据生成 dataset fingerprint 并自动配置 U-Net 变体
  • 覆盖预处理、训练、模型选择到推理的完整流程
  • 支持 2D 与 3D 数据、任意通道定义和多种图像格式
  • 按数据集特性决定是否生成 cascade 等配置
  • 可作为新分割方法的强基线开发框架

容易踩的坑

需先自行安装匹配硬件的 PyTorch 再装 nnU-Net;还需按文档设置 nnUNet_raw、nnUNet_preprocessed、nnUNet_results 三个目录;并非每个数据集都会生成全部配置,例如 cascade 只在数据特性支持时才生成

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

最近发版

4 个版本v2.4.1
  1. v2.4.1Residual Encoder UNets released!最新正式版2024-04-21 · 2024-04-21 19:10 UTC

    See documentation :-)

  2. v2.2nnU-Net v2.22023-09-19 · 2023-09-19 14:42 UTC
    查看更新说明

    Reworked inference code to be more flexible

    Minor bug fixes

  3. v2.0nnU-Net V22023-03-17 · 2023-03-17 13:50 UTC
    查看更新说明

    nnU-Net V2 delivers the same segmentation performance, but has now been re-worked from the ground up to optimize for usability and facilitate modifications for method developers.

    nnU-Net plans are now more powerful and simpler at the same time. Making manual adjustments to the U-Net configurations is much easier. Configurations can inherit from each other, allowing rapid experimentation. You can chain configurations in custom cascades.

    No longer are you bound to use NIFTI files. Datasets can be provided in a wide range of imaging formats and you can even add your own I/O adapters to make nnU-Net compatible with your favorite format!

    Hierarchical labels, such as the tumor regions used in BraTS, are now natively supported!

    Trainer classes are unified: no more messing around with special trainers for distributed training, cascaded training and hierarchical labels. nnUNetTrainer is all you need.

    As part of our usability upgrade, nnU-Net V2 supports Linux, Windows and macOS. It can be run on CUDA capable GPUs, CPU and Apple MPS devices.

    nnU-Net V1 and can V2 be installed at the same time. There stands nothing in your way for trying it out! Existing datasets (not trained model weights!) can be directly transferred from V1 to V2.

  4. v1.7.1nnU-Net V12023-03-17 · 2023-03-17 13:22 UTC
    查看更新说明

    v1.7.1

用户点评

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

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

    README 原文

    未翻译

    nnU-Net

    nnU-Net is a semantic segmentation framework that automatically adapts its pipeline to a dataset. It analyzes the training data, creates a dataset fingerprint, configures suitable U-Net variants, and provides an end-to-end workflow from preprocessing to training, model selection, and inference.

    It is primarily designed for supervised biomedical image segmentation, but it also works well as a strong baseline and development framework for researchers working on new segmentation methods.

    If you are looking for nnU-Net v1, use the v1 branch. If you are migrating from v1, start with the TLDR migration guide.

    nnU-Net overview

    Start Here

    Quick Install

    Install PyTorch for your hardware first, then install nnU-Net:

    pip install nnunetv2
    

    For the full setup, including nnUNet_raw, nnUNet_preprocessed, and nnUNet_results, see Installation and setup.

    Documentation

    Start with the documentation home.

    Useful entry points:

    Scope

    nnU-Net is built for supervised semantic segmentation. It supports 2D and 3D data, arbitrary channel definitions, multiple image formats, and dataset-specific adaptation of preprocessing and network configuration.

    It performs particularly well in training-from-scratch settings such as biomedical datasets, challenge datasets, and non-standard imaging problems where off-the-shelf natural-image pretrained models are often a poor fit.

    For a concise overview of the design, see How nnU-Net works.

    Citation

    Please cite the following paper when using nnU-Net:

    Isensee, F., Jaeger, P. F., Kohl, S. A., Petersen, J., & Maier-Hein, K. H. (2021).
    nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation.
    Nature Methods, 18(2), 203-211.
    

    Additional recent work on residual encoder presets and benchmarking:

    Project Notes

    • nnU-Net v2 is a complete reimplementation of the original nnU-Net with improved code structure and extensibility.
    • Not every dataset creates every configuration. For example, the cascade is only generated when the dataset characteristics justify it.
    • Detailed historical changes are summarized in What is different in v2?.

    Acknowledgements

    nnU-Net is developed and maintained by the Applied Computer Vision Lab (ACVL) of Helmholtz Imaging and the Division of Medical Image Computing at the German Cancer Research Center (DKFZ).