Prostate MRI image segmentation method

CN118470047BActive Publication Date: 2026-10-16WUYI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410673758.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2026-10-16
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

这种传统的分割前列腺区域方式存在人为操作的局限性,如耗费医生精力且误判情况时有发生

Benefits of technology

[0065]According to an embodiment of the present invention, a prostate MRI image segmentation method includes: acquiring a prostate MRI image; inputting the prostate MRI image into a prostate MRI segmentation network for segmentation processing to obtain an image segmentation result. The prostate MRI segmentation network is DT-CSANet, which includes a dynamic token selection and cross-slice attention module (DT-CSA). DT-CSA consists of a cross-slice attention block (CSA block) and a dynamic token selection module (DTblock). The CSA block acquires cross-slice information about inter-slice relationships by introducing an attention module, enabling it to consider the relationships between slices when segmenting the prostate MRI image. The DTblock selects the most important image features for segmentation processing in the prostate MRI image through token scoring and sampling, and removes redundant information from the prostate MRI image. Based on this, the present invention uses DT-CSANet as the prostate MRI segmentation network. The dynamic token selection and cross-slice attention module (DT-CSA) in this segmentation network architecture have the function of focusing on cross-slice level information while retaining high-attention tokens (slice information) that contribute significantly to the network. This can, to a certain extent, eliminate the adverse effects of redundant information on the segmentation effect. Therefore, the embodiments of the present invention can improve the accuracy of prostate region segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470047B_ABST
    Figure CN118470047B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of prostate MRI image segmentation method. Wherein, method includes: obtaining prostate MRI image;Prostate MRI image is input to prostate MRI segmentation network and is segmented to obtain image segmentation result, wherein, prostate MRI segmentation network is DT-CSA Net, DT-CSA Net includes dynamic token selection and cross slice attention module DT-CSA, and DT-CSA is composed of cross slice attention block CSA block and dynamic token selection module DT block, wherein, CSA block obtains cross slice information of inter-slice connection by introducing attention module, and DT block determines the most important feature to segmentation processing by token score and sampling method, and removes redundant information in prostate MRI image. Based on this, the embodiment of the present application can improve the accuracy of prostate region segmentation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more particularly to a method for segmenting prostate MRI images. Background Technology

[0002] Prostate cancer is one of the most common malignant tumors in men, and the second most prevalent cancer among men worldwide after lung cancer. Early detection and intervention can significantly improve the cure rate of prostate cancer. Traditional clinical diagnostic methods primarily rely on magnetic resonance imaging (MRI), where doctors analyze the region, structure, and morphology of the prostate gland in the MRI scan to diagnose prostate cancer. This traditional method of segmenting the prostate region has limitations due to its reliance on manual intervention, such as being time-consuming for doctors and prone to misdiagnosis.

[0003] However, existing U-Net and its variants still have certain limitations in improving the segmentation of the prostate region. The main issue is the uneven intensity field generated by the combined effect of the imaging device and patient specificity, which results in low contrast between the prostate gland and its surrounding tissues. Consequently, the segmentation model is less able to distinguish the bottom and top regions of the prostate compared to the central region, ultimately affecting the segmentation effect of the prostate region. Summary of the Invention

[0004] This invention provides a method for segmenting prostate MRI images, which can improve the accuracy of prostate region segmentation.

[0005] In a first aspect, embodiments of the present invention provide a method for segmenting prostate MRI images, comprising:

[0006] Obtain MRI images of the prostate;

[0007] The prostate MRI image is input into a prostate MRI segmentation network for segmentation processing to obtain the image segmentation result. The prostate MRI segmentation network is a DT-CSA Net, which includes a dynamic token selection and cross-slice attention module (DT-CSA). The DT-CSA consists of a cross-slice attention block (CSA block) and a dynamic token selection module (DT block). The CSA block obtains cross-slice information containing the relationships between slices by introducing an attention module, so that it can consider the relationships between slices when segmenting the prostate MRI image. The DT block selects the most important image features for segmentation processing in the prostate MRI image through token scoring and sampling, and removes redundant information in the prostate MRI image.

