A medical image segmentation method based on multiple attention
By introducing multiple attention mechanisms into medical image segmentation, combined with display attenuation, cross-slice and global local interaction modules, the problem of ignoring cross-slice information and being unable to handle anisotropic spatial resolution in the existing technology is solved, significantly improving prostate Accuracy and consistency of MR image segmentation.
Patent Information
- Application Number
- CN202410463105.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-04-17
AI Technical Summary
Existing medical image segmentation methods ignore cross-slice information and cannot effectively handle anisotropic spatial resolution when processing prostate MR images, resulting in inconsistent segmentation results and low accuracy.
A medical image segmentation method based on multiple attention is adopted to gradually extract and fuse features through display attenuation attention module, cross-slice attention module and global local interaction module, and use multi-scale token aggregation and self-attention mechanism to learn cross-slice information and improve segmentation accuracy.
It significantly improves the accuracy and consistency of medical image segmentation, can better handle the anisotropic characteristics of prostate MR images, improves segmentation performance, and obtains more accurate global and local feature representation.
Smart Images

Figure CN118071774B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image segmentation, and in particular to a medical image segmentation method based on multiple attentions. Background Art
[0002] Multiparametric magnetic resonance imaging is now the preferred non-invasive imaging technique for pre-biopsy diagnosis of prostate cancer. Therefore, accurate and reliable segmentation of the prostate using magnetic resonance (MR) imaging is essential for the auxiliary diagnosis and adjuvant treatment of prostate cancer. Even for experienced radiologists, manual delineation is still challenging and time-consuming, so the development of automated methods has great clinical value.
[0003] Due to the strong task-oriented learning capabilities demonstrated by deep learning, deep neural networks have been widely used in various medical image analysis tasks such as prostate image segmentation. However, the task of medical image segmentation is challenging because prostate MR images often have large variability in gland size and shape, heterogeneity in signal intensity around the endorectal coil, low contrast between the gland and adjacent structures, and anisotropic spatial resolution. Existing two-dimensional medical image segmentation methods do not fully consider or systematically learn the available cross-slice information, so they may ignore important structural information of the prostate, resulting in inconsistent segmentation results. Existing three-dimensional medical image segmentation networks are also limited in their application to prostate MR images. They use three-dimensional convolution methods designed for nearly isotropic images and cannot handle the anisotropic spatial resolution of prostate MR images, i.e., high intra-slice resolution and low inter-slice resolution. Therefore, existing medical image segmentation methods cannot accurately segment the objects in the image. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a medical image segmentation method based on multiple attentions, which can improve the accuracy of medical image segmentation.
[0005] In a first aspect, an embodiment of the present invention provides a medical image segmentation method based on multiple attentions, and the medical image segmentation method based on multiple attentions includes:
[0006] Acquire a medical image to be segmented, and input the medical image to be segmented into an encoder comprising a plurality of display attenuation attention modules to obtain encoding features output by each of the display attenuation attention modules;
[0007] Inputting the encoded features output by each display attenuation attention module into a cross-slice attention module to obtain a cross-slice feature corresponding to the display attenuation attention module;
[0008] Inputting the encoded features output by the display attenuation attention module at the bottom layer of the encoder into the global and local interaction module to obtain global and local features;
[0009] The global local features and the cross-slice features corresponding to the display attenuation attention module in the bottom layer of the encoder are summed element by element to obtain the input features of the decoder module corresponding to the display attenuation attention module in the bottom layer; the input features of the decoder are decoded to obtain decoded features, and the decoded features are upsampled to obtain upsampled features; the upsampled features and the cross-slice features corresponding to the display attenuation attention module in the upper layer of the display attenuation attention module in the bottom layer are summed element by element to obtain the input features of the decoder module corresponding to the display attenuation attention module in the upper layer, until the decoded features output by the top-layer decoder module in the decoder are obtained;
[0010] The decoded features output by the top-level decoder module are upsampled to obtain final features, and the final features are input into the segmentation head to obtain the final medical image segmentation result.
[0011] Compared with the prior art, the first aspect of the present invention has the following beneficial effects:
[0012] The method inputs the medical image to be segmented into an encoder including multiple display attenuation attention modules to obtain the encoded features output by each display attenuation attention module. The display attenuation attention module can enrich the feature representation and lay the foundation for accurate segmentation of the medical image in the later stage. The encoded features output by each display attenuation attention module are input into the cross-slice attention module to obtain the cross-slice features corresponding to the display attenuation attention module. The multiple attention mechanisms can be applied to the deep feature maps of different scales to learn all the cross-slice information on the anisotropic medical image, thereby improving the segmentation performance at each position in the image. The encoded features output by the bottom-level display attenuation attention module in the encoder are input into the global and local interaction module to obtain the global-local features. The global and local interaction module can obtain more accurate global and local feature representations, further improving the accuracy of medical image segmentation. The global-local features and the corresponding cross-slice features are element-by-element summed, and the operation is repeated until the decoded features output by the top-level decoder module in the decoder are obtained, and then the decoded features output by the top-level decoder module are upsampled to obtain the final features, and the final features are input into the segmentation head to obtain the final medical image segmentation result, which can improve the accuracy of medical image segmentation.
[0013] According to some embodiments of the present invention, the display attenuation attention module includes a local perception block, a retention self-attention and a multi-scale token aggregation feedforward network, and the medical image to be segmented is input to an encoder including multiple display attenuation attention modules to obtain the encoded features output by each display attenuation attention module, including:
[0014] Inputting the medical image to be segmented into the encoder of each display attenuated attention module, and using the local perception block to perform position encoding on the medical image to be segmented to obtain encoding position information;
[0015] The encoded position information is layer-normalized and the layer-normalized encoded position information is input into the preservative self-attention, and the display attenuation is extended to a bidirectional and two-dimensional form aligned with the image structure by the preservative self-attention and spatial distance prior knowledge is introduced into the encoded position information to obtain the output result of the preservative self-attention;
[0016] Adding the output result of the retention self-attention to the encoding position information element by element to obtain an element-by-element addition result, and performing layer normalization on the element-by-element addition result to obtain a layer-normalized result;
[0017] Inputting the layer normalized result into the multi-scale token aggregation feed-forward network to perform multi-scale token aggregation, and obtaining the output result of the multi-scale token aggregation feed-forward network;
[0018] The output result of the multi-scale token aggregation feedforward network is added element by element to the element-by-element addition result to obtain the encoding features output by each display attenuation attention module.
[0019] According to some embodiments of the present invention, the output result of the preservative self-attention is obtained by extending the display attenuation to a bidirectional, two-dimensional form aligned with the image structure and introducing spatial distance prior knowledge into the encoded position information in the following manner:
[0020]
[0021]
[0022]
[0023]
[0024] in, The normalized encoding position information of the representation layer, , , Represent the query vector, key vector and numerical vector respectively, represents the number of tokens, represents the nth token, , represents the learnable parameters, express The complex conjugate of represents element-wise dot product, represents a natural constant, represents the imaginary unit, represents a constant, Represents the two-dimensional coordinates of the nth token, represents the exponential decay of the Manhattan distance between the corresponding token pair of each element at their respective positions, represents the attenuation rate, Represents transpose , Softmax represents the Softmax activation function, and ReSA represents the output result of the preserved self-attention.
[0025] According to some embodiments of the present invention, the layer normalization result is input into the multi-scale token aggregation feedforward network to perform multi-scale token aggregation, thereby obtaining an output result of the multi-scale token aggregation feedforward network:
[0026]
[0027]
[0028]
[0029] Among them, MSTA-FFN represents the output result of the multi-scale token aggregation feedforward network, The result after layer normalization is represented. represents 1×1 convolution, The kernel size is The depth convolution of Indicates that the kernel size is The result obtained after deep convolution processing is represents the result obtained after deep convolution with a kernel size of 1. represents the result obtained after deep convolution with a kernel size of 3. represents the result obtained after deep convolution with a kernel size of 5. Indicates channel cascade operation, Represents the residual connection operation.
[0030] According to some embodiments of the present invention, the cross-slice attention module includes semantic attention, position attention and slice attention, and the encoding features output by each display attenuation attention module are input into the cross-slice attention module to obtain the cross-slice features corresponding to the display attenuation attention module, including:
[0031] Input the encoded features output by each display attenuation attention module into a cross-slice attention module, use the semantic attention to generate a semantic attention map, and use the position attention to generate a position attention map;
[0032] Adding the semantic attention map and the position attention map element by element to obtain a first result;
[0033] Inputting the first result into an activation function to obtain a second result;
[0034] Multiplying the second result by the encoded feature output by the display attenuation attention module element by element to obtain a third result;
[0035] Adding the third result and the encoded feature output by the display attenuation attention module element by element to obtain a fourth result;
[0036] The slice attention is used to generate a slice attention map from the fourth result, and the slice attention map is element-wise multiplied with the fourth result to obtain a cross-slice feature corresponding to the display attenuation attention module.
[0037] According to some embodiments of the present invention, the global and local interaction module includes a global interaction block and a local interaction block, and the encoding features output by the display attenuation attention module at the bottom layer of the encoder are input into the global and local interaction module to obtain global and local features, including:
[0038] Input the encoded features output by the display attenuation attention module at the bottom layer of the encoder into the global and local interaction module, and use a convolution layer to obtain smooth features;
[0039] Inputting the smooth features into the global interaction block, using the global interaction block to capture the long-range dependency of the smooth features to obtain global features;
[0040] Inputting the smooth feature into the local interaction block, and using the local interaction block to aggregate local area features to obtain local features;
[0041] Adding the global feature and the local feature element by element to obtain a fused feature;
[0042] The fused features are input into multiple convolutional layers to obtain convolution results, and residual operations are performed on the convolution results and the fused features to obtain global local features.
[0043] According to some embodiments of the present invention, the local interaction block includes an intrinsic codebook and a scaling factor of a visual center, and the smoothing feature is input into the local interaction block, and the local area features are aggregated using the local interaction block to obtain the local feature, including:
[0044] Inputting the smooth features into a set of convolutional layers to obtain convolutional smooth features;
[0045] Inputting the convolution smoothing feature into a CBR block including a 3×3 convolution, a batch normalization layer, and a ReLU activation function to obtain a coded smoothing feature;
[0046] The coding smoothness feature is calculated using the inherent codebook and the scaling factor of the visual center to obtain complete information;
[0047] Performing batch normalization, ReLU activation function and average calculation on the complete information to obtain an average calculation result;
[0048] Passing the average calculation result through a fully connected layer and a convolutional layer to obtain key features;
[0049] The key feature and the smooth feature are multiplied element by element to obtain a multiplication result, and the multiplication result and the smooth feature are added element by element to obtain a local feature.
[0050] In a second aspect, an embodiment of the present invention further provides a medical image segmentation system based on multiple attentions, and the medical image segmentation system based on multiple attentions includes:
[0051] A feature encoding unit, used for acquiring a medical image to be segmented, and inputting the medical image to be segmented into an encoder comprising a plurality of display attenuation attention modules to obtain an encoding feature output by each of the display attenuation attention modules;
[0052] A cross-slice feature acquisition unit, used to input the encoding feature output by each display attenuation attention module into the cross-slice attention module to obtain a cross-slice feature corresponding to the display attenuation attention module;
[0053] A global-local interaction unit, configured to input the encoded features output by the display attenuation attention module at the bottom layer of the encoder into a global and local interaction module to obtain global-local features;
[0054] A feature decoding unit is used to sum the global local features and the cross-slice features corresponding to the display attenuation attention module in the bottom layer of the encoder element by element to obtain the input features of the decoder module corresponding to the display attenuation attention module in the bottom layer; perform a decoding operation on the input features of the decoder to obtain a decoded feature, and upsample the decoded feature to obtain an upsampled feature; sum the upsampled feature and the cross-slice features corresponding to the display attenuation attention module in the upper layer of the display attenuation attention module in the bottom layer element by element to obtain the input features of the decoder module corresponding to the display attenuation attention module in the upper layer, until the decoding features output by the top-level decoder module in the decoder are obtained;
[0055] The image segmentation unit is used to upsample the decoded features output by the top-level decoder module to obtain final features, and input the final features into the segmentation head to obtain the final medical image segmentation result.
[0056] In the third aspect, an embodiment of the present invention also provides a medical image segmentation device based on multiple attentions, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute a medical image segmentation method based on multiple attentions as described above.
[0057] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute a medical image segmentation method based on multiple attention as described above.
[0058] It can be understood that the beneficial effects of the second to fourth aspects compared with the related art are the same as the beneficial effects of the first aspect compared with the related art. Please refer to the relevant description in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0060] Figure 1 is a flow chart of a medical image segmentation method based on multiple attentions according to an embodiment of the present invention;
[0061] Figure 2 is a schematic diagram of the overall structure of a prostate MR image segmentation method based on multiple attentions according to another embodiment of the present invention;
[0062] Figure 3 is a schematic diagram of an explicit attenuation attention module according to an embodiment of the present invention;
[0063] Figure 4 is a schematic diagram of a multiple cross-slice attention module according to an embodiment of the present invention;
[0064] Figure 5 is a schematic diagram of a global and local interaction module according to an embodiment of the present invention;
[0065] Figure 6 is a visualized segmentation result diagram of a prostate MR image segmentation dataset according to an embodiment of the present invention;
[0066] Figure 7 It is a structural diagram of a medical image segmentation system based on multiple attentions according to an embodiment of the present invention. DETAILED DESCRIPTION
[0067] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0068] In the description of the present invention, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0069] In the description of the present invention, it should be understood that descriptions involving orientation, such as orientation or positional relationship indicated as up, down, etc., are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0070] In the description of the present invention, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific content of the technical solution.
[0071] Due to the strong task-oriented learning capabilities demonstrated by deep learning, deep neural networks have been widely used in various medical image analysis tasks such as prostate image segmentation. However, the task of medical image segmentation is challenging because prostate MR images often have large variability in gland size and shape, heterogeneity in signal intensity around the endorectal coil, low contrast between the gland and adjacent structures, and anisotropic spatial resolution. Existing two-dimensional medical image segmentation methods do not fully consider or systematically learn the available cross-slice information, so they may ignore important structural information of the prostate, resulting in inconsistent segmentation results. Existing three-dimensional medical image segmentation networks are also limited in their application to prostate MR images. They use three-dimensional convolution methods designed for nearly isotropic images and cannot handle the anisotropic spatial resolution of prostate MR images, i.e., high intra-slice resolution and low inter-slice resolution. Therefore, existing medical image segmentation methods cannot accurately segment the objects in the image.
[0072] To solve the above problems, the present invention inputs the medical image to be segmented into an encoder including multiple display attenuation attention modules to obtain the encoded features output by each display attenuation attention module. The display attenuation attention module can enrich the feature representation and lay the foundation for accurate segmentation of medical images in the later stage; the encoded features output by each display attenuation attention module are input into the cross-slice attention module to obtain the cross-slice features corresponding to the display attenuation attention module, and the multiple attention mechanism can be applied to the deep feature maps of different scales to learn all cross-slice information on the anisotropic medical image, thereby improving the segmentation performance at various positions in the image; the encoded features output by the bottom-level display attenuation attention module in the encoder are input into the global and local interaction module to obtain the global-local features. The global and local interaction module can obtain more accurate global and local feature representations, further improving the accuracy of medical image segmentation; the global-local features and the corresponding cross-slice features are element-by-element summed, and the operation is repeated until the decoded features output by the top-level decoder module in the decoder are obtained, and then the decoded features output by the top-level decoder module are upsampled to obtain the final features, and the final features are input into the segmentation head to obtain the final medical image segmentation result, which can improve the accuracy of medical image segmentation.
[0073] Reference Figure 1 The embodiment of the present invention provides a medical image segmentation method based on multiple attentions. The medical image segmentation method based on multiple attentions includes but is not limited to steps S100 to S500, wherein:
[0074] Step S100, obtaining a medical image to be segmented, and inputting the medical image to be segmented into an encoder including a plurality of display attenuation attention modules to obtain encoding features output by each display attenuation attention module;
[0075] Step S200: input the encoded features output by each display attenuation attention module into the cross-slice attention module to obtain the cross-slice features corresponding to the display attenuation attention module;
[0076] Step S300, input the encoded features output by the display attenuation attention module at the bottom layer of the encoder into the global and local interaction module to obtain global and local features;
[0077] Step S400, summing the global local features and the cross-slice features corresponding to the bottom-level display attenuation attention module in the encoder element by element, and obtaining the input features of the decoder module corresponding to the bottom-level display attenuation attention module; performing a decoding operation on the input features of the decoder to obtain a decoded feature, and upsampling the decoded feature to obtain an upsampled feature; summing the upsampled feature and the cross-slice features corresponding to the upper-layer display attenuation attention module of the bottom-level display attenuation attention module element by element, and obtaining the input features of the decoder module corresponding to the upper-layer display attenuation attention module, until obtaining the decoded features output by the top-level decoder module in the decoder;
[0078] Step S500: upsample the decoded features output by the top-level decoder module to obtain final features, and input the final features into the segmentation head to obtain the final medical image segmentation result.
[0079] In this embodiment, in order to enrich the feature representation, this embodiment obtains a medical image to be segmented, and inputs the medical image to be segmented into an encoder including multiple display attenuation attention modules to obtain the encoded features output by each display attenuation attention module; in order to improve the segmentation performance at each position in the image, this embodiment inputs the encoded features output by each display attenuation attention module into a cross-slice attention module to obtain the cross-slice features corresponding to the display attenuation attention module; in order to obtain a more accurate global and local feature representation, this embodiment inputs the encoded features output by the bottom-level display attenuation attention module in the encoder into a global and local interaction module to obtain the global-local features; in order to improve the accuracy of medical image segmentation, this embodiment integrates the global-local features and the The cross-slice features corresponding to the bottom-level display attenuation attention module in the encoder are summed element by element to obtain the input features of the decoder module corresponding to the bottom-level display attenuation attention module; the input features of the decoder are decoded to obtain decoded features, and the decoded features are upsampled to obtain upsampled features; the upsampled features and the cross-slice features corresponding to the display attenuation attention module of the upper layer of the bottom-level display attenuation attention module are summed element by element to obtain the input features of the decoder module corresponding to the upper layer of the display attenuation attention module, until the decoding features output by the top-level decoder module in the decoder are obtained, the decoding features output by the top-level decoder module are upsampled to obtain the final features, and the final features are input to the segmentation head to obtain the final medical image segmentation result.
[0080] In some embodiments, the display attenuation attention module includes a local perception block, a preservative self-attention, and a multi-scale token aggregation feedforward network, and the medical image to be segmented is input into an encoder including multiple display attenuation attention modules, and the encoded features output by each display attenuation attention module are obtained, including:
[0081] The medical image to be segmented is input into the encoder of each display attenuated attention module, and the local perception block is used to perform position encoding on the medical image to be segmented to obtain the encoded position information;
[0082] The encoded position information is layer-normalized and the layer-normalized encoded position information is input into the preservative self-attention. The display attenuation is extended to a bidirectional and two-dimensional form aligned with the image structure through the preservative self-attention and the spatial distance prior knowledge is introduced into the encoded position information to obtain the output result of the preservative self-attention.
[0083] The output result of the retention self-attention is added element by element to the encoded position information to obtain the element-by-element addition result, and the element-by-element addition result is layer-normalized to obtain the layer-normalized result;
[0084] Input the layer normalized result into the multi-scale token aggregation feed-forward network to perform multi-scale token aggregation, and obtain the output result of the multi-scale token aggregation feed-forward network;
[0085] The output of the multi-scale token aggregation feed-forward network is added element-wise to the element-wise addition result to obtain the encoded features of the output of each display decay attention module.
[0086] In this embodiment, the local perception block implicitly encodes position information through the convolution operator, which provides flexible position encoding for the prostate MR image segmentation model and improves the performance. The preservative self-attention extends the explicit attenuation to a bidirectional and two-dimensional form aligned with the image structure and introduces spatial prior knowledge for visual tasks. Then the multi-scale token aggregation feedforward network introduces three parallel deep convolutions of different scales, each of which processes one-third of the channels in the hidden layer, so that the rich channel representation can be more fully utilized.
[0087] In some embodiments, the output result of the preservative self-attention is obtained by extending the display attenuation to a bidirectional, two-dimensional form aligned with the image structure and introducing spatial distance prior knowledge to encode the position information in the following manner:
[0088]
[0089]
[0090]
[0091]
[0092] in, The normalized encoding position information of the representation layer, , , Represent the query vector, key vector and numerical vector respectively, represents the number of tokens, represents the nth token, , represents the learnable parameters, express The complex conjugate of represents element-wise dot product, represents a natural constant, represents the imaginary unit, represents a constant, Represents the two-dimensional coordinates of the nth token, represents the exponential decay of the Manhattan distance between the corresponding token pair of each element at their respective positions, represents the attenuation rate, Represents transpose , Softmax represents the Softmax activation function, and ReSA represents the output result of the preserved self-attention.
[0093] In this embodiment, by extending the explicit attenuation to a bidirectional, two-dimensional form aligned with the image structure and introducing spatial prior knowledge for visual tasks, it is possible to lay a data foundation for generating rich feature representations.
[0094] In some embodiments, the layer normalized result is input into the multi-scale token aggregation feedforward network to perform multi-scale token aggregation in the following manner to obtain the output result of the multi-scale token aggregation feedforward network:
[0095]
[0096]
[0097]
[0098] Among them, MSTA-FFN represents the output result of the multi-scale token aggregation feedforward network, The result after layer normalization is represented. represents 1×1 convolution, The kernel size is The depth convolution of Indicates that the kernel size is The result obtained after deep convolution processing is represents the result obtained after deep convolution with a kernel size of 1. represents the result obtained after deep convolution with a kernel size of 3. represents the result obtained after deep convolution with a kernel size of 5. Indicates channel cascade operation, Represents the residual connection operation.
[0099] In this embodiment, a multi-scale token aggregation operation is performed to generate a rich feature representation.
[0100] In some embodiments, the cross-slice attention module includes semantic attention, position attention, and slice attention. The encoded features output by each display attenuation attention module are input into the cross-slice attention module to obtain the cross-slice features corresponding to the display attenuation attention module, including:
[0101] The encoded features output by each display attenuation attention module are input into the cross-slice attention module, semantic attention is used to generate a semantic attention map, and position attention is used to generate a position attention map;
[0102] Add the semantic attention map and the position attention map element by element to get the first result;
[0103] Input the first result into the activation function to obtain the second result;
[0104] Multiply the second result by the encoded feature output by the display attenuation attention module element by element to obtain a third result;
[0105] Add the third result and the encoded feature output by the display attenuation attention module element by element to obtain a fourth result;
[0106] Slice attention is used to generate a slice attention map from the fourth result, and the slice attention map is element-wise multiplied with the fourth result to obtain a cross-slice feature corresponding to the display attenuation attention module.
[0107] In some embodiments, the global and local interaction module includes a global interaction block and a local interaction block, and the encoded features output by the bottom-level display attenuation attention module in the encoder are input into the global and local interaction module to obtain global and local features, including:
[0108] The encoded features output by the display attenuation attention module in the bottom layer of the encoder are input into the global and local interaction modules, and the convolutional layer is used to obtain smooth features;
[0109] The smooth features are input into the global interaction block, and the global interaction block is used to capture the long-range dependencies of the smooth features to obtain the global features;
[0110] The smooth features are input into the local interaction block, and the local area features are aggregated by the local interaction block to obtain the local features;
[0111] Add the global features and local features element by element to obtain the fused features;
[0112] The fused features are input into multiple convolutional layers to obtain the convolution results, and the convolution results and the fused features are subjected to residual operation to obtain the global local features.
[0113] In this embodiment, the global interaction block only needs linear complexity to capture the long-range dependencies of features, and the local interaction block uses a learnable visual center mechanism to aggregate local area features. The two interact and fuse to obtain more accurate global and local feature representations.
[0114] In some embodiments, the local interaction block includes an intrinsic codebook and a scaling factor of the visual center, the smooth feature is input to the local interaction block, and the local area features are aggregated using the local interaction block to obtain the local features, including:
[0115] Input the smoothed features into a set of convolutional layers to obtain convolutional smoothed features;
[0116] The convolution smoothed features are input into a CBR block containing a 3×3 convolution, a batch normalization layer, and a ReLU activation function to obtain coded smoothed features;
[0117] The coded smooth features are calculated using the inherent codebook and the scaling factor of the visual center to obtain complete information;
[0118] The complete information is batch normalized, ReLU activated and averaged to obtain the average calculation result;
[0119] The average calculation results are passed through the fully connected layer and the convolutional layer to obtain the key features;
[0120] The key feature and the smooth feature are multiplied element by element to obtain the multiplication result, and the multiplication result and the smooth feature are added element by element to obtain the local feature.
[0121] In this embodiment, the coded smoothing features are calculated by using an inherent codebook and a scaling factor of the visual center to obtain complete information, and the complete information is batch normalized, ReLU activation function and averaged to obtain an average calculation result. The average calculation result is passed through a fully connected layer and a convolutional layer to obtain key features. This embodiment can highlight the key features and provide effective data for subsequent image segmentation, thereby improving the segmentation accuracy of medical images.
[0122] To facilitate understanding by those skilled in the art, a set of best embodiments is provided below:
[0123] This embodiment proposes a multi-attention guided hierarchical U-shaped encoder and decoder network for performing accurate and robust segmentation of prostate MR images. Specifically, an explicit attenuation attention module is first used to introduce spatial distance prior knowledge into the encoding process, and a multi-scale token aggregation operation is performed to generate rich feature representations. Secondly, multiple cross-slice attention modules are introduced in the jump connection, and multiple attention mechanisms are applied to deep feature maps of different scales to learn all cross-slice information on anisotropic MR images, thereby improving the segmentation performance at various locations of the prostate. Finally, a global and local interaction module that can interactively fuse long-distance dependencies and local context information is used to obtain more accurate global features and local feature representations, thereby further improving the accuracy of prostate segmentation. Specifically include the following contents:
[0124] 1. The data enhancement strategies of random rotation, random flipping and gamma transformation are used to process the input prostate MR images to obtain enhanced prostate MR images.
[0125] It should be noted that the data enhancement strategies of random rotation, random flipping and gamma transformation in this embodiment are all existing technologies and are not described in detail in this embodiment. This embodiment includes but is not limited to segmenting prostate MR images and can also be used for other medical image segmentation.
[0126] 2. If Figure 2 As shown in the encoder part on the left, the enhanced image is input into the encoder for feature extraction, where EDA represents the explicit attenuation attention module, Conv+BN+RcLU represents the decoder module, and MCSA represents the cross-slice attention module. Figure 2 The short, medium-gray downward arrows indicate downsampling. Figure 2 The upward dashed arrow in the figure indicates the use of the upper, GLI indicates the global-local interaction module, and the plus sign in the figure indicates element-by-element addition. The encoder adopts a four-stage hierarchical architecture, each stage consists of a convolutional layer and several sequentially stacked explicit attenuation attention modules. The specific structure is as follows Figure 3 As shown, DWConv represents deep convolution, LN represents layer normalization, Figure 3 The multiplication sign in represents matrix multiplication. Figure 3 The plus sign in represents element-wise addition. The prostate MR image first passes through a convolutional layer consisting of two 3×3 convolutions with a stride of 2 to generate rich local information, and then 2, 2, 8, and 2 explicit attenuation attention modules are stacked in each stage for feature conversion and extraction.
[0127] The explicit attenuated attention module consists of a local perception block that encodes relative position information, a preservative self-attention that introduces spatial distance priors through explicit attenuation, and a feed-forward network that performs multi-scale token aggregation. The local perception block implicitly encodes position information through a convolution operator, providing flexible position encoding and improving performance for the prostate MR image segmentation model, which is defined as:
[0128]
[0129] in, represents the output of the local perception block, represents the input features of the current stage (i.e., the local information generated by the convolutional layer consisting of two 3×3 convolutions with a stride of 2), represents a depthwise convolution with zero padding and a 3×3 kernel size.
[0130] Next, the preservative self-attention extends the explicit attenuation to a bidirectional, two-dimensional form aligned with the image structure and introduces spatial prior knowledge for visual tasks. The operation process can be expressed as:
[0131]
[0132]
[0133]
[0134]
[0135] in, The normalized encoding position information of the representation layer, , , Represent the query vector, key vector and numerical vector respectively, represents the number of tokens, represents the nth token, , represents the learnable parameters, express The complex conjugate of represents element-wise dot product, represents a natural constant, represents the imaginary unit, represents a constant, Represents the two-dimensional coordinates of the nth token, represents the exponential decay of the Manhattan distance between the corresponding token pair of each element at their respective positions, represents the attenuation rate, Represents transpose , Softmax represents the Softmax activation function, and ReSA represents the output result of the preserved self-attention.
[0136] Next, the multi-scale token aggregation feedforward network introduces three parallel depthwise convolutions of different scales, each of which processes one-third of the channels in the hidden layer, thus making better use of the rich channel representation, which is defined as:
[0137]
[0138]
[0139]
[0140] Among them, MSTA-FFN represents the output of the multi-scale token aggregation feedforward network, The result after layer normalization is represented. represents 1×1 convolution, The kernel size is The depth convolution of Indicates that the kernel size is The result obtained after deep convolution processing is represents the result obtained after deep convolution with a kernel size of 1. represents the result obtained after deep convolution with a kernel size of 3. represents the result obtained after deep convolution with a kernel size of 5. Indicates channel cascade operation, represents the residual connection operation. Therefore, the overall processing flow of the explicit attenuation attention module can be expressed as:
[0141]
[0142]
[0143]
[0144] in, , and Respectively represent The output features of the local perception block, the preserved self-attention and the overall explicit decay attention modules of the modules. LN represents layer normalization.
[0145] 3. The encoded features of each level obtained in step 2 are input into the skip connection processing flow. Multiple cross-slice attention modules are used in the skip connection to learn all cross-slice information on the anisotropic MR image. The specific structure is as follows: Figure 4 As shown. The multiple cross-slice attention modules calculate the semantic, position and slice attention maps in turn to weight the input feature map, thereby obtaining a refined feature map, which can be expressed as:
[0146]
[0147]
[0148]
[0149] in, represents the input features, , and Represent the output results of semantic attention, position attention and slice attention respectively, and Indicates the intermediate result, represents the sigmoid activation function, represents element-wise multiplication, Represents the cross-slice feature representation of the output.
[0150] Semantic attention aims to focus on the important semantic information of the feature maps of all slices. First, global average pooling is used to compress the input feature map dimension, collect different information about the features to achieve better semantic attention, and ensure that the semantic attention weights on a single channel at different spatial positions within and between slices are the same. Secondly, the global average pooled features are input into a multi-layer perceptron, and a batch normalization layer is used to adjust the scale of the output to generate a semantic attention map. These operations can be expressed as:
[0151]
[0152] in, represents the batch normalization layer, represents a multi-layer perceptron, Represents a global average pooling operation.
[0153] Position attention aims to focus on the location of important information on each slice in the volume and emphasize or suppress features at different spatial locations. Specifically, a 1×1 convolution is used to integrate and compress the input feature map in dimension. Next, two 3×3 dilated convolutions are applied to effectively utilize contextual information. Finally, a 1×1 convolution is used again to simplify the features, and a batch normalization layer is used to rescale the position attention map. The above operation can be written as:
[0154]
[0155] in, represents the convolution operation, represents the convolution kernel size, Represents the expansion rate.
[0156] Slice attention aims to compute which slices of the image are more likely to contain important information related to the intended task and suppress features that may interfere with the prediction of a given slice. At the same time, the slice uncertainty block can not only improve performance as a regularization method, but also capture the arbitrary uncertainty inherent in the input data. First, the input features are subjected to maximum pooling and average pooling operations respectively and fed into a shared multi-layer perceptron. Then, the outputs of the multi-layer perceptron are added and fed into the slice uncertainty block to generate a slice attention map. These operations can be expressed as:
[0157]
[0158] in, represents the global maximum pooling operation, Represents the output of the slice uncertainty block.
[0159] 4. Input the lowest level encoding features obtained in step 2 into the global and local interaction module. The specific structure is as follows Figure 5As shown, the convolution series includes 1x1 convolution, 3x3 convolution and 1x1 convolution, and CBR includes 3x3 convolution, batch normalization and ReLU activation function. Figure 5 middle Including batch normalization, ReLU activation function and averaging, S represents the scaling factor, Figure 5 The plus sign in denotes element-by-element addition. Figure 5 The multiplication sign in represents element-by-element multiplication. Figure 5 The symbol S in the circle in the figure represents the sigmoid activation function. Figure 5 The symbol with a dot in the circle in represents the Hadamard product. The global and local interaction module consists of two parallel connected blocks, where the global interaction block only needs linear complexity to capture the long-range dependencies of features (i.e., global information), and the local interaction block uses a learnable visual center mechanism to aggregate local area features (i.e., local information). The two interact and fuse to obtain more accurate global and local feature representations.
[0160] For the current input feature map , first use the convolutional layer to get smooth features , the convolutional layer consists of a convolution with a kernel size of 7×7, followed by a batch normalization layer and an activation function layer, which can be expressed as:
[0161]
[0162] in, represents a 7×7 convolution with a stride of 1, Represents the ReLU activation function.
[0163] In the global interaction block, first use the global partition operation to Divide into a series of sizes The spatially continuous patches are shifted and the overall distribution of features in space is changed using a window shift operation, thereby aggregating non-contiguous patches in space. The shift rule is that odd patches move one window to the left horizontally (and vice versa for even patches on the right), and odd patches move one window upward vertically (and vice versa for even patches downward). Next, the spatially shifted feature map is re-divided into The patch is then used to perform global attention calculations. Specifically, the information in the channel dimension is averaged and the spatial dimension is flattened before being input into the feedforward network for linear calculations. Finally, the Softamx activation function is used to obtain the spatial dimension probability distribution of the input feature. Weighted and restored feature map shape to get global interaction block output .
[0164] The local interaction block uses an encoder with an inherent dictionary, which consists of two components: the inherent codebook and a set of scaling factors for the learnable visual center ,in is the total number of visual centers, is the total number of pixels in the feature map. Specifically, the input feature First, the encoded features are obtained through a set of convolutional layers and a block consisting of a 3×3 convolution, a batch normalization layer, and a ReLU activation function. Then The input codebook calculates the entire image about Complete information of codewords , and then the complete information After batch normalization, ReLU activation function and averaging, the average result is obtained. After obtaining the output of the codebook, the average result is further input into the fully connected layer and the 1×1 convolutional layer to predict the key features. and the scaling factor Multiply the channels between to get local features , and After adding each element, we can get the output of the local interaction block , the above operation can be written as:
[0165]
[0166]
[0167] in, represents element-wise multiplication, represents 1×1 convolution, Represents the sigmoid function, the result feature map of the global interaction block and the local interaction block and Further fusion operation is performed, and the outputs of the two blocks are transformed by residual convolution after element-by-element addition to obtain the global local feature representation :
[0168]
[0169]
[0170] in, represents the intermediate feature, Represents a 3×3 convolution.
[0171] 5. After upsampling, the global local feature representation obtained in step 4 is summed element by element with the cross-slice feature representation of the fourth layer in step 3, and used as the input feature of the decoder for decoding. After upsampling, the decoded features are summed element by element with the corresponding cross-slice feature representation in step 3 of the previous layer, and used as the input feature of the decoder in the next stage.
[0172] 6. Repeat the decoding process in step 5 until the top-level decoding features are obtained.
[0173] 7. Upsample the top-level decoded features in step 6 and input them into the segmentation head to obtain the final prostate segmentation prediction result.
[0174] 8. For the final prediction result in step 7, use the weighted loss function for deep supervision to calculate the loss value between it and the image label. The loss function uses the commonly used dice similarity coefficient loss and binary cross entropy loss The weighted sum of , in order to take advantage of the benefits of two complementary loss functions, is defined as:
[0175]
[0176]
[0177]
[0178] in, represents the index of all pixels in the probability distribution map, Indicates The probability that a pixel belongs to the segmented region is Indicates The true value of pixels, yes and The weight balance parameter between .
[0179] 9. Repeat steps 1 to 8 to train the prostate MR image segmentation model. The prostate MR image segmentation model is trained in the following way:
[0180] This example is built using the PyTorch framework and trained using an NVIDIA GeForce RTX 4090 24GB GPU. The learning rate used is 1e -4 The Adam optimizer is used to optimize the network, and the parameter of weight decay regularization is set to 1e -5The entire network was trained on a prostate MR image segmentation dataset, which allowed the prostate MR image segmentation model to converge on this task scenario. The prostate MR image segmentation dataset contains 50 transverse T2-weighted MR images collected from four medical centers and is equipped with expert-annotated ground truth of the entire prostate.
[0181] Table 1 shows the quantitative comparison results between the method of this embodiment and other methods. It can be seen that this embodiment has achieved better performance in the four evaluation indicators of intersection ratio, dice similarity coefficient, 95% Hausdorff distance and average surface distance, which are 86.90%, 92.94%, 3.40mm and 1.38mm respectively. Compared with the SwinUNETR method with the second best overall performance, the intersection ratio, dice similarity coefficient, 95% Hausdorff distance and average surface distance are improved by 2.65%, 1.60%, 0.51mm and 0.46mm respectively.
[0182] Table 1 shows the quantitative comparison results of other methods on the prostate MR image segmentation dataset
[0183]
[0184] The visual segmentation results on the prostate MR image segmentation dataset are as follows: Figure 6 As shown, Figure 6 The vertical group a in the middle represents the real label. Figure 6 The vertical group b in the middle represents the prediction results of this embodiment. It can be seen that the results of this embodiment have a boundary very close to the real label in most cases. The quantitative and qualitative results fully demonstrate the effectiveness and accuracy of this embodiment in prostate MR image segmentation.
[0185] Image segmentation is performed based on the trained prostate MR image segmentation model, including the following steps:
[0186] Step 1: Input the prostate MR image to be segmented into an encoder composed of an explicit attenuated attention module to introduce prior knowledge related to spatial distance into the encoding process and obtain multi-scale encoding features.
[0187] Step 2: The encoded features of each level obtained in step 1 are input into the skip connection processing flow. Multiple cross-slice attention modules are used in the skip connection to learn all cross-slice information on the anisotropic MR image to obtain a refined cross-slice feature representation, thereby improving the segmentation performance at various locations of the prostate.
[0188] Step 3: Input the lowest level encoding features obtained in step 1 into the global-local interaction module to obtain a more accurate global-local feature representation by interactively fusing long-range dependencies and local context information.
[0189] Step 4: The global-local feature representation obtained in step 3 is upsampled and then element-wise summed with the cross-slice feature representation of the fourth layer in step 2 as the input feature of the decoder.
[0190] Step 5: Decode the decoder input features in step 4, and after upsampling, perform element-by-element summation with the corresponding cross-slice feature representation in step 2 of the previous layer as the input features of the decoder in the next stage.
[0191] Step 6: Repeat the decoding process in step 5 until the top-level decoding features are obtained.
[0192] Step 7: Upsample the top-level decoded features in step 6 and input them into the segmentation head to obtain the final prostate segmentation prediction result (i.e., the final medical image segmentation result).
[0193] Reference Figure 7 The embodiment of the present invention further provides a medical image segmentation system based on multiple attentions. The medical image segmentation system based on multiple attentions includes a feature encoding unit 100, a cross-slice feature acquisition unit 200, a global-local interaction unit 300, a feature decoding unit 400 and an image segmentation unit 500, wherein:
[0194] A feature encoding unit 100 is used to obtain a medical image to be segmented, and input the medical image to be segmented into an encoder including a plurality of display attenuation attention modules to obtain an encoding feature output by each display attenuation attention module;
[0195] A cross-slice feature acquisition unit 200 is used to input the encoded features output by each display attenuation attention module into the cross-slice attention module to obtain a cross-slice feature corresponding to the display attenuation attention module;
[0196] A global-local interaction unit 300 is used to input the encoded features output by the bottom-level display attenuation attention module in the encoder into the global and local interaction module to obtain global-local features;
[0197] The feature decoding unit 400 is used to perform element-by-element summation of the global local features and the cross-slice features corresponding to the bottom-level display attenuation attention module in the encoder to obtain the input features of the decoder module corresponding to the bottom-level display attenuation attention module; perform a decoding operation on the input features of the decoder to obtain a decoded feature, and upsample the decoded feature to obtain an upsampled feature; perform element-by-element summation of the upsampled feature and the cross-slice features corresponding to the upper-level display attenuation attention module of the bottom-level display attenuation attention module to obtain the input features of the decoder module corresponding to the upper-level display attenuation attention module, until the decoded features output by the top-level decoder module in the decoder are obtained;
[0198] The image segmentation unit 500 is used to upsample the decoded features output by the top-level decoder module to obtain final features, and input the final features to the segmentation head to obtain the final medical image segmentation result.
[0199] It should be noted that since the medical image segmentation system based on multiple attention in this embodiment and the above-mentioned medical image segmentation method based on multiple attention are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to the system embodiment and will not be described in detail here.
[0200] An embodiment of the present invention also provides a medical image segmentation device based on multiple attentions, including: at least one control processor and a memory for communicating with the at least one control processor.
[0201] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0202] The non-transient software program and instructions required to implement the medical image segmentation method based on multiple attention in the above embodiment are stored in the memory. When executed by the processor, the medical image segmentation method based on multiple attention in the above embodiment is executed, for example, the above described Figure 1 The method comprises steps S100 to S500.
[0203] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0204] The embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by one or more control processors, so that the one or more control processors can execute a medical image segmentation method based on multiple attention in the above method embodiment, for example, executing the above described Figure 1 The functions of method steps S100 to S500 in the method.
[0205] It will be appreciated by those skilled in the art that all or some of the steps and systems in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a 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 a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As known to those skilled in the art, the term computer storage medium 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 include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0206] The above is a specific description of the preferred implementation of the embodiments of the present application, but the embodiments of the present application are not limited to the above-mentioned implementation methods. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the embodiments of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the embodiments of the present application.
Claims
1. A medical image segmentation method based on multiple attention, characterized in that: The medical image segmentation method based on multiple attention includes: A medical image to be segmented is obtained, and the medical image to be segmented is input into an encoder including a plurality of display attenuation attention modules to obtain encoding features output by each of the display attenuation attention modules; wherein: The display attenuation attention module includes a local perception block, a retention self-attention and a multi-scale token aggregation feedforward network, and the medical image to be segmented is input into an encoder including multiple display attenuation attention modules to obtain the encoding features output by each display attenuation attention module, including: Inputting the medical image to be segmented into the encoder of each display attenuated attention module, and using the local perception block to perform position encoding on the medical image to be segmented to obtain encoding position information; The encoded position information is layer-normalized and the layer-normalized encoded position information is input into the preservative self-attention, and the display attenuation is extended to a bidirectional and two-dimensional form aligned with the image structure by the preservative self-attention and spatial distance prior knowledge is introduced into the encoded position information to obtain the output result of the preservative self-attention; Adding the output result of the retention self-attention to the encoding position information element by element to obtain an element-by-element addition result, and performing layer normalization on the element-by-element addition result to obtain a layer-normalized result; Inputting the layer normalized result into the multi-scale token aggregation feed-forward network to perform multi-scale token aggregation, and obtaining the output result of the multi-scale token aggregation feed-forward network; Adding the output result of the multi-scale token aggregation feedforward network to the element-by-element addition result element by element to obtain the encoding feature output by each display attenuation attention module; The encoded features output by each display attenuation attention module are input into a cross-slice attention module to obtain a cross-slice feature corresponding to the display attenuation attention module; wherein: The cross-slice attention module includes semantic attention, position attention and slice attention, and the encoding features output by each display attenuation attention module are input into the cross-slice attention module to obtain the cross-slice features corresponding to the display attenuation attention module, including: Input the encoded features output by each display attenuation attention module into a cross-slice attention module, use the semantic attention to generate a semantic attention map, and use the position attention to generate a position attention map; Adding the semantic attention map and the position attention map element by element to obtain a first result; Inputting the first result into an activation function to obtain a second result; Multiplying the second result by the encoded feature output by the display attenuation attention module element by element to obtain a third result; Adding the third result and the encoded feature output by the display attenuation attention module element by element to obtain a fourth result; Using the slice attention to generate a slice attention map from the fourth result, and performing element-by-element multiplication of the slice attention map and the fourth result to obtain a cross-slice feature corresponding to the display attenuation attention module; Inputting the encoded features output by the display attenuation attention module at the bottom layer of the encoder into the global and local interaction module to obtain global and local features; The global local features and the cross-slice features corresponding to the display attenuation attention module in the bottom layer of the encoder are summed element by element to obtain the input features of the decoder module corresponding to the display attenuation attention module in the bottom layer; the input features of the decoder are decoded to obtain decoded features, and the decoded features are upsampled to obtain upsampled features; the upsampled features and the cross-slice features corresponding to the display attenuation attention module in the upper layer of the display attenuation attention module in the bottom layer are summed element by element to obtain the input features of the decoder module corresponding to the display attenuation attention module in the upper layer, until the decoded features output by the top-layer decoder module in the decoder are obtained; The decoded features output by the top-level decoder module are upsampled to obtain final features, and the final features are input into the segmentation head to obtain the final medical image segmentation result.
2. The medical image segmentation method based on multiple attention according to claim 1, characterized in that: The output result of the retention self-attention is obtained by extending the display attenuation to a bidirectional, two-dimensional form aligned with the image structure and introducing spatial distance prior knowledge into the encoded position information in the following manner: ; ; ; ; in, The normalized encoding position information of the representation layer, , , Represent the query vector, key vector and numerical vector respectively, represents the number of tokens, represents the nth token, , represents the learnable parameters, express The complex conjugate of represents element-wise dot product, represents a natural constant, represents the imaginary unit, represents a constant, Represents the two-dimensional coordinates of the nth token, represents the exponential decay of the Manhattan distance between the corresponding token pair of each element at their respective positions, represents the attenuation rate, Represents transpose , Softmax represents the Softmax activation function, and ReSA represents the output result of the preserved self-attention.
3. The medical image segmentation method based on multiple attention according to claim 1, characterized in that: The layer normalized result is input into the multi-scale token aggregation feed-forward network to perform multi-scale token aggregation, and the output result of the multi-scale token aggregation feed-forward network is obtained in the following manner: ; ; ; Among them, MSTA-FFN represents the output result of the multi-scale token aggregation feedforward network, The result after layer normalization is represented. represents 1×1 convolution, The kernel size is The depth convolution of Indicates that the kernel size is The result obtained after deep convolution processing is represents the result obtained after deep convolution with a kernel size of 1. represents the result obtained after deep convolution with a kernel size of 3. represents the result obtained after deep convolution with a kernel size of 5. Indicates channel cascade operation, Represents the residual connection operation.
4. The medical image segmentation method based on multiple attention according to claim 1, characterized in that: The global and local interaction module includes a global interaction block and a local interaction block, and the encoding features output by the display attenuation attention module at the bottom layer of the encoder are input into the global and local interaction module to obtain global and local features, including: Input the encoded features output by the display attenuation attention module at the bottom layer of the encoder into the global and local interaction module, and use a convolution layer to obtain smooth features; Inputting the smooth features into the global interaction block, using the global interaction block to capture the long-range dependency of the smooth features to obtain global features; Inputting the smooth feature into the local interaction block, and using the local interaction block to aggregate local area features to obtain local features; Adding the global feature and the local feature element by element to obtain a fused feature; The fused features are input into multiple convolutional layers to obtain convolution results, and residual operations are performed on the convolution results and the fused features to obtain global local features.
5. The medical image segmentation method based on multiple attention according to claim 4, characterized in that: The local interaction block includes an intrinsic codebook and a scaling factor of a visual center, and the smooth feature is input into the local interaction block, and the local area feature is aggregated by the local interaction block to obtain a local feature, including: Inputting the smooth features into a set of convolutional layers to obtain convolutional smooth features; Inputting the convolution smoothing feature into a CBR block including a 3×3 convolution, a batch normalization layer, and a ReLU activation function to obtain a coded smoothing feature; The coding smoothness feature is calculated using the inherent codebook and the scaling factor of the visual center to obtain complete information; Performing batch normalization, ReLU activation function and average calculation on the complete information to obtain an average calculation result; Passing the average calculation result through a fully connected layer and a convolutional layer to obtain key features; The key feature and the smooth feature are multiplied element by element to obtain a multiplication result, and the multiplication result and the smooth feature are added element by element to obtain a local feature.
Citation Information
Patent Citations
Medical image segmentation method and device based on dual-scale encoder network, and medium
CN116485815A
Medical image segmentation method based on local and global context information coding
CN116486074A
Transform and multi-scale feature fusion-based medical image segmentation method and system
CN116977348A
Method for image segmentation using cnn
US20210248761A1
Method and apparatus for segmenting a medical image, and storage medium
US20210365717A1
