Knee joint MRI image segmentation method based on fusion attention guidance

By introducing the fusion guided attention module and the contextual attention mechanism into the ResU-net network, and combining the spatial and contextual attention mechanisms, the accuracy and robustness issues of cartilage boundary segmentation in knee joint MRI image segmentation are solved, and the segmentation is improved. The accuracy and robustness of the results reduce the burden of post-analysis.

CN118608535APending Publication Date: 2024-09-06DALIAN MARITIME UNIVERSITY

Patent Information

Application Number
CN202410746911.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Existing knee joint MRI image segmentation technology shows poor performance in cartilage boundary segmentation, and is prone to offset and uneven segmentation edges. Moreover, the deep learning model learns the bone part better than the cartilage part, resulting in under-segmentation and over-segmentation. The problem of segmentation.

Method used

The fusion guided attention module based on the ResU-net network is used, combined with the spatial attention and contextual attention mechanisms, to extract fusion features and perform cascade decoding processing through skip connections and Swin Transformer modules to generate high-precision segmentation masks.

Benefits of technology

It improves the accuracy and robustness of knee joint MRI image segmentation, reduces the burden of later medical image analysis, and alleviates the problems of segmentation breakage and mis-segmentation, especially poor edge segmentation when segmenting cartilage edges.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608535A
    Figure CN118608535A
Patent Text Reader

Abstract

The invention provides a knee joint MRI image segmentation method based on fusion attention guidance, and the method comprises the steps: obtaining an MRI image of a knee joint cartilage based on a medical image database, and integrating the MRI image of the knee joint cartilage and a label image into a training data set; performing image resampling and image enhancement operation on the training data set, and dividing the processed image into a training set and a test set; inputting the training set and the test set into a network fused with an attention-guiding encoder, and carrying out end-to-end network model training; based on an improved ResU-Net long and narrow region segmentation network, extracting and fusing features generated by the step-by-step network by using a space attention mechanism and a context attention mechanism to obtain fused features; and sending the fusion features into a decoder in a jump connection mode, and carrying out cascade and decoding processing on the fusion features to finally obtain a segmentation mask. According to the method, the context can be selectively aggregated, so that the network obtains abundant features, and the accuracy and robustness of a segmentation result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of knee joint MRI image segmentation, and in particular to a knee joint MRI image segmentation method based on fusion-guided attention. Background Art

[0002] The knee joint is one of the important joints for human movement and uprightness, and it is also the area most prone to injury and lesions. Knee osteoarthritis (OA) is a common chronic degenerative and disabling bone and joint disease that is very harmful to the human body. Therefore, research on the knee joint is of great significance. In medical imaging diagnosis, accurate segmentation of the knee joint can help doctors better observe and diagnose lesions, improve diagnostic accuracy and treatment effects. At the same time, knee joint segmentation can also be applied to computer-assisted surgical planning, disease monitoring, and rehabilitation evaluation. Therefore, it is necessary to study a method for automatically segmenting cartilage areas in MRI images, so that it is possible to directly judge whether the cartilage has lesions and the severity of osteoarthritis based on the divided cartilage.

[0003] However, there are still some problems in the current field of medical image segmentation of knee joints. First, knee joint lesions can lead to cartilage fractures, tissue fluid edema and other problems, and the traditional segmentation algorithm based on CNN also shows poor performance in boundary segmentation, which is prone to segmentation edge offset. In addition, due to the poor contrast between bones, cartilage and surrounding tissues, the edge segmentation is further deepened and uneven. Secondly, the cartilage part accounts for a very small proportion of the entire knee joint MRI image, so the deep learning model is better at learning the bone part than the cartilage part, which is caused by the defects of traditional convolutional neural networks. Therefore, when segmenting, there will be problems such as under-segmentation of the cartilage part and over-segmentation of the bone part. Finally, the cartilage of patients with osteoarthritis is thinner and more narrow and long than normal cartilage, and the current technology is not very good when segmenting narrow and long targets such as cartilage, and segmentation breaks and misclassifications will occur. Summary of the invention