[0008] In some embodiments, the DT-CSA Net implementation steps are as follows:

[0009] The MRI features are extracted using the encoder at layer 0 of the DT-CSA Net, denoted as F0;

[0010] The F0 is sent to the 0th layer DT-CSA module;

[0011] The DT-CSA module dynamically selects meaningful adjacent slices for F0, and segments the current slice based on the selected adjacent slices;

[0012] The output of the DT-CSA module is concatenated with the features obtained by upsampling in the next layer, and then upsampled again. The operation for each layer is the same as the above steps.

[0013] The image segmentation result is obtained by passing the output of the 0th layer decoder through a 1×1 convolution.

[0014] In some embodiments, the DT-CSA module implements the following steps:

[0015] The token matrix is ​​obtained by preprocessing the input slice;

[0016] The token matrix is ​​input into the DT-CSA module, and the attention weight matrix is ​​obtained using the CSAblock. The attention weight matrix contains the correlation information between slices.

[0017] The attention weight matrix is ​​input into DTblock for token scoring and inverse transformation sampling to obtain a simplified attention weight matrix;

[0018] The preliminary segmentation result is obtained using the simplified weight matrix. This preliminary segmentation result is then input into a linear mapping and nonlinear activation layer, and normalized. The output after passing through the DT-CSA module is as follows:

[0019] z = Layer_Norm(GELU(z) int W2+b2)+z int )

[0020] in:

[0021] z int =Layer_Norm(GELU(yW1+b1)+x)

[0022] y represents the initial segmentation result, w and b are learnable parameters, and x is the token matrix.

[0023] In some embodiments, the CSAblock implementation steps include data slice preprocessing and calculating the attention matrix.

[0024] In some embodiments, the data slice preprocessing includes the following steps:

[0025] A three-dimensional prostate MRI image of size h×w×c is divided into c slices of size h×w, and each slice is represented by a two-dimensional matrix x. i ∈Rh×w (where i = 1, 2, 3, ..., c) represents;

[0026] Position encoding is performed on all the slices;

[0027] Each of the slice matrices x i All tokens are converted into tokens through the embedding layer, and all the tokens are combined into a token matrix X.

[0028] In some embodiments, calculating the attention matrix includes the following steps:

[0029] The query Q, key K, and value V are obtained using the token matrix X, using the following formula:

[0030] Q = XW Q

[0031] K = XW K

[0032] V = XW V

[0033] Attention matrix A is obtained through the attention mechanism:

[0034]

[0035] The element a of attention matrix A i,j The meaning is the magnitude of the influence of the j-th slice on the prediction when predicting the i-th slice, that is, the degree of correlation between the j-th slice and the prediction of the i-th slice.

[0036] In some embodiments, the DTblock implementation steps include token scoring and inverse transform sampling.

[0037] In some embodiments, the token scoring includes the following steps:

[0038] Using the attention weight matrices A and V calculated by the CSAblock, substitute them into the following formula to calculate the significance score of the j-th token when predicting the i-th slice:

[0039]

[0040] Among them, S j It is the significance score.

[0041] In some embodiments, the inverse transform sampling includes the following steps:

[0042] Calculate the cumulative distribution function based on the significance score:

[0043]

[0044] Inverting CDF yields its inverse function:

[0045] Ψ(k)=CDF -1 (k)

[0046] Where k∈[0,1], the independent variable of CDF is the index i of each token, and the dependent variable is the corresponding probability;

[0047] The upper limit of the number of sampling tokens is set according to the inverse function of CDF, denoted by K, and a fixed sampling scheme is used. Sampling K times; Since multiple probabilities in Ψ(k) correspond to the same token number, a token may be sampled multiple times. If a token is sampled multiple times, it is only retained once. Therefore, the actual number of slices sampled, K′, is often less than or equal to K. The sampled slices are the K′ slices that have the greatest impact on this prediction.

