Spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss

By introducing a large kernel attention residual module and a dynamic distance loss function, the spinal MR image segmentation method solves the problems of limited receptive field and class imbalance in traditional lightweight models, achieving efficient and accurate spinal MR image segmentation, which is suitable for resource-constrained devices.

CN121788511APending Publication Date: 2026-04-03CHANGCHUN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Traditional lightweight models have limited receptive fields in spinal MR image segmentation, which makes it difficult to effectively capture global context, resulting in decreased segmentation accuracy and severe class imbalance, making it difficult to efficiently segment spinal MR images on resource-constrained devices.

Method used

By employing a large-kernel attention residual module and a dynamic distance loss function, and through hierarchical deep aggregation and multi-scale feature fusion, the receptive field is expanded and the weights are adaptively adjusted. Combined with an edge distance map generation strategy, the segmentation accuracy is improved.

Benefits of technology

While reducing the number of network parameters, it improves the accuracy and efficiency of spinal MR image segmentation, making it suitable for resource-constrained clinical scenarios and solving the problems of limited receptive field and class imbalance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121788511A_ABST
    Figure CN121788511A_ABST
Patent Text Reader

Abstract

A spine MR image segmentation method based on depth layer aggregation and dynamic distance loss belongs to the field of image processing, and comprises the following steps: constructing a spine MR image segmentation network model comprising an encoder, a multi-scale feature fusion encoder and a decoder; the encoder comprises two encoding nodes which both use a hierarchical deep aggregation module to process features; the multi-scale feature fusion encoder comprises two key nodes which both use a first multi-scale aggregation module to process features. The decoder comprises two decoding nodes, the decoding nodes use a first multi-scale aggregation module to process features, and the decoding nodes use a second multi-scale aggregation module to process features; setting a segmentation network loss function; setting an edge distance map generation and processing strategy; and inputting a spinal MR image to be processed into the spinal MR image segmentation network model for segmentation processing. According to the method, the network parameter quantity is reduced, the model receptive field is expanded, the class imbalance problem is solved, and the spinal MR segmentation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, specifically relating to a method for segmenting spinal MR images based on depth layer aggregation and dynamic distance loss. Background Technology

[0002] Against the backdrop of a continuously rising incidence of spinal diseases, magnetic resonance (MR) image segmentation, as a core technology for the auxiliary diagnosis of spinal diseases, is used to accurately extract anatomical structures such as vertebrae and intervertebral discs, and has become a key research direction in the field of medical image processing. However, MR image segmentation tasks face challenges such as high image noise, uneven contrast, complex structures, and foreground-background class imbalance, resulting in excessively high computational resource requirements for traditional deep learning models, making them unsuitable for resource-constrained edge devices.

[0003] Currently, most traditional lightweight modeling methods employ small convolutional kernels (e.g., 3×3) to reduce the number of parameters and computational complexity. While this reduces the overall overhead of the model, it limits the receptive field, making it unable to effectively capture the global context and long-range dependencies in spinal MR images. Consequently, multi-scale feature fusion is insufficient in the segmentation of complex structures such as vertebrae and intervertebral discs. Furthermore, due to the reduced number of parameters, the class imbalance problem between the spinal target and the background is further exacerbated, making it difficult for traditional loss functions to adaptively adjust weights, resulting in the loss of boundary details and a decrease in segmentation accuracy.

[0004] Therefore, there is an urgent need for a lightweight medical image segmentation network that can reduce the use of large amounts of computational resources and solve the class imbalance problem caused by the reduction of parameters, making it suitable for resource-constrained platforms. Summary of the Invention

[0005] The purpose of this invention is to provide a spinal MR image segmentation method based on deep layer aggregation and dynamic distance loss, in order to solve the problem that traditional lightweight model methods rely on the stacking of small convolutional kernels, which leads to a significant reduction in model parameters, a limited receptive field, an inability to effectively capture global context, and difficulty in balancing the extraction of global structure and boundary details, thereby causing class imbalance problems.

[0006] The technical solution adopted by this invention to solve the technical problem is as follows:

