Cardiac magnetic resonance image segmentation method based on detail guidance and multi-scale attention
By using a semantic segmentation model of detail guidance and multi-scale attention in cardiac magnetic resonance image segmentation, the problem of insufficient utilization of complex target details in the prior art is solved, and high-precision semantic segmentation of cardiac magnetic resonance images is achieved. Improved support capabilities for clinical diagnosis.
Patent Information
- Application Number
- CN202411405629.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-03
AI Technical Summary
The prior art is difficult to effectively utilize the shape and boundary details of the target in cardiac magnetic resonance image segmentation, resulting in insufficient segmentation ability of the segmentation model on complex targets, especially in the segmentation task of tiny areas, where spatial resolution features are not effectively achieved. Retention and recovery.
Using a semantic segmentation model based on detail guidance and multi-scale attention, including a detail guidance module, a multi-scale attention unit and a hollow convolutional pyramid pooling module, the detailed feature map is generated through the Laplace pyramid processing of real boundary labels, combining space and channel attention mechanism, fuse multi-scale features, and build multi-task loss functions to optimize details and segment losses.
Effectively extracting and fusing the spatial resolution characteristics of context information and detailed information significantly improve the semantic segmentation accuracy of cardiac magnetic resonance images, especially the detail capture ability in boundary blurred areas, and is suitable for clinical diagnosis and treatment planning.
Smart Images