[0048] After sampling and obtaining the indices of K′ important slices, the attention matrix A is clipped using the indices. The clipped attention matrix is ​​the simplified attention matrix A_s.

[0049] Calculate the output Oj of the j-th slice:

[0050]

[0051] V o =X_o×W v_o

[0052] Where X_o is the tensor of the original input 3D image, WV_o is the attention mechanism parameter, aj,i is the j-th row and i-th element of A_s, where each element is the influence weight of each slice on the current slice, V_o is a 3D image after linear transformation, vi is the i-th slice of V_o, and n is the number of input slices.

[0053] In some embodiments, the combined loss function used by DT-CSANet is calculated as follows:

[0054]

[0055] Combination loss function Including the cross-entropy loss function L BCE and DICE loss function L Dice Cross-entropy loss function LBCE The formula is defined as follows:

[0056]

[0057] DICE loss function L Dice The formula is defined as follows:

[0058]

[0059] Where n is the current training iteration number, N is the total number of iterations, and y is the label. This is the segmentation result.

[0060] Secondly, embodiments of the present invention also provide a prostate MRI image segmentation device, the device comprising:

[0061] The acquisition module is used to acquire MRI images of the prostate.

[0062] A segmentation module is used to input the prostate MRI image into a prostate MRI segmentation network for segmentation processing to obtain image segmentation results. The prostate MRI segmentation network is a DT-CSA Net, which includes a dynamic token selection and cross-slice attention module DT-CSA. The DT-CSA consists of a cross-slice attention block (CSA block) and a dynamic token selection module DTblock. The CSA block obtains cross-slice information about inter-slice relationships by introducing an attention module. The DTblock selects the most important image features for segmentation processing in the prostate MRI image through token scoring and sampling, and removes redundant information in the prostate MRI image.

[0063] Thirdly, embodiments of the present invention also provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the prostate MRI image segmentation method as described in the first aspect.

[0064] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for performing the prostate MRI image segmentation method as described in the first aspect.

[0065] According to an embodiment of the present invention, a prostate MRI image segmentation method includes: acquiring a prostate MRI image; inputting the prostate MRI image into a prostate MRI segmentation network for segmentation processing to obtain an image segmentation result. The prostate MRI segmentation network is DT-CSANet, which includes a dynamic token selection and cross-slice attention module (DT-CSA). DT-CSA consists of a cross-slice attention block (CSA block) and a dynamic token selection module (DTblock). The CSA block acquires cross-slice information about inter-slice relationships by introducing an attention module, enabling it to consider the relationships between slices when segmenting the prostate MRI image. The DTblock selects the most important image features for segmentation processing in the prostate MRI image through token scoring and sampling, and removes redundant information from the prostate MRI image. Based on this, the present invention uses DT-CSANet as the prostate MRI segmentation network. The dynamic token selection and cross-slice attention module (DT-CSA) in this segmentation network architecture have the function of focusing on cross-slice level information while retaining high-attention tokens (slice information) that contribute significantly to the network. This can, to a certain extent, eliminate the adverse effects of redundant information on the segmentation effect. Therefore, the embodiments of the present invention can improve the accuracy of prostate region segmentation. Attached Figure Description

[0066] Figure 1A This is a flowchart of a prostate MRI image segmentation method provided in one embodiment of the present invention;

[0067] Figure 1B This is a diagram of the DT-CSANet network architecture provided in one embodiment of the present invention;

[0068] Figure 2 This is a schematic diagram of a dynamic token selection and cross-slice attention module provided in one embodiment of the present invention;

[0069] Figure 3 This is a schematic diagram of a slice data preprocessing process provided in one embodiment of the present invention;

[0070] Figure 4 This is a schematic diagram of the inverse transformation sampling process provided in one embodiment of the present invention;

[0071] Figure 5 This is a schematic diagram of the structure of a prostate MRI image segmentation device provided in one embodiment of the present invention;

[0072] Figure 6 This is a schematic diagram of an electronic device provided in one embodiment of the present invention. Detailed Implementation

