How mic-dkfz/nnssl works
nnssl is a 3D medical-imaging self-supervised pretraining framework, including the nnFoundation CNN and ViT models and the broader OpenMind SSL benchmark. Its documented user workflow prepares a raw collection, fingerprints/plans and preprocesses it, then pretrains a model. The graph also shows the internal training, data-loading and architecture layers, plus conversion and model-sharing capabilities. Edges follow README statements or SOURCE INDEX references; unsampled subsystem details and wiring are not inferred.
Main entry points: AbstractTrainer.py Trainer framework · default_preprocessor.py Preprocessing · raw_dataset.py Raw collections · dataset_conversion Dataset conversion
Components 17
Data preparation
- Raw collections
src/nnssl/data/raw_dataset.py - Dataset conversion
src/nnssl/dataset_conversion - Blosc2 dataset
src/nnssl/data/dataloading/dataset.py
Planning and preprocessing
- Fingerprinting
src/nnssl/experiment_planning/dataset_fingerprint/default_fingerprint_extractor.py - Experiment planning
src/nnssl/experiment_planning/experiment_planners/default_experiment_planner.py - Plans
src/nnssl/experiment_planning/experiment_planners/plan.py - Preprocessing
src/nnssl/preprocessing/preprocessors/default_preprocessor.py - Resampling
src/nnssl/preprocessing/resampling/default_resampling.py
Pretraining
- Training entrypoint
src/nnssl/run/run_training_wandb.py - Trainer framework
src/nnssl/training/nnsslTrainer/AbstractTrainer.py - 3D patch loader
src/nnssl/ssl_data/dataloading/data_loader_3d.py - SSL trainers
src/nnssl/training/nnsslTrainer
Models and adaptation
- Architecture selection
src/nnssl/architectures/get_network_by_name.py - Adaptation plans
src/nnssl/adaptation_planning/adaptation_plan.py
Model sharing
- Model import/export
src/nnssl/model_sharing - Pretrained checkpoints
Other components
- Researcher
Connections 18
- Researcher → Raw collections: prepares data
- Researcher → Dataset conversion: converts datasets
- Dataset conversion → Raw collections: creates collection
src/nnssl/dataset_conversion/Dataset800_Rocket_v0.py - Raw collections → Fingerprinting: fingerprints
- Fingerprinting → Experiment planning: informs plan
- Experiment planning → Plans: creates plan
src/nnssl/experiment_planning/experiment_planners/default_experiment_planner.py - Plans → Preprocessing: configures
src/nnssl/preprocessing/preprocessors/default_preprocessor.py - Preprocessing → Resampling: resamples data
src/nnssl/preprocessing/preprocessors/default_preprocessor.py - Preprocessing → Blosc2 dataset: saves processed data
src/nnssl/preprocessing/preprocessors/default_preprocessor.py - Researcher → Training entrypoint: starts pretraining
- Training entrypoint → Trainer framework: dispatches
src/nnssl/run/run_training_wandb.py - Trainer framework → 3D patch loader: builds batches
src/nnssl/training/nnsslTrainer/AbstractTrainer.py - 3D patch loader → Blosc2 dataset: reads cases
src/nnssl/ssl_data/dataloading/data_loader_3d.py - Trainer framework → Architecture selection: builds network
src/nnssl/training/nnsslTrainer/AbstractTrainer.py - SSL trainers → Trainer framework: extends framework
src/nnssl/training/nnsslTrainer/masked_image_modeling/BaseMAETrainer.py - Trainer framework → Adaptation plans: creates adaptation plan
src/nnssl/training/nnsslTrainer/AbstractTrainer.py - Researcher → Model import/export: imports or exports
- Model import/export → Pretrained checkpoints: transfers weights