Figure CN119251505A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image semantic segmentation in computer vision, and more specifically to a cardiac magnetic resonance image segmentation method based on detail guidance and multi-scale attention. Background Art
[0002] Currently, as a basic task in the field of computer vision, image semantic segmentation aims to perform pixel-level semantic classification on a given image, distinguishing meaningful things such as single targets and regions of interest by determining real boundary information. Image semantic segmentation is used to achieve pixel-level understanding and recognition of the content of a given image. Since semantically related targets usually present similar patterns, it is necessary to deeply understand the structural information of the image and the semantics of each target.
[0003] The task of medical image segmentation represents the understanding of the target semantics. Its purpose is to automatically or semi-automatically classify the pixels in the medical image according to certain similarity features in the medical image, and segment the image into different meaningful regions to obtain the segmentation results. In cardiac magnetic resonance images, there is often a lot of boundary detail information, which also leads to the low distinction between the boundary and the surrounding pixels, which is difficult to distinguish and relatively fuzzy, thus bringing great challenges to the segmentation of cardiac magnetic resonance images. Therefore, image segmentation methods that can effectively utilize detail information have extremely important practical value for the semantic segmentation of cardiac magnetic resonance images.
[0004] In recent years, in the task of cardiac magnetic resonance image segmentation, medical imaging technology and artificial intelligence methods have been continuously optimized and improved, and have achieved improvements in many major segmentation benchmarks, surpassing traditional methods and becoming the current mainstream methods. Among them, methods based on convolutional neural networks have achieved significant improvements. For the training stage of cardiac magnetic resonance image segmentation models, this type of method can associate the contextual information of pixels and has made great progress in segmentation tasks. Therefore, it is particularly important to design a convolutional neural network with powerful image feature extraction and representation capabilities, and automatically learn to extract deep convolution features for image semantic segmentation.
[0005] Although some effective algorithms have been proposed recently, current research shows that the difficulty of segmenting complex targets is often reflected in small areas, and contextual information or spatial resolution has a great impact on the learning ability of the segmentation model, which directly affects its ability to segment complex targets. Therefore, these methods still have the following problems: the detailed information such as the shape and boundary of the target has not been effectively utilized, and the spatial resolution features that can retain the detailed information of the target have not been effectively retained and restored. In addition, the segmentation model needs to more effectively understand and further integrate the features of detailed information and contextual information. Summary of the invention
[0006] In view of this, in order to overcome the shortcomings of the prior art, the present invention provides a cardiac magnetic resonance image segmentation method based on detail guidance and multi-scale attention. Through a semantic segmentation model based on detail guidance and multi-scale attention, it can effectively utilize target detailed information and multi-scale attention features to achieve semantic segmentation of cardiac magnetic resonance images.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] The present invention provides a cardiac magnetic resonance image segmentation method based on detail guidance and multi-scale attention, comprising:
[0009] Constructing a semantic segmentation model based on detail guidance and multi-scale attention, the semantic segmentation model comprising: a multi-level feature encoder with a detail guidance module, a decoder with a multi-scale attention unit, and a dilated convolutional pyramid pooling module;
[0010] The semantic segmentation model is trained using a cardiac magnetic resonance image dataset; wherein the cardiac magnetic resonance image and the real boundary labels of the segmentation targets are used as inputs of the model, and the segmentation masks of the targets in the cardiac magnetic resonance image are used as outputs; the segmentation targets include: the endocardium and epicardium of the cardiac contraction and diastole cycles;
[0011] During the training process, for various types of targets in the input image, the predicted features are compared with the true labels to construct a multi-task loss function; the loss function includes detail loss and segmentation loss;
[0012] The trained semantic segmentation model based on detail guidance and multi-scale attention is applied to the cardiac magnetic resonance images to be segmented, and finally the semantic segmentation results are obtained.
[0013] Furthermore, the multi-level feature encoder of the detail guidance module constructs a densely connected residual block as the main part of the encoding, uses the detail guidance module to process the real boundary label through the Laplacian pyramid to generate a detail feature map, and uses the semantic feature to calculate the detail loss;
[0014] Among them, the detail guidance module is used to process the real label through the Laplacian pyramid to generate the detail feature map. The formula is as follows:
[0015] M d =Conv 1×1 (L(y) s=1 ||U(L(y) s=2 )||U(L(y) s=4 ))
[0016] Among them, M drepresents a detail feature map containing boundary detail information; y represents the true boundary label of each target to be segmented in the cardiac magnetic resonance image; L(y) represents the Laplace convolution on y, s represents the stride; U(·) represents the bilinear upsampling function; || represents the channel cascade; Conv 1×1 Represents the normalized 1×1 convolutional layer performed after the cascade.
[0017] Furthermore, the decoder of the multi-scale attention unit performs feature fusion through a multi-scale upsampling block; the upsampling block fuses low-resolution features and high-resolution features of jump connections, and combines spatial attention and channel attention mechanisms to introduce gradient information of the input image at the end of the upsampling attention block.
[0018] Furthermore, the spatial attention processing process includes:
[0019] In the spatial attention path, a series of 1×1 convolutional layers Convv are used 1×1 Reduce the number of channels to 1 and apply the sigmoid function σ to rescale the features, mapping each channel attention value to the [0, 1] interval:
[0020] s(x)=x c ·σ(Conv 1×1 (Conv 1×1 (x)
[0021] Among them, s(x) represents the attention weight in the spatial attention mechanism, x represents the input feature of the attention path, and x c Represents all channels in the combined feature map;
[0022] The channel attention processing process includes:
[0023] In the channel attention path, compression and activation modules are used to adapt channel weights; a scaling factor in the interval [0, 1] is generated for each channel of the input feature, and it is scaled according to the factor to obtain the output feature c(x);
[0024] The output of the upsampling attention block is:
[0025] UA(x)=(1+s(x))⊙c(x)
[0026] where ⊙ represents the element-wise product.
[0027] Furthermore, the outputs of the dilated convolutional pyramid pooling module and each upsampling attention block are fused with the skip connections in the encoder respectively to aggregate the multi-level features of the encoder.
[0028] Furthermore, the cardiac magnetic resonance image and the ground truth boundary labels of the segmented targets are used as the input of the model, including:
[0029] During the training phase, data preprocessing and data enhancement are performed on the input cardiac magnetic resonance images, and then the images are used as input for model training; the cardiac magnetic resonance images carry the real boundary labels of the segmentation targets.
[0030] Furthermore, the multi-task loss function includes detail loss and segmentation loss. The total loss L total It is given by the following formula;
[0031] L total =L detail +L seg
[0032] Among them, the detail loss L detail Binary cross entropy and Dice loss are jointly optimized to ensure that the spatial detail information is aligned with the actual boundary labels of the details;
[0033] The segmentation loss L seg The calculation is based on the cross entropy loss and Dice loss between the true boundary label and the predicted segmentation mask of each segmentation target in the cardiac magnetic resonance image.
[0034] Furthermore, the detail loss L detail The formula is as follows:
[0035]
[0036] in, They are the true detail label and the predicted detail feature map; all pixels are in a domain with a height of h and a width of w; binary cross entropy and Dic e The losses are as follows:
[0037]
[0038] Where N is a region with a height of h and a width of w; i is the i-th pixel of N, and d i and They represent the true detail label and predicted detail of the i-th pixel respectively, and ε=1 represents the smoothness term.
[0039] Furthermore, the segmentation loss uses cross entropy and Dice loss to jointly optimize learning:
[0040] L seg =L ce +L dice
[0041]
[0042] Among them, y represents the true boundary label of each target to be segmented in the cardiac magnetic resonance image, Represents the boundaries of each target to be segmented predicted by the model; y and All are in the domain of height h, width w, and number of channels K, y∈{0,1} h×w×K , y ik and They represent the true boundary label and the predicted boundary of the ith pixel of category k, respectively, where the value 0 represents the background and 1 represents the boundary; eps=1e-7 is used to maintain the numerical stability of the denominator.
[0043] It can be seen from the above technical solution that compared with the prior art, it has the following advantages:
[0044] The contextual information that can associate pixels and the spatial resolution features that can retain detailed information such as target shape and boundaries are effectively extracted and further integrated to achieve semantic segmentation of cardiac magnetic resonance images. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0046] Figure 1 A flow chart of the cardiac magnetic resonance image segmentation method based on detail guidance and multi-scale attention provided by the present invention.
[0047] Figure 2 Schematic diagram of the cardiac magnetic resonance image segmentation method based on detail guidance and multi-scale attention provided by the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] Reference Figure 1 As shown, an embodiment of the present invention discloses a cardiac magnetic resonance image segmentation method based on detail guidance and multi-scale attention, comprising:
[0050] S10, constructing a semantic segmentation model based on detail guidance and multi-scale attention, wherein the semantic segmentation model includes: a multi-level feature encoder with a detail guidance module, a decoder with a multi-scale attention unit, and a dilated convolutional pyramid pooling module;
[0051] S20, training the semantic segmentation model using a cardiac magnetic resonance image dataset; wherein the cardiac magnetic resonance image and the real boundary labels of the segmentation targets are used as inputs of the model, and the segmentation masks of the targets in the cardiac magnetic resonance image are used as outputs; the segmentation targets include: the endocardium and the epicardium in the cardiac contraction and diastole cycles;
[0052] S30. During the training process, for various types of targets in the input image, the predicted features are compared with the true labels to construct a multi-task loss function; the loss function includes detail loss and segmentation loss;
[0053] S40. Apply the trained semantic segmentation model based on detail guidance and multi-scale attention to the cardiac magnetic resonance image to be segmented, and finally obtain the semantic segmentation result.
[0054] Among them, in step S10, the encoder is mainly responsible for extracting multi-scale features from the input image. The encoder uses a densely connected residual block (Dense Residual Block) to capture details and semantic information at different levels. In the encoder, the detail guidance module extracts the spatial detail information of the image through the Laplacian image pyramid to generate a multi-scale detail feature map. The function of this module is to capture the boundary and shape detail information that is difficult to distinguish in cardiac magnetic resonance images.
[0055] The decoder combines the multi-scale features extracted by the encoder to restore the low-resolution feature map to a high-resolution output image, and finally generates a segmentation mask of the target. Each upsampling block in the decoder part will perform feature fusion with the corresponding layer of the encoder through skip connections to ensure that important details are not lost during the decoding process.
[0056] Atrous Convolution Pyramid Pooling Module, used to extract contextual information from different scales. Atrous convolution enables the model to expand the receptive field without increasing computational complexity, thereby obtaining more global information. The output of this module is fused with the output of the upsampling block and the jump connection in the encoder to aggregate information from different levels to enhance the model's ability to recognize complex structures and details.
[0057] In step S30, the loss function includes detail loss and segmentation loss, which are used to optimize the model. The detail loss jointly optimizes the alignment of spatial details through binary cross entropy and Dice loss, while the segmentation loss is used to adjust the difference between the segmentation mask and the true label.
[0058] In this embodiment, first, a multi-level feature encoder with a detail guidance module, a decoder with a multi-scale attention unit, and a dilated convolutional pyramid pooling module are integrated to construct a semantic segmentation model based on detail guidance and multi-scale attention. Secondly, the segmentation model is trained using a training set in a cardiac magnetic resonance image dataset, wherein the input of the model is an image that is data-enhanced by methods such as center cropping, random rotation, and random horizontal / vertical flipping, and the output of the model is a segmentation mask for each target in the input image. Secondly, during the training process, for each type of target in the input image, the predicted features are compared with the true labels, and a multi-task loss function is constructed, which includes detail loss and segmentation loss. Finally, the trained semantic segmentation model based on detail guidance and multi-scale attention is applied to the cardiac magnetic resonance image to be segmented, and the semantic segmentation result is finally obtained.
[0059] The present invention constructs a convolutional neural network for semantic segmentation based on detail guidance and multi-scale attention, effectively utilizes detailed information and multi-scale attention maps, and realizes semantic segmentation of cardiac magnetic resonance images. The encoder is responsible for extracting multi-scale features, and the decoder restores high-resolution images through jump connections and upsampling, ensuring that the model can extract and restore detailed information at different resolutions. In addition, the detail guidance module and the multi-scale attention mechanism work closely together. The detail guidance module extracts spatial details in the encoder, and the attention mechanism amplifies these details in the decoder, thereby improving the accuracy of segmentation. Finally, detail loss and segmentation loss work together during the training process, and the model's sensitivity to details is improved through joint optimization, ensuring that the segmentation results are more accurate.
[0060] This semantic segmentation model achieves accurate segmentation of cardiac magnetic resonance images through the collaborative work of encoder-decoder structure, multi-scale processing, detail-guided module and attention mechanism, and performs particularly well in detail extraction and semantic information understanding.
[0061] The following is described in detail through specific embodiments:
[0062] like Figure 2 As shown, a cardiac magnetic resonance image segmentation method based on detail guidance and multi-scale attention is used to segment the endocardium and epicardium of the cardiac contraction and diastole cycles in the cardiac magnetic resonance image, so as to help doctors better identify the cardiac function state and evaluate heart diseases. The method specifically includes the following steps:
[0063] Step 1: Construct a densely connected residual block as the main part of the model encoder, and adopt a detail-guided module to process the true label to extract deep features of multi-scale information. In this process, the Laplacian image pyramid is used to process the true mask and generate detail feature maps using multi-level details of different scales. Then the segmentation head and dense connection block are introduced to calculate the detail loss to guide the learning of spatial detail features. The deep features of multi-scale spatial detail information are extracted using the detail-guided module to be fused into the semantic features extracted in the encoder and passed to the decoder through the downsampled dense connection block and the corresponding skip connection.
[0064] Specifically, the detail guidance module is used to process the real boundary label y of the target to be segmented in the cardiac magnetic resonance image, which is manually annotated by experts, to obtain a detail feature map M containing boundary detail information. d The calculation is as follows:
[0065] M d =Conv 1×1 (L(y) s=1 ||U(L(y) s=2 )||U(L(y) s=4 ))
[0066] Where L(y) represents the Laplace convolution on y, s represents the stride. U(·) is the bilinear upsampling function. || represents channel concatenation. Conv 1×1 is the normalized 1×1 convolutional layer performed after the cascade.
[0067] Step 2: Introduce a series of multi-scale upsampling blocks to fuse the low-resolution features of the previous level and the corresponding jump connections, and enhance the feature expression through spatial and channel attention mechanisms. Next, use boundary detection operators (such as Cann y Operator) extracts the boundary of the input image to obtain the gradient information of the input image, and introduces the image gradient at the end of the upsampling attention block to improve the model's ability to extract image detail information.
[0068] For each upsampling block, the previous lower resolution features are first upsampled by transposed convolution. Then, the features of the previous level low resolution features and the skip connections of the same level from the densely connected residual block are fused. Finally, after convolution, batch normalization and nonlinear activation, spatial and channel attention are applied to enhance the ability to extract contextual and spatial information;
[0069] Specifically, in the spatial attention path, a series of 1×1 convolutional layers Conv 1×1 Reduce the number of channels to 1 and apply the sigmoid function σ to rescale the features, mapping each channel attention value to the [0,1] interval:
[0070] s(x)=x c ·σ(Conv 1×1 (Conv 1×1 (x)
[0071] Among them, s(x) represents the attention weight in the spatial attention mechanism, x represents the input feature of the attention path, and x c represents all channels in the combined feature maps, which means stacking by channels to match the output dimension.
[0072] In the channel attention path, a compression and activation module is used for channel weight adaptation. This module generates a scaling factor in the interval [0, 1] for each channel of the input feature and scales it according to the factor to obtain the output feature c(x).
[0073] The output of the upsampling attention block is:
[0074] UA(x)=(1+s(x))⊙c(x)
[0075] Where ⊙ represents the element-wise product.
[0076] Step 3: The outputs of the dilated convolutional pyramid pooling module and each upsampling attention block are fused with the cropped and connected skip connections in the encoder respectively to aggregate the multi-level features of the encoder;
[0077] Specifically, the atrous convolutional pyramid pooling module is applied on top of the encoder and decoder to extract multi-scale context, and the multi-scale upsampling attention block is used in the decoder path.
[0078] Step 4: In the training phase, the cardiac magnetic resonance images are input for data preprocessing and data enhancement, and then used as input for model training;
[0079] Specifically, for example, the cardiac magnetic resonance scan images in DICOM format are scaled to a uniform resolution, maintaining the aspect ratio, and enhanced by center cropping, random rotation, and random horizontal / vertical flipping to expand the training data. The categories of segmentation targets include the endocardium and epicardium of the heart's systolic and diastolic cycles.
[0080] Step 5: By calculating the segmentation loss between the true label and the predicted segmentation image and the detail loss of the model encoder, the predicted segmentation mask is gradually consistent with the true label;
[0081] Specifically, the detail guidance module is applied in the encoder of the model to extract the deep features of multi-scale information and calculate the semantic features of detail loss; for detail loss, the detail map obtained by the detail guidance module is a binary feature map, in which the details account for a relatively small proportion of all pixels. Therefore, using binary cross entropy and Dic e The detail loss L is used to jointly optimize the learning to align the spatial detail features extracted by the encoder with the detail ground truth labels. detail as follows:
[0082]
[0083] in, are the true detail labels and the predicted detail feature maps. All pixels are in a domain with a height of h and a width of w. Binary cross entropy and Dic e The losses are as follows:
[0084]
[0085] Where N is a region with height h and width w. i is the i-th pixel of N, d i and are the true detail label and predicted detail of the i-th pixel respectively, and ε=1 is the smoothness term.
[0086] For the segmentation loss, the cross entropy loss and Dic between the true label and the predicted segmentation image are calculated. e The loss is used as the segmentation loss of the model.
[0087] Among them, using cross entropy and Dic e Loss to jointly optimize learning:
[0088] L seg =L ce +L dice
[0089]
[0090] Where y is the true boundary label of each target to be segmented in the cardiac magnetic resonance image manually annotated by experts, is the boundary of each target to be segmented predicted by the model. All are in the domain of height h, width w, and number of channels K, y∈{0,1} h×w×K , y ik and are the true boundary label and the predicted boundary of the ith pixel of category k, respectively, where the value 0 represents background and 1 represents boundary. eps=1e-7 is used to maintain the numerical stability of the denominator.
[0091] Step 6: Input the preprocessed cardiac magnetic resonance image to be segmented into the segmentation model based on detail guidance and multi-scale attention, and finally obtain the semantic segmentation results of each target to be segmented composed of contour boundaries.
[0092] The present invention combines the characteristics of the target to be segmented, makes full use of the learning ability of the segmentation model based on contextual information and spatial resolution features, and proposes a semantic segmentation model based on detail guidance and multi-scale attention for image segmentation. Based on the trained semantic segmentation model, for the cardiac magnetic resonance images to be segmented, the contextual information that can associate pixels and the spatial resolution features that can retain detail information such as target shape and boundaries can be effectively extracted and further integrated, thereby realizing the semantic segmentation of the cardiac magnetic resonance images, which can further contribute to clinical diagnosis and treatment planning, as well as preoperative evaluation and surgical guidance.
[0093] Through the above embodiments, the cardiac magnetic resonance image segmentation method proposed by the present invention can significantly improve the segmentation accuracy, especially for images with blurred boundaries, it has a stronger ability to capture details. This method is suitable for automatic analysis of clinical cardiac images, which helps doctors to make quick and accurate diagnosis and evaluation.
[0094] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0095] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A cardiac magnetic resonance image segmentation method based on detail guidance and multi-scale attention, characterized in that: include: Constructing a semantic segmentation model based on detail guidance and multi-scale attention, the semantic segmentation model comprising: a multi-level feature encoder with a detail guidance module, a decoder with a multi-scale attention unit, and a dilated convolutional pyramid pooling module; The semantic segmentation model is trained using a cardiac magnetic resonance image dataset; wherein the cardiac magnetic resonance image and the real boundary labels of the segmentation targets are used as inputs of the model, and the segmentation masks of the targets in the cardiac magnetic resonance image are used as outputs; the segmentation targets include: the endocardium and epicardium of the cardiac contraction and diastole cycles; During the training process, for various types of targets in the input image, the predicted features are compared with the true labels to construct a multi-task loss function; the loss function includes detail loss and segmentation loss; The trained semantic segmentation model based on detail guidance and multi-scale attention is applied to the cardiac magnetic resonance images to be segmented, and finally the semantic segmentation results are obtained.
2. The method according to claim 1, characterized in that The multi-level feature encoder of the detail guidance module constructs a densely connected residual block as the main part of the encoding, uses the detail guidance module to process the real boundary label through the Laplacian pyramid to generate a detail feature map, and uses the semantic feature to calculate the detail loss; Among them, the detail guidance module is used to process the real label through the Laplacian pyramid to generate the detail feature map. The formula is as follows: M d =Conv 1×1 (L(y) s=1 ||U(L(y) s=2 )||U(L(y) s=4 )) Among them, M d represents a detail feature map containing boundary detail information; y represents the true boundary label of each target to be segmented in the cardiac magnetic resonance image; L(y) represents the Laplace convolution on y, s represents the stride; U(·) represents the bilinear upsampling function; || represents the channel cascade; Conv 1×1 Represents the normalized 1×1 convolutional layer performed after the cascade.
3. The method according to claim 2, characterized in that The decoder of the multi-scale attention unit performs feature fusion through a multi-scale upsampling block; the upsampling block fuses low-resolution features and high-resolution features of jump connections, and combines spatial attention and channel attention mechanisms to introduce gradient information of the input image at the end of the upsampling attention block.
4. The method according to claim 3, characterized in that The processing of spatial attention includes: In the spatial attention path, a series of 1×1 convolutional layers Conv are used 1×1 Reduce the number of channels to 1 and apply the sigmoid function σ to rescale the features, mapping each channel attention value to the [0,1] interval: s(x)=x c ·σ(Conv 1×1 (Conv 1×1 (x)) Among them, s(x) represents the attention weight in the spatial attention mechanism, x represents the input feature of the attention path, and x c Represents all channels in the combined feature map; The channel attention processing process includes: In the channel attention path, compression and activation modules are used to adapt channel weights; a scaling factor in the interval [0,1] is generated for each channel of the input feature, and it is scaled according to the factor to obtain the output feature c(x); The output of the upsampling attention block is: UA(x)=(1+s(x))⊙c(x) Where ⊙ represents the element-wise product.
5. The method according to claim 4, characterized in that The outputs of the dilated convolutional pyramid pooling module and each upsampling attention block are fused with the skip connections in the encoder to aggregate the multi-level features of the encoder.
6. The method according to claim 1, characterized in that The cardiac magnetic resonance image and the ground truth boundary labels of the segmented targets are used as input to the model, including: During the training phase, data preprocessing and data enhancement are performed on the input cardiac magnetic resonance images, and then the images are used as input for model training; the cardiac magnetic resonance images carry the real boundary labels of the segmentation targets.
7. The method according to claim 1, characterized in that The multi-task loss function includes detail loss and segmentation loss, and the total loss l total It is given by the following formula; L total =L detail +L seg Among them, the detail loss L detail Binary cross entropy and Dice loss are jointly optimized to ensure that the spatial detail information is aligned with the actual boundary labels of the details; The segmentation loss L seg The calculation is based on the cross entropy loss and Dice loss between the true boundary label and the predicted segmentation mask of each segmentation target in the cardiac magnetic resonance image.
8. The method according to claim 7, characterized in that The detail loss L detail The formula is as follows: in, They are the true detail label and the predicted detail feature map; all pixels are in a domain with a height of h and a width of w; the binary cross entropy and Dice loss are as follows: Where N is a region with a height of h and a width of w; i is the i-th pixel of N, and d i and They represent the true detail label and predicted detail of the i-th pixel respectively, and ε=1 represents the smoothness term.
9. The method according to claim 7, characterized in that: The segmentation loss uses cross entropy and Dice loss to jointly optimize learning: L seg =L ce +L dice Among them, y represents the true boundary label of each target to be segmented in the cardiac magnetic resonance image, Represents the boundaries of each target to be segmented predicted by the model; y and All are in the domain of height h, width w, and number of channels K, y∈{0,1} h×w×K , y ik and They represent the true boundary label and the predicted boundary of the ith pixel of category k, respectively, where the value 0 represents the background and 1 represents the boundary; eps=1e-7 is used to maintain the numerical stability of the denominator.
Citation Information
Cited By
Liver tumor segmentation method fusing three kinds of attention
CN120031900A
Abdominal tumor angiography magnetic resonance image generation method based on cross semantic perception
CN121582392A
Cross-semantic perception based abdominal tumor contrast magnetic resonance image generation method
CN121582392B