[0007] This invention provides a spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss, comprising the following steps:

[0008] Step 1: Construct a network model for segmenting spinal MR images;

[0009] The spinal MR image segmentation network model includes an encoder, a multi-scale feature fusion encoder, and a decoder. The encoder includes two encoding nodes X1,0 and X2,0, both of which use a hierarchical deep aggregation module to process features. The multi-scale feature fusion encoder includes two key nodes X1,1 and X3,0, both of which use a first multi-scale aggregation module to process features. The decoder includes two decoding nodes X2,1 and X1,2, where decoding node X2,1 uses a first multi-scale aggregation module to process features, and decoding node X1,2 uses a second multi-scale aggregation module to process features.

[0010] Step 2: Set the loss function for the segmentation network;

[0011] The loss function of the segmentation network is a dynamic distance loss;

[0012] Step 3: Edge distance map generation and processing strategy;

[0013] For each pixel x in the image, calculate its Euclidean distance to the nearest boundary pixel of the target object to generate a two-dimensional matrix, i.e., the original distance map; for each connected component C of the original distance map, subtract the local maximum distance value plus 1, and standardize by dividing by the local maximum distance to obtain the edge distance map;

[0014] Step 4: Input the spinal MR image to be processed into the spinal MR image segmentation network model for segmentation processing.

[0015] Furthermore, the hierarchical deep aggregation module includes a basic convolution module, a large kernel attention residual module, and a first aggregation node; the basic convolution module extracts basic feature information from the input feature map; the large kernel attention residual module sequentially performs 7×7 depthwise convolution, 5×5 depthwise dilated convolution, and channel shuffling on the input feature map, and finally captures channel dependencies and assigns weights through 1D convolution; the first aggregation node concatenates the feature map output by the basic convolution module and the feature map output by the large kernel attention residual module along the channel dimension to form a high-channel feature map. .

[0016] Furthermore, the first multi-scale aggregation module includes a basic convolutional module, a large kernel attention residual module, and a first aggregation node; the first multi-scale aggregation module receives multiple input feature maps from the encoding stage, and the features of these input feature maps all include shallow features. and deep features generated through downsampling The features of these input feature maps are resolution aligned to obtain multi-scale features. Multi-scale features The data is transmitted to the first aggregation node via cross-layer connections, where it is spliced ​​and fused along the channel dimension. The fused features are then used as the output of the first multi-scale aggregation module and transmitted to the decoding stage or the next first aggregation node.

[0017] Furthermore, the second multi-scale aggregation module includes a basic convolutional module, a large-kernel attention residual module, and a second aggregation node; the second multi-scale aggregation module receives multiple input feature maps from the encoding stage, and the features of these input feature maps all include shallow features. and deep features generated through downsampling The features of these input feature maps are resolution aligned to obtain multi-scale features. Multi-scale features The data is transmitted to the first aggregation node via cross-layer connections, where it is spliced ​​and fused along the channel dimension. The fused features are then used as the output of the second multi-scale aggregation module and transmitted to the decoding stage or the next first aggregation node.

[0018] Furthermore, in the encoding stage: the encoder processes the image through the hierarchical depth aggregation module of encoding node X1,0, and outputs a 256×256×32 feature map from the first aggregation node. The features output by encoding node X1,0 are transmitted to encoding node X2,0 through 2× downsampling, and then the hierarchical depth aggregation module is applied again to extract deep features, and outputs a 32×128×128 feature map from the first aggregation node.

[0019] Furthermore, in the multi-scale feature fusion stage: features are input from encoding node X1,0 via 4× downsampling, and simultaneously transmitted from encoding nodes X1,0 and X2,0 to the first aggregation node of key node X1,1, reducing the image resolution to 64×64×32; features are input from encoding node X2,0 via 2× downsampling, and simultaneously transmitted from encoding nodes X1,0 and X2,0 to the first aggregation node of key node X3,0, reducing the image resolution to 64×64×32.

[0020] Furthermore, in the decoding stage: the input is upsampled from the key node X3,0, and the multi-scale features of the key nodes X1,1 and X3,0 are fused to increase the image resolution to 128×128×32; the input is upsampled from the key node X1,1 and the decoding node X2,1 to restore the image resolution to 256×256.

