How sykim8968/alef-seg works
ALEF-Seg is a command-line inference and evaluation pipeline for pediatric ultra-low-field brain MRI. Its workflow inventories Task 2 data, prepares baseline and atlas-guided expert inputs, invokes nnU-Net models, restores and combines predictions, and evaluates the resulting segmentations. The README also documents held-out fold scoring, internal cross-validation, and validation prediction. Edges reflect CLI calls and explicit README capabilities; unsampled CLI sections limit details of some prediction and preparation stages.
Main entry points: cli.py Run commands · prepare.py Atlas and crops · nnunet_predict.py nnU-Net adapter · fusion.py Expert fusion
Components 18
Workflow orchestration
- Run commands
alef_seg/cli.py
Data and atlas preparation
- Data inventory
alef_seg/prepare.py - Source dataset
alef_seg/prepare.py - Atlas and crops
alef_seg/prepare.py - Expert configuration
alef_seg/specs.py
Model inference and fusion
- Baseline prediction
alef_seg/cli.py - Expert predictions
alef_seg/cli.py - nnU-Net adapter
alef_seg/nnunet_predict.py - Restore and ensemble
alef_seg/fusion.py - Expert fusion
alef_seg/fusion.py - Constraint atlas
alef_seg/prepare.py
Scoring and evaluation
- Fold scoring
alef_seg/metrics.py - Full-label evaluation
alef_seg/metrics.py
Other components
- CLI user
- Task 2 data
- nnU-Net models
- Segmentation outputs
- Score reports
Connections 23
- CLI user → Run commands: runs
README.md - Task 2 data → Run commands: supplies data
README.md - nnU-Net models → Run commands: supplies models
README.md - Run commands → Data inventory: inventories
alef_seg/cli.py - Run commands → Source dataset: prepares source
alef_seg/cli.py - Run commands → Atlas and crops: prepares experts
alef_seg/cli.py - Atlas and crops → Expert configuration: uses settings
alef_seg/prepare.py - Run commands → Expert configuration: selects models
alef_seg/cli.py - Run commands → Baseline prediction: runs prediction
alef_seg/cli.py - Run commands → Expert predictions: runs prediction
alef_seg/cli.py - Baseline prediction → nnU-Net adapter: invokes
- Expert predictions → nnU-Net adapter: invokes
- nnU-Net adapter → nnU-Net models: loads models
- Run commands → Restore and ensemble: restores predictions
alef_seg/cli.py - Restore and ensemble → Expert fusion: provides masks
alef_seg/cli.py - Run commands → Expert fusion: fuses predictions
alef_seg/cli.py - Atlas and crops → Constraint atlas: builds views
alef_seg/prepare.py - Expert fusion → Constraint atlas: reads constraint
alef_seg/fusion.py - Run commands → Segmentation outputs: writes outputs
alef_seg/cli.py - Run commands → Fold scoring: scores folds
alef_seg/cli.py - Run commands → Full-label evaluation: evaluates labels
alef_seg/cli.py - Fold scoring → Score reports: writes scores
alef_seg/metrics.py - Full-label evaluation → Score reports: writes summaries
alef_seg/metrics.py