Medical image segmentation method and device and electronic equipment

By using a segmentation model consisting of an encoder and a decoder, combined with multi-scale efficient convolution and attention modules, the problems of complex morphological distortion and low-quality imaging in spinal X-ray image segmentation are solved, achieving accurate segmentation of scoliosis vertebrae, improving segmentation accuracy and adaptability, and supporting clinical diagnosis.

CN121904059APending Publication Date: 2026-04-21UNIV OF SCI & TECH BEIJING
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
UNIV OF SCI & TECH BEIJING
Filing Date
2025-12-09
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing deep learning models are insufficient in handling morphological distortions, low-quality imaging interference, and complex anatomical relationships in spinal X-ray image segmentation. They cannot achieve accurate segmentation of vertebral body details, have poor adaptability, and cannot meet the needs of clinical diagnosis.

Method used

A segmentation model consisting of an encoder and a decoder, combined with a multi-scale efficient convolution module, a global and local dimensional attention module, and a temporary feature fusion module, enhances the segmentation accuracy of spine images and suppresses noise and low-contrast interference through feature extraction, fusion, and weighted processing.

Benefits of technology

It improves the accuracy and adaptability of spinal X-ray image segmentation, effectively handles complex morphological distortions and low-quality imaging, and provides reliable clinical diagnostic support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121904059A_ABST
    Figure CN121904059A_ABST
Patent Text Reader

Abstract

The invention relates to a medical image segmentation method and device, electronic equipment and a storage medium, and the method comprises the steps: inputting a to-be-segmented medical image into an encoder, and sequentially processing the to-be-segmented medical image through a four-layer multi-scale efficient convolution module and a two-layer global and local dimension attention module in the encoder to obtain a first feature map, a feature map output by the upper layer of module in the encoder is used as the input of the lower layer of module; inputting a feature map output by each layer of module in the encoder into a temporary feature fusion module to obtain a second feature map; and inputting a feature map formed by splicing the first feature map and the second feature map into a decoder, and sequentially processing the feature map through two layers of global and local dimension attention modules and four layers of multi-scale efficient convolution modules in the decoder to obtain a target tissue image region, and a feature map formed by splicing the feature map output by the upper layer of module in the decoder and the second feature map is used as the input of the lower layer of module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer vision technology, and more specifically, to a medical image segmentation method, apparatus, and electronic device. Background Technology

[0002] The spine is the core supporting structure of the human body. Precise segmentation of vertebral structures from spinal X-ray images is of great value for clinical pathological evaluation and surgical planning. Accurate segmentation methods not only improve diagnostic accuracy but also provide a more reliable basis for the treatment and surgery of scoliosis. In the field of spinal X-ray image segmentation, early research relied heavily on morphological operations or graph cut algorithms. However, limitations imposed by image noise, low contrast, and the complexity of the spinal structure meant that segmentation accuracy could not meet clinical needs. With breakthroughs in deep learning technology, segmentation methods based on convolutional neural networks have gradually replaced traditional manual methods such as thresholding and region growing, significantly improving automation levels.

[0003] Currently, although various deep learning models (such as dual-branch complementary networks, hybrid architecture CNNs, and multi-supervised learning frameworks) have been optimized for spinal segmentation tasks, they are weak in processing X-ray images in practical applications, and most of them are designed for normal spines, with poor adaptability to pathological morphologies such as scoliosis, resulting in a significant decrease in segmentation accuracy; moreover, they can only achieve coarse segmentation of the entire spine or a single vertebra, and cannot perform detailed and precise separation of scoliotic vertebrae.

[0004] Therefore, there is an urgent need for a segmentation technology specifically for spinal X-ray images that can effectively handle morphological distortions, low-quality imaging interference, and complex anatomical relationships in scoliosis, and achieve precise extraction of vertebral body details to provide reliable support for clinical diagnosis. Summary of the Invention

[0005] One objective of this disclosure is to provide a new technical solution for medical image segmentation.

[0006] According to a first aspect of this disclosure, a medical image segmentation method is provided, comprising: The medical image to be segmented is input into the encoder, and then processed sequentially through four multi-scale efficient convolutional modules and two global and local dimension attention modules in the encoder to obtain the first feature map. The feature map output by the previous layer module in the encoder is used as the input of the next layer module. The feature maps output by each layer module in the encoder are input into the temporary feature fusion module to obtain the second feature map; The concatenated feature map of the first and second feature maps is input into the decoder. It then passes through two layers of global and local dimension attention modules and four layers of multi-scale efficient convolutional modules to obtain the target tissue image region. The concatenated feature map of the previous layer and the second feature map serves as the input to the next layer. The multi-scale efficient convolutional modules in the encoder and decoder are used to extract features from the input image to obtain global and local features of the target tissue in the input image; the temporary feature fusion module is used to fuse the feature maps output by each layer module in the encoder to achieve complementarity of feature information at different levels; the global and local dimension attention modules in the encoder and decoder are used to adaptively weight the features in the spatial and channel dimensions to enhance the features related to the target tissue.

[0007] Optionally, the processing steps of each multi-scale efficient convolutional module in the encoder and the decoder are as follows: Based on the number of channels in the input feature map, the input feature map is divided into four equal parts by a 1×1 convolution process. Based on the four feature maps, they are processed by 3×3 depthwise separable convolution, 7×7 depthwise separable convolution, 3×3 dilated convolution with a dilation rate of 4, and 5×5 dilated convolution with a dilation rate of 3, respectively, to obtain four feature maps. Based on the four feature maps, after normalization and ReLU activation function processing, they are concatenated to obtain the concatenated feature map. The input feature map is then connected to the feature map obtained by concatenating the four feature maps, and a skip connection is performed to obtain the feature map output by the multi-scale efficient convolution module.