[0021] Furthermore, the mathematical expression for the segmentation network loss function is: , ; Indicates the weighting factor. Indicates the nonlinear amplification factor. Responsible for normalizing the dynamic edge loss values, Represents multi-class cross-entropy loss. This represents the edge distance loss.

[0022] Furthermore, the mathematical expression for the multi-class cross-entropy loss is:

[0023] ;

[0024] in, Indicates the number of categories. Indicates the model's predicted probability;

[0025] The mathematical expression for the edge distance loss is:

[0026] ;

[0027] ;

[0028] ;

[0029] ;

[0030] in, Indicates the weight of the positive class. Indicates background loss. Indicates a loss of prospects. Indicates the number of background categories. Indicates the number of foreground categories. This indicates the model's prediction results. Represents the model's true label. This represents the weight of the i-th pixel in the edge distance graph. This represents the sum of the background edge weights in the edge distance map. This represents the sum of the foreground edge weights in the edge distance graph.

[0031] Furthermore, in step three, the formula for calculating the edge distance map for each pixel x in the spinal MR image is:

[0032] ;

[0033] in, Indicates the future; The background is represented by D(x); the Euclidean distance is represented by D(x).

[0034] The beneficial effects of this invention are:

[0035] This invention provides a spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss, primarily addressing the problems of high computational resource requirements, limited receptive field, class imbalance, and insufficient local detail extraction in spinal MR image segmentation. Compared with existing technologies, this invention has the following advantages:

[0036] 1. Regarding the problem of limited receptive field, traditional small kernel convolution is difficult to capture the global context of spinal MR images. This invention introduces a large kernel attention residual module to expand the receptive field, and combines channel shuffling and efficient channel attention to enhance local detail extraction, thereby improving the model's ability to capture complex vertebral structures and reducing the number of parameters.

[0037] 2. This invention focuses on the global structure in the early stage of training and strengthens edge details in the later stage. This adaptive mechanism alleviates the class imbalance problem of spinal MR images and improves segmentation accuracy. While improving resource efficiency, it ensures high-precision segmentation and is suitable for low-power clinical scenarios.

[0038] 3. This invention adopts EDM+DDLoss: CE / ED dynamic weighting based on edge distance map, with adaptive weights during training, to improve contour and detail.

[0039] 4. This invention not only reduces the number of network parameters, but also expands the model's receptive field, solves the class imbalance problem, and improves the efficiency of spinal MR segmentation. Attached Figure Description

[0040] Figure 1 This is a structural diagram of the basic convolutional module.

[0041] Figure 2 This is a structural diagram of the large-core attention residual module.

[0042] Figure 3 This is a schematic diagram illustrating the working principle of the large-core attention residual module.

[0043] Figure 4 This is the structure diagram of the first aggregation node.

[0044] Figure 5 This is the structure diagram of the second aggregation node.

[0045] Figure 6 The diagram shows the overall network structure of a spinal MR image segmentation method based on deep layer aggregation and dynamic distance loss provided by this invention. Detailed Implementation

[0046] The present invention will be further described in detail below with reference to the accompanying drawings.

[0047] See Figure 1-6The present invention provides a method for segmenting spinal MR images based on depth layer aggregation and dynamic distance loss, the specific implementation process of which is as follows:

[0048] Step 1: Construct a network model for segmenting spinal MR images;

[0049] In this invention, a spinal MR image segmentation model is constructed based on a lightweight deep layer aggregation with dynamic distance loss network (DLD-Net) or other lightweight backbone networks like MobileNet. The lightweight DLD-Net backbone consists of U-shaped encoding, multi-scale fusion, decoding, fixed small channels, and two-stage downsampling.

[0050] The specific construction process is as follows:

[0051] Step S1.1: Construct the basic convolutional module;

[0052] like Figure 1 As shown, the basic convolutional module constructed in this invention mainly includes 3×3 convolution, batch normalization (BN), and ReLU activation function, which are used to extract basic feature information.

