Global local feature enhanced breast cancer medical ultrasonic image segmentation method and system
By introducing an improved U-Net model of the global-local feature extraction module in breast cancer ultrasound image segmentation, the shortcomings of traditional CNN methods in global information extraction and boundary recognition are solved, and the segmentation accuracy and stability are significantly improved.
Patent Information
- Application Number
- CN202510013049.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-15
AI Technical Summary
Traditional CNN methods are difficult to effectively capture global information in breast cancer ultrasound image segmentation, and the lesion boundaries are unclear, resulting in limited segmentation performance.
A medical ultrasound image segmentation method for breast cancer with global local features enhancement is proposed. By improving the U-Net model, the global-local feature extraction module is introduced to enhance the global and local feature extraction capabilities of the image segmentation model.
It significantly improves the accuracy and stability of breast cancer ultrasound image segmentation, and the improved model can more effectively capture the global information and local details of the image, improving the accuracy of boundary recognition.
Smart Images

Figure CN119832245A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence and image segmentation, and in particular to a method and system for segmenting medical ultrasound images of breast cancer with global and local feature enhancement. Background Art
[0002] In breast cancer diagnosis, ultrasound images, as a common non-invasive imaging technology, are of great significance for early detection and diagnosis of breast cancer. Breast cancer ultrasound image segmentation technology plays a key role in cancer diagnosis and treatment. Through precise image segmentation, doctors can accurately identify the size, shape, and location of the tumor, providing support for the selection of subsequent treatment plans and effect evaluation. However, ultrasound image segmentation faces many challenges. First, the quality of ultrasound images is low, and there are usually problems of noise, blur, and low contrast. This is because when ultrasound waves propagate in breast tissue, they are affected by factors such as sound wave reflection and scattering, resulting in unclear image details. Secondly, the boundaries of the tumor area in the image are unclear, and the grayscale value difference with the surrounding tissue is small, which increases the difficulty of segmentation. In addition, there are also large variations in the shape, size, and location of the tumor, which brings greater challenges to the image segmentation task.
[0003] Traditional breast cancer ultrasound image segmentation methods mainly rely on edge-based active contour models, such as the Snake model [1] and the Geodesic Active Contour (GAC) model [2]. These methods segment the target area based on image edge information and are suitable for complex shapes and fuzzy boundaries. However, the Snake model is difficult to handle topological changes, and the parameter adjustment is complex, so it has limited effect when the boundary is not clear; the GAC model has high computational overhead and is sensitive to initialization, which can easily lead to unstable segmentation results. With the development of deep learning technology, methods such as convolutional neural networks (CNNs) have gradually become a new choice for breast cancer ultrasound segmentation. Models based on FCN [3] and U-Net [4] avoid the reliance of traditional methods on edge features by automatically learning features, and significantly improve segmentation performance. However, there are two problems that need to be solved. First, due to the limitation of its receptive field, CNN is difficult to effectively capture global information. Second, the boundary of breast cancer is not clear.
[0004] [1]M.Alemán,L.Alvarez,Vicent Caselles,et al.Texture-orientedanisotropic filtering and geodesic active contours in breast tumor ultrasoundsegmentation[J].J Math Imaging vis.,2007,28(1):81-97.
[0005] [2]LAChristopher,EJDelp,CRMeyer,et al.3-D Bayesian ultrasoundbreast image segmentation using the EM / MPM algorithm[C].Proceedings of the2002IEEE International Symposium on Biomedical Imaging,USA,2002:86-89.
[0006] [3]J.Long,E.Shelhamer,T.Darrell,et al..Fully convolutional networks for semantic segmentation[C].Proceedings of the IEEE Conference on ComputerVision and Pattern Recognition,2015:3431-3440.
[0007] [4]O.Ronneberger,P.Fischer,T.Brox,et al.U-Net:Convolutional networks for biomedical image segmentation[C].International Conference on MedicalImage Computing and Computer-Assisted Intervention,2015:234-241. Summary of the invention
[0008] The purpose of the present invention is to provide a method and system for breast cancer medical ultrasound image segmentation with global and local feature enhancement in order to address the problems of insufficient global information extraction and unclear lesion boundaries in traditional CNN methods.
[0009] The technical solution of the present invention is as follows:
[0010] A method for segmenting breast cancer medical ultrasound images with global and local feature enhancement includes steps S110-S150, which are specifically as follows:
[0011] S110: Collect breast cancer ultrasound images and corresponding annotation data, and form an original image dataset I and a label dataset L with the breast cancer ultrasound image data and the annotation data respectively;
[0012] S120: Construct an improved U-Net model for breast cancer medical ultrasound image segmentation, denoted as GLF-UNet; U-Net is used as the backbone network, including the input end, encoder, decoder and segmentation head; in the encoder part, it contains a Conv stem block, four global-local feature extraction modules and three downsampling modules; each Conv stem block consists of a 3×3 convolution layer, a BatchNorm layer and a GELU activation function layer; the global-local feature extraction module consists of a LayerNorm layer, a GLEB layer, a LFEB layer, a Dropout layer and a residual connection layer. The input feature map is first normalized by a LayerNorm layer, and then divided into two paths, which are sent to the GLEB layer and the LFEB layer respectively, which are used to strengthen the global features and local features respectively. After the two parts of the features are enhanced, they are fused by addition operation, and then pass through a Dropout layer to reduce the risk of overfitting. Finally, the final output features are generated through residual connection;
[0013] S130: training the constructed GLF-UNet;
[0014] S140: According to the breast cancer medical ultrasound image segmentation method, a target segmentation result is provided.
[0015] The global local feature enhanced breast cancer medical ultrasound image segmentation method, the GFEB module includes a 1×1 convolution layer, two Max Pooling layers and two Mat Mul operations; specifically, the input features first pass through a 1×1 convolution layer to extract specific channel features; then, the convolution output is divided into three paths, the first path directly extracts global features through Max Pooling; the second path also passes through the Max Pooling operation, and then directly performs matrix multiplication with the convolution output of the third path; the third path directly performs matrix multiplication again with the matrix multiplication result of the second path to obtain the final output.
[0016] The method for segmenting breast cancer medical ultrasound images with global local feature enhancement, the LFEB module includes a 1×1 convolutional layer, three Depthwise Conv, two Pointwise Conv, two Mat Mul operations and a GELU activation function; specifically, the input features first pass through a 1×1 convolutional layer to extract specific channel features; then they are divided into three paths, each path performs a Depthwise Conv operation, and then the features obtained by the first and second paths are multiplied, and then Pointwise Conv, GELU, and Pointwise Conv operations are performed in sequence, and finally multiplied with the features of the third path to obtain the final output.
[0017] The specific steps of the LFEB module of the global local feature enhanced breast cancer medical ultrasound image segmentation method are as follows:
[0018] F l =PWConv(GELU(PWConv(DWConv(Conv 1×1 (F c ))*DWConv(Conv 1×1 (F c )))))
[0019] *DWConv(Conv 1×1 (F c ))
[0020] Among them, DWConv represents the Depthwise Conv operation, PWConv represents the Pointwise Conv, and * represents the MatMul operation.
[0021] The global local feature enhanced breast cancer medical ultrasound image segmentation method, the specific method of the encoder is:
[0022] First, the image F is input into the Conv stem block to get the output F c :
[0023] F c =GELU(BN(Conv 3×3 (F))),
[0024] Then, F c Input to the first global-local feature extraction module to obtain feature F1, followed by the first downsampling to obtain output D1:
[0025] F1=F c +Dropout(GLEB(LN(F c ))+LFEB(LN(Fc ))),
[0026] D1=Downsampling(F c ),
[0027] After that, D1 is input into the second global-local feature extraction module to obtain feature F2, followed by a second downsampling to obtain output D2:
[0028] F2=D1+Dropout(GLEB(LN(D1))+LFEB(LN(D1))),
[0029] D2=Downsampling(F2),
[0030] Then, D2 is input into the third global-local feature extraction module to obtain feature F3, followed by a third downsampling to obtain output D3:
[0031] F3=D2+Dropout(GLEB(LN(D2))+LFEB(LN(D2))),
[0032] D3=Downsampling(F3),
[0033] Finally, D3 is input into the fourth global-local feature extraction module to obtain the final output feature F4 of the decoder:
[0034] F4=D3+Dropout(GLEB(LN(D3))+LFEB(LN(D3))),
[0035] Among them, BN represents the BatchNorm layer.
[0036] The method for segmenting breast cancer medical ultrasound images with global and local feature enhancement, the decoder includes four Convblock modules and three upsampling modules; each Conv Block consists of a Depthwise Conv convolution layer, two Pointwise Conv layers and a GELU activation function layer; the input features pass through Depthwise Conv, Pointwise Conv and GELU in sequence, then perform a residual connection, and finally integrate channel information through a Pointwise Conv to obtain the final output feature map.
[0037] The specific method of the decoder of the breast cancer medical ultrasound image segmentation method with global and local feature enhancement is as follows:
[0038] First, the final output F4 of the decoder is input into the first Conv Block to obtain feature E1, followed by the first upsampling (Upsampling) until the output feature U1 is obtained:
[0039] E1=PWConv(GELU(PWConv(DWConv(F4)))),
[0040] U1=UPsampling(E1),
[0041] Then, the feature F3 obtained by the third global-local feature extraction block is concatenated with the feature map U1 obtained by the first upsampling and input into the second Conv Block to obtain the feature E2, followed by a second upsampling to obtain the output feature U2:
[0042]
[0043] U2=UPsampling(E2),
[0044] Then, the feature F2 obtained by the second global-local feature extraction module is concatenated with the feature map U2 obtained by the second upsampling and input into the third Conv Block until the feature E3 is obtained, and then the third upsampling is performed to obtain the output feature U3:
[0045]
[0046] U3=UPsampling(E3),
[0047] Finally, the feature F1 obtained by the first global-local feature extraction module and the feature map U3 obtained by the third upsampling are concatenated and input into the fourth Conv Block to obtain the final output E4 of the decoder:
[0048]
[0049] Among them, DWConv represents the Depthwise Conv operation, PWConv represents the Pointwise Conv, and + represents the Add operation. Represents a Concat operation.
[0050] The method for segmenting breast cancer medical ultrasound images with global local feature enhancement, the segmentation head is composed of a Seg Head block, and the Seg Head block is composed of a 1×1 Conv layer, a BatchNorm layer and a GELU activation function layer; the specific process includes: firstly splicing the four outputs obtained by the decoder Conv Block, and then performing a Seg Head operation,
[0051]
[0052] in, represents Concat, and L represents the output segmentation result.
[0053] The method for segmenting breast cancer medical ultrasound images with global and local feature enhancement, in step S140, uses the original image training data set I in step S120 train And the manually labeled result dataset L train The specific process of training the model is as follows: First, I train The input data is passed to the network for forward propagation to calculate the prediction result of the current iteration. Then, the prediction result is compared with the corresponding manual annotation result L train The prediction error is calculated using the loss function. Then, the gradient of the loss function relative to the network parameters is calculated by the stochastic gradient descent optimizer, and the weight parameters of the network are updated by the back propagation algorithm. This process is repeated in multiple rounds until the preset error requirements are met, and a trained network model is finally obtained. Finally, the test dataset I of the original image is used. test And the test dataset L with manual annotation results test Verify the trained model and evaluate its performance on unknown data. The loss function in the above steps uses the DiceLoss loss function, which is calculated as follows:
[0054]
[0055] Among them, P represents the predicted image, G represents the true label image, |P∩G| represents the number of pixels in the overlapping area of the predicted image and the label image, |P| represents the number of pixels in the predicted image, and |G| represents the number of pixels in the label image.
[0056] A breast cancer medical ultrasound image segmentation system with global and local feature enhancement, the system executes any of the methods described above.
[0057] By adopting the above scheme, the algorithm of the present invention introduces a global-local feature extraction block in the decoder part. For the global feature extraction block, global information extraction can be enhanced. For the local feature extraction block, boundary details are optimized to obtain better boundary information. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 : Overall flow chart;
[0059] Figure 2 : GLF-UNet network structure diagram;
[0060] Figure 3 : Conv stem structure diagram;
[0061] Figure 4 : Global-local feature extraction module structure diagram;
[0062] Figure 5 : GFEB structure diagram;
[0063] Figure 6 : LFEB structure diagram;
[0064] Figure 7 :Seg Head structure diagram;
[0065] Figure 8 : Conv Block structure diagram; DETAILED DESCRIPTION
[0066] The present invention is described in detail below in conjunction with specific embodiments.
[0067] The present invention provides a method for segmenting breast cancer medical ultrasound images with global and local feature enhancement. The overall process is as follows: Figure 1 The method includes steps S110-S140, which are as follows:
[0068] S110: Collect breast cancer ultrasound images and corresponding annotation data, and form an original image dataset I and a label dataset L with the breast cancer ultrasound image data and the annotation data respectively;
[0069] S120: Construct an improved U-Net model for breast cancer medical ultrasound image segmentation, denoted as Improved U-Net based on global and local feature enhancement, GLF-UNet.
[0070] S130: Train the constructed GLF-UNet.
[0071] S140: According to the breast cancer medical ultrasound image segmentation method, a target segmentation result is provided.
[0072] In step S120, an improved U-Net breast cancer medical ultrasound image segmentation model (GLF-UNet) is constructed, and the network structure is as follows: Figure 2 As shown. U-Net is used as the backbone network, including the input end, encoder network, decoder network and segmentation head network, as follows:
[0073] 210 At the input end, the collected breast cancer ultrasound images are used as input to the network.
[0074] 220 In the encoder part, it includes a Conv stem block, four global-local feature extraction blocks and three downsampling blocks. The Conv stem block structure is as follows Figure 3 As shown in Figure 2, each Conv stem block consists of a 3×3 convolutional layer, a BatchNorm layer, and a GELU activation function layer. The global-local feature extraction module is shown in Figure 2. Figure 4 As shown in the figure, it consists of a LayerNorm layer, a GLEB layer, a LFEB layer, a Dropout layer and a residual connection layer. The input feature map is first standardized by a LayerNorm layer, and then divided into two paths, which are sent to the GLEB layer and the LFEB layer respectively to enhance the global features and local features respectively. After the two parts of the features are enhanced, they are fused by the addition operation, and then passed through a Dropout layer to reduce the risk of overfitting. Finally, the residual connection is used to generate the final output features.
[0075] Among them, GFEB modules such as Figure 5 As shown in the figure, it contains a 1×1 convolution layer, two Max Pooling layers, and two Mat Mul operations. Specifically, the input features first pass through a 1×1 convolution layer to extract specific channel features. Subsequently, the convolution output is divided into three paths. The first path directly extracts global features through Max Pooling; the second path also passes through the Max Pooling operation, and then directly performs matrix multiplication with the convolution output of the third path; the third path directly performs matrix multiplication again with the matrix multiplication result of the second path to obtain the final output. The detailed operations are as follows:
[0076] F g =(Max pooling(Conv 1×1 (F c))*Conv 1×1 (F c ))*Max pooling(Conv 1×1 (F c ))
[0077] Among them, * represents Mat Mul operation.
[0078] LFEB module such as Figure 6 As shown in the figure, it contains a 1×1 convolution layer, three Depthwise Conv, two PointwiseConv, two Mat Mul operations and a GELU activation function. Specifically, the input features first pass through a 1×1 convolution layer to extract specific channel features. Then it is divided into three paths, each path performs a Depthwise Conv operation, and then the features obtained by the first and second paths are multiplied, and then Pointwise Conv, GELU, and Pointwise Conv operations are performed in sequence, and finally multiplied with the features of the third path to obtain the final output. The detailed operations are as follows:
[0079] F l =PWConv(GELU(PWConv(DWConv(Conv 1×1 (F c ))*DWConv(Conv 1×1 (F c )))))
[0080] *DWConv(Conv 1×1 (F c ))
[0081] Among them, DWConv represents the Depthwise Conv operation, PWConv represents the Pointwise Conv, and * represents the MatMul operation.
[0082] The operation process and calculation formula of the entire encoder are as follows:
[0083] First, the image F is input into the Conv stem block to get the output F c :
[0084] F c =GELU(BN(Conv 3×3 (F))),
[0085] Then, F cInput to the first global-local feature extraction block to obtain feature F1, followed by the first downsampling to obtain output D1:
[0086] F1=F c +Dropout(GLEB(LN(F c ))+LFEB(LN(F c ))),
[0087] D1=Downsampling(F c ),
[0088] After that, D1 is input into the second global-local feature extraction block to obtain feature F2, followed by a second downsampling to obtain output D2:
[0089] F2=D1+Dropout(GLEB(LN(D1))+LFEB(LN(D1))),
[0090] D2=Downsampling(F2),
[0091] Then, D2 is input into the third global-local feature extraction block to obtain feature F3, followed by a third downsampling to obtain output D3:
[0092] F3=D2+Dropout(GLEB(LN(D2))+LFEB(LN(D2))),
[0093] D3=Downsampling(F3),
[0094] Finally, D3 is input into the fourth global-local feature extraction block to obtain the final output feature F4 of the decoder:
[0095] F4=D3+Dropout(GLEB(LN(D3))+LFEB(LN(D3))),
[0096] Among them, BN represents the BatchNorm layer.
[0097] The structure of the 230 decoder includes four Conv block modules and three upsampling modules. The Conv Block structure is as follows Figure 7 As shown in the figure, each Conv Block consists of a Depthwise Conv convolution layer, two Pointwise Conv layers and a GELU activation function layer. Specifically, the input features are sequentially passed through DepthwiseConv, Pointwise Conv and GELU, and then a residual connection is performed, and finally a Pointwise Conv is used to integrate the channel information to obtain the final output feature map.
[0098] The operation flow and detailed calculation process of the decoder include:
[0099] First, the final output F4 of the decoder is input into the first Conv Block to obtain feature E1, followed by the first upsampling (Upsampling) until the output feature U1 is obtained:
[0100] E1=PWConv(GELU(PWConv(DWConv(F4)))),
[0101] U1=UPsampling(E1),
[0102] Then, the feature F3 obtained by the third global-local feature extraction block is concatenated with the feature map U1 obtained by the first upsampling and input into the second Conv Block to obtain the feature E2, followed by a second upsampling to obtain the output feature U2:
[0103]
[0104] U2=UPsampling(E2),
[0105] Then, the feature F2 obtained by the second global-local feature extraction block is concatenated with the feature map U2 obtained by the second upsampling, and then input into the third Conv Block to obtain the feature E3, followed by the third upsampling to obtain the output feature U3:
[0106]
[0107] U3=UPsampling(E3),
[0108] Finally, the feature F1 obtained by the first global-local feature extraction block is concatenated with the feature map U3 obtained by the third upsampling and input into the fourth Conv Block to obtain the final output E4 of the decoder:
[0109]
[0110] Among them, DWConv represents the Depthwise Conv operation, PWConv represents the Pointwise Conv, and + represents the Add operation. Represents a Concat operation.
[0111] 240 Segmentation head network is mainly composed of Seg Head. Seg Head block structure is as follows Figure 8 As shown in the figure, the Seg Head block consists of a 1×1 Conv layer, a BatchNorm layer, and a GELU activation function layer. The specific calculation process includes: first, concatenating the four outputs obtained by the decoder Conv Block, and then performing the Seg Head operation.
[0112]
[0113] in, represents Concat, and L represents the output segmentation result.
[0114] In step S140, the original image training data set I in step S120 is used train And the manually labeled result dataset L train The specific process of training the model is as follows: First, I train The input data is passed to the network for forward propagation to calculate the prediction result of the current iteration. Then, the prediction result is compared with the corresponding manual annotation result L train The prediction error is calculated using the loss function. Then, the gradient of the loss function relative to the network parameters is calculated by the stochastic gradient descent optimizer, and the weight parameters of the network are updated by the back propagation algorithm. This process is repeated in multiple rounds until the preset error requirements are met, and a trained network model is finally obtained. Finally, the test dataset I of the original image is used. test And the test dataset L with manual annotation results test Verify the trained model and evaluate its performance on unknown data. The loss function in the above steps uses the DiceLoss loss function, which is calculated as follows:
[0115]
[0116] Among them, P represents the predicted image, G represents the real label image, |P∩G| represents the number of pixels in the overlapping area of the predicted image and the label image, |P| represents the number of pixels in the predicted image (the number of pixels predicted to be positive), and |G| represents the number of pixels in the label image (the number of pixels actually in the positive class).
[0117] Example 1: BUSI (Breast Ultrasound Images) Dataset
[0118] The specific steps are as follows:
[0119] The training dataset I is constructed with the preprocessed data and the corresponding target manual annotation result data in the proportion of 70%, 10% and 20% respectively. train , validation dataset I val And test dataset I test All image data is scaled using the resize() function in the PIL package, and the image size is scaled to 256×256.
[0120] Taking a breast cancer ultrasound image as an example, we construct and train the improved UNet breast cancer ultrasound image segmentation model (GLF-UNet). The specific steps are as follows:
[0121] First, build an encoder network. In the encoder, global information and boundary information can be extracted separately to obtain better global information and boundary information. The encoder includes a Conv stem block, four global-local feature extraction modules and three downsampling modules. The Conv stem block structure is as follows: Figure 3 As shown in Figure 2, each Conv stem block consists of a 3×3 convolutional layer, a BatchNorm layer, and a GELU activation function layer. The global-local feature extraction module is shown in Figure 2. Figure 4 As shown in the figure, each global-local feature extraction module consists of a LayerNorm layer, a GLEB layer, a LFEB layer, a Dropout layer and a residual connection layer. The specific calculation process includes: the input image passes through the Convstem block, the first global-local feature extraction module, the first Downsampling module, the second global-local feature extraction module, the second Downsampling module, the third global-local feature extraction module, the third Downsampling module, the fourth global-local feature extraction module, and finally obtains the feature map extracted by the encoder network.
[0122] Secondly, the decoder network is constructed. The image features extracted from the encoder network are fused and decoded to enhance the feature expression capability. The structure of the encoder network includes four Conv block modules and three Upsampling modules. The Conv Block structure is as follows: Figure 7 As shown in the figure, each Conv Block consists of a Depthwise Conv convolution layer, two Pointwise Conv layers and a GELU activation function layer. The specific calculation process includes: the input image passes through the first Conv Block, the first Upsampling module, the first channel splicing (Concat) module, the second Conv Block, the second Upsampling module, the second channel splicing (Concat) module, the third Conv Block, the third Upsampling module, the third channel splicing (Concat) module, and the fourth Conv Block.
[0123] Among them, the output of the first Unsampling module and the output of the third Global-local feature extractionBlock module are input to the first Concat module for channel splicing; the output of the second Unsampaling module and the output of the second Global-local feature extraction Block module are input to the second Concat module for channel splicing; the output of the third Unsampling module and the output of the first Global-local feature extraction Block module are input to the first Concat module for channel splicing. The output of the first Conv Block module is used as the first output result; the output of the second Conv Block module is used as the second output result; the output of the third Conv Block module is used as the third output result; the output of the fourth Conv Block module is used as the fourth output result.
[0124] Again, the segmentation network is mainly composed of Seg Head. The Seg Head block structure is as follows Figure 8 As shown in the figure, the Seg Head block consists of a 1×1 convolution layer, a BatchNorm layer, and a GELU activation function layer. The specific calculation process includes: concatenating the first, second, third, and fourth outputs of the decoder network as the input of the Seg Head, and finally the Seg Head outputs the segmentation result.
[0125] Finally, using the training dataset I train And manually annotated result dataset Ival The process of training the model is as follows: First, the training data I train Input into the network for calculation to obtain the prediction result of the current iteration. Then, compare the prediction result with the corresponding manual annotation result I train For comparison, the prediction error is calculated using the loss function DiceLoss. At the same time, the validation dataset I val The performance of the model is evaluated and the parameters of the model are adjusted based on the evaluation results. Next, the gradient is calculated using the stochastic gradient descent optimizer, and the weight parameters in the network are updated through the back propagation algorithm. This process will continue to iterate until the predetermined error requirement is met, and finally the trained network model is obtained. After the model training is completed, the test data set I test Input into the trained model to obtain the final detection result, and compare it with the manual annotation result I test The experimental results of the GLF-UNet algorithm in this embodiment are shown in Table 1.
[0126] Table 1 Experimental results of GLF-UNet on BUSI dataset
[0127]
[0128] From Table 1, we can see that the number of parameters of GLF-UNet is 13th of UNet and 1 / 10th of Unet++, which improves the computational efficiency. GLF-UNet's IoU on the BUSI dataset is 3.58% higher than UNet and 3.12% higher than Unet++. For Dice, it is 3.39% higher than UNet and 3.13% higher than Unet++. GLF-UNet is not only efficient, but also can significantly improve segmentation accuracy.
[0129] Example 2: BUS Dataset
[0130] The specific steps are as follows:
[0131] The training dataset I is constructed with the preprocessed data and the corresponding target manual annotation result data in the proportion of 70%, 10% and 20% respectively. train , validation dataset I val And test dataset I test All image data is scaled using the resize() function in the PIL package, and the image size is scaled to 256×256.
[0132] In this embodiment, the specific steps of constructing and training the improved UNet breast cancer ultrasound image segmentation model (GLE-UNet) are the same as the model training steps in Example 1. The training process is iterated multiple times until the model error reaches the predetermined requirement, and finally a trained network model is obtained. After the training is completed, the test data set I test Input into the model, obtain the final prediction result, and compare it with the test data set I of the manual annotation result test The comparison is performed to verify the accuracy and performance of the model. The experimental results of the GLF-UNet algorithm in this embodiment are shown in Table 2.
[0133] Table 2 Experimental results of GLF-UNet on the BUS dataset
[0134]
[0135] From Table 2, we can see that the number of parameters of GLF-UNet is 13th of UNet and 1 / 10th of Unet++, which improves the computational efficiency. The IoU of GLF-UNet on the BUS dataset is 1.08% higher than that of UNet and 0.43% higher than that of Unet++. For Dice, it is 0.77% higher than that of UNet and 0.53% higher than that of Unet++.
[0136] 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 breast cancer medical ultrasound images with global and local feature enhancement, characterized in that: The process includes steps S110-S140, which are specifically as follows: S110: Collect breast cancer ultrasound images and corresponding annotation data, and form an original image dataset I and a label dataset L with the breast cancer ultrasound image data and the annotation data respectively; S120: Construct an improved U-Net model for breast cancer medical ultrasound image segmentation, denoted as GLF-UNet; U-Net is used as the backbone network, including the input end, encoder, decoder and segmentation head; in the encoder part, it contains a Conv stem block, four global-local feature extraction modules and three downsampling modules; each Conv stem block consists of a 3×3 convolution layer, a BatchNorm layer and a GELU activation function layer; the global-local feature extraction module consists of a LayerNorm layer, a GLEB layer, a LFEB layer, a Dropout layer and a residual connection layer. The input feature map is first normalized by a LayerNorm layer, and then divided into two paths, which are sent to the GLEB layer and the LFEB layer respectively, which are used to strengthen the global features and local features respectively. After the two parts of the features are enhanced, they are fused by addition operation, and then pass through a Dropout layer to reduce the risk of overfitting. Finally, the final output features are generated through residual connection; S130: training the constructed GLF-UNet; S140: According to the breast cancer medical ultrasound image segmentation method, a target segmentation result is provided.
2. The method for breast cancer medical ultrasound image segmentation with global and local feature enhancement according to claim 1, characterized in that: The GFEB module contains a 1×1 convolution layer, two Max Pooling layers, and two Mat Mul operations. Specifically, the input features first pass through a 1×1 convolution layer to extract specific channel features. Subsequently, the convolution output is divided into three paths. The first path directly extracts global features through Max Pooling. The second path also passes through the Max Pooling operation and then directly performs matrix multiplication with the convolution output of the third path. The third path directly performs matrix multiplication again with the matrix multiplication result of the second path to obtain the final output.
3. The method for breast cancer medical ultrasound image segmentation with global and local feature enhancement according to claim 1, characterized in that: The LFEB module contains a 1×1 convolution layer, three Depthwise Conv, two Pointwise Conv, two MatMul operations, and a GELU activation function; specifically, the input features first pass through a 1×1 convolution layer to extract specific channel features; It is then divided into three paths, each path performs a Depthwise Conv operation, then the features obtained by the first and second paths are multiplied, and then Pointwise Conv, GELU, and Pointwise Conv operations are performed in sequence, and finally multiplied with the features of the third path to obtain the final output.
4. The method for breast cancer medical ultrasound image segmentation with global and local feature enhancement according to claim 1, characterized in that: The specific steps of the LFEB module are as follows: F l =PWConv(GELU(PWConv(DWConv(Conv 1×1 (F c ))*DWConv(Conv 1×1 (F c ))))) *DWConv(Conv 1×1 (F c )) Among them, DWConv represents Depthwise Conv operation, PWConv represents Pointwise Conv, and * represents Mat Mul operation.
5. The method for breast cancer medical ultrasound image segmentation with global and local feature enhancement according to claim 1, characterized in that: The specific method of the encoder is: First, the image F is input into the Conv stem block to get the output F c : F c =GELU(BN(Conv 3×3 (F))), Then, F c Input to the first global-local feature extraction module to obtain feature F1, followed by the first downsampling to obtain output D1: F1=F c +Dropout(GLEB(LN(F c ))+LFEB(LN(F c ))), D1=Downsampling(F c ), After that, D1 is input into the second global-local feature extraction module to obtain feature F2, followed by a second downsampling to obtain output D2: F2=D1+Dropout(GLEB(LN(D1))+LFEB(LN(D1))), D2=Downsampling(F2), Then, D2 is input into the third global-local feature extraction module to obtain feature F3, followed by a third downsampling to obtain output D3: F3=D2+Dropout(GLEB(LN(D2))+LFEB(LN(D2))), D3=Downsampling(F3), Finally, D3 is input into the fourth global-local feature extraction module to obtain the final output feature F4 of the decoder: F4=D3+Dropout(GLEB(LN(D3))+LFEB(LN(D3))), Among them, BN represents the BatchNorm layer.
6. The method for breast cancer medical ultrasound image segmentation with global and local feature enhancement according to claim 1, characterized in that: The decoder consists of four Conv block modules and three upsampling modules; each Conv Block consists of a Depthwise Conv convolution layer, two Pointwise Conv layers and a GELU activation function layer; the input features pass through Depthwise Conv, Pointwise Conv and GELU in sequence, then perform a residual connection, and finally integrate the channel information through a Pointwise Conv to obtain the final output feature map.
7. The method for breast cancer medical ultrasound image segmentation with global and local feature enhancement according to claim 1, characterized in that: The specific method of the decoder is: First, the final output F4 of the decoder is input into the first Conv Block to obtain feature E1, followed by the first upsampling (Upsampling) until the output feature U1 is obtained: E1=PWConv(GELU(PWConv(DWConv(F4)))), U1=UPsampling(E1), Then, the feature F3 obtained by the third global-local feature extraction block is concatenated with the feature map U1 obtained by the first upsampling, and then input into the second Conv Block to obtain the feature E2, followed by a second upsampling to obtain the output feature U2: U2=UPsampling(E2), Then, the feature F2 obtained by the second global-local feature extraction module is concatenated with the feature map U2 obtained by the second upsampling and input into the third Conv Block until the feature E3 is obtained, and then the third upsampling is performed to obtain the output feature U3: U3=UPsampling(E3), Finally, the feature F1 obtained by the first global-local feature extraction module and the feature map U3 obtained by the third upsampling are concatenated and input into the fourth Conv Block to obtain the final output E4 of the decoder: Among them, DWConv represents the Depthwise Conv operation, PWConv represents the Pointwise Conv, and + represents the Add operation. Represents a Concat operation.
8. The method for breast cancer medical ultrasound image segmentation with global and local feature enhancement according to claim 1, characterized in that: The segmentation head consists of a Seg Head block, which consists of a 1×1 Conv layer, a BatchNorm layer, and a GELU activation function layer. The specific process includes: first, concatenating the four outputs of the decoder Conv Block, and then performing the Seg Head operation. in, represents Concat, and L represents the output segmentation result.
9. A breast cancer medical ultrasound image segmentation system with global and local feature enhancement, characterized in that: The system executes the method according to any one of claims 1 to 8.