Radiation parameter prediction method and related equipment for applicator afterloading radiotherapy
Through the target visual model, feature extraction and fusion of CT images and resident point data is predicted, and the radiation parameters of radiotherapy after the source applicator are solved, which solves the problem of experience in the setting of radiation parameters in the prior art and achieves more accurate doses Distribution and therapeutic effects.
Patent Information
- Application Number
- CN202411077760.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-08-07
AI Technical Summary
The radio parameters setting of radiotherapy after the existing source applicator mainly relies on empirical judgment, and the accurate setting cannot be achieved, resulting in uneven dose distribution and affecting the treatment effect.
By acquiring CT image data, labeling data, residency point positions and directions, using the image encoder, prompt encoder and prediction encoder in the target visual model to perform feature extraction and fusion, attention processing and multi-layer perception processing, using the image encoder, prompt encoder and prediction encoder in the target visual model, it can perform feature extraction and fusion, and perform attention processing and multi-layer perception processing. , predict dose distribution results and dwell time parameters.
Accurate prediction of the radio parameters of radiotherapy after the source applicator is achieved, improving the uniformity of dose distribution and the accuracy of treatment, and reducing side effects.
Smart Images

Figure CN118767348B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of applicator positioning, and in particular to a method for predicting radiation parameters of applicator afterloading radiotherapy and related equipment. Background Art
[0002] Cancer has become the leading cause of death in 36 countries around the world. The remarkable progress of brachytherapy (BT) has brought revolutionary changes to the treatment of cervical cancer. Compared with traditional radiotherapy, BT has many advantages, including more precise radiation dose positioning, significantly shortened treatment time, minimized side effects, and significantly improved treatment success rate.
[0003] In BT treatment, in order to ensure that the high-risk clinical target volume (HRCTV) is adequately irradiated and to protect organs at risk (OARs) such as the bladder, rectum, and sigmoid colon to the greatest extent, the setting of radiation parameters for applicator afterloading radiotherapy is crucial. However, the setting of radiation parameters for existing applicator afterloading radiotherapy mainly relies on experience and judgment, and it is impossible to accurately set the radiation parameters for applicator afterloading radiotherapy. Summary of the invention
[0004] The present application provides a radiation parameter prediction method for applicator afterloading radiotherapy and related equipment, which can accurately set the radiation parameters of applicator afterloading radiotherapy.
[0005] The technical solution of the embodiment of the present application is as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for predicting radiation parameters of an applicator afterloading radiotherapy, the method comprising:
[0007] Acquire CT image data, annotation data, a dwell point position, and a dwell point direction corresponding to the dwell point position;
[0008] Inputting the CT image data and the annotation data into an image encoder in a preset target visual large model to obtain image features; inputting the dwell point position and the dwell point direction into a prompt encoder in a preset target visual large model to obtain prompt features, wherein the prompt features include sparse feature vectors and dense feature vectors;
[0009] The image features, sparse feature vectors and dense feature vectors are input into the predictive encoder in the preset target visual large model. The specific processing process is: attention processing and multi-layer perception processing are performed on the image features, sparse feature vectors and dense feature vectors in turn to obtain the dose distribution results and residence time parameters.
[0010] In the above technical solution, the CT image data and the annotation data are input into the image encoder, so that the anatomical structure information and the annotation information in the image can be fully utilized, and the image features representing the image content can be obtained through the feature extraction capability of the encoder. The dwell point position and the dwell point direction are input into the prompt encoder, so that the discrete dwell point information can be mapped into a continuous feature vector, wherein the sparse feature vector represents the spatial position information of the dwell point, and the dense feature vector represents the direction information of the dwell point. In this way, the image information and the dwell point information can be converted into a unified feature representation. In the predictive encoder, the image features, sparse feature vectors and dense feature vectors are processed to make full use of the correlation between different information. Through the attention mechanism and multi-layer perception processing, the importance of different features can be adaptively adjusted to extract high-level semantic information related to the dose distribution and the dwell time. After the progressive processing of the multi-layer network, the predicted dose distribution results and the dwell time parameters are finally obtained. The radiation parameters of the applicator afterloading radiotherapy can be accurately set in the above manner.
[0011] In a second aspect, an embodiment of the present application provides a radiation parameter prediction device for afterloading radiotherapy of an applicator, the device comprising:
[0012] A data acquisition module, used to acquire CT image data, annotation data, a dwell point position, and a dwell point direction corresponding to the dwell point position;
[0013] An image processing module is used to input CT image data and annotation data into an image encoder in a preset target visual macro model to obtain image features;
[0014] A sequence processing module, used for inputting the dwell point position and the dwell point direction into a prompt encoder in a preset target visual large model to obtain prompt features, wherein the prompt features include a sparse feature vector and a dense feature vector;
[0015] The data prediction module is used to input image features, sparse feature vectors and dense feature vectors into the prediction encoder in the preset target visual model. The specific processing process is: attention processing and multi-layer perception processing are performed on the image features, sparse feature vectors and dense feature vectors in turn to obtain dose distribution results and residence time parameters.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a user interface, a communication bus and a network interface, wherein the processor, the memory, the user interface and the network interface are respectively connected to the communication bus, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute instructions stored in the memory so that the electronic device executes any one of the methods provided in the first aspect.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed, any one of the methods provided in the first aspect is executed.
[0018] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. Inputting CT image data and annotation data into the image encoder can make full use of the anatomical structure information and annotation information in the image, and obtain image features representing the image content through the feature extraction capability of the encoder. Inputting the dwell point position and dwell point direction into the prompt encoder can map the discrete dwell point information into a continuous feature vector, wherein the sparse feature vector represents the spatial position information of the dwell point, and the dense feature vector represents the direction information of the dwell point. In this way, the image information and the dwell point information can be converted into a unified feature representation. In the predictive encoder, the image features, sparse feature vectors and dense feature vectors are processed to make full use of the correlation between different information. Through the attention mechanism and multi-layer perception processing, the importance of different features can be adaptively adjusted to extract high-level semantic information related to dose distribution and dwell time. After progressive processing of the multi-layer network, the predicted dose distribution results and dwell time parameters are finally obtained. The radiation parameters of the applicator afterloading radiotherapy can be accurately set in the above manner.
[0019] 2. Through the processing of the prompt encoder, a more abstract and high-level feature representation is obtained. This representation method can effectively reduce the redundancy and noise of the input data and improve the generalization ability of the model. At the same time, by introducing learning parameters and extension operations, prior knowledge and context information can be incorporated, so that the prompt features can more accurately and comprehensively reflect the characteristics of the dwell point, thereby providing more effective support for the prediction of dose distribution and dwell time.
[0020] 3. The image encoder can obtain high-quality image features by fusing CT image data and annotation data, combining feature extraction, attention mechanism and feature processing techniques. This feature representation can fully describe the patient's anatomical structure and important organ areas, providing rich and discriminative feature support for subsequent dose distribution and residence time prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flow chart of a radiation parameter prediction method for applicator afterloading radiotherapy provided by an embodiment of the present application;
[0022] Figure 2 It is a model schematic diagram of a target visual large model provided by this application;
[0023] Figure 3 A schematic diagram of the structure of the image encoder provided by this application;
[0024] Figure 4 A diagram of the MAE changes in dose and residence time during a training process provided in this application;
[0025] Figure 5 A diagram of the changes in dose and residence time MAE during the verification process provided for this application;
[0026] Figure 6 It is a structural schematic diagram of a radiation parameter prediction device for afterloading radiotherapy of an applicator provided by an embodiment of the present application;
[0027] Figure 7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application;
[0028] Figure 8 A schematic diagram of a model training process provided for this application. DETAILED DESCRIPTION
[0029] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0030] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0031] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0032] The embodiment of the present application proposes a method for predicting radiation parameters of afterloading radiotherapy of an applicator. The method first obtains CT image data, annotation data, dwell point position and corresponding dwell point direction as input data. Then, the CT image data and annotation data are input into the image encoder in the preset target visual large model, and the image features are obtained through operations such as feature fusion, feature extraction and attention mechanism processing. At the same time, the dwell point position and the dwell point direction are input into the prompt encoder in the preset target visual large model, and sparse feature vectors and dense feature vectors are obtained through operations such as normalization, feature fusion and vector expansion. Next, the image features, sparse feature vectors and dense feature vectors are input into the prediction encoder in the preset target visual large model, and the dose distribution results and dwell time parameters are obtained through operations such as multi-way attention processing and multi-layer perception processing. In the specific processing process of the prediction encoder, the sparse feature vector is first feature fused with the preset first learning parameter to obtain the first fused feature vector; the dense feature vector and the image feature are feature fused to obtain the second fused feature vector. Then, the first fused feature vector, the second fused feature vector and the preset image position are processed by multi-way attention and multi-head attention mechanism to obtain the first output vector and the second output vector. Next, the first output vector is normalized and separated to obtain the dose feature and the time feature, and the time feature is linearly processed to obtain the dwell time parameter. Finally, the second output vector and the dose feature after linear processing are fused to obtain the dose distribution result. This method uses the target visual big model to extract and fuse the input data, and predicts the dose distribution results and dwell time parameters through attention mechanism and multi-layer perception. This application uses the target visual big model to achieve end-to-end optimization of the afterloading radiotherapy plan of the cervical cancer applicator, and proposes a strategy for comparing the machine prediction results with the manual calculation results, and constructs an automated system integrating intelligent decision-making assistance and independent verification functions. By comparing the source residence time parameters and dose distribution results output by the deep learning model with the results calculated by the physicist, the accuracy of the afterloading radiotherapy plan can be effectively verified, human errors and equipment abnormalities can be avoided, and accurate radiation parameters can be provided for the afterloading radiotherapy of the applicator.
[0033] It should be noted that the radiation parameter prediction method for applicator afterloading radiotherapy is applied to a radiation parameter prediction device for applicator afterloading radiotherapy.
[0034] The technical solution provided in the embodiments of the present application is further described below in conjunction with the accompanying drawings.
[0035] Reference Figure 1 , Figure 1The present invention is a flowchart of a radiation parameter prediction method for afterloading radiotherapy provided by an embodiment of the present invention. The radiation parameter prediction method for afterloading radiotherapy is applied to a radiation parameter prediction device for afterloading radiotherapy, and is executed by a processor in an electronic device or a readable storage medium. The radiation parameter prediction method for afterloading radiotherapy includes steps 100, 200, 300, and 400.
[0036] Step 100, obtaining CT image data, annotation data, a dwell point position and a dwell point direction corresponding to the dwell point position.
[0037] Specifically, CT image data provides three-dimensional image information of the anatomical structure in the patient's body. A series of tomographic images are obtained through CT scanning technology, and then three-dimensional CT image data is generated through image reconstruction algorithms. CT image data clearly shows the morphology and positional relationship of various organs and tissues in the patient's body, providing detailed anatomical references for subsequent annotation and feature extraction. Annotation data is data for marking and outlining important organs, tumor areas, etc. on CT images. CT images are analyzed and annotated by medical imaging experts or automated algorithms to obtain accurate contours and position information of the region of interest (ROI). Annotation data clarifies the spatial range of the treatment target area and organs at risk, providing a key reference for formulating accurate radiotherapy plans. The dwell point position refers to the spatial position coordinates of the radiation source in the patient's body where it stays for irradiation. The three-dimensional spatial position of the radiation source is determined by the treatment planning system or the image guidance system, which accurately describes the arrangement of the radiation source in the body. The dwell point position information is crucial for calculating the radiation dose distribution and optimizing the source residence time. The dwell point direction refers to the irradiation direction of the radiation source at each dwell point position. Combined with the physical characteristics of the radiation source and the anatomical structure around the dwelling point, the optimal irradiation direction is determined so that the radiation dose is concentrated in the tumor area while avoiding normal tissues and organs as much as possible. The dwelling point direction information and the dwelling point position together determine the spatial distribution of the radiation dose. The above data is stored in the form of a file and read through a preset file reading interface, which can be a read() function.
[0038] Step 200, inputting the CT image data and the annotation data into an image encoder in a preset target visual macro model to obtain image features.
[0039] Specifically, after obtaining the CT image data and annotated data, the next step is to input these data into the image encoder in the preset target visual model to extract image features. This step aims to automatically learn and extract high-level, semantic feature representations from the original CT images and annotated data, providing informative and discriminative feature inputs for subsequent radiological parameter prediction. Figure 2 , the target visual large model is a computer vision model based on deep learning. Through large-scale data training and complex network structure, it has powerful image understanding and feature extraction capabilities. In this embodiment, a preset target visual large model is used as the basic framework. The model consists of three main parts: an image encoder, a prompt encoder, and a predictive encoder. These three parts work together to achieve an end-to-end processing flow from input data to output prediction results. The input data of the target visual large model are CT image data, annotation data (Mask), resident point position, and resident point direction (V) corresponding to the resident point position (P), wherein the resident point position and the resident point direction corresponding to the resident point position are input in a sequence manner, and the output data of the target data visual large model are dose distribution (Dose) and residence time (t).
[0040] For details, please refer to Figure 3 , Figure 3 The image encoder provided in this application adopts the Vision Transformer (ViT) network structure, which is different from the traditional convolutional neural network (CNN). CNN mainly extracts image features through local convolution operations, while ViT uses the self-attention mechanism to model the global dependencies in the image and capture long-range information and contextual semantics. The input of the Transformer network is a set of vector sequences of the same length {a 1 ,a 2 ,...,a n}, after being processed by the self-attention module, a vector sequence of the same length is obtained {b 1 ,b 2 ,...,b n}. Self-attention module such as Figure 3 As shown, let the input vector a 1 ,a 2 ,...,a n After the shared linear transformation W q , W k , W v Processing generates Query, Key and Value vectors (q1 ,k 1 ,v 1 ), (q 2 ,k 2 ,v 2 ),...(q n ,k n ,v n ). Using the same Query vector q i With all Key vectors k j (j=1, 2, ..., n) dot multiplication to get the attention score α i,j =q i ·k j , the attention score is normalized by Softma* to obtain the attention weight α' i,j , the sum of the attention weighted Value vector is the output vector The sequence of all output vectors is the output of the Transformer.
[0041] In this application, the image encoder adopts the Vision Transformer (ViT) network structure to extract high-level features from CT image data and annotation data. Specifically, ViT first divides the input CT image data and annotation data into non-overlapping image sub-blocks (Patch) according to the specified size. Each sub-block generates M-channel features through a 3D convolution operation, and these features are regarded as feature vectors representing the sub-block. The feature vectors of all sub-blocks are arranged in the order of the sub-blocks, forming a set of vector sequences of the same length as the input of the Transformer network.
[0042] The detailed structure of the image encoder is as follows Figure 3As shown in the figure. At the input of the Transformer network, the feature vector sequence of the image sub-block is superimposed with the position encoding result to introduce the position information of the sub-block in the image. Position encoding can help the Transformer network understand the spatial structure and local relationship of the image. The feature vector sequence after superimposing the position encoding is sent to 12 consecutive self-attention modules for processing. Each self-attention module calculates the similarity and weight between feature vectors, models the global dependency between sub-blocks, and extracts high-level semantic features. The calculation process of the self-attention module is the same as the basic principle described above. Through the linear transformation and weighted summation of Query, Key, and Value, the output feature vector sequence that integrates global information is obtained. After being processed by 12 self-attention modules, the obtained feature vector sequence contains the high-level semantic information and global context information of the image. In order to facilitate subsequent processing and feature fusion, ViT reorganizes this feature vector sequence into the form of 3D image blocks. This process is achieved through the reverse Patch Merging operation, merging adjacent feature vectors into a 3D feature map with a spatial structure. Finally, the reorganized 3D feature map undergoes a two-level convolution operation to further extract and fuse local features to obtain the final image feature representation. The convolution operation can help capture local patterns and detail information in the image, which complements the global features extracted by the Transformer.
[0043] It should be noted that Figure 3In the Transformer, Concatenate: concatenate feature maps or vectors from different sources according to a certain dimension (usually the channel dimension) to form a higher-dimensional feature representation; Reshape: change the shape of a feature map or vector, such as converting a 2D feature map to a 1D vector, or restoring a 1D vector to a 2D feature map to adapt to subsequent operations. Window Partition: divide the input feature map into several non-overlapping local windows, and the pixels in each window are treated as a local area for subsequent processing; this division can reduce the computational complexity of the Transformer; Window unPartition: merge the processed local window features back into a complete feature map to restore the original spatial structure; this is the inverse operation of Window Partition. 3D Conv: performs convolution operations on the time dimension, height dimension, and width dimension at the same time, which can extract spatiotemporal features; commonly used in video or volume medical imaging data; 3DConv+LayerNormalization: after the three-dimensional convolution, use layer normalization to normalize the features and stabilize network training. Layer normalization can accelerate convergence and improve generalization performance. Matrix addition: Add two matrices (usually feature maps or vectors) element by element to obtain the fused feature representation. This fusion can realize information interaction between different features; Multihead Self Attention: The core module of Transformer, which performs weighted fusion of features by calculating the similarity between features. The multi-head mechanism can extract attention information from different subspaces; Position Embedding: Add a unique position encoding vector to each feature position to introduce position information. This is crucial for the Transformer encoder to understand the spatial structure of the features.
[0044] Based on the above embodiment, as an optional embodiment, the CT image data and the annotation data are input into the image encoder in the preset visual macro model to obtain image features, including:
[0045] Step 201: Fusing the CT image data and the annotation data to obtain fused image features.
[0046] Specifically, in step 201, the image encoder fuses the CT image data and the annotation data. CT image data refers to a three-dimensional image of the patient's anatomical structure obtained by CT scanning, which is usually stored in the form of a series of two-dimensional slices, and each pixel represents the CT value of the position. Annotation data refers to additional information obtained by annotating and interpreting the CT image by medical experts or algorithms, such as organ contours, lesion areas, anatomical markers, etc. The annotation data provides a higher level of semantic information for the CT image, which helps the image encoder to better understand and analyze the image content. The specific method of fusion processing can be in various forms, such as data superposition, feature splicing, attention fusion, etc. For example, the image encoder can superimpose the CT image data and the annotation data in the spatial dimension, so that each pixel contains not only the CT value but also the corresponding annotation information. Alternatively, the image encoder can splice the CT image features and the annotation features in the feature dimension to form a fused feature vector containing pixel and semantic information. The attention mechanism can also be used to make the CT image features and the annotation features pay attention to each other and dynamically adjust their importance and contribution.
[0047] Step 202, feature extraction is performed on the fused image features, and then attention mechanism processing is performed on the fused image features after feature extraction to obtain attention features.
[0048] Specifically, in step 202, the specific method of feature extraction can adopt a variety of classical or deep learning algorithms, such as convolutional neural networks, autoencoders, feature pyramids, etc. For example, the image encoder can use a series of convolutional layers and pooling layers to abstract and compress the fused image features layer by layer, and extract feature maps of different scales and semantic levels. These feature maps represent the local and global patterns in the fused image features, and contain high-level descriptions of anatomical structures, pathological information, etc. Through feature extraction, the image encoder can convert the original high-dimensional fused features into more compact and expressive feature representations. After obtaining the extracted fused image features, the image encoder further processes them with an attention mechanism. The attention mechanism is a mechanism that imitates human visual attention, which highlights key information and suppresses secondary information by dynamically adjusting the weights of different features or regions. In this step, the image encoder uses the attention mechanism to evaluate the importance of different features in the extracted fused image features and adjusts their weights accordingly.
[0049] Step 203, perform feature processing on the attention feature to obtain image features.
[0050] Specifically, in step 203, the image encoder performs feature processing on the attention feature obtained in step 202. The attention feature is obtained by extracting the fused image features and processing them with the attention mechanism, and contains the most critical and discriminative information in the image. Although the attention feature is already a refined and prominent feature representation, it may still have some redundancy, noise or inconsistency. Therefore, the image encoder needs to further process and optimize the attention feature through feature processing methods such as feature normalization, feature selection, and feature enhancement to improve its quality and applicability.
[0051] Step 300, inputting the dwell point position and the dwell point direction into a prompt encoder in a preset target visual macro model to obtain prompt features, wherein the prompt features include a sparse feature vector and a dense feature vector;
[0052] Specifically, the main function of the prompt encoder is to extract useful prompt features from the dwell point position and the dwell point source direction information to assist the subsequent prediction encoder in generating the expected results. Since the data characteristics of the dwell point position and the dwell point source direction are quite different from the image information, the prompt encoder adopts a network structure different from the image encoder (VisionTransformer). Specifically, the input of the prompt encoder includes two parts of information: the dwell point position (DwellPosition) and the dwell point source direction. First, the input dwell point position is normalized and mapped to a standardized range. Then, the normalized position is multiplied by the predefined position encoding matrix to obtain the radian value representing the position information. Next, the radian value is transformed by the sine and cosine functions to obtain the position embedding (Point Embedding) of the dwell point.
[0053] To further enrich the representation of position information, the prompt encoder superimposes Point Embedding with another learned Multi-Point Embedding to obtain a representation that combines local and global position information. Next, the prompt encoder introduces direction information into the feature representation by multiplying the direction of the resident point source with the predefined direction embedding matrix. Finally, the position embedding and the direction embedding are added to obtain a sparse embedding result, which represents the local features of each resident point. In order to facilitate fusion and interaction with image features, the prompt encoder also expands SparseEmbedding to a dense embedding of the same size as Image Embedding. Specifically, the size of Dense Embedding is Ns*Nh*Nw*Embed Dim, where Ns, Nh, and Nw represent the number of sub-blocks of the input CT image in three dimensions, and Embed Dim represents the dimension of the embedding. In this way, DenseEmbedding has the same spatial structure and dimension as Image Embedding, which facilitates subsequent feature interaction and fusion.
[0054] Based on the above embodiment, as an optional embodiment, the dwell point position and the dwell point direction are input into a prompt encoder in a preset visual macro model to obtain prompt features, including:
[0055] Step 301, normalize the position of the dwell point to obtain a normalized feature, and the normalized feature is consistent with the shape of the image feature.
[0056] Specifically, in step 301, the normalization process is designed according to the size and range of the image feature. For example, if the image feature is a 256*256*64 three-dimensional tensor, indicating that the spatial resolution of the CT image is 256*256 and the number of slices is 64, then the prompt encoder can divide the dwell point position by the spatial size of the image and the slice thickness, and normalize it to the interval [0, 1]. The normalized feature obtained in this way is consistent with the shape of the image feature, and each element represents the relative position of the dwell point in the image space.
[0057] Step 302, performing feature fusion on the normalized features and the preset second learning parameters to obtain a point mapping;
[0058] Specifically, the specific method of feature fusion can take many forms, such as weighted sum attention and other mechanisms. For example, the prompt encoder can splice the normalized features and the preset second learning parameters in the feature dimension to form a fused feature vector containing position information and prior knowledge. Alternatively, the prompt encoder can use the attention mechanism to make the normalized features and the preset second learning parameters pay attention to each other and dynamically adjust their importance and contribution. It is also possible to use the weighted summation method to scale and bias the normalized features according to the value of the preset second learning parameter, introducing prior constraints and adjustments.
[0059] Step 303, expanding the dwelling direction, fusing the expanded dwelling direction with the point mapping, and obtaining a sparse feature vector;
[0060] Specifically, in step 303, the prompt encoder first expands the dwell direction. The dwell direction represents the direction and angle of the radiation source at each dwell point, and is usually given in the form of a three-dimensional unit vector. In order to merge the direction information with the position information, the prompt encoder needs to expand the dwell direction so that it matches the shape and dimension of the point mapping. The specific method of expansion can be designed according to the size and dimension of the point mapping. For example, if the point mapping is a 256*256*64 three-dimensional tensor, representing the fused position information, then the prompt encoder can copy and expand the dwell direction to the same shape so that each position corresponds to a direction vector. This expansion can be achieved through a broadcast mechanism, copying the original dwell direction vector to each spatial position of the point mapping. The expanded dwell direction is aligned with the point mapping in the spatial dimension, which facilitates subsequent fusion operations. After obtaining the expanded dwell direction, the prompt encoder fuses it with the point mapping obtained in step 302. The specific method of fusion can take many forms, such as element-by-element addition, attention and other mechanisms. For example, the hint encoder can concatenate the extended dwell direction and point mapping in the feature dimension to form a fused feature vector containing both position and direction information. Alternatively, the hint encoder can use an attention mechanism to let the point mapping and extended dwell direction pay attention to each other and dynamically adjust their importance and contribution. By fusing the extended dwell direction with the point mapping, the hint encoder can introduce direction information into the position representation and generate a more comprehensive and informative feature vector.
[0061] Step 304: perform vector expansion on the preset third learning parameter to obtain a dense feature vector.
[0062] Specifically, the prompt encoder performs vector expansion on the preset third learning parameters. The preset third learning parameters are a set of parameters pre-learned or set by the prompt encoder, which contain prior knowledge and constraints related to the position and direction of the dwell point. These parameters are usually given in the form of lower-dimensional vectors or matrices, which represent the prior understanding and restrictions on the distribution and geometric relationship of the dwell points. In order to merge the preset third learning parameters with the sparse feature vector, the prompt encoder needs to perform vector expansion on them so that their shape and dimension match the sparse feature vector. The specific expansion method can be designed according to the size and structure of the sparse feature vector. For example, if the sparse feature vector is a 256*256*64 three-dimensional tensor representing the fused position and direction information, then the prompt encoder can copy and expand the preset third learning parameters into the same shape so that each position corresponds to a set of prior knowledge and constraints. This expansion can be achieved through a broadcast mechanism, copying the original third learning parameter vector to each spatial position of the sparse feature vector. The expanded third learning parameters are aligned with the sparse feature vector in the spatial dimension, which facilitates subsequent fusion operations.
[0063] Step 400, input the image features, sparse feature vectors and dense feature vectors into the predictive encoder in the preset target visual large model. The specific processing process is: the image features, sparse feature vectors and dense feature vectors are sequentially subjected to attention processing and multi-layer perception processing to obtain the dose distribution results and residence time parameters.
[0064] Specifically, the image features extracted by the image encoder, the sparse feature vectors and dense feature vectors generated by the prompt encoder are input into the prediction encoder for processing, and finally two key parameters of the radiotherapy process are obtained: dose distribution results and residence time parameters. The reason why these three types of feature vectors are combined and input into the prediction encoder is that they contain information of different dimensions: image features represent the anatomical structure information in the CT image, sparse feature vectors express the position and direction information of sparsely distributed residence points, and dense feature vectors contain some global and generalized features. Fusion of these complementary features can provide a more comprehensive and rich information representation for the prediction encoder, which helps to improve the accuracy of prediction.
[0065] Inside the predictive encoder, we use a combination of attention mechanism and multi-layer perceptron (MLP) to process these feature vectors. First, the attention mechanism is used to adaptively weight the image features, sparse feature vectors, and dense feature vectors in turn. Specifically, for each type of feature vector, the attention mechanism will autonomously learn a set of attention weights based on the task objectives (i.e., predicting dose distribution and dwell time) to measure the importance of different dimensions within this type of feature. This adaptive weighting enables the predictive encoder to flexibly adjust the contribution of different features and mine information that is more relevant to the task. Common attention mechanism implementations include dot product attention, additive attention, etc.
[0066] After completing the attention weighting, we input the three types of weighted features into the multi-layer perceptron (MLP) in turn to further transform the features and extract high-level semantics. MLP consists of several fully connected layers and nonlinear activation functions (such as ReLU). Through layer-by-layer stacking and nonlinear mapping, it can fit the mapping function of arbitrarily complex features to the output. In this process, MLP further integrates cross-modal features and extracts more abstract and high-level semantic features, providing a more refined information representation for subsequent dose and time prediction. The number of layers and hidden units of MLP are important hyperparameters that need to be adjusted according to the difficulty of the task and the scale of the data.
[0067] Finally, the output of the MLP is connected to two independent output heads to generate the dose distribution result and the dwell time parameter. The dose distribution is usually a three-dimensional matrix with the same shape as the CT image, which represents the radiation dose received by each voxel position; the dwell time parameter is a real number vector, which represents the time the radiation source stays at each dwell point.
[0068] Based on the above embodiment, as an optional embodiment, multi-way attention processing and multi-layer perception processing are sequentially performed on image features, sparse feature vectors, and dense feature vectors to obtain dose distribution results and dwell time parameters, including:
[0069] Step 401, feature fusion is performed on the sparse feature vector and the preset first learning parameter to obtain a first fused feature vector, feature fusion is performed on the dense feature vector and the image feature to obtain a second fused feature vector, and multi-way attention processing and multi-head attention mechanism processing are performed on the first fused feature vector, the second fused feature vector and the preset image position to obtain a first output vector and a second output vector;
[0070] Specifically, the predictive encoder first performs feature fusion on the sparse feature vector and the preset first learning parameter to obtain a first fused feature vector. The sparse feature vector represents the local features of each dwell point, such as position and direction information. The first learning parameter is a learnable weight matrix used to adjust the representation of the sparse feature vector. By multiplying the sparse feature vector with the first learning parameter, the predictive encoder can learn the importance and relevance of the sparse features and convert them into a more expressive first fused feature vector. This step helps to highlight the importance of the local features of the dwell point and provide more accurate and effective input for subsequent multi-way attention processing. Next, the predictive encoder performs feature fusion on the dense feature vector and the image feature to obtain a second fused feature vector. The dense feature vector represents the global features of all dwell points, reflecting the overall distribution and mutual relationship between the dwell points. The image feature represents the high-level semantic information such as the anatomical structure and tissue distribution of the input CT image. By fusing the dense feature vector and the image feature, the predictive encoder can combine the global dwell point distribution with the image semantics to form a comprehensive feature representation. This step helps capture the association between the distribution of dwell points and anatomical structures, providing more comprehensive and contextual input for subsequent multi-path attention processing.
[0071] After obtaining the first fused feature vector and the second fused feature vector, the prediction encoder performs multi-way attention processing and multi-head attention mechanism processing on them and the preset image position. Multi-way attention processing allows different feature paths to interact and fuse with each other, realizing information transfer and enhancement between features. Specifically, the prediction encoder inputs the first fused feature vector, the second fused feature vector and the image position into different attention heads respectively. Each attention head independently calculates the similarity and weight between the features and generates the corresponding attention map. Then, the prediction encoder splices and transforms the outputs of different attention heads to obtain the fused multi-way attention features.
[0072] The multi-head attention mechanism further enhances the expressiveness and diversity of features based on multi-way attention processing. The predictive encoder uses multiple independent attention heads to process multi-way attention features, and each attention head focuses on different aspects and attributes of the features. By parallel computing and combining the outputs of multiple attention heads, the predictive encoder can capture multiple subspaces and semantics of features, improving the richness and robustness of feature representation.
[0073] Step 402, normalizing the first output vector, and then separating the normalized first output vector to obtain a dose feature and a time feature;
[0074] Specifically, in step 402, the prediction encoder first normalizes the first output vector. The first output vector is obtained in step 401 through multi-way attention processing and multi-head attention mechanism, and mainly contains the interaction information between the local features of the residence point and the image semantics. Since the elements in the first output vector may have different scales and ranges, directly using them for subsequent predictions may lead to training instability and difficulty in convergence. In order to solve this problem, the prediction encoder uses normalization technology to map the elements in the first output vector to a unified scale and distribution. After normalizing the first output vector, the prediction encoder further separates the normalized first output vector to obtain dose features and time features. The purpose of this step is to decouple the information related to dose distribution and residence time in the first output vector, so that different types of features can more independently and specifically represent their respective semantics.
[0075] Step 403, linearly process the time feature to obtain a dwell time parameter;
[0076] Specifically, in step 403, the predictive encoder performs linear processing on the time feature obtained in step 402. The time feature is obtained by separating the normalized first output vector, and mainly captures information related to the residence time, such as the local characteristics of the residence point and the global distribution. In order to convert the time feature into a specific residence time parameter, the predictive encoder uses a linear processing method to map the time feature to the parameter space through a linear transformation.
[0077] Step 404: fuse the second output vector and the dose feature after linear processing to obtain a dose distribution result.
[0078] Specifically, in step 404, the predictive encoder fuses the second output vector obtained in step 401 with the dose feature after linear processing in step 402. The second output vector is obtained through multi-way attention processing and multi-head attention mechanism, which integrates information such as global dwell point distribution, image semantics and local dwell point features. The dose feature is obtained by separating the normalized first output vector, which mainly captures information related to dose distribution, such as dwell point position, direction and image anatomical structure.
[0079] Based on the above embodiment, as an optional embodiment, please refer to Figure 8 , Figure 8 A schematic diagram of a model training process provided for this application, the training process of the preset large visual model includes:
[0080] Step 510, obtaining a sample data set, the sample data set including CT image sample data, annotated sample data, sample dwell point positions, sample dwell point directions corresponding to the sample dwell point positions, and real dose distribution and real dwell time;
[0081] Specifically, first, a sample data set is obtained. In a specific embodiment, the sample data is the patient's CT, RS, RP and RD files. In the specific implementation process, the center point of the CTV annotation bounding box is taken as the center, and the CT image (in HU), Mask image and Dose data (in cGy) with a size of 128*128*128 and a resolution of 1mm1mm1mm are intercepted. This step extracts the key information of the patient's anatomical structure and dose distribution, and provides the model with image sample data for learning. Then, according to the pipeline reconstruction information in the RP file, the resident point positions of 1mm, 2mm,..., 50mm from the top (after removing the influence of the blind end offset of the pipeline) are taken on the left and right pipelines, and the resident point positions of 1mm, 2mm,..., 120mm from the top (after removing the influence of the blind end offset of the pipeline) are taken on the middle pipeline. For each resident point, its position coordinates and direction information are calculated, and the residence time information at the position is obtained. Considering that the reference air kerma used in different plans may be different, the dwell time information is expressed as the product of the actual dwell time and the reference air kerma. Finally, all the dwell points are arranged in pipeline order to generate structured data containing the position coordinates, direction and time-related information of 220 dwell points. This step extracts key parameters such as the spatial distribution of the radiation source in the lesion area, irradiation direction and dwell time, providing the model with the necessary information for optimizing dose distribution.
[0082] Step 520, inputting the CT image sample data and the annotated sample data into the image encoder in the preset initial visual macro model to obtain image sample features;
[0083] Specifically, a preset initial visual model is first constructed. This model adopts an encoder-decoder architecture, in which the encoder part is responsible for mapping the input image data to a low-dimensional feature space and extracting the key information and abstract features of the image. Then, the CT image sample data and the corresponding annotated sample data are input into the image encoder of the initial visual model. The encoder receives these image data and converts them into feature representations through the forward propagation process. In this process, the model extracts low-level features such as local texture and edges of the image through the convolution layer, and gradually reduces the size of the feature map through the pooling layer and downsampling operations. As the network depth increases, the features extracted by the model gradually transition from low-level local features to high-level semantic features, including global information such as the overall structure and anatomical location of the image. By jointly inputting CT images and annotated data, the encoder can simultaneously learn the anatomical structure of the image and the location information of the lesion area, which is crucial for subsequent dose distribution and residence time prediction.
[0084] After layer-by-layer feature transformation and extraction by the image encoder, a set of compact and efficient image sample features is finally obtained. These features are represented in the form of vectors or tensors, which contain the key information and abstract patterns of the input image.
[0085] Step 530, inputting the sample residence point position and the sample residence point direction into a prompt encoder in a preset initial visual macro model to obtain a prompt feature, where the prompt feature includes a sparse sample vector and a dense sample vector;
[0086] Specifically, the acquired sample dwell point position and sample dwell point direction data are organized into a format suitable for input. The sample dwell point position is usually expressed in the form of three-dimensional coordinates, which identifies the spatial distribution of the radiation source in the lesion area; the sample dwell point direction is expressed in the form of a unit vector or Euler angle, which identifies the irradiation direction of the radiation source at each dwell point. These position and direction data are organized into the form of tensors or vectors in a predetermined order and format for input into the prompt encoder. Next, the prepared sample dwell point position and sample dwell point direction data are input into the prompt encoder of the initial visual large model. The prompt encoder is a neural network module specifically used to process structured input data, which can map input data of different types and formats to a unified feature space.
[0087] Step 540, input the image sample features, sparse sample feature vectors and dense sample feature vectors into the prediction encoder in the preset initial visual large model, and the specific processing process is: the image sample features, sparse sample feature vectors and dense sample feature vectors are sequentially subjected to multi-way attention processing and multi-layer perception processing to obtain the predicted dose distribution and predicted residence time; specifically, firstly, the image sample features extracted by the image encoder, the sparse sample feature vectors and dense sample feature vectors generated by the prompt encoder are organized into the form of tensors or vectors according to a predetermined format and order as the input of the prediction encoder. The prediction encoder is a neural network module specifically used to generate prediction results, which can generate outputs that meet the task requirements based on the input feature representation through a series of nonlinear transformations and feature fusion operations.
[0088] In the processing of the predictive encoder, a combination of a multi-way attention mechanism and a multi-layer perceptron (MLP) is used. By introducing multiple independent attention heads, the multi-way attention mechanism can perform weighted fusion of input features from different angles and granularities to extract key information related to the task. Specifically, the image sample features, sparse sample feature vectors, and dense sample feature vectors are input into different attention heads respectively. Each attention head generates a set of attention weights by calculating the correlation and importance between the input features. Then, these attention weights are applied to the corresponding input features to obtain the weighted fused feature representation. The multi-way attention mechanism can effectively capture the long-range dependencies and interactions between input features, and improve the expressiveness and generalization ability of feature representation.
[0089] Step 550, based on the real dose distribution, the real residence time, the predicted dose distribution and the predicted residence time, the value of the loss function is obtained, and the parameters of the initial visual large model are adjusted using the value of the loss function, and the target visual large model is obtained when the preset training conditions are met.
[0090] Specifically, the predicted results are compared with the actual dose distribution and dwell time related information, and two loss functions are calculated: dose MAE loss and dwell time MAE loss. Figure 4 and Figure 5 , Figure 4 This is a diagram of the MAE changes in dose and residence time during a training process provided in this application. Figure 5A graph of dose and residence time MAE changes during a verification process provided for this application. The dose MAE loss measures the mean absolute error between the predicted dose distribution and the true dose distribution, reflecting the accuracy of the model in spatial dose prediction. The residence time MAE loss measures the mean absolute error between the predicted residence time and the true residence time, reflecting the accuracy of the model in temporal residence prediction. The weighted sum of these two loss functions is used to obtain the overall loss as the objective function for model optimization. By minimizing the overall loss, the performance of the model in dose prediction and residence time prediction can be improved at the same time.
[0091] Based on the above embodiment, as an optional embodiment, based on the real dose distribution, the real residence time, the predicted dose distribution and the predicted residence time, the value of the loss function is obtained, including:
[0092] The preset loss function is used to calculate the loss of the true dose distribution, the true residence time, the predicted dose distribution and the predicted residence time to obtain the value of the loss function.
[0093] The preset loss function formula is expressed as:
[0094] LOSS=MAE(Dosepredict,DOSEGT)+α·MAE(Timepredict,TimeGT)
[0095] Among them, LOSS represents the value of the loss function, MAE() represents the mean absolute error function, Dosepredict represents the predicted dose distribution, DOSEGT represents the true dose distribution, Timepredict represents the predicted residence time, TimeGT represents the true residence time, and α represents the preset adjustment parameter.
[0096] Specifically, the preset loss function is used to calculate the loss of the true dose distribution, the true residence time, the predicted dose distribution and the predicted residence time, and the value of the loss function is obtained. This loss function consists of two parts: the mean absolute error (MAE) of the dose distribution and the mean absolute error (MAE) of the residence time, which respectively measure the difference between the predicted dose distribution and the true dose distribution, and the difference between the predicted residence time and the true residence time. In the formula, Dosepredict represents the predicted dose distribution, DOSEGT represents the true dose distribution, Timepredict represents the predicted residence time, and TimeGT represents the true residence time. The MAE function calculates the mean absolute error between the predicted value and the true value, that is, the absolute difference between the predicted value and the true value at each element or time point is averaged. In this way, the MAE of the dose distribution reflects the accuracy of the model in spatial dose prediction, and the MAE of the residence time reflects the accuracy of the model in temporal residence prediction.
[0097] In order to balance the loss contribution of dose distribution and dwell time, a preset adjustment parameter α is introduced into the loss function. By adjusting the size of α, the weight of dwell time loss in the overall loss can be controlled. When α is larger, the model will pay more attention to the prediction accuracy of dwell time; when α is smaller, the model will pay more attention to the prediction accuracy of dose distribution. The choice of this parameter can be determined according to the requirements and preferences of the specific task, and the optimal value can be found through experience or cross-validation.
[0098] Adding the MAE of the dose distribution and the weighted MAE of the dwell time gives the value of the complete loss function, LOSS. This value quantifies the overall difference between the predicted results and the actual results and is the objective function of the model optimization.
[0099] During the model training process, a large amount of training data is input into the model to obtain the corresponding predicted dose distribution and predicted residence time. Then, according to the preset loss function formula, the LOSS value of each sample is calculated and used as the basis for updating the model parameters. Through the back propagation algorithm and gradient descent optimization, the parameters of the model are continuously adjusted to move in the direction of reducing the LOSS value until the optimal state is reached or the preset stop condition is met. Through the design of the loss function based on MAE, an intuitive and effective evaluation index is established to measure the accuracy and reliability of the model prediction results. As a commonly used regression loss function, MAE has good mathematical properties and interpretability, and can well measure the absolute error between the predicted value and the true value. At the same time, MAE is also relatively robust to outliers and outliers, and is not easily affected by individual extreme samples.
[0100] Based on the above embodiment, as an optional embodiment, before acquiring the CT image data, the annotation data, the dwell point position and the dwell point direction corresponding to the dwell point position, the method further includes:
[0101] The CT file and RS file of the target object to be predicted are obtained, and the CT image data, the annotation data, the position of the dwelling point and the direction of the dwelling point are obtained according to the CT file and the RS file.
[0102] Specifically, a CT file refers to a medical image file generated by computed tomography, which contains three-dimensional anatomical information of the patient's internal structure. By performing a CT scan on a patient, a series of two-dimensional slice images can be obtained, each slice reflecting the density distribution at a specific location in the body. Stacking these slices in the order of scanning forms complete three-dimensional CT image data. CT image data is stored in the DICOM (Digital Imaging and Communications in Medicine) format, which contains image pixel values as well as metadata such as shooting parameters and patient information.
[0103] RS file refers to the radiotherapy planning file generated by the Radiotherapy Planning System. It contains various parameters and settings of the radiotherapy plan, such as the type of radiation source, activity, location and direction of the dwell point, dose distribution, organ contour, etc. This information is obtained based on the doctor's clinical experience and the optimization results of the dosimetrist, reflecting the personalized radiotherapy plan for a specific patient. RS files are stored in DICOM-RT or other proprietary formats and can be read and executed by radiotherapy equipment.
[0104] In order to extract the input data required for the model from CT files and RS files, these two types of files need to be parsed and processed. For CT files, DICOM parsing libraries such as PyDICOM or SimpleITK are used to read DICOM files, extract image pixel values, and perform necessary preprocessing according to the shooting parameters, such as coordinate transformation, resampling, normalization, etc., to finally obtain CT image data in a unified format. These image data are organized in the form of three-dimensional tensors, and each voxel represents the CT value of a spatial position. For RS files, DICOM-RT parsing libraries such as DicomParser or pydicom are also used to read radiotherapy plan files and extract key information. For the contours of organs and tumors, they are converted into binary masks or multi-label masks, aligned with CT image data, and annotated data are obtained. For the position and direction of the resident point of the radiation source, its three-dimensional coordinates and Euler angle (or quaternion) representation are directly read from the RS file to obtain the resident point position and resident point direction data. These data, together with the CT image data, constitute the complete input of the model.
[0105] like Figure 6As shown, an embodiment of the present application provides a radiation parameter prediction device for after-loading radiotherapy of an applicator, which acquires CT image data, annotation data, a dwell point position, and a dwell point direction corresponding to the dwell point position through a data acquisition module 110; then, the CT image data and the annotation data are input into an image encoder in a preset target visual large model by using an image processing module 120 to obtain image features; secondly, the dwell point position and the dwell point direction are input into a prompt encoder in a preset target visual large model through a sequence processing module 130 to obtain prompt features, and the prompt features include sparse feature vectors and dense feature vectors; finally, the image features, sparse feature vectors, and dense feature vectors are input into a prediction encoder in a preset target visual large model through a data prediction module 140, and the specific processing process is: attention processing and multi-layer perception processing are performed on the image features, sparse feature vectors, and dense feature vectors in turn to obtain dose distribution results and dwell time parameters.
[0106] It should also be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0107] The present application also discloses an electronic device. Figure 7 , Figure 7 The electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .
[0108] The communication bus 502 is used to realize the connection and communication between these components.
[0109] The user interface 503 may include a display screen (Display) and a camera (Camera), and the optional user interface 503 may also include a standard wired interface and a wireless interface.
[0110] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0111] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.
[0112] Among them, the memory 505 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned processor 501. Refer to Figure 7 The memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program for a radiation parameter prediction method for applicator afterloading radiotherapy.
[0113] exist Figure 7In the electronic device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 501 can be used to call the application program of a radiation parameter prediction method for after-loading radiotherapy of an applicator stored in the memory 505. When executed by one or more processors 501, the electronic device 500 executes one or more methods in the above-mentioned embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0114] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0115] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0116] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for predicting radiation parameters of applicator afterloading radiotherapy, characterized in that: The method comprises: Acquire CT image data, annotation data, a dwell point position, and a dwell point direction corresponding to the dwell point position; Inputting the CT image data and the annotated data into an image encoder in a preset target visual macromodel to obtain image features; Inputting the dwell point position and the dwell point direction into a prompt encoder in a preset target visual macro model to obtain prompt features, wherein the prompt features include a sparse feature vector and a dense feature vector; The image features, the sparse feature vectors and the dense feature vectors are input into a predictive encoder in a preset target visual large model. The specific processing process is: attention processing and multi-layer perception processing are performed on the image features, the sparse feature vectors and the dense feature vectors in turn to obtain dose distribution results and residence time parameters.
2. The method according to claim 1, characterized in that The step of sequentially performing multi-path attention processing and multi-layer perception processing on the image features, the sparse feature vectors, and the dense feature vectors to obtain dose distribution results and dwell time parameters includes: Performing feature fusion on the sparse feature vector and a preset first learning parameter to obtain a first fused feature vector, performing feature fusion on the dense feature vector and the image feature to obtain a second fused feature vector, and performing multi-way attention processing and multi-head attention mechanism processing on the first fused feature vector, the second fused feature vector and a preset image position to obtain a first output vector and a second output vector; After normalizing the first output vector, separating the normalized first output vector to obtain a dose feature and a time feature; Performing linear processing on the time characteristics to obtain the residence time parameter; The second output vector is fused with the dose feature after linear processing to obtain the dose distribution result.
3. The method according to claim 1, characterized in that The step of inputting the dwell point position and the dwell point direction into a prompt encoder in a preset visual macro model to obtain a prompt feature includes: Normalizing the position of the dwell point to obtain a normalized feature, wherein the normalized feature is consistent with the shape of the image feature; Performing feature fusion on the normalized feature and the preset second learning parameter to obtain a point mapping; Expanding the residence point direction, fusing the expanded residence point direction with the point mapping to obtain the sparse feature vector; The preset third learning parameter is vector-expanded to obtain the dense feature vector.
4. The method according to claim 1, characterized in that: The step of inputting the CT image data and the annotated data into an image encoder in a preset visual macro model to obtain image features includes: Fusing the CT image data and the annotated data to obtain fused image features; Extracting features from the fused image features, and then performing attention mechanism processing on the fused image features after feature extraction to obtain attention features; Perform feature processing on the attention feature to obtain the image feature.
5. The method according to claim 1, characterized in that The training process of the preset large visual model includes: Acquire a sample data set, wherein the sample data set includes CT image sample data, annotated sample data, a sample dwell point position, a sample dwell point direction corresponding to the sample dwell point position, a real dose distribution, and a real dwell time; Inputting the CT image sample data and the annotated sample data into an image encoder in a preset initial visual macro model to obtain image sample features; Inputting the sample dwell point position and the sample dwell point direction into a prompt encoder in a preset initial visual macro model to obtain prompt features, wherein the prompt features include a sparse sample feature vector and a dense sample feature vector; Inputting the image sample features, the sparse sample feature vectors and the dense sample feature vectors into a predictive encoder in a preset initial visual large model, the specific processing process is: performing multi-way attention processing and multi-layer perception processing on the image sample features, the sparse sample feature vectors and the dense sample feature vectors in sequence to obtain a predicted dose distribution and a predicted residence time; Based on the true dose distribution, the true residence time, the predicted dose distribution and the predicted residence time, the value of the loss function is obtained, and the parameters of the initial visual large model are adjusted using the value of the loss function. Under the condition of meeting the preset training conditions, the target visual large model is obtained.
6. The method according to claim 5, characterized in that The obtaining a value of a loss function based on the actual dose distribution, the actual dwell time, the predicted dose distribution and the predicted dwell time comprises: Using a preset loss function to perform loss calculation on the true dose distribution, the true residence time, the predicted dose distribution and the predicted residence time, to obtain a value of the loss function; The preset loss function formula is expressed as: LOSS=MAE(Dosepredict,DOSEGT)+α·MAE(Timepredict,TimeGT) Among them, LOSS represents the value of the loss function, MAE() represents the mean absolute error function, Dosepredict represents the predicted dose distribution, DOSEGT represents the true dose distribution, Timepredict represents the predicted residence time, TimeGT represents the true residence time, and α represents a preset adjustment parameter.
7. The method according to claim 1, characterized in that Before acquiring the CT image data, the annotation data, the resident point position and the resident point direction corresponding to the resident point position, the method further includes: A CT file and an RS file of the target object to be predicted are obtained, and the CT image data, the annotation data, the resident point position and the resident point direction are obtained according to the CT file and the RS file.
8. A radiation parameter prediction device for afterloading radiotherapy of an applicator, characterized in that: The device comprises: A data acquisition module (110) is used to acquire CT image data, annotation data, a resident point position and a resident point direction corresponding to the resident point position; An image processing module (120) is used to input the CT image data and the annotation data into an image encoder in a preset target visual macro model to obtain image features; A sequence processing module (130) is used to input the dwell point position and the dwell point direction into a prompt encoder in a preset target visual macro model to obtain prompt features, wherein the prompt features include a sparse feature vector and a dense feature vector; The data prediction module (140) is used to input the image features, the sparse feature vectors and the dense feature vectors into a prediction encoder in a preset target visual large model. The specific processing process is: the image features, the sparse feature vectors and the dense feature vectors are sequentially subjected to attention processing and multi-layer perception processing to obtain dose distribution results and residence time parameters.
9. An electronic device, characterized in that: The electronic device (500) comprises a processor (501), a memory (505), a user interface (503), a communication bus (502) and a network interface (504), wherein the processor (501), the memory (505), the user interface (503) and the network interface (504) are respectively connected to the communication bus (502), the memory (505) is used to store instructions, the user interface (503) and the network interface (504) are used to communicate with other devices, and the processor (501) is used to execute the instructions stored in the memory (505) so that the electronic device (500) executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is performed.
Citation Information
Patent Citations
Radiation parameter determination method and device, electronic equipment and storage medium
CN111833988A
Methods and systems for sparse vector-based matrix transformations
CN112639980A