[0073] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0074] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the following drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0075] In this embodiment of the invention, the terms "furthermore," "exemplarily," or "optionally" are used as examples, illustrations, or descriptions and should not be construed as being more preferred or advantageous than other embodiments or designs. The use of the terms "furthermore," "exemplarily," or "optionally" is intended to present the relevant concepts in a specific manner.

[0076] To facilitate a more convenient description of the working principle of the embodiments of the present invention, the following introduction of relevant technical scenarios is given first.

[0077] Prostate cancer is one of the most common malignant tumors in men, and the second most prevalent cancer among men worldwide after lung cancer. Early detection and intervention can significantly improve the cure rate of prostate cancer. Traditional clinical diagnostic methods primarily rely on magnetic resonance imaging (MRI), where doctors analyze the region, structure, and morphology of the prostate gland in the MRI scan to diagnose prostate cancer. This traditional method of segmenting the prostate region has limitations due to its reliance on manual intervention, such as being time-consuming for doctors and prone to misdiagnosis.

[0078] However, existing U-Net and its variants still have certain limitations in improving the segmentation of the prostate region. The main issue is the uneven intensity field generated by the combined effect of the imaging device and patient specificity, which results in low contrast between the prostate gland and its surrounding tissues. Consequently, the segmentation model is less able to distinguish the bottom and top regions of the prostate compared to the central region, ultimately affecting the segmentation effect of the prostate region.

[0079] Based on this, the present invention provides a prostate MRI image segmentation method. The prostate MRI image segmentation method includes: acquiring a prostate MRI image; inputting the prostate MRI image into a prostate MRI segmentation network for segmentation processing to obtain image segmentation results. The prostate MRI segmentation network is a DT-CSA Net, which includes a dynamic token selection and cross-slice attention module (DT-CSA). DT-CSA consists of a cross-slice attention block (CSA block) and a dynamic token selection module (DT block). The CSA block acquires cross-slice information about inter-slice relationships by introducing an attention module, enabling it to consider the relationships between slices when segmenting the prostate MRI image. The DT block selects the most important image features for segmentation processing in the prostate MRI image through token scoring and sampling, and removes redundant information from the prostate MRI image. Based on this, the present invention uses DT-CSA Net as the prostate MRI segmentation network. The dynamic token selection and cross-slice attention module (DT-CSA) in this segmentation network architecture can focus on cross-slice level information while retaining high-attention tokens (slice information) that contribute significantly to the network, which can, to a certain extent, eliminate the adverse effects of redundant information on the segmentation effect. Therefore, the embodiments of the present invention can improve the accuracy of prostate region segmentation.

[0080] The embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0081] like Figure 1A As shown, Figure 1A This is a flowchart of a prostate MRI image segmentation method provided in an embodiment of the present invention. The prostate MRI image segmentation method may include, but is not limited to, steps S101 to S102.

[0082] Step S101: Obtain MRI images of the prostate;

[0083] Step S102: Input the prostate MRI image into the prostate MRI segmentation network for segmentation processing to obtain the image segmentation result. The prostate MRI segmentation network is DT-CSA Net, which includes a dynamic token selection and cross-slice attention module DT-CSA. DT-CSA consists of a cross-slice attention block CSA block and a dynamic token selection module DT block. The CSA block obtains cross-slice information of inter-slice relationships by introducing an attention module. The DT block selects the most important image features for segmentation processing in the prostate MRI image by token scoring and sampling, and removes redundant information in the prostate MRI image.

[0084] In one embodiment, a prostate MRI image is acquired; the prostate MRI image is input into a prostate MRI segmentation network for segmentation processing to obtain the image segmentation result. The prostate MRI segmentation network is a DT-CSA Net, which includes a Dynamic Token Selection and Cross-Section Attention (DT-CSA) module. DT-CSA consists of a Cross-section Attention block (CSAblock) and a Dynamic Token Selection block (DT block). The CSAblock obtains cross-section information containing the relationships between sections by introducing an attention module, enabling it to consider the relationships between sections when segmenting the prostate MRI image. The DT block selects the most important image features for segmentation processing in the prostate MRI image through token scoring and sampling, and removes information in the prostate MRI image that has little impact on segmentation, thereby reducing redundant information in the image.

