Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
gourav3017 committed Jul 8, 2024
2 parents fbb7e3b + 39af1dc commit 0168914
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ We have adopted the widely-used JSON and HDF5 formats for data storage.
# Team <a name="Team"></a>
PortPy is a community project initiated at [Memorial Sloan Kettering Cancer Center](https://www.mskcc.org/). It is currently developed and maintained by:

| Name | Expertise | Institution |
|------------------------------------------------------------------------------|--------------------------------------------------|-------------|
| [Masoud Zarepisheh](https://masoudzp.github.io/) | Treatment Planning and Optimization | MSK |
| [Saad Nadeem](https://nadeemlab.org/) | Computer Vision and AI in Medical Imaging | MSK |
| [Gourav Jhanwar](https://github.com/gourav3017) | Algorithm Design and Development | MSK |
| [Mojtaba Tefagh](https://github.com/mtefagh) | Mathematical Modeling and Reinforcement Learning | SUT |
| [Vicki Taasti](https://scholar.google.com/citations?user=PEPyvewAAAAJ&hl=en) | Physics and Planning of Proton Therapy | MAASTRO |
| [Seppo Tuomaala](https://www.linkedin.com/in/seppo-tuomaala-5b57913/) | Eclispe API Scripting | VARIAN |
| Name | Expertise | Institution |
|------------------------------------------------------------------------------|--------------------------------------------------|----------------------------------------|
| [Masoud Zarepisheh](https://masoudzp.github.io/) | Treatment Planning and Optimization | Memorial Sloan Kettering Cancer Center |
| [Saad Nadeem](https://nadeemlab.org/) | Computer Vision and AI in Medical Imaging | Memorial Sloan Kettering Cancer Center |
| [Gourav Jhanwar](https://github.com/gourav3017) | Algorithm Design and Development | Memorial Sloan Kettering Cancer Center |
| [Mojtaba Tefagh](https://www.ed.ac.uk/profile/mojtaba-tefagh) | Mathematical Modeling and Reinforcement Learning | University of Edinburgh, Scotland |
| [Vicki Taasti](https://scholar.google.com/citations?user=PEPyvewAAAAJ&hl=en) | Physics and Planning of Proton Therapy | Aarhus University, Denmak |
| [Seppo Tuomaala](https://www.linkedin.com/in/seppo-tuomaala-5b57913/) | Eclispe API Scripting | Varian Medical Systems |

# License <a name="License"></a>
PortPy code is distributed under **Apache 2.0 with Commons Clause** license, and is available for non-commercial academic purposes.
Expand All @@ -212,4 +212,4 @@ If you find our work useful in your research or if you use parts of this code pl
```


> Written with [StackEdit](https://stackedit.io/).
> Written with [StackEdit](https://stackedit.io/).
27 changes: 18 additions & 9 deletions examples/vmat_scp_dose_prediction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
"id": "ebb21aee",
"metadata": {},
"source": [
"# <center>Pipeline for Deep learning based Dose Prediction and converting it to deliverable plan using VMAT SCP Optimization</center>\n",
"# <center> Automated VMAT Planning via Deep Learning Dose Prediction and Subsequent VMAT Optimization </center>\n",
"\n",
"\n",
"This example showcases the core functionalities of the portpy.ai module, which is designed for deep learning-based dose prediction in the context of radiotherapy treatment planning. The main functionalities demonstrated are as follows:\n",
"This example demonstrates how to predict the 3D dose distribution using the portpy.ai module and then convert it into a deliverable VMAT plan via SCP-based VMAT optimization available in the portpy.photon module.\n",
"\n",
"**Note**: The portpy.ai module currently predicts the 3D dose distribution using benchmark ECHO IMRT plans available in the PortPy dataset. Consequently, the prediction is not optimized for VMAT. The primary goal of this notebook is to illustrate the feasibility of this automated planning workflow. We hope that in the future, researchers, including our group, will share their optimized prediction models using more data and state-of-the-art AI tools. The VMAT module is based on our recent publications ([Dursun et al 2021](https://iopscience.iop.org/article/10.1088/1361-6560/abee58/meta) and [Dursun et al 2023](https://iopscience.iop.org/article/10.1088/1361-6560/ace09e/meta)). For more information, please refer to [vmat_scp_tutorial.ipynb](https://github.com/PortPy-Project/PortPy/blob/master/examples/vmat_scp_tutorial.ipynb)\n",
" \n",
"The main functionalities demonstrated in this notebook are as follows:\n",
"\n",
"1. **Data Access and Preprocessing**: The portpy.ai module allows easy access to curated portpy data, specifically tailored for training deep learning models for dose prediction. It also includes preprocessing steps to prepare the data for use in the models.\n",
"\n",
Expand All @@ -17,11 +21,11 @@
"3. **Patient-Specific Dose Prediction**: The module enables the creation of personalized dose prediction for available patients in the PortPy database. This feature allows users to estimate the dose distribution for individual patients, aiding in treatment planning. Also, PortPy uses simple UNET model with MAE loss to create dose prediction. Users can implement their own customized models for better prediction and accuracy\n",
"\n",
"\n",
"4. **VMAT SCP with Predicted Dose**: The predicted dose distribution can be used to create VMAT plan using scp based optimization for treatment planning. The optimal plan can be imported back to eclipse for final dose calculation. Please refer to [vmat_tps_import](https://github.com/PortPy-Project/PortPy/blob/master/examples/vmat_tps_import.ipynb) for more details.\n",
"4. **VMAT SCP with Predicted Dose**: The predicted dose distribution can be used to create VMAT plan using scp based optimization for treatment planning. The optimal plan can be imported back to a TPS for final dose calculation. Please refer to [vmat_tps_import](https://github.com/PortPy-Project/PortPy/blob/master/examples/vmat_tps_import.ipynb) for more details.\n",
"\n",
"5. **Plan Visualization**: The module offers tools for visualizing treatment plans based on the predicted dose distribution. \n",
"\n",
"Overall, the portpy.ai module provides a comprehensive solution for dose prediction and treatment planning in radiotherapy, leveraging the power of deep learning and data-driven methodologies to enhance precision and patient-specific care.\n"
"\n"
]
},
{
Expand Down Expand Up @@ -159,7 +163,7 @@
"source": [
"### 2. Training and testing the model\n",
"\n",
"Train the model. You can change the parameters for the training as show below"
"Train the model. You can change the parameters for the training as shown below"
]
},
{
Expand Down Expand Up @@ -231,18 +235,23 @@
"source": [
"### 4. VMAT SCP based optimization using predicted dose\n",
"\n",
"Predicted dose can then be used to create a deliverable vmat plan. We demonstrate simple optimization can be done to create a fluence from predicted dose. The optimized fluence can be imported back to eclipse for final dose calculation. Please refer to [vmat_tps_import](https://github.com/PortPy-Project/PortPy/blob/master/examples/vmat_tps_import.ipynb) for more details. \n",
"Model formulation for the optimization is given below:\n",
"The predicted dose can then be used to design a simple optimization problem that attempts to mimic the predicted dose (this idea sometime is referred to as \"dose-mimicking\" in the literature). We use the following optimization problem::\n",
"\n",
"$\n",
" \\mbox{Minimize} \\quad ||A^{PTV}\\mathbf{\\hat{x}}-pred^{ptv}||^2 + ||A^{oar}\\mathbf{\\hat{x}}-pred^{oar}||^2_{+} + w_{ar}(aperture \\space irregularity \\space objective) + w_{as}(aperture \\space similarity \\space objective) \n",
" \\mbox{Minimize} \\quad ||A^{PTV}\\mathbf{\\hat{x}}-pred^{ptv}||^2 + ||A^{oar}\\mathbf{\\hat{x}}-pred^{oar}||^2_{+} + w_{ar}(\\text{aperture irregularity objective}) + w_{as}(\\text{aperture similarity objective}) \n",
"$\n",
"\n",
"$\n",
"\\quad \\mathbf{\\hat{x}} \\geq 0\n",
"$\n",
"\n",
"Here, $\\mathbf{A}$ represents the dose influence matrix, parameterizing the dose delivered to each voxel from each beamlet. $\\mathbf{\\hat{x}}$ refers to the convex approximation of the leaf positons using interior and boundary beamlets (please refer to our recent papers recent publications ([Dursun et al 2021](https://iopscience.iop.org/article/10.1088/1361-6560/abee58/meta) and [Dursun et al 2023](https://iopscience.iop.org/article/10.1088/1361-6560/ace09e/meta) for more details), while $pred$ stands for the predicted dose using the above dose prediction pipeline. The operators $||.||_{+}$ represent the positive of the input vector respectively. "
"where, 1) $\\mathbf{\\hat{x}}$ refers to the fluence derived from the leaf positions and MUs of all control points in VMAT (please refer ([Dursun et al 2021](https://iopscience.iop.org/article/10.1088/1361-6560/abee58/meta) and [Dursun et al 2023](https://iopscience.iop.org/article/10.1088/1361-6560/ace09e/meta) for more details), 2) $\\mathbf{A}$ represents the dose influence matrix corresponding to the control points, and 3) $pred$ represents the predicted dose.\n",
" \n",
"The operators $||.||_{+}$ represents the positive part of the input vector and is used to ensure the objective function does not penalize for OAR doses less than the predicted dose. Additionally, there are two extra terms in the objective function to encourage aperture regularity and similarity, enhancing delivery efficiency and accuracy.\n",
"\n",
"**Note**: The optimization problem above can be enhanced in several ways, including: 1) Modifying the first term to ensure the objective function does not penalize doses that are better than the predicted dose for PTV voxels, 2) adding appropriate terms to the objective function to further incentivize doses that are even better than the predicted dose for PTV/OARs, and 3) incorporating hard constraints to ensure that critical clinical constraints are always satisfied. Please note that these modifications would require further attention and could potentially increase computational time.\n",
"\n",
" "
]
},
{
Expand Down

0 comments on commit 0168914

Please sign in to comment.