[0004] According to the technical problems raised above, a method for knee MRI image segmentation based on fusion-guided attention is provided. The knee MRI image segmentation method of the present invention is based on the ResU-net network. By introducing the spatial attention mechanism and the contextual attention mechanism, the spatial attention map and the detailed structure are obtained, and the context can be selectively aggregated, so that the network obtains rich features, improves the accuracy and robustness of the segmentation results, realizes an end-to-end high-precision segmentation algorithm, and reduces the burden of later medical image analysis.

[0005] The technical means adopted by the present invention are as follows:

[0006] A knee joint MRI image segmentation method based on fusion-guided attention, comprising:

[0007] S1. Based on the medical image database, MRI images of knee cartilage are obtained, and the MRI images of knee cartilage and label images are integrated into a training data set;

[0008] S2, performing image resampling and image enhancement operations on the training data set, and dividing the processed images into a training set and a test set;

[0009] S3, input the training set and the test set into the network of the encoder fused with the guided attention, and perform end-to-end network model training;

[0010] S4, based on the improved ResU-Net narrow area segmentation network, the spatial attention mechanism and the contextual attention mechanism are used to extract and fuse the features generated by the step-by-step network to obtain the fused features;

[0011] S5. Send the obtained fusion features to the decoder in a skip connection manner, and perform cascade and decoding processing with the fusion features to finally obtain the segmentation mask.

[0012] Furthermore, the label image in step S1 is used to identify the region of interest, position and boundary in the MRI image.

[0013] Further, step S2 specifically includes:

[0014] S21, image resampling operation:

[0015] Bilinear interpolation is used to interpolate between original pixels to calculate pixel targets to unify the spatial resolution and pixel size of the image;

[0016] S22, image enhancement operation:

[0017] The MRI images of the knee cartilage and the corresponding label images were subjected to the same random rigid transformation of random flipping and scaling, where random flipping is to randomly flip the image horizontally and vertically to increase the symmetry of the image; random scaling is to randomly adjust the size of the image and scale it by 0.8-1.2 times to increase the image's performance at different angles; through random rigid transformation, the original samples were amplified to reduce the cost of obtaining training samples;

[0018] S23. Divide the training data set

[0019] The processed training data set is divided into training set and test set with a ratio of 4:1.

[0020] Furthermore, the backbone of the encoder in step S3 is composed of a Resnet18 network with a fusion-guided attention module added. The Resnet18 network consists of multiple residual blocks, each of which contains two convolutional layers and a skip connection layer. The first layer uses a 1×1 convolution kernel, and then each layer uses a 3×3 convolution kernel again, followed by a batch normalization and ReLU activation function.

[0021] Further, step S4 specifically includes:

[0022] S41. In the encoder, CNN is used to combine local features with global context information to improve the expressiveness of features.

[0023] S42, sending it to the spatial attention module, the spatial attention performs spatial maximum and spatial average operations on the feature map output by the convolution module to obtain the spatial representation statistics of the feature map;

[0024] S43, combining the obtained spatial representation statistics of the feature map into a feature map with a channel of 2, and inputting it into the spatial attention layer extracted by the convolutional layer;

[0025] S44, the information is fused to generate the final spatial attention weight, the weight matrix is ​​weighted on the original input feature map through the Sigmoid function, and spatial attention is performed according to the spatial relationship between the features to obtain a spatial attention map;

[0026] S45, the spatial attention module uses the convolutional layer to obtain the spatial attention map M S (F)∈R×H×W, the spatial attention map encodes the location of emphasized or suppressed information, and its calculation process is shown in the following formula:

[0027] M S (F C )=σ(f 7×7 ([AvgPool(F C );MaxPool(F C )]))

[0028] Among them, f 7×7 represents a 7×7 convolutional layer, σ represents the sigmoid function;

[0029] S46. Let the feature map F∈R C×W×H As the input feature map of the attention module, the feature map F on the first branch passes through a convolution block to obtain a feature map Then the feature map Reshape into a feature map of shape (W×H)×C; in the second branch, the feature map F follows the same operation and is then transposed to obtain Finally, the result matrix obtained by multiplying the two matrices is applied to Softmax to generate the spatial attention map S p ∈R (W×H)×(W×H ):

[0030]

[0031] in, is the influence of the i-th position on the j-th position;