[0085] In one embodiment, the overall architecture of DT-CSA Net is as follows: Figure 1B As shown, its backbone network structure is the nnU-net framework. Unlike the traditional nnU-net, this invention uses DT-CSA instead of skip connections to obtain cross-slice information, improving segmentation accuracy while also selecting salient features through token selection to reduce redundancy. The nnU-net framework has a six-layer structure, containing six encoders, five decoders, and six DT-CSA modules. The number of convolutional kernels used in each layer, from top to bottom, are 64, 128, 256, 512, 1024, and 2048, respectively. Unlike UNet, nnU-net uses Leaky ReLU instead of ReLU and instance normalization instead of batch normalization. In this network, both input and output data are four-dimensional, with shapes of N×1×128×128 and N×2×128×128, respectively, where N is the number of input slices, with different slice numbers selected according to different segmentation tasks. When input data passes through the encoder, features are extracted and encoded. These features are then fed into the next encoder for further encoding and also used as input sequences for extracting global context information in the DT-CSA module. Similarly, the decoder receives information from the next layer's decoder, as well as cross-slice interest information from the DT-CSA module within the same layer.

[0086] In one embodiment, the DT-CSA Net implementation steps are as follows:

[0087] Step 1: Extract MRI features using the encoder at layer 0 of DT-CSA Net, denoted as F0;

[0088] Step 2: Send F0 into the DT-CSA module at level 0;

[0089] Step 3: The DT-CSA module dynamically selects meaningful adjacent slices for F0, and then segments the current slice based on the selected adjacent slices;

[0090] Step 4: Connect the output of the DT-CSA module with the features obtained from the upsampling of the next layer, and then upsample again. The operation for each layer is the same as Step 1 to Step 4.

[0091] Step 5: Finally, the output of the 0th layer decoder is processed by a 1×1 convolution to obtain the final image segmentation result.

[0092] In one embodiment, such as Figure 2 As shown, the implementation steps in the DT-CSA module are as follows:

[0093] Step 1: Before inputting data into the dynamic token selection and cross-slice attention module, the input slices need to be preprocessed to obtain the token matrix;

[0094] Step 2: Then input the token matrix into the DT-CSA module.

[0095] Step 3: In the DT-CSA module: First, there is a CSA block used to obtain the attention weight matrix. The attention weight matrix contains the correlation information between slices;

[0096] Step 4: Input the attention weight matrix into the DT block for token scoring and inverse transform sampling to obtain a simplified attention weight matrix. Then, use the obtained matrix to obtain the preliminary segmentation result.

[0097] Step 5: Input the preliminary segmentation results into subsequent linear mapping, nonlinear activation layers, and normalization. The output after passing through the DT-CSA module is represented as follows:

[0098] z = Layer_Norm(GELU(z) int W2+b2)+z int )

[0099] in:

[0100] z int =Layer_Norm(GELU(yW1+b1)+x)

[0101] y is the result obtained in step 4, w and b are learnable parameters, and x is the preprocessed data obtained in step 1.

[0102] In one embodiment, the CSA block module first converts the information of each slice into vectors through embedding. This invention refers to the resulting vectors as tokens, with each token corresponding to a slice, and each token containing information unique to its corresponding slice. After obtaining the tokens, the tokens are combined into a token matrix, and the relevant parameters Q, K, and V are obtained through an attention mechanism using the token matrix. The attention weight matrix A can then be calculated using these three parameters. The following are the specific implementation steps of the cross-slice attention module, including data slice preprocessing and the calculation of the attention matrix.

[0103] In one embodiment, the slice preprocessing step is as follows: Figure 3 As shown:

