pyanno4rt: Python-based Advanced Numerical Nonlinear Optimization for Radiotherapy

CI/CD Read the Docs PyPI - Python Version PyPI - Downloads Coverage Status GitHub Release GitHub Downloads GitHub Repo stars GitHub Discussions GitHub Issues GitHub Contributors License: GPL v3


General information

pyanno4rt is a Python package for conventional and outcome prediction model-based inverse photon and proton treatment plan optimization, including radiobiological and machine learning (ML) models for tumor control probability (TCP) and normal tissue complication probability (NTCP). It leverages state-of-the-art local and global solution methods to handle both single- and multi-objective (un)constrained optimization problems, thereby covering a number of different problem designs. To summarize roughly, the following functionality is provided:

  • Import of patient data and dose information from different sources
    • DICOM files (.dcm)
    • MATLAB files (.mat)
    • Python files (.npy, .p)

  • Individual configuration and management of treatment plan instances
    • Dictionary-based plan generation
    • Dedicated logging channels and singleton datahubs
    • Automatic input checks to preserve the integrity
    • Snapshot/copycat functionality for storage and retrieval

  • Multi-objective treatment plan optimization
    • Dose-fluence projections
      • Constant RBE projection
      • Dose projection
    • Fluence initialization strategies
      • Data medoid initialization
      • Tumor coverage initialization
      • Warm start initialization
    • Optimization methods
      • Lexicographic method
      • Weighted-sum method
      • Pareto analysis
    • 24-type dose-volume and outcome prediction model-based optimization component catalogue
    • Local and global solvers
      • Proximal algorithms provided by Proxmin
      • Multi-objective algorithms provided by Pymoo
      • Population-based algorithms provided by PyPop7
      • Local algorithms provided by SciPy

  • Data-driven outcome prediction model handling
    • Dataset import and preprocessing
    • Automatic feature map generation
    • 27-type feature catalogue for iterative (re)calculation to support model integration into optimization
    • 7 customizable internal model classes (decision tree, k-nearest neighbors, logistic regression, naive Bayes, neural network, random forest, support vector machine)
      • Individual preprocessing, inspection and evaluation units
      • Adjustable hyperparameter tuning via sequential model-based optimization (SMBO) with robust k-fold cross-validation
      • Out-of-folds prediction for generalization assessment
    • External model loading via user-definable model folder paths

  • Evaluation tools
    • Cumulative and differential dose volume histograms (DVH)
    • Dose statistics and clinical quality measures

  • Graphical user interface
    • Responsive PyQt5 design with easy-to-use and clear surface
      • Treatment plan editor
      • Workflow controls
      • CT/Dose preview
    • Extendable visualization suite using Matplotlib and PyQt5
      • Optimization problem analysis
      • Data-driven model review
      • Treatment plan evaluation