How mic-dkfz/nnunet works
nnU-Net is a self-configuring biomedical image-segmentation framework. Its principal workflow prepares dataset inputs, fingerprints and plans for each dataset, preprocesses data, trains and selects models, then runs inference and evaluates predictions. The graph also preserves dataset conversion, model sharing, ensembling, and postprocessing as distinct capabilities. Relationships use README workflow statements and SOURCE INDEX references; unsampled implementation details are not asserted.
Main entry points: predict_from_raw_data.py Inference engine · nnUNetTrainer.py Trainer · plans_handler.py Plan manager · dataset_conversion Dataset conversion
Components 21
Dataset preparation
- Dataset conversion
nnunetv2/dataset_conversion - Dataset metadata
nnunetv2/dataset_conversion/generate_dataset_json.py
Planning and preprocessing
- Dataset fingerprint
nnunetv2/experiment_planning/dataset_fingerprint/fingerprint_extractor.py - Experiment planner
nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py - Plan manager
nnunetv2/utilities/plans_handling/plans_handler.py - Preprocessing
nnunetv2/preprocessing/preprocessors/default_preprocessor.py - Image readers
nnunetv2/imageio/base_reader_writer.py
Model training
- Training entry point
nnunetv2/run/run_training.py - Training dataset
nnunetv2/training/dataloading/nnunet_dataset.py - Trainer
nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py - Checkpoint handling
nnunetv2/utilities/checkpoints.py
Prediction and evaluation
- Inference engine
nnunetv2/inference/predict_from_raw_data.py - Inference input
nnunetv2/inference/data_iterators.py - Prediction export
nnunetv2/inference/export_prediction.py - Prediction evaluation
nnunetv2/evaluation/evaluate_predictions.py - Model selection
nnunetv2/evaluation/find_best_configuration.py
Model utilities
- Ensembling
nnunetv2/ensembling/ensemble.py - Postprocessing
nnunetv2/postprocessing/remove_connected_components.py - Model sharing
nnunetv2/model_sharing - Data locations
nnunetv2/paths.py
Other components
- Researcher
Connections 21
- Researcher → Dataset conversion: prepares data
- Dataset conversion → Dataset metadata: defines dataset
- Dataset metadata → Dataset fingerprint: describes inputs
- Dataset fingerprint → Experiment planner: informs planning
nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py - Experiment planner → Plan manager: creates plans
nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py - Plan manager → Preprocessing: configures preprocessing
nnunetv2/preprocessing/preprocessors/default_preprocessor.py - Preprocessing → Image readers: reads images
- Researcher → Training entry point: starts training
- Training entry point → Trainer: runs trainer
nnunetv2/run/run_training.py - Trainer → Training dataset: loads dataset
nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py - Trainer → Checkpoint handling: saves checkpoints
nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py - Researcher → Inference engine: requests inference
- Inference engine → Inference input: loads inputs
nnunetv2/inference/predict_from_raw_data.py - Inference engine → Prediction export: exports predictions
nnunetv2/inference/predict_from_raw_data.py - Researcher → Prediction evaluation: evaluates results
- Prediction evaluation → Model selection: supports selection
- Inference engine → Checkpoint handling: loads weights
nnunetv2/inference/predict_from_raw_data.py - Inference engine → Plan manager: reads plans
nnunetv2/inference/predict_from_raw_data.py - Researcher → Ensembling: combines models
- Researcher → Postprocessing: refines predictions
- Researcher → Model sharing: shares models