[0032] S47, the input feature map F is sent to different convolution blocks of the third branch to generate Its shape is the same as F; then, it is multiplied by the transposed spatial attention map and restructure their output into R C×W×H ; The corresponding attention feature map F PAM The calculation is as follows:

[0033]

[0034] Among them, λ p Hyperparameters whose values ​​are initialized to 0.

[0035] Furthermore, the decoder in step S5 adopts a Swin Transformer decoder, which is composed of multiple groups of Transformer modules, and each Transformer module is composed of multiple layers of self-attention, offset attention and multi-layer perceptron.

[0036] Furthermore, the Swin Transformer decoder is composed of a mixture of multi-layer self-attention and multi-layer perceptron, and the continuous Swin Transformer block is formulated as:

[0037]

[0038]

[0039]

[0040]

[0041] in, and Z l Respectively represent the outputs of the SW-MSA module and the MLP module of the first block, and then and Z l+1 Represents the output of the SW-MSA of the second block and the output of the MLP module.

[0042] Furthermore, step S5 specifically includes:

[0043] S51, concatenating the obtained feature vectors and sending them to the feature map of the same level of the decoder in a skip connection manner for concatenation;

[0044] S52, integrating high-level semantic features with low-level detail features, transferring high-level semantic features and low-level detail features through skip connections, and retaining more context information;

[0045] S53, after the decoder receives the fused feature map, a feature map having the same resolution as the input is obtained by upsampling step by step;

[0046] S54. Map the output to between 0 and 1 through the sigmoid activation function to obtain a segmentation mask.

[0047] Furthermore, in the decoder, patch expansion is used to upsample the extracted fusion features, the feature map resolution is increased, and the feature dimension is reduced to half of the original; in order to keep the input image and the output image consistent in size, a patch expansion module is finally used, which also includes a 1×1 convolution and expands and restores the feature image at a rate of 4 times; the data processing formula in the decoder is as follows:

[0048] V k =STB(STB(u k ,m k ))

[0049] u k-1 =PE(v k )

[0050] Among them, k, STB and PE represent the horizontal index, Swin Transformer and patch extension block respectively.

[0051] Compared with the prior art, the present invention has the following advantages:

[0052] 1. The knee joint MRI image segmentation method based on fusion guided attention provided by the present invention proposes a network model of fusion guided attention module on the basis of ResU-Net network, and integrates the spatial attention module into the network. The introduction of this module allows the network to ignore noise and pay more attention to more meaningful cartilage areas in space, which alleviates the situation of continuous segmentation breaks to a certain extent.

[0053] 2. The knee joint MRI image segmentation method based on fusion guided attention provided by the present invention proposes a deep learning segmentation algorithm that integrates a contextual attention module, so that the network can obtain richer contextual relevance and more effective features, focusing on key pixels.

[0054] 3. The knee joint MRI image segmentation method based on fusion-guided attention provided by the present invention introduces cascade operations and Swin Transformer modules to address the problems of mis-segmentation and blurred edges in segmentation, and effectively cascades and fuses the low-level semantic information with the high-level semantic information in the image, thereby not only obtaining richer semantic information, but also including low-level features lost due to upsampling, effectively solving the problem of poor edge segmentation when the network segments the edge of damaged cartilage, and reducing the burden of later medical image analysis.

[0055] Based on the above reasons, the present invention can be widely promoted in the fields of knee joint MRI image segmentation and the like. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0057] Figure 1 The figure is a flow chart of the method of the present invention.

[0058] Figure 2 This is a structural diagram of the deep learning network of the present invention.

[0059] Figure 3 Schematic diagram of the fusion guided attention module of the present invention.

[0060] Figure 4 A comparison chart of experimental results between the existing segmentation method provided in an embodiment of the present invention and the method of the present invention. DETAILED DESCRIPTION

[0061] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0062] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0063] like Figure 1 As shown, the present invention provides a knee joint MRI image segmentation method based on fusion-guided attention, comprising:

[0064] S1. Based on the medical image database, MRI images of knee cartilage are obtained, and the MRI images of knee cartilage and label images are integrated into a training data set;

[0065] S2, performing image resampling and image enhancement operations on the training data set, and dividing the processed images into a training set and a test set;

[0066] S3, input the training set and the test set into the network of the encoder fused with the guided attention, and perform end-to-end network model training;