[0104] Step 1: First, divide a three-dimensional prostate MRI image of size h×w×c into c slices of size h×w. Each slice can be represented by a two-dimensional matrix xi∈Rh×w (where i=1,2,3,…,c).

[0105] Step 2: Encode all slice positions.

[0106] Step 3: Convert each slice matrix xi into a vector (i.e., token) through the embedding layer, and then combine all the tokens into a token matrix X.

[0107] In one embodiment, the steps for calculating the attention matrix are as follows:

[0108] The query Q, key K, and value V are obtained using the token matrix X, as shown in the following formula:

[0109] Q = XW Q

[0110] K = XW K

[0111] V = XW V

[0112] Attention matrix A is obtained through the attention mechanism:

[0113]

[0114] The element a of attention matrix A i,j The meaning is the magnitude of the influence of the j-th slice on the prediction when predicting the i-th slice, that is, the degree of correlation between the j-th slice and the prediction of the i-th slice.

[0115] In one embodiment, such as Figure 4As shown, the DT block module first scores the tokens using the attention matrices A and V calculated by the CSA block. Then, it trims the attention matrix A based on the token scores, removing redundant information to obtain a simplified attention matrix A_s. The following are the specific steps of dynamic token selection, including token scoring and inverse transform sampling.

[0116] In one embodiment, for token scoring, the attention weight matrices A and V calculated by the CSA block can be used, and the significance score of the j-th token when predicting the i-th slice can be calculated by substituting them into the following formula:

[0117]

[0118] In one embodiment, DTblock uses inverse transform sampling to select significant tokens to reduce computational costs. The specific steps of inverse transform sampling are as follows:

[0119] Step 1: Calculate the cumulative distribution function based on the significance score:

[0120]

[0121] Step 2: Invert CDF to obtain its inverse function:

[0122] Ψ(k)=CDF -1 (k)

[0123] Where k∈[0,1], the independent variable of CDF is the index i of each token, and the dependent variable is the corresponding probability.

[0124] Step 3: According to the inverse function of CDF, the purpose of sampling is to reduce computational cost. Processing more tokens means requiring more computational cost, so an upper limit needs to be set for the number of tokens to be sampled, denoted by K. A fixed sampling scheme is used. Sampling is performed K times. Since multiple probabilities in Ψ(k) may correspond to the same token number, a token may be sampled multiple times. If a token is sampled multiple times, it is only retained once. Therefore, the actual number of sampled slices K′ is often less than or equal to K. The sampled slices are the K′ slices that have the greatest impact on this prediction.

[0125] Step 4: After sampling and obtaining the indices of K′ important slices, use these indices to prune the attention matrix A. The pruned matrix is ​​the final simplified attention matrix A_s that can reduce the computational cost of prediction.

[0126] Step 5: Calculate the output Oj of the j-th slice:

[0127]

[0128] V o =X_o×W v_o

[0129] Where X_o is the tensor of the original input 3D image, and WV_o are the attention mechanism parameters. aj,i is the j-th row and i-th element of A_s, where each element is the influence weight of each slice on the current slice. V_o is a 3D image after linear transformation, vi is the i-th slice of V_o, and n is the number of input slices.

[0130] In one embodiment, in order to address the problem of class imbalance with small segmentation targets in segmentation tasks, the present invention provides a combination loss, the calculation formula of which is as follows.

[0131]

[0132] It is mainly composed of the cross-entropy loss function L BCE and DICE loss function L Dice Consequently, the cross-entropy loss function L BCE The formula is defined as follows:

[0133]

[0134] DICE loss function L Dice The formula is defined as follows:

[0135]

[0136] Where n is the current training iteration number, N is the total number of iterations, and y is the label. This is the segmentation result. The loss function places greater emphasis on using the cross-entropy loss function L in the early stages of training. BCE In the later stages of training, more emphasis is placed on using the DICE loss function L. Dice .

