PhysRFANet: Physics-Guided Neural Network for Real-Time Prediction of Thermal Effect During Radiofrequency Ablation Treatment
This repository contains the implementation of a neural network designed to predict the thermal effects of Radiofrequency Ablation (RFA) on breast tumors. RFA is a medical procedure used to ablate, or destroy, breast tumors using heat generated by radiofrequency energy. Understanding the thermal impact of RFA is crucial for effective treatment planning and outcome prediction.
- 3D Encoder-decoder-based convolutional neural network (EDCNN), U-Net, and Attention U-Net architecture for accurate prediction of ablated area and temperature distribution.
- Custom loss functions that combine MSE, weighted MSE, and weighted Dice loss to enhance prediction accuracy.
- Data pre-processing and loading modules for efficient handling of RFA simulation data.
- Evaluation metrics to assess model performance, including MSE, RMSE, dice coefficient, and Jaccard index.
- python 3.9
- torch-1.11.0+cu113
- cudatoolkit-11.3.1
To set up the project environment:
- Clone the repository:
git clone https://github.com/iangilan/PhysRFANet.git
The dataset used in this project consists of:
- Temperature distribution data post-RFA treatment (https://drive.google.com/drive/u/3/folders/16n7pxy6xu1_FxEonRygYzY2eoViybYVp)
- Ablated area data post-RFA treatment (https://drive.google.com/drive/u/3/folders/1tdP9XYhw9ngsphZpTX-pW58eGEmOH0wr)
- Electrode location and geometry data during RFA treatment (https://drive.google.com/drive/u/3/folders/1F4lV7uL2pAGCMpC09Q1k2XIegJRtIoQ-).
- Segmented breast tumor data obtained from MR images (https://drive.google.com/drive/u/3/folders/1E-5jkI7lijlGaqmILcMUbeiAmQO5PMD_ ).
Note: MR images of breast cancer patients from a publicly available dataset (Saha et al., 2018) were utilized to model tumor geometry.
- Locate your RFA dataset in your local storage.
- Edit config.py according to the user's need.
- Edit the data loaders
data_loader_Temp.pyanddata_loader_Dmg.pyfor temperature distribution and damaged area, respectively, to load and preprocess the data. - Train the model using
python train_Temp.pyorpython train_Dmg.py. - Evaluate the model's performance on test data using
python test_Temp.pyorpython test_Dmg.py.
- The
RFACNNmodel is a 3D EDCNN that consists of encoder and decoder blocks, designed for extracting features and predicting both temperature distribution and damaged (ablated) areas. - The
RFAUNetmodel is a 3D U-Net, designed for extracting features and predicting both temperature distribution and damaged (ablated) areas. - The
RFAAttUNetmodel is a 3D Attention U-Net, designed for extracting features and predicting both temperature distribution and damaged (ablated) areas. - The architectures of all models are defined in
models.py.
The model uses a combined loss function (new_combined_loss in utils.py) incorporating MSE, weighted MSE, and weighted Dice loss to cater to the specific challenges in RFA thermal effect prediction.
The model is evaluated based on Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and Dice Coefficient, providing a comprehensive assessment of its prediction accuracy.
If you use this tool in your research, please cite the following paper:
- M. Shin, M. Seo, S. Cho, J. Park, J. Kwon, D. Lee, K. Yoon. "PhysRFANet: Physics-Guided Neural Network for Real-Time Prediction of Thermal Effect During Radiofrequency Ablation Treatment." TBD
- A. Saha, M. R. Harowicz, L. J. Grimm, C. E. Kim, S. V. Ghate, R. Walsh, M. A. Mazurowski, A machine learning approach to radiogenomics of breast cancer: a study of 922 subjects and 529 DCE-MRI features, Br. J. Cancer. 119 (2018) 508–516.
For any queries, please reach out to Minwoo Shin.