[0053] Step S1.2: Construct the Large Kernel Attention Residual (LKAR) module.

[0054] like Figure 2 As shown, the large kernel attention residual module constructed in this invention mainly includes a 7×7 depth convolution, a 5×5 depth dilated convolution, channel shuffling, and an efficient channel attention (ECA) module, which are used to expand the receptive field and enhance the extraction of key features.

[0055] Specifically, such as Figure 3 As shown, the working principle of the large-core attention residual module is as follows:

[0056] The input feature map is subjected to a 7×7 depthwise convolution to capture local spatial information, followed by a 5×5 depthwise dilated convolution with a dilation rate of 3 to expand the receptive field and capture long-range dependencies. Then, channel shuffling is performed to enhance the information interaction between channels. Finally, an efficient channel attention module is applied to capture channel dependencies and assign weights through 1D convolution. By introducing residual connections and the LeakyReLu activation function, nonlinear representation is enhanced and gradients are stabilized. Overfitting is prevented by adding a Dropout layer.

[0057] Step S1.3: Construct the aggregation node;

[0058] Construct a first aggregation node and a second aggregation node. The first aggregation node aggregates the input features through a 1×1 convolution and reduces the number of channels to a fixed value; the second aggregation node aggregates the input features through two 1×1 convolutions and reduces the number of channels to a fixed value.

[0059] Specifically, such as Figure 4 As shown, the first aggregation node concatenates multiple input feature maps along the channel dimension, which temporarily increases the number of channels; then a 1×1 convolution is used to compress the channel dimension to reduce the number of channels to a fixed value, fusing redundant information and extracting common semantics.

[0060] Specifically, such as Figure 5 As shown, the second aggregation node concatenates multiple input feature maps along the channel dimension, which temporarily increases the number of channels; then, two 1×1 convolutions are used to compress the channel dimension to reduce the number of channels to a fixed value, fusing redundant information and extracting common semantics.

[0061] Step S1.4: Construct the Hierarchical Deep Aggregation (HDA) module.

[0062] A hierarchical deep aggregation module is established using the basic convolutional module constructed in step S1.1, the large kernel attention residual module constructed in step S1.2, and the aggregation nodes constructed in step S1.3.

[0063] Specifically, the hierarchical deep aggregation module consists of a basic convolutional module, a large kernel attention residual module, and a first aggregation node. The feature maps received by the hierarchical deep aggregation module have the same scale to ensure semantic consistency during fusion. The basic convolutional module extracts basic feature information from the input feature map; the large kernel attention residual module sequentially performs 7×7 depthwise convolution, 5×5 depthwise dilated convolution, and channel shuffling on the input feature map, and finally captures channel dependencies and assigns weights through 1D convolution; the first aggregation node concatenates the feature maps output by the basic convolutional module and the large kernel attention residual module along the channel dimension to form a temporary high-channel feature map. It retains complete information from all input feature maps, and its specific mathematical expression is as follows:

[0064] ;

[0065] in, Represents multiple input feature maps, This indicates splicing along the channel dimension.

[0066] High-channel feature map formed by splicing 1×1 convolutions are applied for channel dimensionality reduction and information fusion. The aggregated feature map is shown below. As the output of the hierarchical deep aggregation module, it is directly transmitted to the next encoding node, and its specific mathematical expression is as follows:

[0067]

[0068] in, This represents 1×1 convolutional fusion and dimensionality reduction to 32 channels; This indicates that the number of channels in the output feature map is set to 32; This indicates that the convolutional layer does not use a bias term.

[0069] Step S1.5: Construct the Multi-Scale Aggregation (MSA) module;

[0070] The multi-scale aggregation module reduces the semantic gap between the encoder and decoder by aggregating shallow and deep features, thereby achieving cross-layer semantic information integration.

[0071] A multi-scale aggregation module is established using the basic convolutional module constructed in step S1.1, the large kernel attention residual module constructed in step S1.2, and the aggregation node constructed in step S1.3.

[0072] Specifically, the first multi-scale aggregation module consists of a basic convolutional module, a large kernel attention residual module, and a first aggregation node; the second multi-scale aggregation module consists of a basic convolutional module, a large kernel attention residual module, and a second aggregation node.

