This repository contains code and scripts for developing and evaluating deep-learning models to estimate dose-averaged linear energy transfer (LETd) distributions in proton therapy, as described in our associated publication:
Kieslich et al., “Deep learning for dose-averaged linear energy transfer estimation in pencil-beam scanning and double scattering proton plans with uncertainty-aware validation on external dataset,” 2025.
Create a conda environment and install the required dependencies:
conda create -n let_2nd python=3.8
conda activate let_2nd
cd src
pip install -r requirements.txt
pip install -e .Verified library versions:
monai=1.1.0
seaborn=0.11.2
scipy=1.7.1
torch=1.10.0
pydicom=2.2.2
pytorch_lightning=1.9.0
Preprocessing aligns and standardizes CT, dose, LET, and ROI data across datasets.
To generate the required *.npy arrays from DICOM data, use:
python src/scripts/data_preparation/interpolation.pyConfiguration of file paths, plan tables, and ROI renaming tables can be done in
src/scripts/data_preparation/input_variables.py.
All training and inference processes are orchestrated through the provided pipeline scripts. Navigate to the model training directory:
cd src/scripts/model_trainingRun the full training and inference pipelines:
-
Cross-validation training and inference
./pipeline_cv_orchestra.sh
-
Final model training and evaluation
./pipeline_orchestra.sh
These scripts automatically handle model training, validation, evaluation, and subsequent inference, including NTCP model evaluation as presented in the paper.
The repository now includes functionality to estimate model uncertainty through latent space distance and ensemble variance (median voxel variance) metrics.
-
Latent Space Calculation
To compute latent representations of the model inputs:
./execute_latent_space_calculation.sh
-
Uncertainty Metric Generation
To generate latent space distance and median voxel variance metrics:
./execute_uncertainty_estimation.sh
These metrics provide quantitative insight into prediction reliability and allow assessment of model applicability for datasets without Monte Carlo reference LET distributions.
The updated models were trained and validated across multiple proton delivery techniques, including pencil-beam scanning (PBS) and double scattering (DS), improving robustness and generalizability. Earlier limitations related to model transferability between delivery modalities have been substantially mitigated through combined PBS+DS training.
However, some considerations remain:
- Current validation covers proton therapy systems from limited vendors. While multi-institutional data have been incorporated, further inclusion of centers using different beamline configurations would enhance generalization.
- The model has been evaluated primarily on brain tumor cases; extending to other anatomical sites is ongoing.
- Uncertainty estimation (latent distance and ensemble variance) provides indirect validation in scenarios lacking Monte Carlo ground truth, but cannot fully substitute direct reference comparison.
Future developments will focus on expanding training data to diverse treatment techniques and tumor sites, refining uncertainty calibration, and integrating additional predictive endpoints related to RBE variability.
For inquiries, collaborations, or technical issues:
Aaron Kieslich Email: aaron.kieslich@oncoray.de
Prof. Dr. Steffen Löck Email: steffen.loeck@oncoray.de