[0008] Optionally, the processing steps of the temporary feature fusion module are as follows: The feature map output by the first multi-scale efficient convolutional module in the encoder is sequentially processed by pooling with its size reduced by half and 1×1 convolution, and then concatenated with the feature map output by the second multi-scale efficient convolutional module in the encoder to obtain the first concatenated feature map. The first stitched feature map is sequentially processed by 1×1 convolution and then by pooling with its size reduced by half. It is then stitched together with the feature map output by the third layer multi-scale efficient convolution module in the encoder to obtain the second stitched feature map. The second spliced ​​feature map is processed by a 1×1 convolution to obtain the third spliced ​​feature map; The feature map output by the global and local dimension attention module of the sixth layer in the encoder is processed by transposed convolution with its size magnified by two times, and then concatenated with the feature map output by the global and local dimension attention module of the fifth layer in the encoder to obtain the fourth concatenated feature map. The fourth stitched feature map is sequentially processed by 1×1 convolution and transposed convolution with a size magnification of 2, and then stitched with the feature map output by the fourth layer multi-scale high-efficiency convolution module in the encoder to obtain the fifth stitched feature map. The fifth stitched feature map is then processed sequentially through 1×1 convolution and transposed convolution with its size doubled to obtain the sixth stitched feature map. The feature map obtained by concatenating the third and sixth spliced ​​feature maps is then processed by a 1×1 convolution to obtain the feature map output by the temporary feature fusion module.

[0009] Optionally, the processing steps of the global and local dimension attention modules in the encoder and the decoder are as follows: Based on the input feature map, determine the attention weight matrix corresponding to the spatial dimension and the attention weight matrix corresponding to the channel dimension respectively. Based on the input feature map and the attention weight matrix corresponding to the spatial dimension, the feature map corresponding to the spatial dimension is determined, and based on the input feature map and the attention weight matrix corresponding to the channel dimension, the feature map corresponding to the channel dimension is determined. Based on the input feature map, determine the feature map corresponding to the local feature; The feature map corresponding to the spatial dimension, the feature map corresponding to the channel dimension, and the feature map corresponding to the local feature are concatenated to obtain a feature map after concatenating the three feature maps. The concatenated feature map is then processed sequentially through 3×3 convolution, normalization, ReLU activation, and 1×1 convolution. This concatenated feature map is then skipped with the input feature map to obtain the feature map output by the global and local dimension attention module.

[0010] Optionally, determining the attention weight matrix corresponding to the spatial dimension based on the input feature map includes: The input feature map is sequentially processed by a 3×3 convolution with a stride of 2 to obtain a feature map whose width and height are both reduced to half of their original values. The feature map, whose width and height are both reduced to half of their original values, is processed by the ReLU activation function to obtain the feature values ​​corresponding to query Q and key K, respectively. The feature value corresponding to query Q represents the location features of the target tissue, and the feature value corresponding to key K represents the location features of all tissues. The dot product of the feature value corresponding to query Q and the feature value corresponding to key K is calculated to obtain the correlation weight matrix used to represent the relationship between each pixel; The correlation weight matrix is ​​then subjected to bilinear interpolation, 3×3 convolution, and normalization based on the Softmax function to obtain the attention weight matrix corresponding to the spatial dimension. The step of determining the feature map corresponding to the spatial dimension based on the input feature map and the attention weight matrix corresponding to the spatial dimension includes: The input feature map is weighted and calculated with the attention weight matrix corresponding to the spatial dimension to obtain the feature map corresponding to the spatial dimension.

[0011] Optionally, determining the attention weight matrix corresponding to the channel dimension based on the input feature map includes: The input feature map is sequentially processed by a 3×3 convolution with a stride of 1 to obtain a feature map whose number of channels is reduced to half of the original. The feature map with the number of channels reduced to half of its original value is processed by the ReLU activation function to obtain the feature value corresponding to query Q and the feature value corresponding to key K, respectively. The feature value corresponding to query Q represents the channel feature of the target organization in the channel dimension, and the feature value corresponding to key K represents the channel feature of all organizations in the channel dimension. The dot product of the eigenvalues ​​corresponding to query Q and key K is calculated to obtain the relevance weight matrix that represents the relevance of different channels across the entire graph. The correlation weight matrix is ​​then subjected to bilinear interpolation, 3×3 convolution, and normalization based on the Softmax function to obtain the attention weight matrix corresponding to the channel dimension. The step of determining the feature map corresponding to the channel dimension based on the input feature map and the attention weight matrix corresponding to the channel dimension includes: The input feature map is weighted and calculated with the attention weight matrix corresponding to the channel dimension to obtain the feature map corresponding to the channel dimension.

[0012] Optionally, determining the feature map corresponding to the local feature based on the input feature map includes: The input feature map is processed sequentially through 1×1 convolution, normalization and ReLU activation function, 3×3 depthwise convolution, normalization and ReLU activation function, 1×1 convolution recovery, normalization and ReLU activation function, to obtain the feature map corresponding to the local features.

[0013] Optionally, the medical image to be segmented is a spinal image.

[0014] According to a second aspect of this disclosure, a medical image segmentation apparatus is provided, comprising: The encoder processing module is used to input the medical image to be segmented into the encoder, and then process it sequentially through the four-layer multi-scale efficient convolution module and the two-layer global and local dimension attention module in the encoder to obtain the first feature map. The feature map output by the previous layer module in the encoder is used as the input of the next layer module. A temporary feature fusion processing module is used to input the feature maps output by each layer module in the encoder into the temporary feature fusion module to obtain a second feature map; The decoder processing module is used to input the concatenated feature map of the first feature map and the second feature map into the decoder. The feature map then passes through two layers of global and local dimension attention modules and four layers of multi-scale efficient convolutional modules in the decoder to obtain the target tissue image region. The concatenated feature map of the previous layer and the second feature map in the decoder serves as the input to the next layer module. The multi-scale efficient convolutional modules in the encoder and the decoder are used to capture the overall morphological features of the target tissue and the detailed features of other tissues. The temporary feature fusion module is used to fuse the feature maps output by each module in the encoder. The global and local dimension attention modules in the encoder and the decoder are used to enhance the target tissue image region.

[0015] According to a third aspect of this disclosure, an electronic device is provided, including a memory and a processor, the memory storing a computer program for controlling the processor to operate in order to perform the method according to any one of the first aspects of this disclosure.

[0016] The medical image segmentation method disclosed herein utilizes a segmentation model composed of an encoder, a temporary feature fusion module, and a decoder to segment the medical image to be segmented. Each multi-scale efficient convolutional module in the encoder and decoder is used to capture the overall morphological features of the target tissue and the detailed features of other tissues, enhancing the model's adaptability to complex morphological distortions. The temporary feature fusion module is used to fuse the feature maps output by each module in the encoder, dynamically aggregating the shallow texture and deep semantic information of the encoder, optimizing the feature fusion ratio, and suppressing background interference. Each global and local dimension attention module in the encoder and decoder is used to enhance the target tissue image region, avoiding missegmentation caused by noise and low contrast interference in the medical image to be segmented, and improving the model's adaptability to harsh imaging conditions.

[0017] The features and advantages of the embodiments of this specification will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments of this specification and, together with their description, serve to explain the principles of these embodiments.

[0019] Figure 1 A schematic diagram of the architecture of a trained medical image segmentation model according to an embodiment of the present disclosure is shown.

[0020] Figure 2 A flowchart of a medical image segmentation method according to an embodiment of the present disclosure is shown.

[0021] Figure 3 A processing flowchart of each multi-scale efficient convolution module in the encoder and decoder according to an embodiment of the present disclosure is shown.

[0022] Figure 4 A processing flowchart of a temporary feature fusion module according to an embodiment of the present disclosure is shown.

[0023] Figure 5 A processing flowchart of the global and local dimension attention modules in the encoder and decoder according to an embodiment of the present disclosure is shown.

[0024] Figure 6 A schematic block diagram of a medical image segmentation apparatus according to an embodiment of the present disclosure is shown.

[0025] Figure 7 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0026] Various exemplary embodiments of this specification will now be described in detail with reference to the accompanying drawings.

[0027] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the embodiments of this specification or their application or use.

[0028] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0029] To address the aforementioned technical issues, this disclosure provides a medical image segmentation method. The method utilizes a segmentation model composed of an encoder, a temporary feature fusion module, and a decoder to segment the medical image to be segmented. Each multi-scale efficient convolutional module in the encoder and decoder is used to capture the overall morphological features of the target tissue and the detailed features of other tissues, enhancing the model's adaptability to complex morphological distortions. The temporary feature fusion module fuses the feature maps output by each module in the encoder, dynamically aggregating shallow texture and deep semantic information from the encoder, optimizing the feature fusion ratio, and suppressing background interference. Each global and local dimension attention module in the encoder and decoder is used to enhance the target tissue image region, avoiding missegmentation caused by noise and low contrast interference in the medical image to be segmented, and improving the model's adaptability to harsh imaging conditions.

[0030] The medical image segmentation method disclosed herein is performed by a trained medical image segmentation model. Figure 1 A schematic diagram of the architecture of a trained medical image segmentation model according to an embodiment of the present disclosure is shown.

[0031] according to Figure 1 As shown, the trained medical image segmentation model includes an encoder, a Temporal Feature Fusion (TFF) module, and a decoder.

[0032] The encoder consists of four layers of multi-scale efficient convolution (MESC) modules connected from top to bottom, and two layers of global-local dimensional attention (GLDA) modules.

[0033] The decoder consists of two layers of global and local attention modules connected from bottom to top, and four layers of multi-scale efficient convolution modules.

[0034] The temporary feature fusion module is connected to the modules in the encoder. The temporary feature fusion module is also connected to the modules in the decoder.

[0035] Figure 2 A flowchart of a medical image segmentation method according to an embodiment of the present disclosure is shown. Figure 2 As shown, the method includes steps S210 to S230.

[0036] Step S210: The medical image to be segmented is input into the encoder and processed sequentially by four multi-scale efficient convolutional modules and two global and local dimension attention modules in the encoder to obtain the first feature map. The feature map output by the previous layer module in the encoder is used as the input of the next layer module.

[0037] Step S220: Input the feature maps output by each module in the encoder into the temporary feature fusion module to obtain the second feature map.

[0038] Step S230: The concatenated feature map of the first and second feature maps is input to the decoder. It then passes through two layers of global and local dimension attention modules and four layers of multi-scale efficient convolutional modules in the decoder to obtain the target tissue image region. The feature map output from the previous layer of the decoder and the concatenated feature map of the second feature map serve as the input to the next layer. The multi-scale efficient convolutional modules in the encoder and decoder extract features from the input image to obtain global and local features of the target tissue. The temporary feature fusion module fuses the feature maps output from each layer of the encoder to achieve complementarity of feature information at different levels. The global and local dimension attention modules in the encoder and decoder adaptively weight the features in the spatial and channel dimensions to enhance target tissue-related features and suppress other features. These other tissue features include background features and other tissue features.

[0039] Combination Figure 1 As shown, the relationship between the encoder, the temporary feature fusion module, and the decoder is explained in detail.

[0040] In the encoder, the correspondence between the inputs and outputs of each module is as follows: , = , , , , , in, For the medical image to be segmented, This is the feature map output by the MESC module in the first layer of the encoder. This is the feature map output by the MESC module in the second layer of the encoder. This is the feature map output by the MESC module in the third layer of the encoder. This is the feature map output by the MESC module in the fourth layer of the encoder. This is the feature map output by the GLDA module in the fifth layer of the encoder. This is the feature map output by the GLDA module in the sixth layer of the encoder. This shows that the feature map output by the previous layer in the encoder serves as the input to the next layer.

[0041] In the decoder, the correspondence between the inputs and outputs of each module is as follows: , , , , ,

[0042] in, The feature map output by the temporary feature fusion module. This is the feature map output by the GLDA module in the first layer of the decoder. This is the feature map output by the GLDA module in the second layer of the decoder. This is the feature map output by the MESC module in the third layer of the decoder. This is the feature map output by the MESC module in the fourth layer of the decoder. This is the feature map output by the MESC module in the fifth layer of the decoder. This is the feature map output by the MESC module in the sixth layer of the decoder. As the final output of the decoder .

[0043] In some embodiments, combined with Figure 3 As shown, the processing steps of each multi-scale efficient convolution module in the encoder and decoder include steps S301 to S304.

[0044] Step S301: Based on the number of channels in the input feature map, the input feature map is divided into four equal parts by 1×1 convolution.

[0045] The input feature map is divided into four equal parts by a 1×1 convolution, i.e.

[0046] in, This represents the feature map corresponding to the number of channels being divided into four equal parts, Conv 1×1 This is a 1×1 convolution operation.

[0047] Step S302: Based on the four feature maps, they are processed by 3×3 depthwise separable convolution, 7×7 depthwise separable convolution, 3×3 dilated convolution with a dilation rate of 4, and 5×5 dilated convolution with a dilation rate of 3, respectively, to obtain four feature maps.

[0048] Step S303: Based on the four feature maps, after normalization and ReLU activation function processing, they are concatenated to obtain the concatenated feature map.

[0049] Step S304: The input feature map is connected to the feature map concatenated with the four feature maps by skip connection to obtain the feature map output by the multi-scale efficient convolution module.

[0050] The calculation formulas corresponding to the processes involved in steps S302, S303, and S304 are as follows:

[0051] Among them, the four feature maps are F1, F2, F3, and F4, respectively. avg This represents the feature map corresponding to the number of channels being divided into four equal parts. It is a 3×3 depthwise separable convolution. It is a 7×7 depth separable convolution. It is a 3×3 dilated convolution with a dilation rate of 4. For 5×5 dilated convolution with a dilation rate of 3, Conv 1×1 RB() is a 1×1 convolution operation, which is a combination of normalization and ReLU activation function, and C is the number of channels in the corresponding feature map.

[0052]

[0053] in, F1, F2, F3, and F4 are the feature maps output by the multi-scale efficient convolution module, respectively, and are the four feature maps calculated above. The corresponding functions for concatenation processing are RB(), which combines normalization and ReLU activation functions, and Conv. 1×1 For a 1×1 convolution operation, The input feature map.

[0054] In this embodiment, the multi-scale efficient convolutional modules in the encoder and decoder adopt a combination of parallel branches of depthwise separable convolution and dilated convolution, which breaks through the limitation of a single convolutional kernel in traditional network models, expands the receptive field, realizes efficient collaborative extraction of multi-scale features, and enhances the adaptability to complex morphological distortions.

[0055] In some embodiments, combined with Figure 1 and Figure 4 As shown, the processing steps of the temporary feature fusion module include steps S401 to S407.

[0056] Step S401: The feature map F output by the first layer multi-scale efficient convolutional module in the encoder is... e1 After being successively processed by pooling with its size reduced by half and 1×1 convolution, the feature map F is compared with the output feature map F of the second-layer multi-scale efficient convolution module in the encoder. e2 The images are then stitched together to obtain the first stitched feature map.

[0057] Step S402: The first stitched feature map is processed sequentially through 1×1 convolution and pooling with its size reduced by half, and then combined with the feature map F output by the third layer multi-scale efficient convolution module in the encoder.e3 The images are then stitched together to obtain the second stitched feature map.

[0058] Step S403: The second spliced ​​feature map is processed by 1×1 convolution to obtain the third spliced ​​feature map.

[0059] Step S404: The feature map F output by the sixth layer global and local dimension attention module in the encoder is... e6 After being transposed and enlarged by a factor of two, the feature map F is compared with the output feature map F from the fifth layer global and local dimension attention module in the encoder. e5 The splicing process is performed to obtain the fourth spliced ​​feature map.

[0060] Step S405: The fourth stitched feature map is processed sequentially through 1×1 convolution and transposed convolution with its size doubled, and then combined with the feature map F output by the fourth layer multi-scale efficient convolution module in the encoder. e4 The images are then stitched together to obtain the fifth stitched feature map.

[0061] Step S406: The fifth stitched feature map is processed by 1×1 convolution and transposed convolution with a size magnified by two times to obtain the sixth stitched feature map.

[0062] Step S407: The feature map resulting from the concatenation of the third and sixth concatenated feature maps is processed by a 1×1 convolution to obtain the feature map F output by the temporary feature fusion module. TFF .

[0063] In this embodiment, a temporary feature fusion module is used to aggregate the shallow texture and deep semantic information in the feature maps output by each module of the encoder, optimize the feature fusion ratio, suppress background interference, avoid missegmentation caused by noise and low contrast interference in the image to be segmented, and improve the model's adaptability to harsh imaging conditions.

[0064] In this embodiment, the feature maps output by the multi-layer modules in the encoder are progressively fused to suppress background interference.

[0065] In some embodiments, combined with Figure 5 As shown, the processing steps of each global and local dimension attention module in the encoder and decoder include steps S501 to S505.

[0066] Step S501: Based on the input feature map, determine the attention weight matrix corresponding to the spatial dimension and the attention weight matrix corresponding to the channel dimension, respectively.

[0067] Step S502: Based on the input feature map and the attention weight matrix corresponding to the spatial dimension, determine the feature map corresponding to the spatial dimension; and based on the input feature map and the attention weight matrix corresponding to the channel dimension, determine the feature map corresponding to the channel dimension.

[0068] Combination Figure 5 As shown, determining the feature map corresponding to the spatial dimension based on the input feature map specifically includes steps S502a to S502e.

[0069] Step S502a: The input feature map is processed by 3×3 convolution with stride of 2 in sequence to obtain a feature map whose width and height are reduced to half of the original.

[0070] Step S502b: The feature map, whose width and height are reduced to half of their original values, is processed by the ReLU activation function to obtain the feature values ​​corresponding to query Q and key K, respectively. The feature value corresponding to query Q represents the location features of the target tissue, and the feature value corresponding to key K represents the location features of all tissues.

[0071] The calculation formulas corresponding to the processes involved in steps S502a and S502b are as follows:

[0072] Where Q is the feature value corresponding to query Q, and K is the feature value corresponding to key K. Given the input feature map, The convolution is a 3×3 convolution with a stride of 2, and RB() is a combination of normalization and ReLU activation. Although Q and K are formally obtained from the same input features through convolution mapping, their mapping parameters are independently learnable, and they play asymmetric roles as query and matching benchmark in attention computation, respectively. Therefore, they differ in feature subspace representation and functional semantics. Their dot product essentially describes the correlation between the two feature subspaces, rather than the numerical consistency of the features themselves.

[0073] Step S502c: Calculate the dot product of the feature value corresponding to query Q and the feature value corresponding to key K to obtain the correlation weight matrix used to represent the relationship between each pixel.

[0074] In step S502d, the relevance weight matrix is ​​processed sequentially by bilinear interpolation, 3×3 convolution, and normalization based on the Softmax function to obtain the attention weight matrix corresponding to the spatial dimension.

[0075] The specific processing corresponding to steps S502c and S502d includes: calculating the dot product of the feature value corresponding to query Q and the feature value corresponding to key K, that is, transposing K to K TMultiplying this by Q yields a correlation weight matrix representing the relationships between pixels. Bilinear interpolation is used to restore the spatial resolution of this correlation weight matrix to the same size as the input feature map. After a 3×3 convolution, and then through a softmax function and normalization, the attention weight matrix corresponding to the spatial dimension is obtained. See the calculation formula below for details.

[0076] Where A is the attention weight matrix corresponding to the spatial dimension, Q is the feature value corresponding to query Q, K is the feature value corresponding to key K, BI is bilinear interpolation, and Conv 3×3 It is a 3×3 convolution. () represents the Softmax function.

[0077] Step S502e: The input feature map is weighted and calculated with the attention weight matrix corresponding to the spatial dimension to obtain the feature map corresponding to the spatial dimension.

[0078] The specific processing steps corresponding to step S502e include: reshaping the input feature map to align its size order with the attention weight matrix corresponding to the spatial dimension, and then performing a weighted calculation with the attention weight matrix corresponding to the spatial dimension to obtain the feature map corresponding to the spatial dimension. The specific calculation formula is as follows:

[0079] in, Let A be the feature map corresponding to the spatial dimension, and let A be the attention weight matrix corresponding to the spatial dimension. This is the feature map of the input after Reshape processing.

[0080] Combination Figure 5 As shown, determining the feature map corresponding to the channel dimension based on the input feature map specifically includes steps S502f to S502e.

[0081] Step S502f: The input feature map is processed by 3×3 convolution with stride 1 in sequence to obtain a feature map in which the number of feature map channels is reduced to half of the original number.

[0082] Step S502g: The feature map with the number of channels reduced to half of the original number is processed by the ReLU activation function to obtain the feature value corresponding to query Q and the feature value corresponding to key K. The feature value corresponding to query Q represents the channel feature of the target tissue in the channel dimension, and the feature value corresponding to key K represents the channel feature of all tissues in the channel dimension.

[0083] The calculation formulas corresponding to the processes involved in steps S502f and S502g are as follows:

[0084] Where Q is the feature value corresponding to query Q, and K is the feature value corresponding to key K. Given the input feature map, The convolution is a 3×3 convolution with a stride of 1, and RB() is a combination of normalization and ReLU activation. Although Q and K are formally obtained from the same input features through convolution mapping, their mapping parameters are independently learnable, and they play asymmetric roles as query and matching benchmark in attention calculation, respectively. Therefore, they differ in feature subspace representation and functional semantics. Their dot product essentially describes the correlation between the two feature subspaces, rather than the numerical consistency of the features themselves.

[0085] Step S502h calculates the dot product of the eigenvalues ​​corresponding to query Q and key K, resulting in a correlation weight matrix representing the correlation of different channels across the entire image. This strengthens the feature channels related to the target tissue while suppressing background and noise channels.

[0086] In step S502i, the correlation weight matrix is ​​processed sequentially by bilinear interpolation, 3×3 convolution, and normalization based on the Softmax function to obtain the attention weight matrix corresponding to the channel dimension.

[0087] The specific processing corresponding to steps S502h and S502i includes: calculating the dot product of the feature value corresponding to query Q and the feature value corresponding to key K, that is, transposing K to K T Multiplying this by Q yields the correlation weight matrix, which represents the correlation of different channels across the entire image. Bilinear interpolation is used to restore the spatial resolution of this correlation weight matrix to the same size as the input feature map. After 3×3 convolution, and then through Softmax and normalization, the attention weight matrix corresponding to each channel dimension is obtained. See the calculation formula below for details.

[0088] Where B is the attention weight matrix corresponding to the channel dimension, Q is the feature value corresponding to query Q, K is the feature value corresponding to key K, BI is bilinear interpolation, and Conv 3×3 It is a 3×3 convolution. () represents the Softmax function.

[0089] Step S502j: The input feature map is weighted and calculated with the attention weight matrix corresponding to the channel dimension to obtain the feature map corresponding to the channel dimension.

[0090] The specific processing steps corresponding to step S502j include: reshaping the input feature map to align its size order with the attention weight matrix corresponding to the spatial dimension, and then weighting it with the attention weight matrix corresponding to the channel dimension to obtain the feature map corresponding to the channel dimension. The specific calculation formula is as follows:

[0091] in, Let B be the feature map corresponding to the channel dimension, and let B be the attention weight matrix corresponding to the channel dimension. This is the feature map of the input after Reshape processing.

[0092] Step S503: Based on the input feature map, determine the feature map corresponding to the local feature.

[0093] Combination Figure 5 As shown, the input feature map is processed sequentially through 1×1 convolution, normalization and ReLU activation function, 3×3 depthwise convolution, normalization and ReLU activation function, 1×1 convolution recovery, and normalization and ReLU activation function to obtain the feature map corresponding to the local features.

[0094] The calculation formulas corresponding to the processing involved in step S503 are as follows:

[0095] in, The feature map corresponding to the local features. For the input feature map, Conv 1×1 It is a 1×1 convolution, RB() is a combination of normalization and ReLU activation function, Conv 3×3 It is a 3×3 convolution, where C is the number of channels in the corresponding feature map.

[0096] Step S504: The feature map corresponding to the spatial dimension, the feature map corresponding to the channel dimension, and the feature map corresponding to the local features are concatenated to obtain a feature map after concatenation of the three feature maps.

[0097] Step S504 specifically includes: converting the feature map corresponding to the spatial dimension. Feature maps corresponding to channel dimensions Shape adjustment to match the input feature map Alignment yields feature maps corresponding to the adjusted spatial dimensions. Feature maps corresponding to the adjusted channel dimensions Then, the feature map corresponding to the adjusted spatial dimension. Feature maps corresponding to the adjusted channel dimensions Feature maps corresponding to local features The three feature maps are concatenated to obtain a new feature map. The specific calculation formula is as follows:

[0098] in, This is the function corresponding to the splicing process.

[0099] Step S505: The concatenated feature map is processed sequentially by 3×3 convolution, normalization and ReLU activation function, and 1×1 convolution. Then, it is connected to the input feature map to obtain the feature map output by the global and local dimension attention module.

[0100] The calculation formulas corresponding to the processing involved in step S505 are as follows:

[0101] in, These are the feature maps output by the global and local attention modules. Given the input feature map, The feature map obtained by concatenating the three feature maps in step S504 above, Conv 3×3 It is a 3×3 convolution, where C is the number of channels in the corresponding feature map, RB() is a combination of normalization and ReLU activation function, and Conv 1×1 It is a 1×1 convolution.

[0102] In this embodiment, spatial attention, channel attention, and local bottleneck structures are integrated into a single module to achieve dynamic allocation of feature weights and accurate modeling of anatomical semantics. Taking spinal images as an example, spatial attention modeling obtains overall spatial information of the spine, channel attention modeling suppresses redundant noise, and local bottleneck structures enhance vertebral edge details, improving the accuracy of spinal image region determination and enhancing adaptability to complex morphological distortions.

[0103] Taking a spinal image as an example, this paper specifically explains the medical image segmentation method. The spinal image includes the spine, thoracic vertebrae, and lumbar vertebrae. Using a medical image segmentation method, the corresponding spinal regions are segmented from this spinal image.

[0104] Combination Figure 1 As shown, the spinal image first passes through an encoder, then through a 4-layer MSEC module, continuously capturing local vertebral features as the resolution decreases, and then through a 2-layer GLDA module to model the global semantic relationships of the spine at a smaller resolution.

[0105] When the feature map output by the encoder is transmitted to the decoder, it first goes through two layers of GLDA modules, which receive temporary features from the TFF module to achieve the fusion modeling of deep and mid-level features. Then it goes through four layers of MSEC modules, which receive temporary features from the TFF module to integrate global features.

[0106] Taking a spinal image as an example, the training process of the trained medical image segmentation model is explained. This process includes steps S601 to S604.

[0107] Step S601: Obtain a spinal image training set, wherein each sample in the spinal image training set includes different spinal images and location information of labeled spinal regions. Each spinal image includes the spine, thoracic vertebrae, and lumbar vertebrae.

[0108] Step S602: Using the spinal image training set, train the medical image segmentation model to be trained to obtain the predicted location information of the spinal region in each spinal image. Step S603: Determine the loss function value based on the location information of the labeled spinal regions in each spinal image and the predicted location information of the spinal regions in each spinal image. Step S604: If the loss function value is greater than a preset threshold, adjust the parameters of the medical image segmentation model to be trained according to the loss function value until the loss function value is less than the preset threshold, then stop training the medical image segmentation model to be trained, and obtain the trained multi-medical image segmentation model.

[0109] This disclosure also provides a medical image segmentation apparatus for implementing any of the above method embodiments. Figure 6 A structural block diagram of a medical image segmentation apparatus according to some embodiments is shown. Figure 6 As shown, the hand medical image segmentation device 600 may include an encoder processing module 610, a temporary feature fusion processing module 620, and a decoder processing module 630.

[0110] The encoder processing module 610 is used to input the medical image to be segmented into the encoder, and then process it through the four-layer multi-scale efficient convolution module and the two-layer global and local dimension attention module in the encoder to obtain the first feature map. The feature map output by the previous layer module in the encoder is used as the input of the next layer module.

[0111] The temporary feature fusion processing module 620 is used to input the feature maps output by each layer module in the encoder into the temporary feature fusion module to obtain the second feature map.

[0112] The decoder processing module 630 is used to input the feature map after the first feature map and the second feature map are concatenated into the decoder. The feature map is processed by two global and local dimension attention modules and four multi-scale efficient convolution modules in the decoder to obtain the target tissue image region. The feature map output by the previous layer module in the decoder and the feature map after the second feature map are concatenated into the next layer module. The multi-scale efficient convolution modules in the encoder and decoder are used to capture the overall morphological features of the target tissue and the detailed features of other tissues. The temporary feature fusion module is used to fuse the feature maps output by each module in the encoder. The global and local dimension attention modules in the encoder and decoder are used to enhance the target tissue image region.

[0113] In some embodiments, each multi-scale efficient convolutional module in the encoder and decoder is used to divide the input feature map into four equal feature maps by performing 1×1 convolution processing based on the number of channels in the input feature map; based on the four feature maps, they are processed by 3×3 depthwise separable convolution, 7×7 depthwise separable convolution, 3×3 dilated convolution with a dilation rate of 4, and 5×5 dilated convolution with a dilation rate of 3, respectively, to obtain four feature maps; based on the four feature maps, after normalization and ReLU activation function processing, they are concatenated to obtain a concatenated feature map; the input feature map is then skip-connected with the concatenated feature map to obtain the feature map output by the multi-scale efficient convolutional module.

[0114] In some embodiments, the temporary feature fusion processing module 620 is used to concatenate the feature map output by the first-layer multi-scale efficient convolutional module in the encoder with the feature map output by the second-layer multi-scale efficient convolutional module in the encoder after sequentially performing halved pooling and 1×1 convolution processing to obtain a first concatenated feature map; to concatenate the first concatenated feature map with the feature map output by the third-layer multi-scale efficient convolutional module in the encoder after sequentially performing 1×1 convolution and halved pooling processing to obtain a second concatenated feature map; to concatenate the second concatenated feature map with the feature map output by the sixth-layer global and local dimension attention module in the encoder to obtain a third concatenated feature map; and to concatenate the feature map output by the sixth-layer global and local dimension attention module in the encoder with the feature map output by the second-layer multi-scale efficient convolutional module in the encoder to obtain a third concatenated feature map. After the feature map is enlarged by a factor of two and then transposed, it is concatenated with the feature map output by the fifth layer global and local dimension attention module in the encoder to obtain the fourth concatenated feature map. The fourth concatenated feature map is then processed by 1×1 convolution and then transposed by a factor of two, and concatenated with the feature map output by the fourth layer multi-scale efficient convolution module in the encoder to obtain the fifth concatenated feature map. The fifth concatenated feature map is then processed by 1×1 convolution and then transposed by a factor of two to obtain the sixth concatenated feature map. The feature map concatenated from the third and sixth concatenated feature maps is then processed by 1×1 convolution to obtain the feature map output by the temporary feature fusion module.

[0115] In some embodiments, the global and local dimension attention modules in the encoder and decoder are used to determine the attention weight matrix corresponding to the spatial dimension and the attention weight matrix corresponding to the channel dimension based on the input feature map; determine the feature map corresponding to the spatial dimension based on the input feature map and the attention weight matrix corresponding to the spatial dimension, and determine the feature map corresponding to the channel dimension based on the input feature map and the attention weight matrix corresponding to the channel dimension; determine the feature map corresponding to the local features based on the input feature map; concatenate the feature map corresponding to the spatial dimension, the feature map corresponding to the channel dimension, and the feature map corresponding to the local features to obtain a concatenated feature map; pass the concatenated feature map through 3×3 convolution, normalization and ReLU activation function processing, and 1×1 convolution processing in sequence, and then perform a skip connection with the input feature map to obtain the feature map output by the global and local dimension attention modules.

[0116] In some embodiments, the global and local dimension attention modules in the encoder and decoder are used to sequentially process the input feature map through a 3×3 convolution with a stride of 2 to obtain a feature map whose width and height are both reduced to half of their original values; the feature map whose width and height are reduced to half of their original values ​​is processed by the ReLU activation function to obtain the feature value corresponding to query Q and the feature value corresponding to key K, respectively, where the feature value corresponding to query Q represents the location feature of the target tissue, and the feature value corresponding to key K represents the location feature of all tissues; the dot product of the feature value corresponding to query Q and the feature value corresponding to key K is calculated to obtain a correlation weight matrix used to represent the relationship between pixels; the correlation weight matrix is ​​sequentially processed by bilinear interpolation, 3×3 convolution, and normalization based on the Softmax function to obtain the attention weight matrix corresponding to the spatial dimension; the feature map corresponding to the spatial dimension is determined according to the input feature map and the attention weight matrix corresponding to the spatial dimension, including: weighting the input feature map and the attention weight matrix corresponding to the spatial dimension to obtain the feature map corresponding to the spatial dimension.

[0117] In some embodiments, the global and local attention modules in the encoder and decoder are used to sequentially process the input feature map through 3×3 convolutions with a stride of 1 to obtain a feature map with half the number of channels. The feature map with half the number of channels is then processed by the ReLU activation function to obtain the feature values ​​corresponding to query Q and key K, respectively. The feature value corresponding to query Q represents the channel feature of the target tissue in the channel dimension, and the feature value corresponding to key K represents the channel feature of all tissues in the channel dimension. The dot product of the feature value corresponding to query Q and the feature value corresponding to key K is calculated to obtain the correlation weight matrix representing the correlation of different channels in the entire image. The correlation weight matrix is ​​then sequentially processed by bilinear interpolation, 3×3 convolution, and normalization based on the Softmax function to obtain the attention weight matrix corresponding to the channel dimension. Based on the input feature map and the attention weight matrix corresponding to the channel dimension, the feature map corresponding to the channel dimension is determined, including: weighting the input feature map with the attention weight matrix corresponding to the channel dimension to obtain the feature map corresponding to the channel dimension.

[0118] In some embodiments, the global and local dimension attention modules in the encoder and decoder are used to sequentially process the input feature map through 1×1 convolution, normalization and ReLU activation function processing, 3×3 depth convolution, normalization and ReLU activation function processing, 1×1 convolution recovery processing, and normalization and ReLU activation function processing to obtain the feature map corresponding to the local features.

[0119] This disclosure also provides an electronic device for implementing any of the above method embodiments. Figure 7 A structural block diagram of an electronic device 7 according to some embodiments is shown. This electronic device 7 may be a PC, workstation, laptop computer, server, etc., and is not limited thereto.

[0120] like Figure 7 As shown, the electronic device 7 includes a processor 710 and a memory 720 for storing executable instructions of the processor 710. The processor 710 is configured to implement a medical image segmentation method according to any embodiment of the present disclosure when executing the instructions stored in the memory 720.

[0121] The processor 710 is used to execute computer instructions, which can be written using instruction sets of architectures such as x86, Arm, RISC, MIPS, and SSE. The memory 720 includes, for example, ROM (Read-Only Memory), RAM (Random Access Memory), and non-volatile memory such as a hard disk, etc., and is not limited thereto.

[0122] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. For the apparatus embodiments, relevant parts can be referred to the descriptions in the method embodiments.

[0123] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0124] Embodiments of this specification may be systems, methods, and / or computer program products. A computer program product may include a computer-readable storage medium having computer instructions stored thereon for causing a processor to implement various aspects of the embodiments of this specification.

[0125] Computer-readable storage media can be tangible devices capable of holding and storing computer instructions for use by computer instruction execution devices. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing computer instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0126] The computer instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network layer, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network layer may include copper cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network layer adapter card or network layer interface in each computing / processing device receives computer instructions from the network layer and forwards those instructions for storage on computer-readable storage media within the respective computing / processing device.

[0127] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this specification. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of computer instructions, which contains one or more executable computer instructions for implementing a specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are equivalent.

[0128] Various embodiments of this specification have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A medical image segmentation method, characterized in that, include: The medical image to be segmented is input into the encoder, and then processed sequentially through four multi-scale efficient convolutional modules and two global and local dimension attention modules in the encoder to obtain the first feature map. The feature map output by the previous layer module in the encoder is used as the input of the next layer module. The feature maps output by each layer module in the encoder are input into the temporary feature fusion module to obtain the second feature map; The concatenated feature map of the first and second feature maps is input into the decoder. It then passes through two layers of global and local dimension attention modules and four layers of multi-scale efficient convolutional modules to obtain the target tissue image region. The concatenated feature map of the previous layer and the second feature map serves as the input to the next layer. The multi-scale efficient convolutional modules in the encoder and decoder are used to extract features from the input image to obtain global and local features of the target tissue in the input image; the temporary feature fusion module is used to fuse the feature maps output by each layer module in the encoder to achieve complementarity of feature information at different levels; the global and local dimension attention modules in the encoder and decoder are used to adaptively weight the features in the spatial and channel dimensions to enhance the features related to the target tissue.

2. The method according to claim 1, characterized in that, The processing steps of each multi-scale efficient convolutional module in the encoder and the decoder are as follows: Based on the number of channels in the input feature map, the input feature map is divided into four equal parts by a 1×1 convolution process. Based on the four feature maps, they are processed by 3×3 depthwise separable convolution, 7×7 depthwise separable convolution, 3×3 dilated convolution with a dilation rate of 4, and 5×5 dilated convolution with a dilation rate of 3, respectively, to obtain four feature maps. Based on the four feature maps, after normalization and ReLU activation function processing, they are concatenated to obtain the concatenated feature map. The input feature map is then connected to the feature map obtained by concatenating the four feature maps, and a skip connection is performed to obtain the feature map output by the multi-scale efficient convolution module.

3. The method according to claim 1, characterized in that, The processing steps of the temporary feature fusion module are as follows: The feature map output by the first multi-scale efficient convolutional module in the encoder is sequentially processed by pooling with its size reduced by half and 1×1 convolution, and then concatenated with the feature map output by the second multi-scale efficient convolutional module in the encoder to obtain the first concatenated feature map. The first stitched feature map is sequentially processed by 1×1 convolution and then by pooling with its size reduced by half. It is then stitched together with the feature map output by the third layer multi-scale efficient convolution module in the encoder to obtain the second stitched feature map. The second spliced ​​feature map is processed by a 1×1 convolution to obtain the third spliced ​​feature map; The feature map output by the global and local dimension attention module of the sixth layer in the encoder is processed by transposed convolution with its size magnified by two times, and then concatenated with the feature map output by the global and local dimension attention module of the fifth layer in the encoder to obtain the fourth concatenated feature map. The fourth stitched feature map is sequentially processed by 1×1 convolution and transposed convolution with a size magnification of 2, and then stitched with the feature map output by the fourth layer multi-scale high-efficiency convolution module in the encoder to obtain the fifth stitched feature map. The fifth stitched feature map is then processed sequentially through 1×1 convolution and transposed convolution with its size doubled to obtain the sixth stitched feature map. The feature map obtained by concatenating the third and sixth spliced ​​feature maps is then processed by a 1×1 convolution to obtain the feature map output by the temporary feature fusion module.

4. The method according to claim 1, characterized in that, The processing steps of the global and local dimension attention modules in the encoder and decoder are as follows: Based on the input feature map, determine the attention weight matrix corresponding to the spatial dimension and the attention weight matrix corresponding to the channel dimension respectively. Based on the input feature map and the attention weight matrix corresponding to the spatial dimension, the feature map corresponding to the spatial dimension is determined, and based on the input feature map and the attention weight matrix corresponding to the channel dimension, the feature map corresponding to the channel dimension is determined. Based on the input feature map, determine the feature map corresponding to the local feature; The feature map corresponding to the spatial dimension, the feature map corresponding to the channel dimension, and the feature map corresponding to the local feature are concatenated to obtain a feature map after concatenating the three feature maps. The concatenated feature map is then processed sequentially through 3×3 convolution, normalization, ReLU activation, and 1×1 convolution. This concatenated feature map is then skipped with the input feature map to obtain the feature map output by the global and local dimension attention modules.

5. The method according to claim 4, characterized in that, The process of determining the attention weight matrix corresponding to the spatial dimension based on the input feature map includes: The input feature map is sequentially processed by a 3×3 convolution with a stride of 2 to obtain a feature map whose width and height are both reduced to half of their original values. The feature map, whose width and height are both reduced to half of their original values, is processed by the ReLU activation function to obtain the feature values ​​corresponding to query Q and key K, respectively. The feature value corresponding to query Q represents the location features of the target tissue, and the feature value corresponding to key K represents the location features of all tissues. The dot product of the feature value corresponding to query Q and the feature value corresponding to key K is calculated to obtain the correlation weight matrix used to represent the relationship between each pixel; The correlation weight matrix is ​​then subjected to bilinear interpolation, 3×3 convolution, and normalization based on the Softmax function to obtain the attention weight matrix corresponding to the spatial dimension. The step of determining the feature map corresponding to the spatial dimension based on the input feature map and the attention weight matrix corresponding to the spatial dimension includes: The input feature map is weighted and calculated with the attention weight matrix corresponding to the spatial dimension to obtain the feature map corresponding to the spatial dimension.

6. The method according to claim 4, characterized in that, The process of determining the attention weight matrix corresponding to the channel dimension based on the input feature map includes: The input feature map is sequentially processed by a 3×3 convolution with a stride of 1 to obtain a feature map whose number of channels is reduced to half of the original. The feature map with the number of channels reduced to half of its original value is processed by the ReLU activation function to obtain the feature value corresponding to query Q and the feature value corresponding to key K, respectively. The feature value corresponding to query Q represents the channel feature of the target organization in the channel dimension, and the feature value corresponding to key K represents the channel feature of all organizations in the channel dimension. The dot product of the eigenvalues ​​corresponding to query Q and key K is calculated to obtain the relevance weight matrix that represents the relevance of different channels across the entire graph. The correlation weight matrix is ​​then subjected to bilinear interpolation, 3×3 convolution, and normalization based on the Softmax function to obtain the attention weight matrix corresponding to the channel dimension. The step of determining the feature map corresponding to the channel dimension based on the input feature map and the attention weight matrix corresponding to the channel dimension includes: The input feature map is weighted and calculated with the attention weight matrix corresponding to the channel dimension to obtain the feature map corresponding to the channel dimension.

7. The method according to claim 4, characterized in that, The process of determining the feature map corresponding to local features based on the input feature map includes: The input feature map is processed sequentially through 1×1 convolution, normalization and ReLU activation function, 3×3 depthwise convolution, normalization and ReLU activation function, 1×1 convolution recovery, normalization and ReLU activation function, to obtain the feature map corresponding to the local features.

8. The method according to any one of claims 1-7, characterized in that, The medical image to be segmented is a spine image.

9. A medical image segmentation device, characterized in that, include: The encoder processing module is used to input the medical image to be segmented into the encoder, and then process it sequentially through the four-layer multi-scale efficient convolution module and the two-layer global and local dimension attention module in the encoder to obtain the first feature map. The feature map output by the previous layer module in the encoder is used as the input of the next layer module. A temporary feature fusion processing module is used to input the feature maps output by each layer module in the encoder into the temporary feature fusion module to obtain a second feature map; The decoder processing module is used to input the concatenated feature map of the first feature map and the second feature map into the decoder. The feature map then passes through two layers of global and local dimension attention modules and four layers of multi-scale efficient convolutional modules in the decoder to obtain the target tissue image region. The concatenated feature map of the previous layer and the second feature map in the decoder serves as the input to the next layer module. The multi-scale efficient convolutional modules in the encoder and the decoder are used to capture the overall morphological features of the target tissue and the detailed features of other tissues. The temporary feature fusion module is used to fuse the feature maps output by each module in the encoder. The global and local dimension attention modules in the encoder and the decoder are used to enhance the target tissue image region.

10. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program for controlling the processor to operate in order to perform the medical image segmentation method according to any one of claims 1 to 8.