[0137] It is understood that the present invention designs a prostate MRI segmentation method called DT-CSANet. The dynamic token selection and cross-slice attention module DT-CSA in the DT-CSA Net network architecture are the key technologies of the present invention. The DT-CSA module has the function of paying attention to cross-slice level information while retaining high attention tokens (slice information) that contribute greatly to the network, which can eliminate the adverse effects of redundant information on the segmentation effect to a certain extent.

[0138] Understandably, in order to further improve the segmentation effect and alleviate the problem of high difficulty in segmenting small targets, this invention also designs a new combined loss function as a hyperparameter of the network. This combined loss function can make the segmentation network pay more attention to the foreground pixels of the image.

[0139] Based on this, compared to existing technologies, this invention not only takes into account its cross-slice-level information focus characteristics, but also designs a token selection module to further eliminate redundant information when analyzing adjacent slices. Specifically, when segmenting the prostate region of an MRI slice, it can dynamically select and incorporate information from adjacent slices that are significant for the current slice segmentation. Furthermore, this invention utilizes a combination loss mechanism to allow the network to focus more on foreground information in the image, effectively alleviating the problem of high difficulty in segmenting small targets.

[0140] In addition, such as Figure 5 As shown, one embodiment of the present invention also discloses a prostate MRI image segmentation device, the device comprising:

[0141] Acquisition module 110 is used to acquire MRI images of the prostate.

[0142] The segmentation module 120 is used to input the prostate MRI image into the prostate MRI segmentation network for segmentation processing to obtain the image segmentation result. The prostate MRI segmentation network is DT-CSA Net, which includes a dynamic token selection and cross-slice attention module DT-CSA. DT-CSA consists of a cross-slice attention block CSA block and a dynamic token selection module DT block. CSA block obtains cross-slice information of inter-slice relationships by introducing an attention module. DT block selects the most important image features for segmentation processing in the prostate MRI image through token scoring and sampling, and removes redundant information in the prostate MRI image.

[0143] The prostate MRI image segmentation device of this invention is used to execute the prostate MRI image segmentation method in the above embodiments. Its specific processing procedure is the same as that of the prostate MRI image segmentation method in the above embodiments, and will not be described in detail here.

[0144] In addition, such as Figure 6 As shown, one embodiment of the present invention also discloses an electronic device, including: at least one processor 210; at least one memory 220 for storing at least one program; when the at least one program is executed by the at least one processor 210, it implements the prostate MRI image segmentation method as in any of the preceding embodiments.

[0145] In addition, one embodiment of the present invention discloses a computer-readable storage medium storing computer-executable instructions for performing the prostate MRI image segmentation method as described in any of the preceding embodiments.

[0146] The system architecture and application scenarios described in the embodiments of this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of system architecture and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.

[0147] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0148] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0149] The terms “component,” “module,” “system,” etc., used in this specification are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process or execution thread, and components may be located on a single computer or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems via signals).

Claims