[0067] S4, based on the improved ResU-Net narrow area segmentation network, the spatial attention mechanism and the contextual attention mechanism are used to extract and fuse the features generated by the step-by-step network to obtain the fused features;

[0068] S5. Send the obtained fusion features to the decoder in a skip connection manner, and perform cascade and decoding processing with the fusion features to finally obtain the segmentation mask.

[0069] During specific implementation, as a preferred embodiment of the present invention, the label image in step S1 is used to identify the region of interest, position and boundary in the MRI image. In this embodiment, the training data set in step S1 comes from a team of the First Affiliated Hospital of Dalian Medical University, and is composed of sagittal MRI images of 35 volunteers without knee joint diseases and 15 patients with knee osteoarthritis, wherein the average age of the volunteers is about 34 years old, and the uPMR790 model MRI scanning device is used for scanning to obtain a T1-weighted MRI image sequence, in which the minimum image length in the data set is 280 pixels, the maximum length is 458 pixels, the minimum image width is 458 pixels, the maximum image width is 490 pixels, the minimum number of image slices is 100, and the maximum number of slices is 180. There are 4756 MRI images obtained, and there are 2156 valid images after removing redundant images. The average age of the 15 patients was about 67 years old. They were also scanned using the uPMR790 MRI scanner and obtained a T1-weighted MRI image sequence. The resolution of the image length and width was the same as that of the MRI images collected by the volunteers, and the number of slices was between 160 and 180. All patients had damaged femoral cartilage and patellar cartilage, with 6 and 9 patients, respectively. After removing redundant slices, a valid data set of 1,443 images was obtained.

[0070] In specific implementation, as a preferred embodiment of the present invention, step S2 specifically includes:

[0071] S21, image resampling operation:

[0072] Bilinear interpolation is used to interpolate between original pixels to calculate pixel targets to unify the spatial resolution and pixel size of the image; in this embodiment, the pixel size of the training data set is unified to 224*224*3 (length*width*number of channels).

[0073] S22, image enhancement operation:

[0074] The same random rigid transformation of random flipping and scaling is performed on the MRI image of the knee cartilage and the corresponding label image, wherein the random flipping is to randomly flip the image horizontally and vertically to increase the symmetry change of the image; the random scaling is to randomly adjust the size of the image, scaling it by 0.8-1.2 times, to increase the image's expressiveness at different angles; through the random rigid transformation, the original samples are amplified to reduce the cost of acquiring training samples; in this embodiment, for example, the original 20 samples are amplified to 200.

[0075] In this embodiment, by performing grayscale enhancement operations on the TI modality data and performing operations such as translation, rotation, and random cropping on the data, the data set is expanded and the robustness of the model can be enhanced.

[0076] S23. Divide the training data set

[0077] The processed training data set is divided according to the ratio of training set to test set of 4: 1. In this embodiment, 160 samples are used as the model training set and the remaining 40 samples are used as the model test set.

[0078] In specific implementation, as a preferred embodiment of the present invention, the backbone of the encoder in step S3 is composed of a Resnet18 network, and a fusion-guided attention module is added. The Resnet18 network is composed of multiple residual blocks, each residual block contains two convolutional layers and a skip connection layer (shortcut connection), in which the first layer first uses a 1×1 convolution kernel, and then each layer uses a 3×3 convolution kernel again, followed by a batch normalization (batchnormalization) and ReLU activation function, such as Figure 2 shown.

[0079] In specific implementation, as a preferred embodiment of the present invention, step S4 specifically includes:

[0080] S41. In the encoder, CNN is used to combine local features with global context information to improve the expressiveness of features.

[0081] S42, sending it to the spatial attention module, the spatial attention performs spatial maximum and spatial average operations on the feature map output by the convolution module to obtain the spatial representation statistics of the feature map;

[0082] S43, combining the obtained spatial representation statistics of the feature map into a feature map with a channel of 2, and inputting it into the spatial attention layer extracted by the convolutional layer;

[0083] S44, the information is fused to generate the final spatial attention weight, the weight matrix is ​​weighted on the original input feature map through the Sigmoid function, and spatial attention is performed according to the spatial relationship between the features to obtain a spatial attention map;