[0073] Specifically, the multi-scale aggregation module first receives multiple input feature maps from the encoding stage. These input feature maps all include shallow features. and deep features generated through downsampling These input feature maps have features at different scales to capture multi-level information from spinal MR images. Resolution alignment of these input feature maps yields multi-scale features. Multi-scale features after resolution alignment The data is transmitted to the first aggregation node via cross-layer connections, where it is spliced ​​and fused along the channel dimension. The fused features are then used as the output of the multi-scale aggregation module and transmitted to the decoding stage or the next first aggregation node.

[0074] Specifically, the mathematical expressions for splicing and merging are as follows:

[0075] ;

[0076] ;

[0077] in, This represents the intermediate feature map after being stitched along the channel in the multi-scale aggregation module; Indicates: via The multi-scale aggregated feature map output after convolutional fusion and dimensionality reduction; This indicates splicing along the channel dimension (temporary channel expansion to 64). This indicates that 1×1 convolutions are merged and the dimensionality is reduced to 32 channels.

[0078] Step S1.6: Build the encoder;

[0079] The encoder employs a two-layer downsampling structure, containing two encoding nodes: X1,0 (high resolution) and X2,0 (low resolution). Each layer uses a hierarchical depth aggregation module to process features, with a fixed output of 32 channels. Downsampling from encoding node X1,0 to encoding node X2,0 uses 2×max pooling or a convolution with stride=2, with resolution ranging from... Down to .

[0080] Encoding stage: The image enters the encoder and is first processed by the hierarchical depth aggregation module of the encoding node X1,0. A 256×256×32 feature map is obtained from the output of the first aggregation node. The features output by the encoding node X1,0 are transmitted to the encoding node X2,0 through 2× downsampling. Then, the hierarchical depth aggregation module is applied again to extract deep features, and a 32×128×128 feature map is obtained from the output of the first aggregation node.

[0081] Step S1.7: Construct a multi-scale feature fusion encoder (MSF).

[0082] The multi-scale feature fusion encoder contains two key nodes: X1,1 and X3,0. Each layer processes features using the first multi-scale aggregation module. The multi-scale feature fusion encoder generates features via 4× downsampling paths and 2× downsampling paths: Encoding node X1,0 → Encoding node X2,0 (2× downsampling): resolution halved; Encoding node X2,0 → Key node X3,0 (2× downsampling): further halved; Encoding node X1,0 → Key node X1,1 (4× downsampling): directly reduced to low resolution. Key nodes X1,1 and X3,0 generate fused features, both with the following shape. , This is the downsampling factor, which takes the value of 2 or 4, and integrates shallow details and deep semantics.

[0083] Multi-scale feature fusion stage: Key node X1,1: Input from encoding node X1,0 via 4× downsampling; simultaneously, features are transferred from encoding nodes X1,0 and X2,0 to the first aggregation node of key node X1,1, further reducing the resolution to 64×64×32. Key node X3,0: Input from encoding node X2,0 via 2× downsampling; features are transferred from encoding nodes X1,0 and X2,0 to the first aggregation node of key node X3,0, at which point the image resolution is reduced to 64×64×32.

[0084] Step S1.8: Construct the decoder;

[0085] The decoder comprises decoding nodes X2,1 and X1,2. Decoding node X2,1 processes features using a first multi-scale aggregation module, and decoding node X1,2 processes features using a second multi-scale aggregation module. The decoder receives the fused features from key nodes X1,1 and X3,0, and processes them through the multi-scale aggregation module and upsampling operations.

[0086] Decoding stage: Decoding node X2,1: Upsamples the input from key node X3,0; fuses the multi-scale features of key nodes X1,1 and X3,0, increasing the image resolution to 128×128×32. Decoding node X1,2: Upsamples the input from key nodes X1,1 and X2,1, restoring the image resolution to 256×256.

[0087] Finally, the overall structure of the spinal MR image segmentation network model constructed in this invention is as follows: Figure 6 As shown, the spinal MR image segmentation network model mainly includes: an encoder, a multi-scale feature fusion encoder, and a decoder.

[0088] Step 2: Set the loss function for the segmentation network;

[0089] In this invention, the loss function of the segmentation network is the Dynamic Distance Loss (DDLoss), and its mathematical expression is as follows: ,in, ; Indicates the weighting factor. Indicates the nonlinear amplification factor. Responsible for normalizing the dynamic edge loss values, Represents multi-class cross-entropy loss. This represents the edge distance loss.

[0090] Step 3: Edge distance map generation and processing strategy;

[0091] In image segmentation tasks, traditional binary segmentation masks assign equal importance to all categories. To address this limitation, this invention proposes a series of edge distance map generation and processing strategies to create edge distance maps (EDMs).

[0092] For each pixel x in the image, calculate its Euclidean distance to the nearest boundary pixel of the target object, generating a two-dimensional matrix called the Original Distance Map (ODM). For each connected component C of the ODM, subtract the local maximum distance value plus 1, and then normalize by dividing by the local maximum distance. This process ensures that the generated edge distance map represents the weight distribution at different locations within the range [0, 1].

[0093] The specific formula for calculating the edge distance map for each pixel x in a spinal MR image is as follows:

[0094]

[0095] in, Indicates the future; The background is represented by D(x); D(x) represents the Euclidean distance, and its specific calculation formula is as follows:

[0096]

[0097] in, Let x represent the Euclidean distance between pixel x and pixel b, and let B represent the set of points on the boundary of the target object. Represents pixels In the Coordinate values ​​in each dimension (e.g., x-axis or y-axis). Represents boundary points In the Coordinate values ​​in each dimension.

[0098] Based on the edge distance map, an improved distance loss function is designed, and its specific calculation formula is as follows:

[0099]

[0100]

[0101]

[0102]

[0103] in, Indicates the weight of the positive class. Indicates edge distance loss. Indicates background loss. Indicates a loss of prospects. Indicates the number of background categories. Indicates the number of foreground categories. This indicates the model's prediction results. Represents the model's true label. This represents the weight of the i-th pixel in the edge distance graph. This represents the sum of the background edge weights in the edge distance map. This represents the sum of the foreground edge weights in the edge distance graph.

[0104] Cross-entropy loss is one of the most commonly used loss functions in image segmentation tasks. The mathematical expression for the multi-class cross-entropy loss function is as follows:

[0105]

[0106] in, Indicates the number of categories. This represents the probability predicted by the model.

[0107] Step 4: Input the spinal MR image to be processed into the spinal MR image segmentation network model for segmentation processing.