1. A method for segmenting prostate MRI images, comprising: Obtain MRI images of the prostate; The prostate MRI image is input into a prostate MRI segmentation network for segmentation processing to obtain image segmentation results. The prostate MRI segmentation network is a DT-CSA Net, which includes a dynamic token selection and cross-slice attention module DT-CSA. The DT-CSA consists of a cross-slice attention block (CSA block) and a dynamic token selection module (DT block). The CSA block obtains cross-slice information about inter-slice relationships by introducing an attention module. The DT block selects the most important image features for segmentation processing in the prostate MRI image through token scoring and sampling, and removes redundant information in the prostate MRI image. The steps for implementing the DT-CSA module are as follows: The token matrix is ​​obtained by preprocessing the input slice; The token matrix is ​​input into the DT-CSA module, and the attention weight matrix is ​​obtained using the CSA block. The attention weight matrix contains the correlation information between slices. The attention weight matrix is ​​input into the DT block for token scoring and inverse transformation sampling to obtain a simplified attention weight matrix; The preliminary segmentation result is obtained using the simplified weight matrix. This preliminary segmentation result is then input into a linear mapping and nonlinear activation layer, and normalized. The output after passing through the DT-CSA module is as follows: in: y represents the initial segmentation result. , , and Here are the learnable parameters, and x is the token matrix; The token scoring includes the following steps: Using the attention weight matrices A and V calculated from the CSA block, substitute them into the following formula to calculate the significance score of the j-th token when predicting the i-th slice: in, These are the significance scores, elements of the attention matrix A. The meaning is the magnitude of the influence of the j-th slice on the prediction when predicting the i-th slice, that is, the degree of correlation between the j-th slice and the prediction of the i-th slice; The inverse transform sampling includes the following steps: Calculate the cumulative distribution function based on the significance score: Inverting CDF yields its inverse function: Where k∈[0,1], the independent variable of CDF is the index i of each token, and the dependent variable is the corresponding probability; The upper limit of the number of sampling tokens is set according to the inverse function of CDF, denoted by K, and a fixed sampling scheme is used. Sampling K times; Since multiple probabilities in Ψ(k) correspond to the same token number, a token may be sampled multiple times. If a token is sampled multiple times, it is only retained once. Therefore, the actual number of slices sampled, K′, is often less than or equal to K. The sampled slices are the K′ slices that have the greatest impact on this prediction. After sampling and obtaining the indices of K′ important slices, the attention matrix A is clipped using the indices. The clipped attention matrix is ​​the simplified attention matrix A_s. Calculate the output Oj of the j-th slice: Where X_o is the tensor of the original input 3D graph, Wv_o are the attention mechanism parameters, and a j,i It is the j-th row and i-th element of A_s, where each element is the influence weight of each slice on the current slice, and v_o is a 3D image after linear transformation. i Let be the i-th slice of v_o, and m be the number of input slices.

2. The method according to claim 1, characterized in that, The steps for implementing the DT-CSA Net are as follows: The MRI features are extracted using the encoder at layer 0 of the DT-CSA Net, denoted as F0; The F0 is sent to the 0th layer DT-CSA module; The DT-CSA module dynamically selects meaningful adjacent slices for F0, and segments the current slice based on the selected adjacent slices; The output of the DT-CSA module is concatenated with the features obtained by upsampling in the next layer, and then upsampled again. The operation for each layer is the same as the above steps. The image segmentation result is obtained by passing the output of the 0th layer decoder through a 1×1 convolution.

3. The method according to claim 1, characterized in that, The CSA block implementation steps include data slice preprocessing and calculation of the attention matrix.

4. The method according to claim 3, characterized in that, The data slice preprocessing includes the following steps: A three-dimensional prostate MRI image of size h×w×c is divided into c slices of size h×w, and each slice is represented by a two-dimensional matrix x. i ∈R h×w Let i = 1, 2, 3, ..., c; Position encoding is performed on all the slices; Each of the slice matrices x i All tokens are converted into tokens through the embedding layer, and all the tokens are combined into a token matrix X.

5. The method according to claim 4, characterized in that, The calculation of the attention matrix includes the following steps: The query Q, key K, and value V are obtained using the token matrix X, using the following formula: Attention matrix A is obtained through the attention mechanism: Elements of attention matrix A The meaning is the magnitude of the influence of the j-th slice on the prediction when predicting the i-th slice, that is, the degree of correlation between the j-th slice and the prediction of the i-th slice.

6. The method according to claim 5, characterized in that, The DT block implementation steps include token scoring and inverse transform sampling.

7. The method according to claim 1, characterized in that, The combined loss function used in the DT-CSA Net is calculated using the following formula: Combination loss function Including cross-entropy loss function and DICE loss function Cross-entropy loss function The formula is defined as follows: DICE loss function The formula is defined as follows: Where n is the current training iteration number, N is the total number of iterations, and y is the label. This is the segmentation result.

Citation Information

Patent Citations

  • Prostate MRI (Magnetic Resonance Imaging) image segmentation method and system based on adaptive multi-scale Transform optimization

    CN115272170A

  • Method and system for improved image segmentation

    US20090226060A1