[0084] S45, the spatial attention module uses the convolutional layer to obtain the spatial attention map M S (F)∈R×H×W, the spatial attention map encodes the location of emphasized or suppressed information, and its calculation process is shown in the following formula:

[0085] M S (F C )=σ(f 7×7 ([AvgPool(F C );MaxPool(F C )]))

[0086] Among them, f 7×7 represents a 7×7 convolutional layer, σ represents the sigmoid function;

[0087] S46. After the introduction of the spatial attention module, it is very effective in addressing the problem of fracture caused by the ResU-Net network when segmenting narrow and thin cartilage. However, due to the imbalance of cartilage and bone samples unique to knee MRI images, misclassification still exists. The introduction of the contextual attention module can obtain richer contextual relevance and more effective features. The contextual attention module selectively aggregates contextual information based on the spatial attention module and focuses on key cartilage pixels. Let the feature map F∈R C×W×H As the input feature map of the attention module, the feature map F on the first branch passes through a convolution block to obtain a feature map Then the feature map Reshape into a feature map of shape (W×H)×C; in the second branch, the feature map F follows the same operation and is then transposed to obtain Finally, the result matrix obtained by multiplying the two matrices is applied to Softmax to generate the spatial attention map S p ∈R (W×H)×(W×H) :

[0088]

[0089] in, is the influence of the i-th position on the j-th position;

[0090] S47, the input feature map F is sent to different convolution blocks of the third branch to generate Its shape is the same as F; then, it is multiplied by the transposed spatial attention map and restructure their output into R C×W×H ; The corresponding attention feature map F PAM The calculation is as follows:

[0091]

[0092] Among them, λ p Hyperparameters whose values ​​are initialized to 0. Figure 4 As shown, it is a schematic diagram of the fusion-guided attention module.

[0093] In this embodiment, a channel attention mechanism and a guided attention mechanism are added on the basis of the original ResU-net, and the mechanism is improved. The segmentation process of the knee joint medical image is as follows:

[0094] The channel attention mechanism is introduced into the ResU-Net network. The addition of the fusion-guided attention mechanism enables the network to downsample the feature map with different sizes of dilated convolutions, which is equivalent to capturing the contextual information of the given feature map at different scales, and then using the contextual attention module to obtain richer features. Features are extracted from the obtained feature image, and the feature image is converted into a multi-channel feature image b×w×h through the fusion-guided attention module; where b is the number of channels, w is the width of the decomposed sub-image, and h is the height of the decomposed sub-image. The multi-channel feature image is input into the Swin Transformer decoder module, which consists of a padding layer and four Swin Transformer modules. The first three Swin Transformer modules are four-layer, and the fourth is two-layer; after the channel adaptation module, the segmented image is obtained.

[0095] In this embodiment, the specific process of extracting the knee joint feature image is as follows:

[0096] The encoder is divided into 4 layers, and the sampling rate is 4×4. In addition, in order to ensure that the sampling rate of the first layer is also 4×4, a convolution layer of size 1×1×1 is used first. The feature map of the top layer is downsampled by the ResU-Net network and connected to the SwinTransformer module of the decoder. After fusing the features of different levels, a feature image with richer information can be obtained, and the boundary information and small features in the feature map are more complete.

[0097] In this embodiment, the method for obtaining the feature vector is to first use spatial attention, through average pooling, and then through a one-dimensional convolution with a convolution kernel size of k, and then generate attention weights through a sigmoid activation function, and finally multiply the attention weights and features in sequence to obtain a feature vector.

[0098] In specific implementation, as a preferred embodiment of the present invention, the decoder in step S5 adopts a Swin Transformer decoder, which is composed of multiple groups of Transformer modules, each of which is composed of multi-layer self-attention (MSA), offset attention (SW-MSA) and multi-layer perceptron (MLP). The Swin Transformer decoder uses the self-attention mechanism to capture global context and long-distance dependencies, and better restore the edge information of the image, such as Figure 2 shown.

[0099] In specific implementation, as a preferred embodiment of the present invention, the Swin Transformer decoder is composed of a mixture of multi-layer self-attention and multi-layer perceptron, and the continuous Swin Transformer blocks are formulated as:

[0100]

[0101]

[0102]

[0103]

