CN115270588B - Method and device for calculating and modeling fluence spectrum distribution and calculating fluence spectrum distribution - Google Patents

Method and device for calculating and modeling fluence spectrum distribution and calculating fluence spectrum distribution Download PDF

Info

Publication number
CN115270588B
CN115270588B CN202210928213.5A CN202210928213A CN115270588B CN 115270588 B CN115270588 B CN 115270588B CN 202210928213 A CN202210928213 A CN 202210928213A CN 115270588 B CN115270588 B CN 115270588B
Authority
CN
China
Prior art keywords
spectrum distribution
training
data
fluence spectrum
fluence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210928213.5A
Other languages
Chinese (zh)
Other versions
CN115270588A (en
Inventor
朱金汉
陈立新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Yat Sen University Cancer Center
Original Assignee
Sun Yat Sen University Cancer Center
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sun Yat Sen University Cancer Center filed Critical Sun Yat Sen University Cancer Center
Priority to CN202210928213.5A priority Critical patent/CN115270588B/en
Publication of CN115270588A publication Critical patent/CN115270588A/en
Application granted granted Critical
Publication of CN115270588B publication Critical patent/CN115270588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/25Design optimisation, verification or simulation using particle-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/08Probabilistic or stochastic CAD

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method and a device for calculating and modeling fluence spectrum distribution, wherein the method comprises the following steps: image data is collected, monte Carlo simulation calculation is completed according to the image data, and training data is obtained, wherein the training data comprises incident fluence spectrum distribution and emergent fluence spectrum distribution of particles; preprocessing the image data according to the incident fluence spectrum distribution to generate training input data; constructing an initial neural network model based on a graphic processor, repeatedly training and evaluating the initial neural network model according to training input data and training data, and updating model parameters; and stopping training iteration until a preset condition is reached, and storing model parameters to complete the construction of the neural network model. According to the invention, the accuracy and efficiency of fluence spectrum distribution calculation are ensured by taking Monte Carlo simulation calculation as a neural network model training target.

Description

Method and device for calculating and modeling fluence spectrum distribution and calculating fluence spectrum distribution
Technical Field
The invention relates to the field of particle transport calculation, in particular to a method and a device for calculating and modeling fluence spectrum distribution.
Background
The particle fluence is defined as the number of particles passing through the recording plane perpendicularly in unit area, and fluence spectrum distribution refers to dividing a plurality of recording grids for the recording plane, and recording fluence of different energy intervals in each grid. In both radiation therapy and radiation protection, the fluence spectrum distribution of the radiation emitted after penetrating a certain structural medium needs to be calculated, so that the next calculation is convenient. For example, for radiation protection, it is necessary to evaluate the radiation after the radiation has penetrated the protection wall to evaluate the protection effect; for radiation therapy, it is necessary to obtain a fluence spectrum distribution after penetration of the human body for in vivo dose detection or the like.
Currently, the mainstream techniques for fluence spectrum calculation are: an algorithm for obtaining emergent fluence distribution by performing analog sampling based on a particle interaction basic principle represented by a Monte Carlo (Monte Carlo) algorithm; the output fluence spectrum distribution is calculated by a convolution (concentration/superposition) algorithm, using a convolution principle, such as a pencil-beam convolution algorithm (PencilBeam convolution/superposition), a barrel-string convolution algorithm (collapsed cone convolution/superposition).
The existing Monte Carlo (Monte Carlo) algorithm is represented by an algorithm for obtaining emergent fluence distribution by analog sampling based on a particle interaction basic principle, and has low calculation efficiency due to large particle quantity in dose calculation although the accuracy is high. In addition, in the existing method for calculating the fluence spectrum distribution, a dosage calculation model is built based on a deep learning model, medical machine parameters are taken as input, the dosage calculation model is trained through dosage information in water, automatic modeling is achieved, but the quantity of neurons in dosage calculation is huge, and therefore calculation efficiency is low.
Disclosure of Invention
The invention provides a method and a device for calculating and modeling fluence spectrum distribution, and aims to solve the technical problem that in fluence spectrum calculation, calculation efficiency and calculation accuracy are difficult to ensure simultaneously.
In order to solve the above technical problems, in a first aspect, an embodiment of the present invention provides a method for calculating and modeling fluence spectrum distribution, including:
image data is collected, monte Carlo simulation calculation is completed according to the image data, and training data is obtained, wherein the training data comprises incident fluence spectrum distribution and emergent fluence spectrum distribution of particles;
preprocessing the image data according to the incident fluence spectrum distribution to generate training input data;
constructing an initial neural network model based on a graphic processor, repeatedly training and evaluating the initial neural network model according to training input data and training data, and updating model parameters;
and stopping training iteration until a preset condition is reached, and storing model parameters to complete the construction of the neural network model.
According to the method, the incident fluence spectrum distribution and the emergent fluence spectrum distribution of the particles are obtained through Monte Carlo simulation calculation, the Monte Carlo simulation calculation result is used as a target for training a neural network model, the neural network model is optimized, the model calculation precision is improved, the preprocessed image data are adopted, the neural network model processing data are constructed through a graphic processor, a large number of neuron calculation tasks generated by training or applying the neural network model in fluence spectrum distribution calculation can be processed in parallel, and the fluence spectrum distribution calculation efficiency is improved.
Further, the image data is collected, the Monte Carlo simulation calculation is completed according to the image data, and training data is obtained, wherein the training data comprises incident fluence spectrum distribution and emergent fluence spectrum distribution of particles, and specifically comprises:
collecting image data, and acquiring particle information according to the image data, wherein the particle information comprises medium conditions, source conditions and cross-section data of interaction of particles and a medium;
randomly setting a radiation field condition, carrying out simulation sampling on particles according to particle information, and completing Monte Carlo simulation calculation to obtain incident fluence spectrum distribution and emergent fluence spectrum distribution of the particles; and taking the incident fluence spectrum distribution and the emergent fluence spectrum distribution as training data.
According to the method, particle information is obtained through image data, monte Carlo simulation calculation is completed according to the particle information and the randomly set field conditions, the incident fluence spectrum distribution and the emergent fluence spectrum distribution in Monte Carlo simulation are recorded, the incident fluence spectrum distribution and the emergent fluence spectrum distribution are used as training samples and training targets of the neural network model, the neural network model is optimized continuously, and the accuracy of calculating the fluence spectrum distribution of the neural network model is improved.
Further, the preprocessing is performed on the image data according to the incident fluence spectrum distribution, so as to generate training input data, specifically:
converting the image data into an electron density distribution map, and constructing an incident fluence spectrum distribution matrix according to the incident fluence spectrum distribution of the particles;
constructing a space physical distance matrix based on the electron density distribution diagram;
and connecting and integrating the electron density distribution diagram, the space physical distance matrix and the incident fluence spectrum distribution matrix to obtain training input data.
According to the invention, the image data are preprocessed and integrated, so that the data with different dimensions are in a similar range, the training process of the subsequent neural network model has higher convergence rate, the model training efficiency is improved, and the efficiency of calculating the fluence spectrum distribution by the model is improved.
Further, the construction of the space physical distance matrix based on the electron density distribution map specifically comprises the following steps:
according to the electron density distribution diagram, obtaining physical coordinates corresponding to each grid point of the electron density grid, calculating the distance between each grid point and the radioactive source and the normalized distance of the radioactive source, and constructing a source distance square inverse factor matrix;
acquiring physical coordinates corresponding to each grid point of the electron density grid according to the electron density distribution diagram, calculating the vertical distance from each grid point to the central axis of the radioactive source, and constructing an off-axis distance matrix;
and carrying out link combination on the source distance inverse square factor matrix and the off-axis distance matrix to obtain a space physical distance matrix.
Further, before the initial neural network model is built based on the graphic processor, and the initial neural network model is repeatedly trained and evaluated according to training input data and training data, and model parameters are updated, the method further comprises the steps of:
obtaining an initial training set and an evaluation set according to the training data;
expanding the initial training set, randomly extracting a plurality of groups of incident fluence spectrum distribution and corresponding emergent fluence spectrum distribution in the initial training set to be used as an expanded data set; respectively carrying out linear superposition on the incident fluence spectrum distribution and the emergent fluence spectrum distribution in the extended data set to obtain extended incident fluence spectrum distribution and corresponding extended emergent fluence spectrum distribution, and adding the extended incident fluence spectrum distribution and the extended emergent fluence spectrum distribution into a target training set to complete one-time data expansion;
repeating data expansion for multiple times until all incident fluence spectrum distribution and corresponding emergent fluence spectrum in the initial training set are extracted, and the number of samples in the target training set reaches a preset condition, stopping data expansion, and obtaining a target training set; the target training set further includes an initial training set.
According to the method, the initial training set and the evaluation set are obtained by dividing the training data, and the initial training set is expanded, so that the overfitting of the model is avoided, and the generalization capability of the model is improved as much as possible. In addition, the samples in the training set are expanded to increase the number of the samples, so that the diversity of the samples is improved, and the problem of low sample acquisition efficiency caused by low Monte Carlo simulation calculation efficiency is avoided.
Further, the image processor builds an initial neural network model, and repeatedly trains and evaluates the initial neural network model according to training input data and training data, and updates model parameters, specifically:
constructing an initial neural network model based on a graphic processor, setting model weights immediately, and training and iterating the initial neural network model by adopting a self-adaptive gradient method;
randomly extracting a plurality of data samples from a training input data set, inputting the data samples into an initial neural network model, and obtaining a first emergent fluence spectrum distribution output by the model;
acquiring second emergent fluence spectrum distribution corresponding to the incident fluence spectrum distribution of the plurality of data samples in a target training set;
calculating a loss value according to the first emergent fluence spectrum distribution and the second emergent fluence spectrum distribution, and updating a model weight based on the loss value;
and (3) until all data samples in the training input data are extracted, saving the model weight, and updating the model weight based on the evaluation set.
According to the invention, the neural network model is constructed through the graphic processor to process data, so that a large number of neuron calculation tasks can be processed in parallel, and the fluence spectrum distribution calculation efficiency is improved. And simultaneously, carrying out iterative optimization on model parameters through a self-adaptive gradient algorithm, calculating loss values of emergent fluence spectrum distribution, updating weight values of the model, and improving the precision of the model.
Further, updating the model weight based on the evaluation set is specifically as follows:
calculating a loss value of the current training period of the evaluation set data sample;
and comparing the loss value of the current training period with the loss value of the previous period, updating the saved model weight if the loss value of the current training period is smaller than the loss value of the previous period, and otherwise, not updating the model weight.
According to the invention, training data obtained through Monte Carlo simulation calculation is used as an evaluation set to evaluate the loss value of the model, optimize and update the weight of the model, improve the precision of the model and improve the precision of fluence spectrum distribution calculation.
In a second aspect, an embodiment of the present invention provides a fluence spectrum distribution calculation method, including:
acquiring a neural network model constructed by applying the fluence spectrum distribution calculation modeling method;
acquiring first image data to be detected, wherein the first image data comprises image information or geometric information; preprocessing the first image data to obtain first input data;
inputting the first input data into the neural network model, and calculating an emergent fluence spectrum distribution matrix;
and reducing the emergent fluence spectrum distribution matrix to an absolute value to finish calculation of emergent fluence spectrum distribution.
According to the invention, the model input data is obtained by preprocessing according to the image data, the fluence spectrum distribution is calculated according to the neural network model, the fluence spectrum distribution calculation efficiency is improved, and the neural network model takes samples calculated by Monte Carlo simulation as training data, so that the accuracy of calculating the fluence spectrum distribution by the neural network model is ensured.
In a third aspect, an embodiment of the present invention provides a fluence spectrum distribution calculation modeling apparatus, including: the system comprises a simulation calculation module, a data preprocessing module and an iterative training module;
the simulation calculation module is used for collecting image data, completing Monte Carlo simulation calculation according to the image data, and obtaining training data, wherein the training data comprises incident fluence spectrum distribution and emergent fluence spectrum distribution of particles;
the data preprocessing module is used for preprocessing the image data according to the incident fluence spectrum distribution to generate training input data;
the iterative training module is used for constructing an initial neural network model based on the graphic processor, repeatedly training and evaluating the initial neural network model according to training input data and training data, and updating model parameters; and stopping training iteration until a preset condition is reached, and storing model parameters to complete the construction of the neural network model.
In a fourth aspect, an embodiment of the present invention provides a fluence spectrum distribution calculation apparatus, including: the system comprises a model construction module, a data processing module, a data calculation module and a normalization processing module;
the model construction module is used for acquiring a neural network model constructed by applying the fluence spectrum distribution calculation modeling device;
the data processing module is used for acquiring image data, wherein the image data comprises image information or geometric information; preprocessing the image data to obtain model input data;
the data calculation module is used for inputting the model input data into the neural network model and calculating an emergent fluence spectrum distribution matrix;
and the normalization processing module is used for restoring the emergent fluence spectrum distribution matrix to an absolute value to finish calculation of emergent fluence spectrum distribution.
Drawings
FIG. 1 is a schematic flow chart of a method for modeling fluence spectrum distribution calculation according to an embodiment of the invention;
FIG. 2 is a schematic flow chart of step 102 according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a method for calculating fluence spectrum distribution according to an embodiment of the invention;
FIG. 4 is a schematic structural diagram of a device for calculating and modeling fluence spectrum distribution according to an embodiment of the invention;
fig. 5 is a schematic structural diagram of a fluence spectrum distribution calculating device according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, fig. 1 is a flow chart of a method for modeling fluence spectrum distribution calculation according to an embodiment of the invention, which mainly includes steps 101 to 103, specifically as follows:
step 101: image data are collected, monte Carlo simulation calculation is completed according to the image data, and training data are obtained, wherein the training data comprise incident fluence spectrum distribution and emergent fluence spectrum distribution of particles.
In this embodiment, the conditions required for the monte carlo simulation calculation include three parts: one part is the medium conditions (including medium geometry, medium material, density of the medium), the second part is the source conditions (including particle species: e.g. photon, charged particle, neutron, particle direction, particle energy), and the third part is the cross-sectional data of the particle-medium interactions, which can be obtained by looking up a public database, e.g. national institute of standards and technology (National Institute of Standards and Technology, NIST).
In this embodiment, for the first part, if the collected parts of the human body are distributed according to the density of the image data, the density of the medium is directly given, then the medium material (for example, 0.001-0.044 is defined as air, 0.044-0.302 is defined as lung tissue, 0.302-1.101 is defined as soft tissue, and 1.101-2.088 is defined as bone tissue) is given according to the density range, if the design drawing is adopted, the geometrical distribution of the medium is reduced according to the drawing, and the medium composition and density are directly given according to the description of the material composition of the drawing. For the second part, analog sampling is performed based on source irradiation range (field range, intensity distribution), source energy, and type.
In this embodiment, image data is collected, which includes CT/MR image data of various parts of the human body, such as head and neck, chest, abdomen, pelvis, etc., or related design drawings.
As a specific example of the embodiment of the present invention, before finishing the monte carlo simulation calculation according to the image data, the method further includes expanding the image data, specifically including:
numbering the collected total N original image data in sequence;
the serial numbers arranged in sequence are disturbed;
sequentially extracting B numbers from the disordered numbers, and acquiring corresponding original image data according to the extracted numbers;
obtaining new image data by linearly superposing the extracted B image data;
when all original image data are traversed to finish one image data expansion;
repeating the image data expansion for a plurality of times to generate new image data until the number of the new image data meeting the requirement is generated.
In this embodiment, the original image data is linearly superimposed to obtain new image data, specifically:
Figure BDA0003780555940000081
wherein I is k X is the extracted original sample image k Random floating point number with superimposed weight of 0-1, while x k The following conditions are satisfied:
Figure BDA0003780555940000082
in this embodiment, training data is simulated and calculated by using a monte carlo algorithm based on the expanded image data. Particle information is acquired from the image data, the particle information including media conditions, source conditions, and cross-sectional data of interactions of the particles with the media.
In this embodiment, when performing monte carlo simulation calculation, the field conditions are randomly set, where the field conditions include a field shape, an intensity distribution, an incident angle, and an incident energy; sampling the energy and direction of the simulated particles according to the energy spectrum and irradiation range of the source, and simulating the process of penetrating the medium by the particles, after a sufficient number of particles are simulated (10 is adopted in the embodiment 9 A sample is completed by individual particle simulation), and the incident fluence spectrum distribution before entering the medium and the emergent fluence spectrum distribution after leaving the medium are recorded as training data.
In the embodiment, particle information is acquired through image data, monte Carlo simulation calculation is completed according to the particle information and the randomly set field conditions, incident fluence spectrum distribution and emergent fluence spectrum distribution in Monte Carlo simulation are recorded, the incident fluence spectrum distribution and the emergent fluence spectrum distribution are used as training samples and training targets of a neural network model, the neural network model is optimized continuously, and accuracy of calculating the fluence spectrum distribution by the neural network model is improved.
Step 102: and preprocessing the image data according to the incident fluence spectrum distribution to generate training input data.
Referring to fig. 2, fig. 2 is a schematic flow chart provided by step 102 in the embodiment of the present invention, which mainly includes steps 201 to 203, specifically as follows:
step 201: and converting the image data into an electron density distribution map, and constructing an incident fluence spectrum distribution matrix according to the incident fluence spectrum distribution of the particles.
In this embodiment, the image is a CT (Computed Tomography, electronic computed tomography) image, which is converted into an electron density distribution map based on image or geometric information, and HU values of the CT image are converted into an electron density distribution map based on a HU-electron density conversion curve of a machine that acquires the CT image. (or electron density is given according to MR (Magnetic Resonance, magnetic resonance) image information, for example, air: 0.001, lung tissue: 0.4, adipose tissue: 0.9, water: 1.0, muscle tissue: 1.05, bone tissue: 1.69. The electron density distribution can be interpolated to 100X 100 (length X width X height) according to known structure geometry, for example, thickness and corresponding cement wall electron density according to machine room protection wall drawing, or medical linac handpiece structure, for example, structural position of multi-page grating, etc.), each grid physical size is 0.5cm X0.5 cm.
In this embodiment, the construction of the incident fluence spectrum distribution matrix F before the particles enter the motif is specifically: the particle fluence is defined as the number of particles passing through the recording plane perpendicularly in unit area, and fluence spectrum distribution refers to dividing a plurality of recording grids for the recording plane, and recording fluence of different energy intervals in each grid. A matrix with the number of grids of 100 multiplied by 100 (length multiplied by width multiplied by energy) is constructed, wherein the size of the space physical dimension is 50cm multiplied by 50cm, the number of grids is 100 multiplied by 100, the size of each grid in the space dimension is 0.5cm multiplied by 0.5cm, the energy dimension range is 0-20 MeV, 100 intervals are divided, and the interval between each energy interval is 0.2MeV. The incident fluence spectrum distribution matrix F is obtained by respectively recording the fluence of the particles in each energy interval of each recording grid in . The incident fluence spectrum can be obtained by, first, when the source type (e.g., point source or parallel beam source), the source particle type (photon or charged particle) and the energy spectrum are known, calculating the incident fluence spectrum distribution of the particles emitted by the source to the recording plane before entering the phantom, directly from a determined geometrical relationship, according to fluence definition. Second according to the stored recordThe phase space file of the recording plane (a phase space file is a file that holds the states of all particles in the recording plane, including particle type, direction of motion, energy, and position) counts the fluence spectrum distribution of the plane.
Step 202: based on the electron density distribution diagram, a space physical distance matrix is constructed.
In the present embodiment, in order to describe the spatial position corresponding to the electron density distribution, according to the physical coordinates corresponding to each grid point of the electron density grid, the space physical distance matrix is constructed, the size of the matrix is 100 multiplied by 100 (length multiplied by width multiplied by height), and the specific method is as follows:
the space physical matrix comprises two parts, wherein one part is a source distance square inverse factor, and the calculation formula is as follows:
Figure BDA0003780555940000101
where rijk is the (i, j, k) grid point-to-source distance and r0 is the source normalized (normalized) distance (typically 100 cm).
The other part is an off-axis distance matrix, and the calculation formula is as follows:
Figure BDA0003780555940000102
where d is the vertical distance of the (i, j, k) grid to the central axis where the source is located, d0 is half the total length of the matrix, which in this embodiment is 25cm.
Finally, the step of obtaining the product, the two-part matrix links are combined into a spatial physical distance matrix of size 100 x 2.
Step 203: and connecting and integrating the electron density distribution diagram, the space physical distance matrix and the incident fluence spectrum distribution matrix to obtain training input data.
In this embodiment, after acquiring the electron density distribution map, the spatial physical distance matrix and the incident fluence spectrum distribution, respectively integrating the data channels as data channels, the final input matrix is 100 x 4, to be trained byThe process has faster convergence speed, so that the data of different dimensions are in a similar range, for example, between 0 and 1, the data are normalized according to the corresponding maximum value, the maximum value of electron density distribution is 2, and the incident fluence spectrum distribution is according to the maximum value F max,in And (5) normalization is carried out.
Step 103: constructing an initial neural network model based on a graphic processor, repeatedly training and evaluating the initial neural network model according to training input data and training data, and updating model parameters; stopping training iteration until reaching a preset condition, and storing model parameters to complete the construction of the neural network model.
In this embodiment, before the initial neural network model is built based on the graphics processor, and the initial neural network model is repeatedly trained and evaluated according to training input data and training data, and model parameters are updated, the method further includes:
sample size in training data was set to 9: the scale of 1 is divided into an initial training set and an evaluation set.
Expanding the initial training set, randomly extracting a plurality of groups of incident fluence spectrum distribution and corresponding emergent fluence spectrum distribution in the initial training set to be used as an expanded data set; respectively carrying out linear superposition on the incident fluence spectrum distribution and the emergent fluence spectrum distribution in the extended data set to obtain extended incident fluence spectrum distribution and corresponding extended emergent fluence spectrum distribution, and adding the extended incident fluence spectrum distribution and the extended emergent fluence spectrum distribution into a target training set to complete one-time data expansion;
repeating data expansion for multiple times until all incident fluence spectrum distribution and corresponding emergent fluence spectrum in the initial training set are extracted, and the number of samples in the target training set reaches a preset condition, stopping data expansion, and obtaining a target training set; the target training set further includes an initial training set.
As a specific example of this embodiment, the data expansion is specifically:
numbering the incident fluence spectrum distribution with the total quantity of M in the initial training set and the corresponding emergent fluence spectrum distribution in sequence;
the serial numbers arranged in sequence are scrambled, B serial numbers are sequentially extracted from the scrambled serial numbers, and corresponding original samples are obtained according to the serial numbers, wherein the original samples are incident fluence spectrum distribution and corresponding emergent fluence spectrum distribution;
obtaining new input samples S by continuing linear superposition of the extracted B samples in Output sample S out
When all original samples are traversed, one data expansion is completed.
In this embodiment, data expansion is performed a plurality of times, and new sample generation is performed until the number of new fluence samples that meet the demand is generated.
As a specific example of this embodiment, the original samples are linearly superimposed, specifically as follows:
Figure BDA0003780555940000111
Figure BDA0003780555940000112
wherein F is in,k Incident fluence spectrum distribution for the extracted raw sample, F out,k For the extracted raw sample exit fluence spectrum distribution, y k Random floating point number with superimposed weight of 0-1, while y k The following conditions are satisfied:
Figure BDA0003780555940000113
in this embodiment, the image-based processor constructs an initial neural network model, and performs repeated training and evaluation on the initial neural network model according to training input data and training data, and updates model parameters, specifically:
constructing an initial neural network model based on a graphic processor, setting model weights immediately, and training and iterating the initial neural network model by adopting a self-adaptive gradient method;
randomly extracting a plurality of data samples from a training input data set, inputting the data samples into an initial neural network model, and obtaining a first emergent fluence spectrum distribution output by the model;
acquiring second emergent fluence spectrum distribution corresponding to the incident fluence spectrum distribution of the plurality of data samples in a target training set;
calculating a loss value according to the first emergent fluence spectrum distribution and the second emergent fluence spectrum distribution, and updating a model weight based on the loss value;
until all data samples in the training input data are extracted, saving model weights;
calculating a loss value of the current training period of the evaluation set data sample;
and comparing the loss value of the current training period with the loss value of the previous period, updating the saved model weight if the loss value of the current training period is smaller than the loss value of the previous period, and otherwise, not updating the model weight.
As a specific example of this embodiment, the neural network is constructed using a structure of an encoder-decoder, the encoder gradually reduces the data dimension, recognizes the image features, and the decoder gradually restores the detail and the data dimension of the object, and predicts pixel by pixel. Considering that the dosimeter is a three-dimensional calculation process, a three-dimensional Vision transducer module is used as an encoder. The encoder depth is 4 layers, except that the input of the first layer encoder is the model input, each layer encoder is the output of the last layer encoder, the output is 50 x 32 through the first layer encoder, through the encoder of the second layer of the encoder, the output is 25 x 64, and through the third layer encoder, the output is 12 x 128, the fourth layer encoder, the output is 6 x 256. Three-dimensional tri-linear upsampling combined with residual convolution is used as the decoder. The same layer encoder-decoder uses characteristic channel layer to connect, so the number of input channels of the decoder is 2 times of that of the decoder. The fourth layer decoder inputs are 6 x 512, outputs are 12 x 128, the third layer decoder input is 12 x 256, the output is 25 x 64, the second layer decoder inputs 25 x 128, outputs 50 x 32, the first layer decoder inputs 50 x 64, the output is 100×100×100×16. The last output layer reduces the feature layer to 1 by a convolution layer with a convolution kernel size of 1, in order to guarantee a final output range >0, the final output layer employs a relu activation function.
In this embodiment, no matter the training and application of the neural network model, each neuron (the minimum calculation unit of the model is generally specified as y=wx+b, where y is the output of the neuron, x is the input of the neuron, and w and b are fitting parameters) needs to be calculated, and the calculation is characterized in that the calculation of a single neuron is simple but the number of the single neuron is huge, and for the neural network constructed by the invention, the specific parameters are as follows: 30698775. the greatest advantage of the graphics processor (GraphicsProcessingUnit, GPU) is that the graphics processor has a large number of processing units, and can effectively perform parallel computing to complete the computing tasks of a plurality of neurons without increasing the processing speed of a single processing unit. Thereby improving overall computational efficiency.
In the embodiment, the model parameter iterative optimization is performed in the model training process by adopting an adaptive gradient method, and the initial learning rate is set to be 5e-4. The MSE loss value of the model output result and the training sample is calculated by adopting the mean square error (mean squared error, MSE) as a loss function. The training process randomly extracts 2 sample input models (which can be increased according to computer performance) from the training set each iteration to derive MSE, and calculates gradient direction update model parameters.
In the present embodiment, the specific calculation loss value is specifically as follows:
Figure BDA0003780555940000131
wherein y is i For true value, i.e. training sample, y i ' is the model output value.
In this embodiment, after all training set samples are traversed once, the model parameters are fixed, MSE loss values of the evaluation set samples are calculated, and the model parameters are saved, so that the model training is completed for the first period. And continuing to expand the training set for a new round according to the steps, and entering a second training period. From the second cycle, the saved model parameters are updated only if the MSE loss value of the evaluation set is smaller than the MSE loss value of the previous cycle to ensure that the saved model performance is optimal.
In this embodiment, training is stopped when the training period reaches the upper limit (set to 500 by default) or the evaluation set loss value does not drop for 10 consecutive periods.
Referring to fig. 3, fig. 3 is a flow chart of a fluence spectrum distribution calculation method according to an embodiment of the invention, which mainly includes steps 301 to 304:
step 301: acquiring a neural network model constructed by applying the fluence spectrum distribution calculation modeling method provided by the embodiment of the invention;
step 302: acquiring first image data to be detected, wherein the first image data comprises image information or geometric information; preprocessing the first image data to obtain first input data;
step 303: inputting the first input data into the neural network model, and calculating an emergent fluence spectrum distribution matrix;
step 304: and reducing the emergent fluence spectrum distribution matrix to an absolute value to finish calculation of emergent fluence spectrum distribution.
In this embodiment, the neural network model output data is obtained by using a phantom described by electron density distribution, the ray leaves the matrix of the emission fluence spectrum distribution of the phantom, the output grid number is a matrix of 100 x 100 (length x width x energy), the space physical dimension is 50cm multiplied by 50cm, the number of grids is 100 multiplied by 100, the size of each grid in the space dimension is 0.5cm multiplied by 0.5cm, the energy dimension range is 0-20 MeV, 100 intervals are divided, and the interval of each energy interval is 0.2MeV. The fluence of particles in each energy interval in each record grid is recorded respectively to obtain the emergent fluence spectrum distribution matrix F out . For training data, in order to maintain the numerical association between the incident fluence spectrum distribution and the output fluence spectrum distribution in the input data, the fluence is generated according to the generation of the fluenceNormalization value F of incident fluence spectrum distribution corresponding to fluence spectrum distribution max,in As denominator, normalization calculation is performed.
In the embodiment, the output is normalized emergent fluence spectrum distribution matrix F through model calculation out ' the maximum value of the input incident fluence spectrum distribution is reduced to an absolute value.
As a specific example of this embodiment, the specific reduction step of the exit fluence spectrum distribution matrix is:
F out =F out ’*F max,in (9)
wherein F is in For the input incident fluence spectrum distribution, F max,in For the maximum value of the input incident fluence spectrum distribution, F out ' is the normalized exit fluence spectrum distribution that is output through model calculation.
In this embodiment, the input data of the model is obtained by preprocessing according to the image data, and the fluence spectrum distribution is calculated according to the neural network model, so that the efficiency of calculating the fluence spectrum distribution is improved, and the neural network model uses the sample of monte carlo simulation calculation as training data, so that the accuracy of calculating the fluence spectrum distribution by the neural network model is ensured.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a fluence spectrum distribution calculation modeling apparatus according to an embodiment of the invention, which mainly includes a simulation calculation module 401, a data preprocessing module 402, and an iterative training module 403;
the simulation calculation module 401 is configured to collect image data, complete monte carlo simulation calculation according to the image data, and obtain training data, where the training data includes incident fluence spectrum distribution and emergent fluence spectrum distribution of the particles;
the data preprocessing module 402 is configured to preprocess the image data according to the incident fluence spectrum distribution, and generate training input data;
the iterative training module 403 is configured to construct an initial neural network model based on the graphics processor, and perform repeated training and evaluation on the initial neural network model according to training input data and training data, and update model parameters; and stopping training iteration until a preset condition is reached, and storing model parameters to complete the construction of the neural network model.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a fluence spectrum distribution calculating device according to an embodiment of the invention, which mainly includes a model building module 501, a data processing module 502, a data calculating module 503 and a normalization processing module 504;
the model construction module 501 is configured to obtain a neural network model constructed by applying the fluence spectrum distribution calculation modeling apparatus;
the data processing module 502 is configured to obtain image data, where the image data includes image information or geometric information; preprocessing the image data to obtain model input data;
the data calculation module 503 is configured to input the model input data into the neural network model, and calculate an emergent fluence spectrum distribution matrix;
the normalization processing module 504 is configured to restore the output fluence spectrum distribution matrix to an absolute value, and complete output fluence spectrum distribution calculation.
In this embodiment, the input data of the model is obtained by preprocessing according to the image data, and the fluence spectrum distribution is calculated according to the neural network model, so that the efficiency of calculating the fluence spectrum distribution is improved, and the neural network model uses the sample of monte carlo simulation calculation as training data, so that the accuracy of calculating the fluence spectrum distribution by the neural network model is ensured.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention, and are not to be construed as limiting the scope of the invention. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present invention are intended to be included in the scope of the present invention.

Claims (8)

1. The calculation modeling method for the fluence spectrum distribution is characterized by comprising the following steps of:
image data is collected, monte Carlo simulation calculation is completed according to the image data, and training data is obtained, wherein the training data comprises incident fluence spectrum distribution and emergent fluence spectrum distribution of particles;
preprocessing the image data according to the incident fluence spectrum distribution to generate training input data; converting the image data into an electron density distribution map, and constructing an incident fluence spectrum distribution matrix according to the incident fluence spectrum distribution of the particles; constructing a space physical distance matrix based on the electron density distribution diagram; connecting and integrating the electron density distribution map, the space physical distance matrix and the incident fluence spectrum distribution matrix to obtain training input data;
the method for constructing the space physical distance matrix based on the electron density distribution map comprises the following steps: according to the electron density distribution diagram, obtaining physical coordinates corresponding to each grid point of the electron density grid, calculating the distance between each grid point and the radioactive source and the normalized distance of the radioactive source, and constructing a source distance square inverse factor matrix; acquiring physical coordinates corresponding to each grid point of the electron density grid according to the electron density distribution diagram, calculating the vertical distance from each grid point to the central axis of the radioactive source, and constructing an off-axis distance matrix; connecting and integrating the source distance inverse square factor matrix and the off-axis distance matrix to obtain a space physical distance matrix;
constructing an initial neural network model based on a graphic processor, repeatedly training and evaluating the initial neural network model according to training input data and training data, and updating model parameters;
and stopping training iteration until a preset condition is reached, and storing model parameters to complete the construction of the neural network model.
2. The method for modeling fluence spectrum distribution calculation according to claim 1, wherein the collecting image data, completing monte carlo simulation calculation according to the image data, and obtaining training data, wherein the training data includes an incident fluence spectrum distribution and an emergent fluence spectrum distribution of the particles, specifically:
collecting image data, and acquiring particle information according to the image data, wherein the particle information comprises medium conditions, source conditions and cross-section data of interaction of particles and a medium;
randomly setting a portal condition, carrying out simulation sampling on particles according to particle information, and completing Monte Carlo simulation calculation to obtain incident fluence spectrum distribution and emergent fluence spectrum distribution of the particles; and taking the incident fluence spectrum distribution and the emergent fluence spectrum distribution as training data.
3. The method of modeling fluence spectrum distribution calculation of claim 1, further comprising, prior to said building an initial neural network model based on the graphics processor and repeating training and evaluation of the initial neural network model based on training input data and training data and updating model parameters:
obtaining an initial training set and an evaluation set according to the training data;
expanding the initial training set, randomly extracting a plurality of groups of incident fluence spectrum distribution and corresponding emergent fluence spectrum distribution in the initial training set to be used as an expanded data set; respectively carrying out linear superposition on the incident fluence spectrum distribution and the emergent fluence spectrum distribution in the extended data set to obtain extended incident fluence spectrum distribution and corresponding extended emergent fluence spectrum distribution, and adding the extended incident fluence spectrum distribution and the extended emergent fluence spectrum distribution into a target training set to complete one-time data expansion;
repeating data expansion for multiple times until all incident fluence spectrum distribution and corresponding emergent fluence spectrum in the initial training set are extracted, and the number of samples in the target training set reaches a preset condition, stopping data expansion, and obtaining a target training set; the target training set further includes an initial training set.
4. The method for modeling a fluence spectrum distribution calculation as defined in claim 3, wherein the building an initial neural network model based on the graphic processor, and performing repeated training and evaluation on the initial neural network model according to training input data and training data, and updating model parameters, specifically:
constructing an initial neural network model based on a graphic processor, setting model weights immediately, and training and iterating the initial neural network model by adopting a self-adaptive gradient method;
randomly extracting a plurality of data samples from a training input data set, inputting the data samples into an initial neural network model, and obtaining a first emergent fluence spectrum distribution output by the model;
acquiring second emergent fluence spectrum distribution corresponding to the incident fluence spectrum distribution of the plurality of data samples in a target training set;
calculating a loss value according to the first emergent fluence spectrum distribution and the second emergent fluence spectrum distribution, and updating a model weight based on the loss value;
and (3) until all data samples in the training input data are extracted, saving the model weight, and updating the model weight based on the evaluation set.
5. The method for modeling fluence spectrum distribution calculation as defined in claim 4, wherein updating model weights based on the evaluation set is specifically:
calculating a loss value of the current training period of the evaluation set data sample;
and comparing the loss value of the current training period with the loss value of the previous period, updating the saved model weight if the loss value of the current training period is smaller than the loss value of the previous period, and otherwise, not updating the model weight.
6. A fluence spectrum distribution calculation method, comprising:
obtaining a neural network model constructed by applying the fluence spectrum distribution calculation modeling method according to any one of claims 1 to 5;
acquiring first image data to be detected, wherein the first image data comprises image information or geometric information; preprocessing the first image data to obtain first input data;
inputting the first input data into the neural network model, and calculating an emergent fluence spectrum distribution matrix;
and reducing the emergent fluence spectrum distribution matrix to an absolute value to finish calculation of emergent fluence spectrum distribution.
7. A fluence spectrum distribution calculation modeling apparatus, comprising: the system comprises a simulation calculation module, a data preprocessing module and an iterative training module;
the simulation calculation module is used for collecting image data, completing Monte Carlo simulation calculation according to the image data, and obtaining training data, wherein the training data comprises incident fluence spectrum distribution and emergent fluence spectrum distribution of particles;
the data preprocessing module is used for preprocessing the image data according to the incident fluence spectrum distribution to generate training input data; converting the image data into an electron density distribution map, and constructing an incident fluence spectrum distribution matrix according to the incident fluence spectrum distribution of the particles; constructing a space physical distance matrix based on the electron density distribution diagram; connecting and integrating the electron density distribution map, the space physical distance matrix and the incident fluence spectrum distribution matrix to obtain training input data;
the method for constructing the space physical distance matrix based on the electron density distribution map comprises the following steps: according to the electron density distribution diagram, obtaining physical coordinates corresponding to each grid point of the electron density grid, calculating the distance between each grid point and the radioactive source and the normalized distance of the radioactive source, and constructing a source distance square inverse factor matrix; acquiring physical coordinates corresponding to each grid point of the electron density grid according to the electron density distribution diagram, calculating the vertical distance from each grid point to the central axis of the radioactive source, and constructing an off-axis distance matrix; connecting and integrating the source distance inverse square factor matrix and the off-axis distance matrix to obtain a space physical distance matrix;
the iterative training module is used for constructing an initial neural network model based on the graphic processor, repeatedly training and evaluating the initial neural network model according to training input data and training data, and updating model parameters; and stopping training iteration until a preset condition is reached, and storing model parameters to complete the construction of the neural network model.
8. A fluence spectrum distribution calculation apparatus comprising: the system comprises a model construction module, a data processing module, a data calculation module and a normalization processing module;
the model construction module is used for acquiring a neural network model constructed by applying the fluence spectrum distribution calculation modeling device according to claim 7;
the data processing module is used for acquiring image data, wherein the image data comprises image information or geometric information; preprocessing the image data to obtain model input data;
the data calculation module is used for inputting the model input data into the neural network model and calculating an emergent fluence spectrum distribution matrix;
and the normalization processing module is used for restoring the emergent fluence spectrum distribution matrix to an absolute value to finish calculation of emergent fluence spectrum distribution.
CN202210928213.5A 2022-08-03 2022-08-03 Method and device for calculating and modeling fluence spectrum distribution and calculating fluence spectrum distribution Active CN115270588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210928213.5A CN115270588B (en) 2022-08-03 2022-08-03 Method and device for calculating and modeling fluence spectrum distribution and calculating fluence spectrum distribution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210928213.5A CN115270588B (en) 2022-08-03 2022-08-03 Method and device for calculating and modeling fluence spectrum distribution and calculating fluence spectrum distribution

Publications (2)

Publication Number Publication Date
CN115270588A CN115270588A (en) 2022-11-01
CN115270588B true CN115270588B (en) 2023-06-23

Family

ID=83748574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210928213.5A Active CN115270588B (en) 2022-08-03 2022-08-03 Method and device for calculating and modeling fluence spectrum distribution and calculating fluence spectrum distribution

Country Status (1)

Country Link
CN (1) CN115270588B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112086173A (en) * 2020-09-14 2020-12-15 广州瑞多思医疗科技有限公司 Three-dimensional dose calculation method and device, computer equipment and readable medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110133703A (en) * 2019-05-15 2019-08-16 中国辐射防护研究院 A kind of gamma-rays Dosimetry based on BP neural network and Monte carlo algorithm
CN112086172A (en) * 2020-09-14 2020-12-15 广州瑞多思医疗科技有限公司 Three-dimensional dose calculation method, computer equipment and readable medium
US11992702B2 (en) * 2020-09-21 2024-05-28 Elekta, Inc. Machine learning optimization of fluence maps for radiotherapy treatment
CN114298177A (en) * 2021-12-16 2022-04-08 广州瑞多思医疗科技有限公司 Expansion enhancement method and system suitable for deep learning training data and readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112086173A (en) * 2020-09-14 2020-12-15 广州瑞多思医疗科技有限公司 Three-dimensional dose calculation method and device, computer equipment and readable medium

Also Published As

Publication number Publication date
CN115270588A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
US11386557B2 (en) Systems and methods for segmentation of intra-patient medical images
Jia et al. GPU-based fast low-dose cone beam CT reconstruction via total variation
CN110047113A (en) Neural network training method and equipment, image processing method and equipment and storage medium
CN107633540A (en) The system and method for image conversion
CN108770373A (en) It is generated according to the pseudo- CT of MR data using feature regression model
CN110363797B (en) PET and CT image registration method based on excessive deformation inhibition
US11515025B2 (en) Dosimetry assessment method and system for organ at risk in esophageal radiotherapy plan
Bai et al. Deep dose plugin: towards real-time Monte Carlo dose calculation through a deep learning-based denoising algorithm
WO2018129889A1 (en) Medical image-based method for deconstructing tissue element mass ratio and method for establishing geometric model
CN105678821A (en) Dynamic PET image reconstruction method based on self-encoder image fusion
EP3566747A1 (en) Medical image data-based method for establishing smooth geometric model
CN109658390A (en) A kind of area-of-interest exacting method detecting sinusoidal matrix diagram for positive electron
CN110021399A (en) A kind of automatic design method of radiotherapy treatment planning
Denisova et al. Development of anthropomorphic mathematical phantoms for simulations of clinical cases in diagnostic nuclear medicine
Peng et al. A review of computational phantoms for quality assurance in radiology and radiotherapy in the deep-learning era
CN115270588B (en) Method and device for calculating and modeling fluence spectrum distribution and calculating fluence spectrum distribution
CN104424625A (en) GPU (graphics processing unit) acceleration CBCT image reconstruction method and device
Matej et al. Performance of a fast maximum likelihood algorithm for fully 3D PET reconstruction
CN113178242B (en) Automatic plan optimization system based on coupled generation countermeasure network
Rutherford et al. An inception network for positron emission tomography based dose estimation in carbon ion therapy
Vazquez et al. A deep learning-based approach for statistical robustness evaluation in proton therapy treatment planning: a feasibility study
Qureshi et al. Determination of optimal number of projections and parametric sensitivity analysis of operators for parallel‐ray transmission tomography using hybrid continuous genetic algorithm
JP2023525372A (en) Methods relating to medical diagnostics and medical diagnostic systems
Bert et al. Monte Carlo simulations for medical and biomedical applications
Jiang et al. Sparse-View CBCT Reconstruction Using Combined DRUNet and HQS

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant