A lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement
By employing a lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement, and utilizing a residual U-shaped module and an edge feature fusion module, the algorithm solves the problem of difficult feature extraction in echocardiography segmentation, achieves efficient multi-scale feature extraction and edge recognition, and improves segmentation performance.
Patent Information
- Application Number
- CN202410689896.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2044-05-30
AI Technical Summary
Existing medical image segmentation methods are unable to effectively extract multi-scale and edge features from echocardiograms when training data is limited and image quality is poor, making cardiac ultrasound image segmentation a difficult task.
A lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement is adopted. Multi-scale features are extracted through multiple residual U-shaped modules of different depths. An edge prediction network is constructed by combining a multi-level edge feature fusion module and a channel attention boundary perception module to enhance the representation and segmentation performance of edge information.
It improves the robustness and accuracy of cardiac ultrasound image segmentation, reduces model complexity, effectively identifies ventricular boundaries, and reduces sensitivity to motion artifacts, plaques, and noise.
Smart Images

Figure CN118570474B_ABST
Abstract
Description
Technical Field
[0001] This invention proposes a lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement, which relates to the field of medical ultrasound image processing. Background Technology
[0002] Echocardiography, as a non-invasive real-time imaging technique, is crucial for assessing cardiac function and detecting various abnormalities in clinical practice. Calculating changes in ventricular or atrial volume is an important indicator for evaluating cardiac function. In clinical practice, this is typically done by manually marking regions of the left ventricle during systole and diastole and then calculating the volume. However, this manual assessment method is time-consuming, error-prone, has low accuracy, and suffers from high inter-observer variance.
[0003] In addition, medical image processing differs from natural image processing. First, well-labeled medical datasets are relatively small, and annotation requires the participation of professionals. However, doctors are short on time and cannot devote themselves fully to annotation work, which limits the algorithm design due to the amount of data. Second, ultrasound images have problems such as uneven brightness, low contrast between the myocardium and blood pool, and are often accompanied by motion artifacts and noise. In particular, the irregular, unclear, and variable boundaries of cardiac structures make the segmentation task of echocardiography challenging.
[0004] Existing medical image segmentation methods can be broadly categorized into two types: image segmentation methods based on convolutional neural networks and those based on transformer architectures. However, both of these methods require not only a large number of parameters but also a large amount of data to achieve ideal results. Furthermore, most existing models extract features based on backbone networks used in image classification tasks, and these features may not be effective in segmentation tasks, especially for images with blurred and irregular boundaries, such as ultrasound images.
[0005] In summary, existing image segmentation methods are ineffective at extracting echocardiographic features and performing segmentation tasks when training data is limited and image quality is poor.
[0006] Therefore, how to efficiently extract multi-scale features and edge features from ultrasound images and effectively fuse them to segment important regions in cardiac ultrasound images is a technical problem that urgently needs to be solved. Summary of the Invention
[0007] The technical problem to be solved by this invention is to propose a lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement, in order to solve the problem that traditional methods used in ultrasound image segmentation tasks are sensitive to motion artifacts, plaques and noise, and cannot effectively identify ventricular boundaries.
[0008] This invention is achieved through the following technical solution:
[0009] A lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement includes the following steps:
[0010] Step 1: Acquire cardiac ultrasound images. Encode the cardiac ultrasound images based on multiple residual U-shaped modules (RSUs) of different depths and extract multi-level, multi-scale features from the cardiac ultrasound images.
[0011] Step 2: Construct a multi-level edge feature fusion module to extract shallow features of cardiac ultrasound images from multi-level and multi-scale features of cardiac ultrasound images, construct an edge prediction network based on the shallow features of cardiac ultrasound images, and characterize the edge prediction branches through the edge prediction network.
[0012] Step 3: Construct a channel attention boundary perception module and fuse edge features, the output features of the RUS module during the decoding process and the output features of the corresponding RUS module during the encoding process to decode the multi-level and multi-scale features of the cardiac ultrasound image and the shallow features of the cardiac ultrasound image to obtain multi-stage feature sub-maps of the cardiac ultrasound image.
[0013] Step 4: Perform segmentation prediction on the obtained multi-stage feature sub-maps of the cardiac ultrasound image, and then fuse the segmented and predicted multi-stage feature sub-maps of the cardiac ultrasound image to obtain the final segmentation result of the cardiac ultrasound image.
[0014] Furthermore, Step 1 specifically includes the following steps:
[0015] Step 1.1: Input the cardiac ultrasound image x into an encoder based on the residual U-shaped module RSU level for encoding, where:
[0016]
[0017] H represents the height of the original input ultrasound image, W represents the width of the original input ultrasound image, and C represents the number of channels in the original ultrasound image.
[0018] Step 1.2: Perform convolutional layer processing on the initial attribute x to obtain the intermediate representation map F(x) of the cardiac ultrasound image.
[0019]
[0020] Among them, C out This represents the number of channels.
[0021] Step 1.3: Based on the U-shaped encoder-decoder in the RSU module, extract the multi-level and multi-scale features U(F(x)) of the cardiac ultrasound image from the intermediate representation map F(x) of the cardiac ultrasound image.
[0022] Step 1.4: Connect the residuals of F(x) processed by the convolutional layer in the RSU module with the residuals of U(F(x)) processed by the U-shaped encoder-decoder to form H. RSU (x) serves as the output feature map of the RSU module at this level.
[0023] H RSU (x)=F(x)+U(F(x))
[0024] in,
[0025] Furthermore, the encoder based on the residual U-shaped module RSU level is an encoder based on the cascaded U-shaped residual module RSU of different depths.
[0026] The RSU module is used in the feature extraction stage, and each feature extraction stage corresponds to one RSU module.
[0027] The RSU module includes an RSU-L module and an RSU-D module.
[0028] The RSU-L module performs downsampling encoding and upsampling decoding operations on the input features to extract multi-scale features from the input feature map.
[0029] The RSU-D module is used to extract features from the input features using dilated convolution.
[0030] During the encoding process, after max pooling downsampling of the multi-scale features in the echocardiogram image extracted by each RSU module, the multi-scale features in the echocardiogram image after max pooling downsampling are used as the input feature map of the next RSU module.
[0031] The encoding process includes four RSU-L modules, namely RSU-7, RSU-6, RSU-5 and RSU-4, and two RSU-D modules.
[0032] The decoding process includes five RSU modules. Each RSU module extracts and fuses features from the corresponding RSU encoder, edge features, and the RSU output features from the previous level encoder. The decoding process includes one RSU-D module and four RSU-L modules: RSU-4, RSU-5, RSU-6, and RSU-7.
[0033] The original image sequentially passes through the encoding processes RSU-7, RSU-6, RSU-5, RSU-4, first RSU-D and second RSU-D, and then enters the decoding process, which sequentially passes through first RSU-D, RSU-4, RSU-5, RSU-6 and RSU-7.
[0034] Furthermore, the RSU-D modules are the first RSU-D and the second RSU-D, and the RSU-L modules are RSU-7, RSU-6, RSU-5 and RSU-4.
[0035] The RSU-L module is specifically represented as follows:
[0036] (Cin,M,Cout)
[0037] Where L represents the depth of the U-shaped encoder-decoder in the RSU module, M is the number of intermediate layers, and C... in , and C out This represents the number of input and output channels of the model.
[0038] Furthermore, Step 2 specifically includes the following steps:
[0039] Step 2.1: During the encoding process of the encoder, extract the shallow features F1 of the output of the RSU-5 module after max pooling downsampling and the shallow features F2 of the output of the RSU-4 module.
[0040]
[0041] Step 2.2: Based on the multi-level edge feature fusion module, the extracted shallow features F1 and F2 are denoised to obtain the edge features F of the cardiac ultrasound image. edge .
[0042] F edge =W1·F1+W2·F2
[0043] Where W1 and W2 represent the gate weights from the softmax layer,
[0044] Step 2.3: Analyze the edge features F of the obtained echocardiogram images. edge After interpolation upsampling, 3x3 convolutional layers, batch normalization, and activation function processing, F is obtained respectively. edge3 F edge2 and F edge1 .
[0045]
[0046] Step 2.4: For the F edge1 A 3x3 convolutional layer is applied to obtain the boundary prediction P of the cardiac ultrasound image. B .
[0047]
[0048] Among them, C labelThis represents the number of channels in the label image.
[0049] Furthermore, the specific steps in Step 2.2 are as follows:
[0050] Step 2.2.1: Perform a 1x1 convolutional layer and concatenation operation on the extracted shallow features F1 and F2 to obtain the spatial gate G1 of shallow features F1 and the spatial gate G2 of F2.
[0051]
[0052] Step 2.2.2: Perform softmax layer gating weight processing on space gates G1 and G2 respectively to obtain the gating weight W1 of G1 and the gating weight W2 of G2.
[0053]
[0054] Step 2.2.3: Based on the gating weights W1 and W2 of G1, the extracted shallow features F1 and F2 are denoised to obtain the edge features F of the cardiac ultrasound image. edge .
[0055] F edge =W1·F1+W2·F2
[0056] Where W1 and W2 represent the gate weights from the softmax layer,
[0057] Furthermore, Step 3 specifically includes the following steps:
[0058] Step 3.1: Based on the channel attention boundary perception module and by fusing edge features, analyze the edge features F of the cardiac ultrasound image. edge Perform attention-enhanced boundary-aware feature calculation to obtain F. att :
[0059]
[0060] Here, AMP(·) represents adaptive max pooling, and MLP(·) is a two-layer fully connected network followed by a sigmoid activation function. Represents element-wise product.
[0061] Step 3.2: Based on the output characteristics of the RSU-D module during the decoding process, the characteristics of the decoded output are processed by interpolation to obtain F. dec Then use F dec With the F att Perform a splicing operation to obtain F cat .
[0062] F cat =cat(F dec ,F att )
[0063] Step 3.3: For the F cat Perform 3x3 convolutional network processing to obtain F' cat .
[0064] Step 3.4: F dec With F' cat The final aggregation is performed to obtain the feature F of the final aggregation of the cardiac ultrasound image boundaries. agg .
[0065]
[0066] Wherein, GAM represents the Global Attention Module. It is an element-by-element addition.
[0067] Step 3.5: Based on the RSU-D input features in the encoding process that are mirror images of the RSU-D in the decoding process, F agg It is concatenated with the RSU-D input features during the encoding process and used as the input value for the next RSU module during the decoding process.
[0068] Furthermore, Step 4 specifically includes the following steps:
[0069] Step 4.1: The sub-feature maps output by the deepest encoder RSU-D in the encoding process and the sub-feature maps output by each decoder RSU in the decoding process are upsampled using a 3x3 convolutional network and interpolation. The upsampled sub-feature maps and the sub-feature maps output by each decoder are then converted into segmentation prediction sub-maps with the label image size and number of channels.
[0070] Step 4.2: Perform a stitching operation and a 1x1 convolutional layer on the segmentation prediction sub-images to obtain the final image segmentation prediction map.
[0071] Step 4.3: Based on the overall model loss function and the binary cross-entropy loss function, perform deep supervised training on the image segmentation prediction map, and use gradient descent to update the parameters in the training model to reduce prediction bias in the model.
[0072] The overall loss function of the model is:
[0073]
[0074] in, This is the loss for the nth segment prediction map. There are a total of 7 segment prediction losses, where n∈{0,…,N=6}. It is the boundary prediction loss.
[0075] The binary cross-entropy loss function is
[0076]
[0077] Where (h,w) are pixel coordinates, G (h,w) and P (h,w) These represent the pixel value of the label and the predicted value of the model, respectively. 1 indicates the segmented target region, and 0 indicates the background.
[0078] Furthermore, the image segmentation prediction map includes six prediction segmentation sub-maps. One final segmentation prediction map And one boundary prediction feature.
[0079] Compared with the prior art, the present invention has at least one of the following advantages:
[0080] 1. This invention extracts multi-scale and multi-level features from images by cascading residual U-shaped modules of different depths, and extracts shallow features through a multi-level edge feature fusion module CFM during the model encoding stage to construct an edge prediction branch. This makes up for the problems of traditional methods being easily affected by artifacts, patches and noise in the image when extracting features, and being unable to recognize blurred boundaries with irregular shapes and uneven brightness.
[0081] 2. This invention captures more contextual information in images by mixing different receptive fields, enhancing the robustness of segmentation model prediction, and uses an edge prediction network to enhance the representation of edge information. It also utilizes the edge awareness module BAM to fuse high-order information in the image with edge information, thereby reducing model complexity and efficiently extracting key features, thus improving the segmentation performance of cardiac ultrasound images. Attached Figure Description
[0082] Figure 1 This is a flowchart of the steps of the present invention;
[0083] Figure 2 This is a diagram of the overall framework of the model network;
[0084] Figure 3 This is a schematic diagram of the Residual U-shaped Module (RSU) structure;
[0085] Figure 4 It contains the true labels and prediction results for the left ventricle in a public dataset. Detailed Implementation
[0086] Traditional methods for processing ultrasound image segmentation tasks are sensitive to motion artifacts, plaques, and noise, and cannot effectively identify ventricular boundaries.
[0087] The main technical solution adopted in this application embodiment is: to extract multi-scale and multi-level features in the image by cascading residual U-shaped modules of different depths, and to extract shallow features by multi-level edge feature fusion module CFM in the model encoding stage, and to construct edge prediction branches. This makes up for the problem that traditional methods are easily affected by artifacts, patches and noise in the image when extracting features, and cannot clearly identify blurred boundaries with irregular shapes and uneven brightness.
[0088] To better understand the above technical solutions, exemplary embodiments of this application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.
[0089] This application discloses a lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement, comprising the following steps:
[0090] Step 1: Acquire echocardiogram images. Encode the echocardiogram images using Residual U-shaped Units (RSUs) at six different depths, and extract multi-level, multi-scale features from the echocardiogram images, specifically:
[0091] Step 1.1: Input the cardiac ultrasound image x into an encoder based on residual U-shaped modules for encoding, where:
[0092]
[0093] H represents the height of the original input ultrasound image, W represents the width of the original input ultrasound image, and C represents the number of channels in the original ultrasound image, with a value of 3.
[0094] Step 1.2: Perform convolutional layer processing on the initial attribute x of the cardiac ultrasound image in the input encoder to obtain the intermediate representation map F(x) of the cardiac ultrasound image;
[0095]
[0096] Among them, C out This represents the number of channels, with a value of 64.
[0097] Step 1.3: Based on the U-shaped encoder-decoder in the RSU module, extract the multi-level, multi-scale features U(F(x)) of the echocardiogram from the intermediate representation map F(x) of the echocardiogram image, such as... Figure 3As shown;
[0098] Step 1.4: Connect the residuals of F(x) processed by the convolutional layer in the RSU module with the residuals of U(F(x)) processed by the U-shaped encoder-decoder to form H. RSU (x) serves as the output feature map of the RSU module at this level.
[0099] H RSU (x)=F(x)+U(F(x))
[0100] in,
[0101] It should be noted that the overall network structure is as follows: Figure 2 As stated above, each feature extraction stage corresponds to RSU-L(C) in the RSU module. in ,M,C out ) module, where L represents the encoder depth in the RSU module, which is determined based on the input image size, C in =64 and C out =64 represents the number of input and output channels of the model, and M is the number of intermediate layers. Setting M to 16 achieves model lightweighting.
[0102] The RSU module is similar to a U-shaped network. The RSU module includes the RSU-L module and the RSU-D module. The RSU-L module is used to perform downsampling encoding and upsampling decoding operations on the input features to extract multi-scale features from cardiac ultrasound images.
[0103] The RSU-D module is used to extract features from the input features using dilated convolution. After max pooling downsampling of the multi-scale features in the echocardiogram image extracted by each RSU module, the multi-scale features in the echocardiogram image after max pooling downsampling are used as the input feature map of the next RSU module.
[0104] The RSU-D modules are the first RSU-D and the second RSU-D, and the RSU-L modules are RSU-7, RSU-6, RSU-5 and RSU-4. The encoding part of the model uses RSU-7, RSU-6, RSU-5, RSU-4, the first RSU-D and the second and second RSU-D to extract multi-scale features.
[0105] RSU-D uses dilated convolution to avoid the problem of information loss in downsampling of small features, such as Figure 3 As shown, the RSU-7 encoding process for the original ultrasound image input features First, the intermediate feature F(x) from Step 1.4 is obtained through convolutional layer processing. Then, the multi-level, multi-scale feature U(F(x)) of the echocardiogram image is obtained through a U-shaped encoder-decoder with a depth of 7. The RSU-7 encoding process includes 5 max-pooling downsampling operations and one dilated convolution, while the decoding process includes 5 interpolation upsampling operations. The residual connection H between the intermediate feature F(x) of RSU-7 and the multi-level, multi-scale feature U(F(x)) of the echocardiogram image processed by the U-shaped encoder-decoder with a depth of 7 is... RSU (x) serves as the output feature map of the RSU-7 module at this level.
[0106] H RSU (x)=F(x)+U(F(x))
[0107] The raw echocardiogram image is processed through RSU-7, RSU-6, RSU-5, and RSU-4 modules, and then subjected to four rounds of max pooling downsampling to obtain the input feature map. First, the intermediate feature F(x) is obtained through convolutional layers. Then, it is encoded by four dilated convolutional layers and decoded by three dilated convolutional layers to obtain the feature U(F(x)). F(x) and U(F(x)) are added to obtain H. RSU (x) is used as the output of RSU-D. The second RSU-D module has the same internal structure as the first RSU-D module. The output features of the first RSU-D module are max-pooled and downsampled to serve as the input features of the second RSU-D module.
[0108] Step 2: Construct a multi-level edge feature fusion module to extract shallow features from multi-level and multi-scale features of echocardiogram images. Based on these shallow features, construct an edge prediction network. Represent the edge prediction branches through this network to enhance edge information. Specifically:
[0109] Step 2.1: During the encoder encoding process, extract the shallow features F1 of the RSU-5 module output after max pooling downsampling and the shallow features F2 of the RSU-4 output;
[0110]
[0111] Step 2.2: Based on the multi-level edge feature fusion module, the extracted shallow features F1 and F2 are denoised to obtain the edge features F of the cardiac ultrasound image. edge .
[0112] F edge =W1·F1+W2·F2
[0113] Where W1 and W2 represent the gate weights from the softmax layer,
[0114] It should be noted that: F edge Specifically, it is obtained through the following steps:
[0115] The extracted shallow features F1 and F2 are subjected to a 1x1 convolutional layer and a concatenation operation to obtain the spatial gate G1 of shallow features F1 and the spatial gate G2 of F2.
[0116]
[0117] The gating weights of space gates G1 and G2 are processed by the softmax layer to obtain the gating weights W1 and W2 of G1.
[0118]
[0119] Based on the gating weights W1 and W2 of G1, noise reduction is applied to the extracted shallow features F1 and F2 to obtain the edge features F of the cardiac ultrasound image. edge :
[0120] F edge =W1·F1+W2·F2
[0121] Step 2.3: Analyze the edge features F of the obtained echocardiogram images. edge After interpolation upsampling, 3x3 convolutional layers, batch normalization, and activation function processing, F is obtained respectively. edge3 F edge2 and F edge1 ;
[0122]
[0123] Step 2.4: For the F edge1 A 3x3 convolutional layer is applied to obtain the boundary prediction P of the cardiac ultrasound image. B .
[0124]
[0125] Among them, C label Number of channels in the label image
[0126] Step 3: Construct a channel attention boundary perception module and fuse edge features, the output features of the RUS module during decoding, and the corresponding output features of the RUS module during encoding to decode multi-level, multi-scale features and shallow features of echocardiogram images, obtaining multi-stage feature sub-maps of echocardiogram images, specifically:
[0127] Step 3.1: Based on the channel attention boundary perception module and by fusing edge features, analyze the edge features F of the cardiac ultrasound image. edge Perform attention-enhanced boundary-aware feature calculation to obtain F. att :
[0128]
[0129] Here, AMP(·) represents adaptive max pooling, and MLP(·) is a two-layer fully connected network followed by a sigmoid activation function. Represents element-wise product.
[0130] Step 3.2: Based on the output characteristics of the RSU-D module during the decoding process, the characteristics of the decoded output are processed by interpolation to obtain F. dec Then use F dec With the F att Perform a splicing operation to obtain F cat .
[0131] F cat =cat(F dec ,F att )
[0132] Step 3.3: For the F cat Perform 3x3 convolutional network processing to obtain F' cat ;
[0133] Step 3.4: F dec With F' cat The final aggregation is performed to obtain the feature F of the final aggregation of the cardiac ultrasound image boundaries. agg .
[0134]
[0135] Wherein, GAM represents the Global Attention Module. It is element-wise addition
[0136] Step 3.5: Based on the RSU-D input features in the encoding process that are mirror images of the RSU-D in the decoding process, F agg It is concatenated with the RSU-D input features during the encoding process and used as the input value for the next RSU module during the decoding process.
[0137] Step 4: Segmentation prediction is performed on the obtained multi-stage feature sub-maps of the echocardiogram image, and then the segmented and predicted multi-stage feature sub-maps of the echocardiogram image are fused to obtain the final segmentation result of the echocardiogram image. The specific steps are as follows:
[0138] Step 4.1: To preserve rich information on features at different levels and improve computational efficiency, the sub-feature maps output by the deepest encoder RSU-D in the encoding process and the sub-feature maps output by each decoder RSU in the decoding process are upsampled using a 3x3 convolutional network and interpolation. The upsampled sub-feature maps and the sub-feature maps output by each decoder are then converted into segmentation prediction sub-maps with the label image size and number of channels.
[0139] Step 4.2: Perform a stitching operation and a 1x1 convolutional layer on the segmentation prediction sub-images to obtain the final image segmentation prediction image;
[0140] Step 4.3: Based on the overall loss function and the binary cross-entropy loss function of the model, perform deep supervised training on the image segmentation prediction map, and use gradient descent to update the parameters in the training model to reduce the prediction bias in the model.
[0141] The overall loss function of the model is:
[0142]
[0143] in, This is the loss for the nth segment prediction map. There are a total of 7 segment prediction losses, where n∈{0,…,N=6}. It is the boundary prediction loss.
[0144] The binary cross-entropy loss function is:
[0145]
[0146] Where (h,w) are pixel coordinates, (H,W) are the height and width of the image, and G... (h,w) and P (h,w) These represent the pixel value of the label and the predicted value of the model, respectively. 1 indicates the segmented target region, and 0 indicates the background.
[0147] It should be noted that the image segmentation prediction map includes 6 prediction segmentation sub-maps. One final segmentation prediction map And one boundary prediction feature.
[0148] Based on the above specific implementation description, the following experiments demonstrate that the present invention is indeed feasible:
[0149] 1. Experimental data: (public dataset);
[0150] The EchoNet-Dynamic dataset is a large-scale cardiac motion video dataset for medical machine learning, released by Stanford University in 2020. It includes 10,036 echocardiographic videos covering a range of typical echocardiographic laboratory imaging conditions. The dataset is labeled with ejection fraction, systolic frames, and diastolic frames, and human experts have annotated the left ventricle region at end-systole and end-diastole. By extracting the labeled frames from the videos, they can be converted into 112x112 pixel images with binary labels: left ventricle and background.
[0151] 2. Experiment setup;
[0152] All experiments were implemented using the PyTorch framework and optimized with the Adam optimizer. The training iterations were 400, and the learning rate was set to 0.001. The dataset consisted of 20,048 labeled images, with 14,920 used for training, 2,576 for validation, and 2,552 for testing. The F1 score and Intersection over Union (IoU) were used as evaluation metrics.
[0153] The F1 score is a statistical metric used to measure the precision of a binary classification model. It considers both precision and recall, and can be viewed as a weighted average of these two metrics. The F1 score is calculated as follows:
[0154]
[0155] Precision refers to the proportion of samples whose predicted value is 1 and whose actual value is also 1 out of all samples whose predicted value is 1:
[0156]
[0157] Recall, also known as the recall rate, refers to the proportion of samples whose predicted value is 1 and whose true value is also 1 out of all samples whose true value is 1.
[0158]
[0159] Among them, TP is the true positive, which is the number of samples correctly classified as positive; FP is the false positive, which is the number of samples that are actually negative but are incorrectly classified as positive; and FN is the false negative, which is the number of samples that are actually positive but are incorrectly classified as negative.
[0160] IoU is the ratio of the intersection to the union of the model's predictions for a given class and the actual values. It is calculated as follows:
[0161]
[0162] 3. Experimental Results
[0163] Following the steps above, experiments were conducted on the EchoNet-Dynamic dataset to verify the results, which are shown in Table 1. The results were then visualized. Figure 4 .
[0164]
[0165]
[0166] Table 1: Prediction results of left ventricular segmentation of the model on the public dataset EchoNet-Dynamic.
[0167] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement, characterized in that, Includes the following steps: Step 1: Acquire cardiac ultrasound images, encode cardiac ultrasound images based on multiple residual U-shaped modules (RSU) at different depths, and extract multi-level and multi-scale features of cardiac ultrasound images. Step 2: Construct a multi-level edge feature fusion module to extract shallow features of cardiac ultrasound images from multi-level and multi-scale features of cardiac ultrasound images, construct an edge prediction network based on the shallow features of cardiac ultrasound images, and characterize the edge prediction branches through the edge prediction network; Step 3: Construct a channel attention boundary perception module and fuse edge features, the output features of the RUS module during the decoding process and the output features of the corresponding RUS module during the encoding process to decode the multi-level and multi-scale features of the cardiac ultrasound image and the shallow features of the cardiac ultrasound image to obtain a multi-stage feature sub-map of the cardiac ultrasound image. Step 4: Perform segmentation prediction on the obtained multi-stage feature sub-maps of the cardiac ultrasound image, and then fuse the segmented and predicted multi-stage feature sub-maps of the cardiac ultrasound image to obtain the final segmentation result of the cardiac ultrasound image. Step 2 specifically includes the following steps: Step 2.1: Extracting shallow features from the output of the RSU-5 module after max pooling downsampling during the encoder encoding process. Shallow features of RSU-4 output ; ; Step 2.2: Based on the multi-level edge feature fusion module, the extracted shallow features are processed. and Noise reduction is performed to obtain edge features of cardiac ultrasound images. ; ; in, , This represents the gate weights from the softmax layer. ; Step 2.3: Analyze the edge features of the obtained cardiac ultrasound images After interpolation upsampling, 3x3 convolutional layers, batch normalization, and activation function processing, the following results were obtained: , and ; ; ; ; Step 2.4: For the above By performing 3x3 convolutional layer processing, boundary prediction of cardiac ultrasound images is obtained. ; ; in, The number of channels in the label image; The specific steps in Step 2.2 are as follows: Step 2.2.1: Extracting shallow features and Perform 1x1 convolutional layers and concatenation operations to obtain shallow features. Space Gate and Space Gate ; ; ; Step 2.2.2: Regarding the space gate and space gate Gating weights of the softmax layer are processed separately to obtain Gating weights and Gating weights ; ; ; Step 2.2.3: In Gating weights and Gating weights Based on this, the extracted shallow features and Noise reduction is performed to obtain edge features of cardiac ultrasound images. ; ; in, , This represents the gate weights from the softmax layer. ; Step 3 specifically includes the following steps: Step 3.1: Based on the channel attention boundary perception module and by fusing edge features, analyze the edge features of cardiac ultrasound images. Perform attention-enhanced boundary-aware feature calculation to obtain : ; in, This indicates an adaptive max-pooling operation. It is a two-layer fully connected network followed by a sigmoid activation function. ; Step 3.2: Based on the output features of the RSU-D module during the decoding process, the features of the decoded output are processed using interpolation to obtain... Then use With the Perform a splicing operation to obtain ; ; Step 3.3: Regarding the aforementioned Perform 3x3 convolutional network processing to obtain ; Step 3.4: and Perform final aggregation to obtain the final aggregation features of the cardiac ultrasound image boundaries. ; ; Wherein, GAM represents the Global Attention Module. It is an element-wise addition; Step 3.5: Based on the RSU-D input features in the encoding process that are mirror images of the RSU-D in the decoding process, ... It is concatenated with the RSU-D input features during the encoding process and used as the input value of the next RSU module during the decoding process; Step 4 specifically includes the following steps: Step 4.1: The sub-feature maps output by the deepest encoder RSU-D in the encoding process and the sub-feature maps output by each decoder RSU in the decoding process are upsampled using a 3x3 convolutional network and interpolation. The upsampled sub-feature maps and the sub-feature maps output by each decoder are then converted into segmentation prediction sub-maps based on the label image size and number of channels. Step 4.2: Perform a stitching operation and a 1x1 convolutional layer on the segmentation prediction sub-images to obtain the final image segmentation prediction image; Step 4.3: Based on the overall model loss function and the binary cross-entropy loss function, perform deep supervised training on the image segmentation prediction map, and use gradient descent to update the parameters in the training model; The overall loss function of the model is: ; ; in, This is the loss for the nth segment prediction map; there are a total of 7 segment prediction losses. , It is the boundary prediction loss; The binary cross-entropy loss function is : ; Where (h, w) are pixel coordinates. and These represent the pixel value of the label and the predicted value of the model, respectively. 1 indicates the segmented target region, and 0 indicates the background.
2. The lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement according to claim 1, characterized in that, Step 1 specifically includes the following steps: Step 1.1: Translate the cardiac ultrasound images The input is encoded in an encoder based on the residual U-shaped module RSU level, where: ; H represents the height of the original input ultrasound image, W represents the width of the original input ultrasound image, and C represents the number of channels in the original ultrasound image. Step 1.2: Initialize the attributes Convolutional layer processing is performed to obtain intermediate representation maps of cardiac ultrasound images. ; ; Among them, C out Number of channels; Step 1.3: Based on the U-shaped encoder-decoder in the RSU module, extract intermediate representations from cardiac ultrasound images. Extract multi-level, multi-scale features U(F(x)) from cardiac ultrasound images; Step 1.4: Process the data from the convolutional layers in the RSU module. Residual connection with U(F(x)) processed by U-type encoder-decoder As the output feature map of the RSU module at this level; ; in, .
3. The lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement according to claim 2, characterized in that: The encoder based on residual U-shaped module RSU level is an encoder based on six U-shaped residual module RSUs of different depths cascaded together. The RSU module is used in the feature extraction stage, and each feature extraction stage corresponds to one RSU module. The RSU module includes an RSU-L module and an RSU-D module; The RSU-L module performs downsampling encoding and upsampling decoding operations on the input features to extract multi-scale features from the input feature map. The RSU-D module is used to extract features from the input features using dilated convolution; During the encoding process, after max pooling downsampling of the multi-scale features in the echocardiogram image extracted by each RSU module, the multi-scale features in the echocardiogram image after max pooling downsampling are used as the input feature map of the next RSU module.
4. The lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement according to claim 3, characterized in that: The RSU-D modules are the first RSU-D and the second RSU-D, and the RSU-L modules are RSU-7, RSU-6, RSU-5 and RSU-4. The RSU-L module is specifically represented as follows: (Cin, M, Cout); Where L represents the depth of the U-shaped encoder-decoder in the RSU module, M is the number of intermediate layers, and C... in, and C out This represents the number of input and output channels of the model.
5. The lightweight cardiac ultrasound image segmentation algorithm based on boundary enhancement according to claim 1, characterized in that: The image segmentation prediction map includes 6 prediction segmentation sub-maps. One final segmentation prediction map And one boundary prediction feature.
Citation Information
Patent Citations
Intestinal tract lesion segmentation method combining multi-scale U-shaped residual encoder and overall reverse attention mechanism
CN112712528A
Medical ultrasonic image segmentation method and system based on adaptive feature fusion
CN117078692A