Method and system for epicardial adipose tissue segmentation and volume calculation
By introducing edge refinement module and cross-multi-scale attention module in epicardial adipose tissue segmentation model, the problems of edge blur and detail loss in epicardial adipose tissue segmentation are solved, and higher segmentation accuracy and volume calculation accuracy are achieved.
Patent Information
- Application Number
- CN202411960836.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-29
AI Technical Summary
The prior art has problems of blurring edges and loss of details in epicardial adipose tissue segmentation, and due to uneven tissue distribution and large individual differences, it is difficult to effectively capture target area characteristics at different scales.
The epicardial adipose tissue segmentation model based on edge multi-scale spatial attention was adopted. By introducing edge refinement module and cross-multi-scale attention module, combining attention mechanism and edge detection operator, boundary features are refined and tissue features of different scales are captured.
It effectively solves the problems of edge blur and detail loss, improves the segmentation accuracy of epicardial adipose tissue and the accuracy of volume calculation, and adapts to the regional characteristics of epicardial adipose tissue of different scales and shapes.
Smart Images

Figure CN119904634A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical image processing, and in particular to a method and system for segmenting and calculating the volume of epicardial fat tissue, which provides more efficient and accurate technical support for clinical diagnosis and helps in the early analysis and diagnosis of cardiovascular diseases. The present invention is derived from the key research and development plan of the Shanxi Provincial Department of Science and Technology, "Research and Application of Key Technologies for Predicting the Risk of Stroke Based on Big Data Analysis". Background Art
[0002] Epicardial adipose tissue (EAT) is located between the myocardium and the visceral pericardium. It is unevenly distributed on the surface of the myocardium, and most of the adipose tissue is located in the atrioventricular groove and the interventricular groove. EAT can secrete a variety of inflammatory factors and directly act on the local cardiovascular system to regulate coronary artery metabolism and function, thereby causing changes in the body's pathophysiological state. Many studies have shown that EAT is closely related to the development of cardiovascular disease. Therefore, segmenting epicardial adipose tissue is very important in the diagnosis and prognosis of cardiovascular disease.
[0003] Compared with other segmentation tasks, segmenting and quantifying EAT is particularly challenging. EAT is unevenly distributed around the heart and has a distinct shape that is difficult to detect automatically. Moreover, epicardial and paracardial adipose tissue have similar intensity and are bounded by the pericardium, but the pericardium is usually too thin to be fully seen in CT or MRI images. There are many methods to segment and quantify EAT. Automatic segmentation methods of EAT can be roughly divided into four categories: intensity-based methods, clustering-based methods, machine learning-based methods, and deep learning-based methods.
[0004] With the development of deep learning technology, some methods using 3D deep learning models to segment EAT have emerged. For example, the existing technology Siriapisith T, Kusakunniran W, Haddawy P. A 3D deep learning approach to epicardial fat segmentation in non-contrast and post-contrast cardiac CT images [J]. Peer J Computer Science, 2021, 7: e806. A new method for 3D segmentation of EAT is achieved by integrating attention gates and deep supervision into the 3DU-Net deep learning architecture. However, 3D models require a lot of computing resources, and the limitations of hardware conditions and computing power will affect the convergence speed of the network.
[0005] In addition, there are methods that use 2D deep learning models to segment EAT. For example, the existing technology Qu J, Chang Y, Sun L, et al. Deep Learning-Based Approach for the Automatic Quantification of Epicardial Adipose Tissue from Non-Contrast CT [J]. Cognitive Computation, 2022, 14 (4): 1392-1404. A method for quantifying EAT is achieved by integrating the traditional CNN neural network (T-CNN) and the multi-scale attention mechanism into the U-Net architecture.
[0006] However, these advances are accompanied by two problems to be solved. The first problem is that epicardial fat tissue is bounded by the pericardium, which is relatively blurred and not clearly visible in CT images, resulting in the loss of edge details during model training; the second problem is that epicardial fat tissue is unevenly distributed on the surface of the myocardium, and most of the fat is located in the atrioventricular groove and the interventricular groove. At the same time, epicardial fat tissue has individual differences, and there are obvious differences in the size, shape, and location of epicardial fat tissue in different patients. If only the features of a single scale are considered, the model can easily miss some key information. Therefore, how to capture target areas of different scales is also particularly important. Summary of the invention
[0007] In view of the above two problems, the present invention provides a method and system for epicardial fat tissue segmentation and volume calculation.
[0008] The present invention adopts the following technical solution:
[0009] A method for segmenting and calculating the volume of epicardial fat tissue comprises the following steps:
[0010] Construct MBSA-UNet: Construct the epicardial fat tissue segmentation model MBSA-UNet based on edge multi-scale spatial attention; MBSA-UNet uses the improved UNet architecture as the backbone network, including encoder module, edge refinement module, cross multi-scale attention module and decoder module;
[0011] In the encoder module, there are five layers of convolutional coding blocks and four maximum pooling layers. The convolutional coding block contains two 2D convolutional layers, each of which contains a convolution kernel with a convolution kernel of 3 and a padding value of 1, a batch normalization layer, and a ReLU activation layer. The original input image is downsampled by five convolutional coding calculations and four maximum pooling layer calculations. Based on the first and second convolutional coding blocks, an edge refinement module is constructed. The edge refinement module refines the boundaries of the feature map by using multi-scale convolutions, spatial attention mechanisms, and edge detection operators.
[0012] At the network jump connection, a cross-multi-scale attention module is constructed. The cross-multi-scale attention module contains two branches, one of which is a dual attention module branch with a convolution kernel of 3, and the other is a dual attention module branch with a convolution kernel of 7;
[0013] In the decoder module, there are four layers of convolutional decoding blocks and an output block; the convolutional decoding block includes two 2D convolutional layers, a bilinear interpolation layer and a channel splicing layer; each 2D convolutional layer contains a convolution kernel with a convolution kernel of 3 and a padding value of 1, a batch normalization layer and a ReLU activation layer; the output block consists of a 2D convolutional layer with a convolution kernel of 1, a batch normalization layer, and a ReLU activation layer;
[0014] Segmentation step: Use the trained model to segment epicardial fat tissue;
[0015] Volume calculation step: Based on the segmentation result of the epicardial fat tissue, the volume of the epicardial fat tissue is calculated.
[0016] The method described above also includes a data collection step and a data preprocessing step before constructing MBSA-UNet; data collection: collecting the original image data of cardiac CT image data and the corresponding target area manual segmentation result data to form an original image data set I and a label data set L respectively; data preprocessing step: preprocessing the original image data set and the label data set, and constructing an original image training data set I at a ratio of 80% and 20% respectively train , original image test dataset I test , Manual segmentation results training data set L train And the manual segmentation results test dataset L test .
[0017] The method, the data preprocessing step includes: 3D medical image slicing, 2D image normalization, 2D image scaling;
[0018] If the medical image is a three-dimensional image, each original medical image data and the corresponding target area manual segmentation result data are sliced two-dimensionally along the Z axis;
[0019] In order to accelerate the convergence of neural network training and ensure fast convergence of the network, all two-dimensional images are first normalized, that is, each pixel value of the image is changed from [0,255] to [0,1]; the normalization formula is as follows:
[0020]
[0021] Among them, x i represents the i-th pixel value, max(x) and max(x) represent the maximum and minimum values of the pixel respectively;
[0022] All image data are scaled using the resize() function in the PIL package, and the image size is scaled to 256×256.
[0023] In the volume calculation step of the method, according to the segmentation result of the epicardial fat tissue, the segmentation result of the epicardial fat tissue area is binarized and stacked in sequence along the Z axis to form a complete three-dimensional structure, and the volume size of the epicardial fat tissue area is accurately calculated by combining the voxel spacing between adjacent voxels, the spatial resolution of the image and the number of non-zero voxels to ensure the accuracy of the volume calculation;
[0024] Volume=voxels×(spacing[x]×spacing[y]×spacing[z])
[0025] Where voxels is the number of non-zero voxels, spacing[x] is the x-axis voxel spacing, spacing[y] is the y-axis voxel spacing, and spacing[z] is the z-axis voxel spacing.
[0026] The method described above, the specific calculation steps in the edge refinement module are as follows:
[0027] The feature map of the first layer of the encoder is defined as F1, and the feature map of the second layer of the encoder is defined as F2; the feature map F1 and the feature map F2 channels are concatenated to form F 12 , the operation is as follows:
[0028] F 12 =Concat[F1,F2]
[0029] Concat[·] is a channel concatenation operation;
[0030] F 12 The input is fed into the dilated convolutional blocks with dilation rates of 1 and 3 respectively, and the channels are concatenated to obtain the output feature map F 12 ',
[0031] F 12 =Concat[Conv1×1 (F 12 ),Conv 3×3 (F 12 )]
[0032] Among them, Conv 1×1 Represents a dilated convolution with a dilation rate of 1 and a convolution kernel of 3. Conv 3×3 It represents a dilated convolution with a dilation rate of 3 and a convolution kernel of 3;
[0033] Then F 12 ' and F 12 The result of the dilated convolution with a dilation rate of 5 is channel-joined and input into the spatial attention mechanism (SA) and then combined with F 12 Add element by element to get F 23 ';
[0034] F 23 '=SA(Concat[F 12 ',Conv 5×5 (F 12 )])+F 12
[0035] Conv 5×5 represents the expansion rate of 5, SA represents the spatial attention operation, including a maximum pooling layer, an average pooling layer, a channel splicing layer, and a 2D convolution with a convolution kernel of 3;
[0036] SA=Conv[Concat[Maxpool(x),Avgpool(x)]]
[0037] Among them, Conv represents a 2D convolution with a convolution kernel of 3, Maxpool represents the maximum pooling layer, and Avgpool represents the average pooling layer;
[0038] F 23 'Add the feature map obtained by the Canny edge detection operator with the input x, and obtain the final output edge feature map att after element-by-element addition edge ;
[0039] att edge =F 23 '+Canny(x).
[0040] The method described, the cross multi-scale attention module: first, the image from the encoder and the image from the previous decoder A cross-scale attention module is performed, and then the results from the two branches are added element-wise to obtain the final feature map, which is output to the same-level decoder.
[0041] The method described herein, wherein the dual attention module comprises two convolutional layers, a spatial attention module and a reverse spatial attention module; the feature map from the encoder layer l First, the spatial attention module is performed. The spatial attention module contains the maximum pooling layer and the average pooling layer. The number of channels is compressed to 1, and then the result is channel spliced and passed through a convolution layer with a convolution kernel of k, as shown in the following formula:
[0042]
[0043]
[0044] Feature map from the l-1 layer decoder Similarly, it first passes through a convolution layer with a convolution kernel of k, then passes through the Sigmoid activation function, and then subtracts the result from 1 to obtain the reverse attention feature map, as shown below:
[0045]
[0046]
[0047] Finally, att sa and att ra The two attention feature maps are added element by element to obtain the final attention feature map, which is compared with the feature map of the encoder at the lth layer. Multiply element by element and then and Add element by element to get the final output feature map As shown below:
[0048]
[0049] The method, the encoder module: first, the decoder layer l-1 feature map First, the feature map size is doubled by using a bilinear interpolation layer through a convolutional decoding block. Channel concatenation is performed to form a new feature map, which is passed to the decoding module of the next layer, as shown in the following formula:
[0050]
[0051] In the above formula, UpSample indicates that the bilinear interpolation layer implements upsampling; in addition, in the 3rd and 4th layer decoder blocks, the feature map from the decoder module is combined with the edge feature map att edge Multiply and add element by element to get the decoder feature map of the corresponding layer, as shown in the following formula:
[0052]
[0053] Finally, the feature map is input into the output block and the final segmentation result is output.
[0054] A system for segmenting and calculating the volume of epicardial fat tissue, wherein any of the above methods is implemented.
[0055] The present invention has the following beneficial effects:
[0056] 1. By introducing an edge refinement module into the network and integrating the attention mechanism and edge detection operator, the problems of blurred edges and easy loss or redundancy of edge details are solved. The boundary details of epicardial fat tissue can be better preserved, the accuracy of the model in the boundary area can be ensured, and the segmentation effect of epicardial fat tissue can be improved.
[0057] 2. In view of the uneven distribution of epicardial fat tissue on the surface of the heart and the large individual differences, a cross-multi-scale attention module is introduced into the network. By using convolution kernels of different sizes and inverse attention mechanism, the characteristics of epicardial fat areas of different scales and shapes are captured, thereby enhancing the model's perception of key areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 : Overall flow chart;
[0059] Figure 2 : Data preprocessing flow chart;
[0060] Figure 3 :MBSA-UNet network overall architecture diagram;
[0061] Figure 4 : edge refinement module diagram;
[0062] Figure 5 : spatial attention map;
[0063] Figure 6 : Cross-scale multi-scale attention module diagram;
[0064] Figure 7 : Dual attention map; DETAILED DESCRIPTION
[0065] The present invention is described in detail below in conjunction with specific embodiments.
[0066] A method for segmenting and calculating the volume of epicardial fat tissue, the overall process is as follows Figure 1 As shown, steps S1-S6 are included:
[0067] Step S1: Collect the original image data of cardiac CT image data and the corresponding target area manual segmentation result data to form an original image data set I and a label data set L respectively;
[0068] Step S2: Preprocess the original image dataset and the label dataset, and construct the original image training dataset I with a ratio of 80% and 20% respectively. train , original image test dataset I test , Manual segmentation results training data set L train And the manual segmentation results test dataset L test .
[0069] Step S3: Construct an epicardial fat tissue segmentation model based on edge multi-scale spatial attention, denoted as MBSA-UNet.
[0070] Step S4: Train the constructed MBSA-UNet.
[0071] Step S5: Use the trained model to segment the epicardial fat tissue.
[0072] Step S6: Calculate the volume of the epicardial fat tissue according to the segmentation result of the epicardial fat tissue.
[0073] The data preprocessing method flow in step S2 is as follows: Figure 2 As shown, the method includes the steps of: 3D medical image slicing, 2D image normalization, and 2D image scaling. Each part is described below.
[0074] If the medical image is a three-dimensional image, each original medical image data and the corresponding target area manual segmentation result data are two-dimensionally sliced along the Z axis.
[0075] In order to accelerate the convergence of neural network training and ensure fast convergence of the network, all two-dimensional images are first normalized, that is, each pixel value of the image is changed from [0,255] to [0,1]. The normalization formula is as follows:
[0076]
[0077] Among them, x i represents the i-th pixel value, max(x) and max(x) represent the maximum and minimum values of the pixel respectively.
[0078] All image data are scaled using the resize() function in the PIL package, and the image size is scaled to 256×256.
[0079] In step S3, the edge multi-scale spatial attention-based epicardial fat tissue segmentation model (MBSA-UNet) is constructed, and the network structure is as follows: Figure 3 As shown in the figure, the improved UNet architecture is used as the backbone network, including the edge refinement module, the encoder module, the cross multi-scale attention module and the decoder module, as follows:
[0080] In the encoder module, there are five convolutional coding blocks and four maximum pooling layers. The convolutional coding block contains two 2D convolutional layers, each of which contains a convolution kernel with a convolution kernel of 3 and a padding value of 1, a batch normalization layer, and a ReLU activation layer. The original input image is downsampled by five convolutional coding calculations and four maximum pooling layer calculations.
[0081] Based on the first layer convolutional coding block and the second layer convolutional coding block, an edge refinement module is constructed. The edge refinement module refines the boundary of the feature map by using multi-scale convolution, spatial attention mechanism and edge detection operator. The specific module diagram is as follows Figure 4 , Figure 5 As shown, the specific calculation process is as follows:
[0082] The feature map of the first layer of the encoder is defined as F1, and the feature map of the second layer of the encoder is defined as F2. The feature map F1 and the feature map F2 channels are concatenated to form F 12 , the operation is as follows:
[0083] F 12 =Concat[F1,F2]
[0084] Concat[·] is a channel concatenation operation;
[0085] F 12 The input is fed into the dilated convolutional blocks with dilation rates of 1 and 3 respectively, and the channels are concatenated to obtain the output feature map F 12 ',
[0086] F 12 =Concat[Conv 1×1 (F 12 ),Conv 3×3 (F 12 )]
[0087] Among them, Conv 1×1 Represents a dilated convolution with a dilation rate of 1 and a convolution kernel of 3. Conv 3×3 Represents a dilated convolution with a dilation rate of 3 and a convolution kernel of 3.
[0088] Then F 12 ' and F 12 The result of the dilated convolution with a dilation rate of 5 is channel-joined and input into the spatial attention mechanism (SA) and then combined with F 12 Add element by element to get F 23 '.
[0089] F 23 '=SA(Concat[F 12 ',Conv5×5 (F 12 )])+F 12
[0090] Conv 5×5 It indicates the expansion rate is 5, SA represents the spatial attention operation, including a maximum pooling layer, an average pooling layer, a channel splicing layer and a 2D convolution with a convolution kernel of 3.
[0091] SA=Conv[Concat[Maxpool(x),Avgpool(x)]]
[0092] Among them, Conv represents a 2D convolution with a convolution kernel of 3, Maxpool represents the maximum pooling layer, and Avgpool represents the average pooling layer.
[0093] F 23 'Add the feature map obtained by the Canny edge detection operator with the input x, and obtain the final output edge feature map att after element-by-element addition edge .
[0094] att edge =F 23 '+Canny(x)
[0095] At the network jump connection, a cross-scale multi-scale attention module is constructed, such as Figure 6 (Cross-scale multi-scale attention module diagram), the cross-scale multi-scale attention module contains two branches, one of which is a dual attention module branch with a convolution kernel of 3 ( Figure 7 The other is a dual attention module branch with a convolution kernel of 7. The specific steps include: first, the image from the encoder and the image from the previous decoder A cross-scale attention module is performed, and then the results from the two branches are added element-wise to obtain the final feature map, which is output to the same-level decoder.
[0096] Specifically, the dual attention module contains two convolutional layers, a spatial attention module, and a reverse spatial attention module. Feature maps from the encoder layer l First, the spatial attention module is performed. The spatial attention module includes a maximum pooling layer and an average pooling layer. The number of channels is compressed to 1, and then the result is channel-joined and passed through a convolution layer with a convolution kernel of k (k = 3 or 7), as shown in the following formula:
[0097]
[0098]
[0099] Feature map from the l-1 layer decoder Similarly, it first passes through a convolution layer with a convolution kernel of k (k = 3 or 7), then passes through the Sigmoid activation function, and then uses 1 to subtract the result to obtain the reverse attention feature map, as shown below:
[0100]
[0101]
[0102] Finally, att sa and att ra The two attention feature maps are added element by element to obtain the final attention feature map, which is compared with the feature map of the encoder at the lth layer. Multiply element by element and then and Add element by element to get the final output feature map As shown below:
[0103]
[0104] In the decoder module, there are four layers of convolutional decoding blocks and an output block. The convolutional decoding block includes two 2D convolutional layers, a bilinear interpolation layer, and a channel concatenation layer. Each 2D convolutional layer contains a convolution kernel with a convolution kernel of 3 and a padding value of 1, a batch normalization layer, and a ReLU activation layer. The output block consists of a 2D convolutional layer with a convolution kernel of 1, a batch normalization layer, and a ReLU activation layer. The specific calculation process is as follows: First, the feature map of the l-1 layer of the decoder First, the feature map size is doubled by using a bilinear interpolation layer through a convolutional decoding block. Channel concatenation is performed to form a new feature map, which is passed to the decoding module of the next layer, as shown in the following formula:
[0105]
[0106] In the above formula, UpSample indicates that the bilinear interpolation layer implements upsampling. In addition, in the 3rd and 4th layer decoder blocks, the feature map from the decoder module is combined with the edge feature map att edge Multiply and add element by element to get the decoder feature map of the corresponding layer, as shown in the following formula:
[0107]
[0108] Finally, the feature map is input into the output block and the final segmentation result is output.
[0109] In step S4, the original image training data set I in step S2 is used train And the manual segmentation result training dataset L trainThe specific steps are as follows: First, I train Input into the network to calculate the result of this round of iteration, and compare the result with L train The corresponding manual segmentation results are compared with the loss function, and the loss value is calculated; the gradient is calculated by the Adam optimizer and the weights in the network are updated by back propagation; the above process is iterated until the error requirements are met to obtain the network training model; finally, the original image test dataset I is used test And the manual segmentation results test dataset L test Verify the model. The loss function in the above steps uses a weighted loss function, which is calculated as follows:
[0110] L=α·Loss BCE +β·Loss DICE
[0111] Among them, α and β represent the weights of the two loss functions. BCE Represents the binary cross entropy loss function, Loss DICE Represents the Dice loss function, which is calculated as follows:
[0112]
[0113]
[0114] Among them, y is the prediction result, is the label image.
[0115] In step S6, the segmentation results of the epicardial fat tissue area are binarized according to the segmentation results of the epicardial fat tissue, and then stacked in sequence along the Z axis to form a complete three-dimensional structure. The volume size of the epicardial fat tissue area is accurately calculated by combining the voxel spacing between adjacent voxels, the spatial resolution of the image, and the number of non-zero voxels to ensure the accuracy of the volume calculation.
[0116] Volume=voxels×(spacing[x]×spacing[y]×spacing[z])
[0117] Where voxels is the number of non-zero voxels, spacing[x] is the x-axis voxel spacing, spacing[y] is the y-axis voxel spacing, and spacing[z] is the z-axis voxel spacing.
[0118] Example 1: Epicardial fat tissue image segmentation method for patients with atrial fibrillation
[0119] The original data in the epicardial fat tissue CT image set of patients with atrial fibrillation and the corresponding target area segmentation result data are respectively used to form a CT data set I and a label data set L, and the data are further preprocessed. Each CT data and the corresponding target area segmentation result data are sliced two-dimensionally along the cross section, and all two-dimensional slices are normalized, that is, each pixel value of the image is changed from [0,255] to [0,1]. The normalization formula is as follows:
[0120]
[0121] where x i represents the i-th pixel value, max(x) and max(x) represent the maximum and minimum values of the pixel respectively.
[0122] The normalized CT data and the corresponding target area manual segmentation result data are used to construct the training data set I in a ratio of 80% and 20% respectively. train , CT test dataset I test , segmentation result training data set L train And the segmentation result test dataset L test .
[0123] Taking a piece of CT data as an example, we build and train a medical image segmentation model based on edge multi-scale spatial attention (MBSA-UNet). The specific steps are as follows:
[0124] First, an encoder module is constructed, including five convolutional coding blocks and four maximum pooling layers, wherein each convolutional coding block is composed of two 2D convolutions with a convolution kernel of 3, two batch normalizations, and two ReLU activation functions to extract image features. The five convolutional coding blocks and four maximum pooling layers are used to perform five convolutional coding block calculations and four maximum pooling layer downsampling operations on the original input image.
[0125] Secondly, based on the first-layer convolutional coding block and the second-layer convolutional coding block, an edge refinement module is constructed. By using multi-scale convolution, spatial attention mechanism and edge detection operator, the boundary of the feature map is refined and the edge feature map is output.
[0126] Again, at the network jump connection, a cross-multi-scale attention module is constructed, and the encoder feature map of the lth layer and the decoder feature map of the l-1th layer are passed to the cross-multi-scale attention module of the corresponding layer to obtain the attention feature map.
[0127] Then, a convolution decoder module is constructed. The structure of the convolution decoder module includes four layers of convolution decoding modules and an output block. The convolution decoding block contains two convolution kernels with a convolution kernel of 3 and a padding value of 1, two batch normalization layers, two ReLU activation layers, a bilinear interpolation layer and a channel splicing layer; the output block consists of a 2D convolution layer with a convolution kernel of 1, a batch normalization layer, and a ReLU activation layer. The specific calculation process includes: splicing the attention feature map obtained by the cross-multiscale attention module of the network jump connection part with the upsampled decoder feature map channel, and passing it to the next level decoder module; in addition, in the last two layers of the decoding module, the decoder feature map is combined with the edge feature map att obtained in the edge refinement module. edge Multiply and add element by element to get the decoder feature map of the corresponding layer The final segmentation result is then obtained after calculation through the output block.
[0128] Finally, use the CT training dataset I train And the segmentation result training dataset L train Train the model. The specific steps are as follows: train Input into the network to calculate the result of this round of iteration, and compare the result with L train Compare the corresponding segmentation results in and use the loss function to calculate the loss value. The loss function uses L s =α·Loss BCE +β·Loss DICE . Among them, α and β represent the weights of the two loss functions. BCE Represents the binary cross entropy loss function, Loss DICE represents the Dice loss function. In this embodiment, the values are α=0.5 and β=0.5 respectively. Next, the gradient is calculated by the Adam optimizer and the weights in the network are updated by back propagation. The above process is iterated until the error requirement is met to obtain the network training model. Finally, the CT test data set I test Input into the model to obtain the final segmentation result, and compare it with the manual segmentation result test data set L test The model is verified. The experimental results of the MBSA-UNet network in this embodiment are shown in Table 1.
[0129] Table 1 Experimental results of MBSA-UNet on the self-built epicardial fat tissue dataset
[0130]
[0131] Example 2: Method for calculating epicardial fat tissue volume in patients with atrial fibrillation
[0132] Based on Example 1, Example 2 of the present invention further provides a volume calculation method, comprising the following steps:
[0133] According to the segmentation results of the epicardial fat tissue in Example 1, the segmentation results of the epicardial fat tissue area are first binarized; secondly, they are stacked in sequence along the Z axis to form a complete three-dimensional structure; finally, the volume of the epicardial fat tissue area is calculated by combining the voxel spacing between adjacent voxels, the spatial resolution of the image, and the number of non-zero voxels. The results of calculating the volume of the epicardial fat tissue are shown in Table 2:
[0134] Table 2 Calculation results of epicardial fat tissue volume
[0135]
[0136]
[0137] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims
1. A method for segmenting and calculating the volume of epicardial fat tissue, characterized in that: The following steps are involved: Construct MBSA-UNet: Construct the epicardial fat tissue segmentation model MBSA-UNet based on edge multi-scale spatial attention; MBSA-UNet uses the improved UNet architecture as the backbone network, including encoder module, edge refinement module, cross multi-scale attention module and decoder module; In the encoder module, there are five layers of convolutional coding blocks and four maximum pooling layers. The convolutional coding block contains two 2D convolutional layers, each of which contains a convolution kernel with a convolution kernel of 3 and a padding value of 1, a batch normalization layer, and a ReLU activation layer. The original input image is downsampled by five convolutional coding calculations and four maximum pooling layer calculations. Based on the first and second convolutional coding blocks, an edge refinement module is constructed. The edge refinement module refines the boundaries of the feature map by using multi-scale convolutions, spatial attention mechanisms, and edge detection operators. At the network jump connection, a cross-multi-scale attention module is constructed. The cross-multi-scale attention module contains two branches, one of which is a dual attention module branch with a convolution kernel of 3, and the other is a dual attention module branch with a convolution kernel of 7; In the decoder module, there are four layers of convolutional decoding blocks and an output block; the convolutional decoding block includes two 2D convolutional layers, a bilinear interpolation layer and a channel splicing layer; each 2D convolutional layer contains a convolution kernel with a convolution kernel of 3 and a padding value of 1, a batch normalization layer and a ReLU activation layer; the output block consists of a 2D convolutional layer with a convolution kernel of 1, a batch normalization layer, and a ReLU activation layer; Segmentation step: Use the trained model to segment epicardial fat tissue; Volume calculation step: Based on the segmentation result of the epicardial fat tissue, the volume of the epicardial fat tissue is calculated.
2. The method according to claim 1, characterized in that Before constructing MBSA-UNet, data collection and data preprocessing steps are also included; Data collection: The original image data of cardiac CT image data and the corresponding target area manual segmentation result data are collected to form the original image data set I and the label data set L respectively; Data preprocessing step: perform data preprocessing on the original image dataset and the label dataset, and construct the original image training dataset I with a ratio of 80% and 20% respectively. train , original image test dataset I test , Manual segmentation results training data set L train And the manual segmentation results test dataset L test .
3. The method according to claim 2, characterized in that Data preprocessing steps include: 3D medical image slicing, 2D image normalization, and 2D image scaling; If the medical image is a three-dimensional image, each original medical image data and the corresponding target area manual segmentation result data are sliced two-dimensionally along the Z axis; In order to accelerate the convergence of neural network training and ensure fast convergence of the network, all two-dimensional images are first normalized, that is, each pixel value of the image is changed from [0,255] to [0,1]; the normalization formula is as follows: Among them, x i represents the i-th pixel value, max(x) and max(x) represent the maximum and minimum values of the pixel respectively; All image data are scaled using the resize() function in the PIL package, and the image size is scaled to 256×256.
4. The method according to claim 2, characterized in that: In the volume calculation step, according to the segmentation results of the epicardial fat tissue, the segmentation results of the epicardial fat tissue area are binarized and stacked in sequence along the Z axis to form a complete three-dimensional structure. The volume size of the epicardial fat tissue area is accurately calculated by combining the voxel spacing between adjacent voxels, the spatial resolution of the image, and the number of non-zero voxels to ensure the accuracy of the volume calculation; Volume=voxels×(spacing[x]×spacing[y]×spacing[z]) Where voxels is the number of non-zero voxels, spacing[x] is the x-axis voxel spacing, spacing[y] is the y-axis voxel spacing, and spacing[z] is the z-axis voxel spacing.
5. The method according to claim 1, characterized in that: The specific calculation steps in the edge refinement module are as follows: The feature map of the first layer of the encoder is defined as F1, and the feature map of the second layer of the encoder is defined as F2; the feature map F1 and the feature map F2 channels are concatenated to form F 12 , the operation is as follows: F 12 =Concat[F1,F2] Concat[·] is a channel concatenation operation; F 12 The input is fed into the dilated convolutional blocks with dilation rates of 1 and 3 respectively, and the channels are concatenated to obtain the output feature map F 12 ', F 12 '=Concat[Conv 1×1 (F 12 ),Conv 3×3 (F 12 )] Among them, Conv 1×1 Represents a dilated convolution with a dilation rate of 1 and a convolution kernel of 3. Conv 3×3 It represents a dilated convolution with a dilation rate of 3 and a convolution kernel of 3; Then F 12 ' and F 12 The result of the dilated convolution with a dilation rate of 5 is channel-joined and input into the spatial attention mechanism (SA) and then combined with F 12 Add element by element to get F 23 '; F 23 '=SA(Concat[F 12 ',Conv 5×5 (F 12 )])+F 12 Conv 5×5 represents the expansion rate of 5, SA represents the spatial attention operation, including a maximum pooling layer, an average pooling layer, a channel splicing layer, and a 2D convolution with a convolution kernel of 3; SA=Conv[Concat[Maxpool(x),Avgpool(x)]] Among them, Conv represents a 2D convolution with a convolution kernel of 3, Maxpool represents the maximum pooling layer, and Avgpool represents the average pooling layer; F 23 'Add the feature map obtained by the Canny edge detection operator with the input x, and obtain the final output edge feature map att after element-by-element addition edge ; to edge =F 23 '+Canny(x)。 6. The method according to claim 6, characterized in that: The cross-scale multi-scale attention module: First, the image from the encoder and the image from the previous decoder A cross-scale attention module is performed, and then the results from the two branches are added element-wise to obtain the final feature map, which is output to the same-level decoder.
7. The method according to claim 6, characterized in that The dual attention module contains two convolutional layers, a spatial attention module and a reverse spatial attention module; the feature map from the encoder layer l First, the spatial attention module is performed. The spatial attention module contains the maximum pooling layer and the average pooling layer. The number of channels is compressed to 1, and then the result is channel spliced and passed through a convolution layer with a convolution kernel of k, as shown in the following formula: Feature map from the l-1 layer decoder Similarly, it first passes through a convolution layer with a convolution kernel of k, then passes through the Sigmoid activation function, and then subtracts the result from 1 to obtain the reverse attention feature map, as shown below: Finally, att sa and att ra The two attention feature maps are added element by element to obtain the final attention feature map, which is compared with the feature map of the encoder at the lth layer. Multiply element by element and then and Add element by element to get the final output feature map As shown below:
8. The method according to claim 1, characterized in that The encoder module: First, the decoder layer l-1 feature map First, the feature map size is doubled by using a bilinear interpolation layer through a convolutional decoding block. Channel concatenation is performed to form a new feature map, which is passed to the decoding module of the next layer, as shown in the following formula: In the above formula, UpSample indicates that the bilinear interpolation layer implements upsampling; in addition, in the 3rd and 4th layer decoder blocks, the feature map from the decoder module is combined with the edge feature map att edge Multiply and add element by element to get the decoder feature map of the corresponding layer, as shown in the following formula: Finally, the feature map is input into the output block and the final segmentation result is output.
9. A system for epicardial fat tissue segmentation and volume calculation, wherein the method according to any one of claims 1-8 is implemented.
Citation Information
Cited By
Pericardial adipose tissue image segmentation method, apparatus and device, and medium
CN120976551A
A method, device, equipment and medium for image segmentation of pericardial adipose tissue
CN120976551B
Breast cancer ultrasonic image segmentation method and system
CN121725249A
A method and system for segmenting ultrasound images of breast cancer
CN121725249B