[0104] in, and Z l Respectively represent the outputs of the SW-MSA module and the MLP module of the first block, and then and Z l+1 Represents the output of the SW-MSA of the second block and the output of the MLP module.

[0105] In specific implementation, as a preferred embodiment of the present invention, step S5 specifically includes:

[0106] S51, concatenating the obtained feature vectors and sending them to the feature map of the same level of the decoder in a skip connection manner for concatenation;

[0107] S52, integrating high-level semantic features with low-level detail features, transferring high-level semantic features and low-level detail features through skip connections, and retaining more context information;

[0108] S53, after the decoder receives the fused feature map, a feature map having the same resolution as the input is obtained by upsampling step by step;

[0109] S54. Map the output to between 0 and 1 through the sigmoid activation function to obtain a segmentation mask.

[0110] In specific implementation, as a preferred embodiment of the present invention, in the decoder, patch expansion is used to upsample the extracted fusion features, the feature map resolution is increased, and the feature dimension is reduced to half of the original; in order to keep the input image and the output image consistent in size, a patch expansion module is finally used, which also includes a 1×1 convolution and expands and restores the feature image at a rate of 4 times; the data processing formula in the decoder is as follows:

[0111] V k =STB(STB(u k ,m k ))

[0112] u k-1 =PE(v k )

[0113] Among them, k, STB and PE represent the horizontal index, Swin Transformer and patch extension block respectively.

[0114] Example

[0115] In order to verify the effectiveness of the method of the present invention, an experimental comparison was conducted between the existing segmentation method and the present segmentation method. Figure 4 As shown, the knee joint MRI image segmentation method based on the ResU-net network of the present invention obtains the spatial attention map and detailed structure by introducing the spatial attention mechanism and the contextual attention mechanism, can selectively aggregate the context, so that the network obtains rich features, and improves the accuracy and robustness of the segmentation results.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A knee joint MRI image segmentation method based on fusion-guided attention, characterized in that: include: S1. Based on the medical image database, MRI images of knee cartilage are obtained, and the MRI images of knee cartilage and label images are integrated into a training data set; S2, performing image resampling and image enhancement operations on the training data set, and dividing the processed images into a training set and a test set; S3, input the training set and the test set into the network of the encoder fused with the guided attention, and perform end-to-end network model training; S4, based on the improved ResU-Net narrow area segmentation network, the spatial attention mechanism and the contextual attention mechanism are used to extract and fuse the features generated by the step-by-step network to obtain the fused features; S5. Send the obtained fusion features to the decoder in a skip connection manner, and perform cascade and decoding processing with the fusion features to finally obtain the segmentation mask.

2. The knee joint MRI image segmentation method based on fusion-guided attention according to claim 1 is characterized in that: The label image in step S1 is used to identify the region of interest, position and boundary in the MRI image.

3. The knee joint MRI image segmentation method based on fusion-guided attention according to claim 1, characterized in that: Step S2 specifically includes: S21, image resampling operation: Bilinear interpolation is used to interpolate between original pixels to calculate pixel targets to unify the spatial resolution and pixel size of the image; S22, image enhancement operation: The MRI images of the knee cartilage and the corresponding label images were subjected to the same random rigid transformation of random flipping and scaling, where random flipping is to randomly flip the image horizontally and vertically to increase the symmetry of the image; random scaling is to randomly adjust the size of the image and scale it by 0.8-1.2 times to increase the image's performance at different angles; through random rigid transformation, the original samples were amplified to reduce the cost of obtaining training samples; S23. Divide the training data set The processed training data set is divided into training set and test set with a ratio of 4:

1.

4. The knee joint MRI image segmentation method based on fusion-guided attention according to claim 1, characterized in that: The backbone of the encoder in step S3 is composed of a Resnet18 network with a fusion-guided attention module added. The Resnet18 network consists of multiple residual blocks, each of which contains two convolutional layers and a skip connection layer. The first layer uses a 1×1 convolution kernel, and then each layer uses a 3×3 convolution kernel again, followed by a batch normalization and ReLU activation function.

