Method for realizing automatic dose verification based on accelerator log file
Technical Field
The invention relates to the technical field of medical radiotherapy, in particular to a method for realizing automatic dose verification based on an accelerator log file.
Background
Modern radiotherapy techniques are increasingly complex, and the number and quality requirements for dose verification are increasing. The current technological progress of modern radiotherapy is mainly reflected in that: 1) the conformality is increased continuously to improve the dosage of the target area of the tumor, and simultaneously, the radiation exposure of peripheral normal tissues and organs is reduced obviously; 2) the physical dose distribution in the target area is purposefully distributed according to the requirement; 3) single split dose escalation. The development of these techniques has resulted in a significant increase in the complexity of planning design and implementation, as well as a significant increase in uncertainty in dosage errors. Therefore, in modern radiotherapy technology, individualized radiotherapy dose verification is urgently needed to ensure the radiotherapy quality and level.
Current dose verification includes measurement-based verification methods (ionization chamber, film, two-dimensional matrix, EPID, and three-dimensional matrix) and calculation-based verification methods (montage), with measurement-based dose verification methods being more common. The analysis mode of the result of the dose verification comprises a dose difference, an anastomosis distance method and a gamma analysis method, wherein the analysis mode which is most used is the gamma analysis method combining the dose difference and the anastomosis distance. The dose verification process based on measurement is tedious and time-consuming, the dependence degree on equipment is high, and the resolution ratio of the equipment, the angle response of a probe and the like can influence the result. The problems of low efficiency, large limitation of verified points and surfaces and the like generally exist in the individualized dose verification method at the present stage. This causes the conventional individualized QA to be time-consuming and labor-consuming, which makes it more difficult for the treatment center with heavy duty to realize individualized QA, so it is very important and urgent to find a more time-saving, labor-saving and comprehensively effective dose verification method. Although the existing automatic individualized dose verification method utilizes a machine learning method to establish a prediction model of a two-dimensional passing rate based on a planning complexity parameter, the method does not consider the influence of real parameters on dose verification in the accelerator execution process, and therefore, the method is not suitable for dose verification under the condition of real irradiation of a patient.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method for realizing automatic dose verification based on an accelerator log file, wherein a dose verification prediction model based on the accelerator log file can accurately predict gamma passing rates under different threshold standards, and the dose verification efficiency is improved.
In order to solve the technical problems, the technical scheme of the invention is as follows: a method for implementing automatic dose verification based on an accelerator log file includes the following steps,
SP1135 chest intensity-modulated plans on the Walian Eclipse planning system are collected, and comprise 584 radiation fields;
SP2before radiotherapy plan implementation, plan delivery is carried out by using a linear accelerator, and log files generated in the plan delivery verification process of the linear accelerator are collected;
SP3calculating and measuring gamma passing rates of dose distribution under different threshold standards by using 2D gamma analysis;
SP4extracting an original RGB color image of dose distribution from a flux map formed by a linear accelerator log file by using a pylinac library, and then cutting off redundant information;
SP5zooming the original RGB color image with the extracted dose distribution by a bilinear interpolation algorithm;
SP6collecting RGB color image samples of the zoomed dose distribution, randomly extracting a test set from the collected samples, randomly dividing the residual samples into 5 parts by adopting a 5-time cross validation strategy, and taking 4 parts as a training set and 1 part as a validation set each time;
SP7cutting the training set, the verification set and the test set by adopting a data enhancement strategy of horizontal random inversion and random cutting respectively;
SP8adopting a CNN network structure to build a model, and outputting a dose distribution graph corresponding to the training set, the verification set and the test set after cutting, so as to finally obtain a 100-dimensional output vector;
SP9carrying out equalization processing by using a probability distribution cumulative function of gamma passage rate, namely mapping the gamma passage rate value of each sample to a probability distribution cumulative value of the value, linearly stretching to the range of-50 to 50, relatively equalizing the data distribution, and obtaining a back propagation error through a model error;
SP10using Adam optimizerLearning the back propagation errors, training data in a random batch mode, setting the batch size to be 20 and the training turn to be 80, and building software codes of a model through an open source machine learning library pytore;
SP11and evaluating the regression error of the gamma passing rate by adopting a mean square error loss function (MSE).
As a preferred technical solution, the SP3In the step, the 2D gamma analysis adopts threshold standards of 3%/3 mm, 3%/2 mm, 2%/3 mm and 2%/2 mm, a dose threshold of 10%, and local normalization setting of absolute dose.
As a preferred technical solution, the SP4In the step, the resolution of the original RGB color image of the extracted dose distribution is 640 multiplied by 480, and the cut-off redundant information comprises image frames and coordinate axes.
As a preferred technical solution, the SP5In the step, the original RGB color image from which the dose distribution is extracted is scaled by a bilinear interpolation algorithm, and the resolution of the original RGB color image from which the dose distribution is extracted is 260 × 260.
As a preferred technical solution, the SP6In the step, 584 parts of samples are collected, 98 parts of samples are randomly extracted from 584 parts of samples to serve as a test set, the rest 486 parts of samples are randomly divided into 5 parts by adopting a 5-time cross validation strategy, 4 parts of the samples, namely 389 parts of samples, are used as a training set each time, and 1 part of the samples, namely 97 parts of samples, are used as a validation set;
respectively training the division modes of the 5 training sets and the verification sets to obtain 5 network parameters under the same model, then carrying out model averaging on the 5 parameters to obtain final network parameters, and testing the data of the test set by using the network parameters.
As a preferred technical solution, the SP7In the step, the images of the training set are randomly cropped to 256 × 256, and the verification set and the test set are cropped to 256 × 256 from the center of the images.
As a preferred technical solution, the SP7In the step, the turnover probability p at the time of horizontal random turnover is 0.5.
As a preferred technical solution, the SP8In the step, the CNN network structure comprises 13 convolutional layers, 4 fully-connected layers, and corresponding active layers and pooling layers, and the dose distribution diagram corresponding to the training set, the verification set and the test set after cutting is output through the convolutional layers, the active layers and the pooling layers to the second fully-connected layer to obtain a 100-dimensional vector and the vector is output through the subsequent fully-connected layers and the active layers.
As an improvement to the above technical solution, the SP10In the step, when the Adam optimizer learns the back propagation error, the initial value of the learning rate is set to 0.001, and the reduction rate is set to 0.9.
Due to the adoption of the technical scheme, the invention has the following beneficial effects: and (3) establishing a dose verification prediction model of gamma passing rates under different threshold standards based on the accelerator log file by using a deep learning algorithm, and verifying the accuracy of the prediction model. The traffic graph formed based on the accelerator log file is used as input to train a prediction model, real delivery parameters are considered, and the prediction model is more accurate compared with parameters based on the plan. The dose verification prediction model based on the log file can accurately predict individualized dose verification results, realize automatic dose verification before treatment, improve the efficiency of dose verification, and allow a physicist to pay more attention to the reasons of dose verification failure.
Drawings
The drawings are only for purposes of illustrating and explaining the present invention and are not to be construed as limiting the scope of the present invention.
Wherein:
FIG. 1 shows an embodiment SP of the present invention8The CNN network structure of the step is shown schematically.
Detailed Description
The invention is further illustrated below with reference to the figures and examples. In the following detailed description, certain exemplary embodiments of the present invention are described by way of illustration only. Needless to say, a person skilled in the art realizes that the described embodiments can be modified in various different ways without departing from the spirit and scope of the present invention. Accordingly, the drawings and description are illustrative in nature and not intended to limit the scope of the claims.
As shown in fig. 1, a method for implementing automated dose verification based on an accelerator log file includes the following steps:
SP1135 chest intensity modulated plans on the Warran Eclipse planning system, containing 584 fields. All radiotherapy planning is done on Eclipse (variable Medical Systems, Palo Alto, CA)) planning system, dose distribution is calculated using AXB algorithm (AXB, ver.11.0.31, variable Medical Systems, Palo Alto, CA) with a calculated grid size of 2.5 mm.
SP2Before radiotherapy plan delivery, the linear accelerator is used for carrying out planned delivery, and meanwhile log files generated in the process of verifying planned delivery by the linear accelerator are collected. Specifically, the planned delivery was performed using a Varian 120 MLC (plasma Medical System, Palo Alto, CA) linac, 60 pairs of leaves, 20 outer leaves of 0.5cm width and 40 inner leaves of 0.25cm width on each side, all fields being performed at true angles. The individualized dosimetry QA of the patient is completed before treatment, and the dose deviation of the ionization chamber at the isocenter is verified to meet clinical requirements before EPID verification is performed. During the execution of the verification plan, the Walian log file records information (frame angle, collimation, jaws, blade position and the like) delivered by the accelerator and ray parameters (beam state) every 20ms, and collects the log file during the execution of the verification plan.
The type of the EPID imager used in the linear accelerator in this embodiment is aS1000, and the effective area thereof is 30 × 40cm2And consists of 768 × 1024 pixels. EPID was calibrated by collecting Dark Field (DF) and Flow Field (FF). The DF is acquired without beaming for background shift, and the FF image is obtained by open field "uniform" illumination of the EPID over the entire area of the imager to determine the difference in sensitivity of individual pixels. This implementation uses a two-dimensional (2D) profile-corrected image provided by a warian preconfigured flat dosimetry software package, which takes into account the backscatter of the support arm. The dosimetry calibration of the EPID is based on a calibration sheetBit (CU) of 10X 10cm at 100MU beam2CAX values of the field of view, dose image is shown as100 CU. The preconfigured dosimetry software package of wariran (PDPC) was imported into the Eclipse workstation for dosimetry calculations. The dynamic chair field and AIDA test plan is delivered and then used to debug and validate the planar dosimetry algorithm.
SP3Gamma passage rates at different threshold criteria were calculated and measured for dose distribution using 2D gamma analysis. Specifically, in this step, the 2D gamma analysis uses threshold criteria of 3%/3 mm, 3%/2 mm, 2%/3 mm and 2%/2 mm, a dose threshold of 10%, a setting of local normalization of absolute dose. The results of the prediction of the different threshold standard gamma passage rates are shown in table 1.
TABLE 1
|
MAE
|
RMSE
|
Sr |
R2 |
3%/3 mm validation set
|
0.473
|
1.153
|
0.704(P<0.01)
|
0.4943
|
3%/3 mm test set
|
0.402
|
0.800
|
0.643(P<0.01)
|
0.4110
|
3%/2 mm validation set
|
0.647
|
1.337
|
0.711(P<0.01)
|
0.4995
|
3%/2 mm test set
|
0.511
|
0.993
|
0.684(P<0.01)
|
0.4666
|
2%/3 mm validation set
|
1.674
|
2.688
|
0.888(P<0.01)
|
0.7885
|
2%/3 mm test set
|
1.724
|
2.580
|
0.821(P<0.01)
|
0.6677
|
2%/2 mm validation set
|
1.799
|
3.396
|
0.895(P<0.01)
|
0.7934
|
2%/2 mm test set
|
2.530
|
3.083
|
0.824(P<0.01)
|
0.6769 |
As can be seen from the data in the table above, the gamma passing rate can be accurately predicted by establishing a prediction model based on a log file by utilizing deep learning. With the strictness of the threshold value standard, the accuracy of the prediction model is reduced, and the correlation coefficient between the predicted value and the true value is increased.
SP4And extracting the original RGB color image of the dose distribution from the flux map formed by delivering the original log file by the linear accelerator by using a pylinac library, and then cutting off redundant information. In this step, the resolution of the original RGB color image from which the dose distribution is extracted is 640 × 480, and the cut-out redundant information includes image borders and coordinate axes.
SP5And zooming the original RGB color image of the extracted dose distribution by a bilinear interpolation algorithm. The SP5In the step, the extracted original RGB color image of the dose distribution is scaled by a bilinear interpolation algorithm, and the resolution of the original RGB color image of the dose distribution is 260 × 260.
SP6And collecting the zoomed RGB color image sample of dose distribution, randomly extracting a test set from the collected sample, randomly dividing the residual sample into 5 parts by adopting a 5-time cross validation strategy, and taking 4 parts as a training set and 1 part as a validation set each time. The SP6In the step, 584 parts of samples are collected, 98 parts of samples are randomly extracted from 584 parts of samples to be used as a test set, the rest 486 parts of samples are randomly divided into 5 parts by adopting a 5-time cross validation strategy, 4 parts of the samples, namely 389 parts of samples, are used as a training set each time, and 1 part of the samples, namely 97 parts of samples, is used as a validation set. Respectively training the division modes of the 5 training sets and the verification set to obtain 5 network parameters under the same model, then carrying out model averaging on the 5 parameters to obtain final network parameters, and using the network parameters to pairThe test set data is tested.
SP7And respectively carrying out clipping processing on the training set, the verification set and the test set by adopting a data enhancement strategy of horizontal random inversion and random clipping. The SP7In the step, the turnover probability p during horizontal random turnover is 0.5, the images of the training set are randomly cut to a size of 256 × 256, and the verification set and the test set are cut from the center of the images to a size of 256 × 256.
SP8And adopting a CNN network structure to build a model, and outputting the dose distribution map corresponding to the training set, the verification set and the test set after cutting, so as to finally obtain a 100-dimensional output vector. Specifically, the CNN network structure mainly includes 13 convolutional layers and 4 fully-connected layers similar to the VGG16 structure, and corresponding active layers and pooling layers, and after the dose distribution map corresponding to the training set, the validation set, and the test set after clipping passes through the convolutional layers, the active layers, the pooling layers to the second fully-connected layer, a 100-dimensional vector is obtained and is output through the subsequent fully-connected layers and the active layers.
SP9And performing equalization processing by using a probability distribution cumulative function of the gamma passage rate, namely mapping the gamma passage rate value of each sample to a probability distribution cumulative value of the gamma passage rate value, linearly stretching to a range of-50 to 50, relatively equalizing the data distribution, and acquiring a back propagation error through a model error. The reason why the equalization processing is carried out by using the probability distribution cumulative function of the gamma passing rate is as follows: data with the gamma passing rate value of more than 90% in the input data accounts for a high proportion, data with the gamma passing rate of less than 90% accounts for a small proportion, the unevenly distributed original gamma passing rate data are used for training input, large model errors are easily introduced, and the probability distribution cumulative function of the gamma passing rate is used for equalization processing, so that the data distribution is relatively balanced, and the model errors are favorably reduced.
SP10Learning the back propagation errors by adopting an Adam optimizer, training data in a random batch mode, setting the batch size to be 20, setting the training turn to be 80, and constructing software codes of the model through an open-source machine learning library pytorech. The SP10In the step, the model learns the back propagation error by using a commonly used Adam optimizer (optimizer), the initial value of the learning rate (learning rate) is set to be 0.001, and the rate of decline is set to be 0.9 as the training is exponentially decreased. Therefore, the data is trained in a random mini-batch mode, the batch size (batch size) is set to 20, and the training round (epoch) is set to 80. The software code of the model is built through an open source machine learning library pytorech, and the whole N-time cross validation training is completed on the NVIDIA Tesla P4 GPU, wherein the time is about 150 minutes.
SP11The evaluation parameters are used for representing the performance of the trained model on invisible data, and a mean square error loss function (MSE) can be adopted to evaluate the regression error of the gamma passing rate.
According to the method, a deep learning algorithm is utilized, a dose verification prediction model of gamma passing rates under different threshold standards is established based on an accelerator log file, and the accuracy of the prediction model is verified. The log file records parameters such as blade positions, MU (multi-user) and frame angles in the real execution process of the accelerator, a flux map generated by the log file is used as the input of a deep learning model, and gamma passing rates of four different threshold standards are used as the output response of the model. The prediction model verifies the MAE and RMSE with smaller measured values and predicted values in the set of test sets, and has stronger or moderate linearity.
The predictive model is trained based on the traffic map formed in the accelerator log file as input, taking into account the true delivery parameters, and is more accurate than a predictive model based on the plan itself. The clinical IMRT plans are large in number, the prediction model can be used for accurately predicting individualized dose verification results, automatic dose verification before treatment is realized, QA work based on measurement before auxiliary treatment is performed, the dose verification efficiency is improved, a physicist is allowed to pay more attention to the reason of dose verification failure, a foundation is laid for further development of the automatic individualized QA, and the method is expected to become a powerful tool for IMRT QA.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.