[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. However, these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for segmenting spinal MR images based on depth layer aggregation and dynamic distance loss, characterized in that, Includes the following steps: Step 1: Construct a network model for segmenting spinal MR images; The spinal MR image segmentation network model includes an encoder, a multi-scale feature fusion encoder, and a decoder. The encoder includes two encoding nodes X1,0 and X2,0, both of which use a hierarchical deep aggregation module to process features. The multi-scale feature fusion encoder includes two key nodes X1,1 and X3,0, both of which use a first multi-scale aggregation module to process features. The decoder includes two decoding nodes X2,1 and X1,2, where decoding node X2,1 uses a first multi-scale aggregation module to process features, and decoding node X1,2 uses a second multi-scale aggregation module to process features. Step 2: Set the loss function for the segmentation network; The loss function of the segmentation network is a dynamic distance loss; Step 3: Edge distance map generation and processing strategy; For each pixel x in the image, calculate its Euclidean distance to the nearest boundary pixel of the target object to generate a two-dimensional matrix, i.e., the original distance map; for each connected component C of the original distance map, subtract the local maximum distance value plus 1, and standardize by dividing by the local maximum distance to obtain the edge distance map; Step 4: Input the spinal MR image to be processed into the spinal MR image segmentation network model for segmentation processing.

2. The spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss according to claim 1, characterized in that, The hierarchical deep aggregation module includes a basic convolution module, a large kernel attention residual module, and a first aggregation node. The basic convolution module extracts basic feature information from the input feature map. The large kernel attention residual module sequentially performs 7×7 depthwise convolution, 5×5 depthwise dilated convolution, and channel shuffling on the input feature map, and finally captures channel dependencies and assigns weights through 1D convolution. The first aggregation node concatenates the feature map output by the basic convolution module and the feature map output by the large kernel attention residual module along the channel dimension to form a high-channel feature map. .

3. The spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss according to claim 1, characterized in that, The first multi-scale aggregation module includes a basic convolutional module, a large kernel attention residual module, and a first aggregation node; the first multi-scale aggregation module receives multiple input feature maps from the encoding stage, and the features of these input feature maps all include shallow features. and deep features generated through downsampling The features of these input feature maps are resolution aligned to obtain multi-scale features. Multi-scale features The data is transmitted to the first aggregation node via cross-layer connections, where it is spliced ​​and fused along the channel dimension. The fused features are then used as the output of the first multi-scale aggregation module and transmitted to the decoding stage or the next first aggregation node.

4. The spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss according to claim 1, characterized in that, The second multi-scale aggregation module includes a basic convolutional module, a large kernel attention residual module, and a second aggregation node; the second multi-scale aggregation module receives multiple input feature maps from the encoding stage, and the features of these input feature maps all include shallow features. and deep features generated through downsampling ; Resolution alignment of the features from these input feature maps yields multi-scale features. Multi-scale features The data is transmitted to the first aggregation node via cross-layer connections, where it is spliced ​​and fused along the channel dimension. The fused features are then used as the output of the second multi-scale aggregation module and transmitted to the decoding stage or the next first aggregation node.

5. The spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss according to claim 1, characterized in that, In the encoding stage: the encoder processes the image through the hierarchical depth aggregation module of encoding node X1,0, and outputs a 256×256×32 feature map from the first aggregation node. The features output by encoding node X1,0 are transmitted to encoding node X2,0 through 2× downsampling, and then the hierarchical depth aggregation module is applied again to extract deep features, and outputs a 32×128×128 feature map from the first aggregation node.

6. The spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss according to claim 1, characterized in that, Multi-scale feature fusion stage: Features are input from encoding node X1,0 via 4× downsampling, and simultaneously transmitted from encoding nodes X1,0 and X2,0 to the first aggregation node of key node X1,1, reducing the image resolution to 64×64×32; Features are input from encoding node X2,0 via 2× downsampling, and simultaneously transmitted from encoding nodes X1,0 and X2,0 to the first aggregation node of key node X3,0, reducing the image resolution to 64×64×32.

7. The spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss according to claim 1, characterized in that, Decoding stage: Input is upsampled from key node X3,0, and multi-scale features of key nodes X1,1 and X3,0 are fused to increase the image resolution to 128×128×32; Input is upsampled from key node X1,1 and decoding node X2,1 to restore the image resolution to 256×256.

8. The spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss according to claim 1, characterized in that, The mathematical expression for the loss function of the segmentation network is: , ; Indicates the weighting factor. Indicates the nonlinear amplification factor. Responsible for normalizing dynamic edge loss values, Represents multi-class cross-entropy loss. This represents the edge distance loss.

9. The spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss according to claim 8, characterized in that, The mathematical expression for the multi-class cross-entropy loss is: ; in, Indicates the number of categories. Indicates the model's predicted probability; The mathematical expression for the edge distance loss is: ; ; ; ; in, Indicates the weight of the positive class. Indicates background loss. Indicates a loss of prospects. Indicates the number of background categories. Indicates the number of foreground categories. This indicates the model's prediction results. Represents the model's true label. This represents the weight of the i-th pixel in the edge distance map. This represents the sum of the background edge weights in the edge distance map. This represents the sum of the foreground edge weights in the edge distance graph.

10. The spinal MR image segmentation method based on depth layer aggregation and dynamic distance loss according to claim 1, characterized in that, In step three, the formula for calculating the edge distance map for each pixel x in the spinal MR image is: ; in, Indicates the future; The background is represented by D(x); the Euclidean distance is represented by D(x).