How huilin0220/stenunet works
StenUNet is a coronary-angiography stenosis segmentation system built on nnU-Net v2. Its documented workflow prepares multiple image modalities, plans and trains a model, then preprocesses test images, predicts segmentations, and postprocesses the results. The repository also contains nnU-Net capabilities for dataset planning, model architectures, evaluation, ensembling, and model sharing. Arrows are limited to relationships shown in the README or source index; several nnU-Net connections remain unverified because their implementation excerpts are incomplete.
Main entry points: inference.py Inference entry · training.py Model training · nnUNetTrainer.py nnU-Net trainer · predict_from_raw_data.py Segmentation predictor
Components 24
Data preparation
- Raw angiograms
- Image preprocessing
pre_process/preprocess.py - Image filters
utils/DDFB.py
Planning and training
- Training planning
training_planning.py - Model training
training.py - nnU-Net trainer
nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py - Model weights
Prediction workflow
- Inference entry
inference.py - Segmentation predictor
nnunetv2/inference/predict_from_raw_data.py - Sliding-window inference
nnunetv2/inference/sliding_window_prediction.py - Dataset preprocessing
nnunetv2/preprocessing/preprocessors/default_preprocessor.py - Small-segment removal
post_process/remove_small_segments.py - Prediction results
nnU-Net capabilities
- Experiment planning
nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py - Dataset preparation
nnunetv2/experiment_planning/plan_and_preprocess_entrypoints.py - Network architectures
nnunetv2/dynamic_network_architectures/architectures/unet.py - Plan configuration
nnunetv2/utilities/plans_handling/plans_handler.py - Image I/O
nnunetv2/imageio/reader_writer_registry.py - Resampling
nnunetv2/preprocessing/resampling/default_resampling.py - Label handling
nnunetv2/utilities/label_handling/label_handling.py - Prediction evaluation
nnunetv2/evaluation/evaluate_predictions.py - Model ensembling
nnunetv2/ensembling/ensemble.py - Model sharing
nnunetv2/model_sharing/entry_points.py
Other components
- Dataset user
Connections 26
- Dataset user → Raw angiograms: provides data
- Raw angiograms → Image preprocessing: preprocessed by
- Image preprocessing → Image filters: uses filters
pre_process/preprocess.py - Dataset user → Training planning: plans training
- Training planning → Model training: configures
- Model training → nnU-Net trainer: runs trainer
- Model training → Model weights: produces weights
- Dataset user → Inference entry: starts inference
- Inference entry → Image preprocessing: preprocesses images
inference.py - Inference entry → Segmentation predictor: requests predictions
inference.py - Segmentation predictor → Dataset preprocessing: preprocesses cases
nnunetv2/inference/predict_from_raw_data.py - Segmentation predictor → Sliding-window inference: runs inference
nnunetv2/inference/predict_from_raw_data.py - Inference entry → Model weights: loads checkpoint
- Inference entry → Small-segment removal: postprocesses output
inference.py - Small-segment removal → Prediction results: writes results
- Dataset preparation → Experiment planning: plans dataset
nnunetv2/experiment_planning/plan_and_preprocess_entrypoints.py - Experiment planning → Plan configuration: creates plans
nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py - Experiment planning → Image I/O: selects reader
nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py - Plan configuration → Label handling: creates label manager
nnunetv2/utilities/plans_handling/plans_handler.py - Plan configuration → Dataset preprocessing: configures preprocessing
nnunetv2/utilities/plans_handling/plans_handler.py - Dataset preprocessing → Resampling: resamples data
nnunetv2/preprocessing/preprocessors/default_preprocessor.py - nnU-Net trainer → Network architectures: builds network
- nnU-Net trainer → Prediction evaluation: evaluates validation
nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py - Dataset user → Prediction evaluation: evaluates predictions
- Dataset user → Model ensembling: ensembles models
- Dataset user → Model sharing: shares models