5. The knee joint MRI image segmentation method based on fusion-guided attention according to claim 1, characterized in that: Step S4 specifically includes: S41. In the encoder, CNN is used to combine local features with global context information to improve the expressiveness of features. S42, sending it to the spatial attention module, the spatial attention performs spatial maximum and spatial average operations on the feature map output by the convolution module to obtain the spatial representation statistics of the feature map; S43, combining the obtained spatial representation statistics of the feature map into a feature map with a channel of 2, and inputting it into the spatial attention layer extracted by the convolutional layer; S44, the information is fused to generate the final spatial attention weight, the weight matrix is ​​weighted on the original input feature map through the Sigmoid function, and spatial attention is performed according to the spatial relationship between the features to obtain a spatial attention map; S45, the spatial attention module uses the convolutional layer to obtain the spatial attention map M S (F)∈R×H×W, the spatial attention map encodes the location of emphasized or suppressed information, and its calculation process is shown in the following formula: M S (F C )=σ(f 7×7 ([AvgPool(F C );MaxPool(F C )])) Among them, f 7×7 represents a 7×7 convolutional layer, σ represents the sigmoid function; S46. Let the feature map F∈R C×W×H As the input feature map of the attention module, the feature map F on the first branch passes through a convolution block to obtain a feature map F0 p ∈R C×W×H , and then the feature map F0 p Reshape into a feature map of shape (W×H)×C; in the second branch, the feature map F follows the same operation and is then transposed to obtain F1 p ∈R C×(W×H) Finally, the result matrix obtained by multiplying the two matrices is applied to Softmax to generate the spatial attention map S p ∈R (W×H)×(W×H) : in, is the influence of the i-th position on the j-th position; S47, the input feature map F is sent to different convolution blocks of the third branch to generate Its shape is the same as F; then, it is multiplied by the transposed spatial attention map and restructure their output into R C×W×H ; The corresponding attention feature map F PAM The calculation is as follows: Among them, λ p Hyperparameters whose values ​​are initialized to 0.

6. The knee joint MRI image segmentation method based on fusion-guided attention according to claim 1, characterized in that: The decoder in step S5 adopts the Swin Transformer decoder, which is composed of multiple groups of Transformer modules, each of which is composed of multiple layers of self-attention, offset attention and multi-layer perceptron.

7. The knee joint MRI image segmentation method based on fusion-guided attention according to claim 6, characterized in that: The Swin Transformer decoder consists of a mixture of multi-layer self-attention and multi-layer perceptrons. The consecutive Swin Transformer blocks are formulated as: in, and Z l Respectively represent the outputs of the SW-MSA module and the MLP module of the first block, and then and Z l+1 Represents the output of the SW-MSA of the second block and the output of the MLP module.

8. The knee joint MRI image segmentation method based on fusion-guided attention according to claim 1, characterized in that: Step S5 specifically includes: S51, concatenating the obtained feature vectors and sending them to the feature map of the same level of the decoder in a skip connection manner for concatenation; S52, integrating high-level semantic features with low-level detail features, transferring high-level semantic features and low-level detail features through skip connections, and retaining more context information; S53, after the decoder receives the fused feature map, a feature map having the same resolution as the input is obtained by upsampling step by step; S54. Map the output to between 0 and 1 through the sigmoid activation function to obtain a segmentation mask.

9. The knee joint MRI image segmentation method based on fusion-guided attention according to claim 8, characterized in that: In the decoder, patch expansion is used to upsample the extracted fusion features, the feature map resolution is increased, and the feature dimension is reduced to half of the original; in order to keep the input image and the output image consistent in size, a patch expansion module is finally used, which also includes a 1×1 convolution and expands the restored feature image at a rate of 4 times; the data processing formula in the decoder is as follows: V k =STB(STB(u k ,m k )) you k-1 =PE(v k ) Among them, k, STB and PE represent the horizontal index, Swin Transformer and patch extension block respectively.

Citation Information

Patent Citations

  • Knee joint nuclear magnetic resonance image automatic segmentation method based on deep learning

    CN115953416A

  • Medical image semantic segmentation method and apparatus

    WO2023231329A1

Cited By

  • Hydrological time series prediction network and method based on feature extraction and guidance

    CN120256865A

  • Articular cartilage image segmentation method and system based on mixed attention mechanism

    CN120635441A

  • Joint cartilage image segmentation method and system based on hybrid attention mechanism

    CN120635441B

  • Medical image segmentation method based on attention enhancement

    CN122368451A