A breast ultrasound image segmentation method and device
By constructing a comprehensive network and combining it with a joint loss function, the problem of intra-class and inter-class ambiguity in breast ultrasound image segmentation is solved, achieving higher segmentation accuracy and boundary clarity, which is suitable for accurate localization and diagnosis of breast ultrasound images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YUNNAN UNIV
- Filing Date
- 2026-05-15
- Publication Date
- 2026-07-31
AI Technical Summary
Segmentation methods for breast ultrasound images have low accuracy when dealing with complex shapes, size differences, low contrast, blurred boundaries, and noise interference. Existing methods have failed to effectively address the uncertainties caused by intra- and inter-class blurring.
A comprehensive network based on a scale aggregation module, a channel dynamic mixing module, and a frequency refinement module is constructed and trained using a joint loss function to improve image segmentation accuracy.
By generating binary segmentation masks through pixel-level probabilistic prediction, the segmentation accuracy and boundary clarity of breast ultrasound images are significantly improved, enhancing adaptability to tumor regions of different sizes and highlighting tumor-related features, while reducing misclassification.
Smart Images

Figure CN122493050A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image processing technology, and in particular to a method and apparatus for segmenting breast ultrasound images. Background Technology
[0002] Breast cancer is a major component of cancer incidence among women worldwide, and its incidence continues to rise. Studies have shown that early detection and timely intervention can effectively reduce mortality and significantly improve patient prognosis. Ultrasound imaging, due to its radiation-free, non-invasive, and low-cost characteristics, has become a commonly used technique for detecting breast lesions. However, traditional manual annotation is not only resource-intensive but also susceptible to subjective factors such as the lack of clinical expertise. Therefore, computer-aided diagnostic systems are gradually becoming a powerful tool to assist radiologists in diagnosis. Ultrasound image segmentation, as an important component of computer-aided diagnostic systems, can accurately locate lesion areas and assist doctors in making diagnoses.
[0003] However, breast ultrasound image segmentation still faces many challenges, including intra-class uncertainty (caused by complex shapes, size differences, scattered distribution and non-uniform echoes) and inter-class blur (caused by low contrast, blurred boundaries, speckle noise, shadow artifacts and interference), which make accurate segmentation a very challenging task.
[0004] Early traditional segmentation methods were weakly resistant to noise, exhibiting significant limitations when processing complex breast ultrasound images. In recent years, although convolutional neural network (CNN)-based methods have made significant progress in breast ultrasound image segmentation, the convolutional operation primarily focuses on local features, and its inherent local receptive field limits the global modeling and long-range dependency modeling capabilities of CNN-based networks. Furthermore, these methods are computationally complex and tend to neglect local features. Mamba, with its linear complexity and powerful long-sequence modeling capabilities, offers new possibilities for overcoming these bottlenecks. However, due to the inherent challenges of breast ultrasound images, these methods have not yet been specifically optimized for the core challenge of uncertainty caused by intra- and inter-class ambiguity in breast ultrasound images. Notably, enhancing the model's resistance to noise by combining complementary information from the frequency and spatial domains has proven uniquely valuable in medical image segmentation. However, these methods still fall short in modeling the uncertainty caused by intra- and inter-class ambiguity.
[0005] In summary, due to the inherent intra-class uncertainty and inter-class ambiguity in breast ultrasound images, traditional methods still suffer from low segmentation accuracy when dealing with complex shapes, size differences, low contrast, blurred boundaries, and noise interference. Summary of the Invention
[0006] The purpose of this application is to provide a method and apparatus for segmenting breast ultrasound images to solve the problem of low segmentation accuracy of breast ultrasound images.
[0007] To achieve the above objectives, this application provides the following solution.
[0008] In a first aspect, this application provides a method for segmenting breast ultrasound images, characterized in that the method includes: Acquire a breast ultrasound image to be segmented; the breast ultrasound image to be segmented is a breast ultrasound image of the target patient. The pixel values of the breast ultrasound image to be segmented are normalized to obtain the normalized breast ultrasound image to be segmented. The normalized breast ultrasound image to be segmented is input into a breast tumor recognition model to obtain the segmentation and recognition results for the target patient. The breast tumor recognition model is determined based on a pre-trained integrated network, which is trained using a joint loss function. The integrated network is constructed based on a scale aggregation module, a channel dynamic mixing module, and a frequency refinement module. The joint loss function includes segmentation loss and evidence loss. The segmentation and recognition results are the segmentation prediction probabilities of each pixel in the breast ultrasound image to be segmented belonging to the tumor region. Based on the segmentation and recognition results, a binary segmentation mask for the breast ultrasound image to be segmented is determined, thereby completing the segmentation of the breast ultrasound image.
[0009] Secondly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the breast ultrasound image segmentation method described above.
[0010] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application discloses a method and apparatus for breast ultrasound image segmentation. By constructing a comprehensive network based on a scale aggregation module, a channel dynamic mixing module, and a frequency refinement module, and training it with a joint loss function (including segmentation loss and evidence loss), the segmentation accuracy of breast ultrasound images is effectively improved. Specifically, the scale aggregation module can fuse multi-scale features, enhancing adaptability to tumor regions of different sizes; the channel dynamic mixing module can adaptively adjust the information interaction between channels, highlighting tumor-related features; and the frequency refinement module helps preserve high-frequency details of the image and avoid edge blurring. Simultaneously, the segmentation loss in the joint loss function drives the network to accurately distinguish between tumors and background, while the evidence loss utilizes uncertainty modeling to reduce misclassification. Finally, by performing pixel-level probability prediction on the normalized image to be segmented and generating a binary segmentation mask, the segmentation prediction results for the tumor region are more accurate. Compared with existing methods, this significantly improves the completeness and boundary clarity of the segmentation, thus improving the segmentation accuracy of breast ultrasound images. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic flowchart of a breast ultrasound image segmentation method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the integrated network structure; Figure 3 This is a schematic diagram of the scale aggregation module structure; Figure 4 This is a schematic diagram of the channel dynamic mixing module structure; Figure 5 This is a schematic diagram of the channel-space attention module structure; Figure 6 This is a schematic diagram of the frequency refinement module structure; Figure 7 This is a schematic diagram of the FMamba block structure; Figure 8 This is a schematic diagram of the spatial discrete wavelet transform module structure; Figure 9 This is the first breast ultrasound image; Figure 10 This is the ground truth map corresponding to the first breast ultrasound image; Figure 11 The binary segmentation mask corresponding to the first breast ultrasound image; Figure 12 This is a schematic diagram of the second breast ultrasound image; Figure 13 This is the ground truth map corresponding to the second breast ultrasound image; Figure 14 This is the binary segmentation mask corresponding to the second breast ultrasound image; Figure 15 This is the third breast ultrasound image; Figure 16 This is the ground truth map corresponding to the third breast ultrasound image; Figure 17 This is the binary segmentation mask corresponding to the third breast ultrasound image; Figure 18 This is the fourth breast ultrasound image; Figure 19 This is the ground truth map corresponding to the fourth breast ultrasound image; Figure 20 The binary segmentation mask corresponding to the fourth breast ultrasound image; Figure 21 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0014] The purpose of this application is to provide a method and apparatus for segmenting breast ultrasound images, aiming to improve the accuracy of breast ultrasound image segmentation.
[0015] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0016] In one exemplary embodiment, such as Figure 1 As shown, a method for segmenting breast ultrasound images is provided, including the following steps.
[0017] Step 1: Obtain the breast ultrasound image to be segmented; the breast ultrasound image to be segmented is the breast ultrasound image of the target patient.
[0018] Step 2: Normalize the pixel values of the breast ultrasound image to be segmented to obtain the normalized breast ultrasound image to be segmented.
[0019] Step 3: Input the normalized breast ultrasound image to be segmented into the breast tumor recognition model to obtain the segmentation and recognition results of the target patient.
[0020] The breast tumor identification model is based on a pre-trained integrated network, which is trained using a joint loss function. The integrated network is constructed using a ScaleAggregation Module (SAM), a Channel Dynamic Mixed Module (CDMM), and a Frequency Refinement Module (FRM). The joint loss function includes segmentation loss and evidence loss. The segmentation identification result is the segmentation prediction probability of each pixel in the breast ultrasound image to be segmented belonging to the tumor region.
[0021] As an optional implementation, step 3, the process of determining the trained integrated network, includes: Step 31: Obtain the training set; the training set includes multiple sample breast ultrasound images and corresponding ground truth maps; the sample breast ultrasound images are breast ultrasound images of sample patients containing tumors, and the ground truth map is a binary segmentation mask corresponding to the sample breast ultrasound images.
[0022] Step 32: Initialize the synthesis network.
[0023] Step 33: Using the joint loss function, train the integrated network based on the training set to obtain the trained integrated network.
[0024] Specifically, step 31 includes: obtaining a breast tumor segmentation dataset from a breast ultrasound image database and dividing it into a training set, a validation set, and a test set in a ratio of 7:1:2; the breast ultrasound images in the breast tumor segmentation dataset meet the following conditions: they do not include normal tissue, only benign and malignant breast tumors; they are two-dimensional planar imaging data, not three-dimensional ultrasound images; and the image resolution is maintained within 100 to 1000.
[0025] During the training phase, experiments were conducted on an NVIDIA GeForce RTX 3080 Ti graphics processor using PyTorch 2.1.0, CUDA 12.1, and Python 3.10.18, with Linux as the operating system. First, all sample breast ultrasound images were resized to 224×224. Then, the Adam optimizer was used to optimize the network parameters of the synthesis network, with an initial learning rate of 1e-4 and a weight decay rate of 5e-4. The synthesis network was trained for 100 epochs with a batch size of 8. Furthermore, online data augmentation strategies, such as random horizontal flipping, random vertical flipping, and random rotation, were employed.
[0026] As an optional implementation method, such as Figure 2 As shown, the integrated network includes an initial feature extraction module, an encoder, a channel dynamic mixing module, a decoder, a recognition module, and a Softplus activation function; The encoder consists of a ResNet34 network and five scale aggregation modules. The output of the initial feature extraction module is connected to the input of the ResNet34 network; the input of the first scale aggregation module is connected to the output of the initial feature extraction module; and the input of the i-th scale aggregation module is connected to the (i-1)-th output of the ResNet34 network; i = 2, 3, 4, 5. The input of the channel dynamic mixing module is connected to the output of the fifth scale aggregation module; The decoder includes four frequency refinement modules; The input of the first frequency refinement module is connected to the output of the channel dynamic mixing module and the output of the fourth scale aggregation module, respectively. The input of the j-th frequency refinement module is connected to the output of the (j-1)-th frequency refinement module and the output of the (5-j)-th scale aggregation module, respectively; j=2,3,4. The recognition module includes a detection head and a Sigmoid activation function; the output of the fourth frequency refinement module is connected to the input of the detection head; the output of the detection head is connected to the input of the Sigmoid activation function and the input of the Softplus activation function, respectively.
[0027] As an alternative implementation, the breast tumor recognition model includes an initial feature extraction module, an encoder, a channel dynamic mixing module, a decoder, and a recognition module in a trained integrated network.
[0028] Step 3 includes: The normalized breast ultrasound image to be segmented is input into the initial feature extraction module of the breast tumor recognition model to obtain the initial feature map of the target patient; The initial feature map is input into the ResNet34 network in the breast tumor recognition model to obtain four encoded feature maps of the target patient; The initial feature map and four coded feature maps of the target patient are input into the scale aggregation module of the corresponding breast tumor recognition model to obtain five multi-scale aggregated feature maps of the target patient. The fifth multi-scale aggregated feature map of the target patient is input into the channel dynamic mixing module in the breast tumor recognition model to obtain the weighted deep feature map of the target patient. The fourth multi-scale aggregated feature map and the weighted deep feature map of the target patient are input into the first frequency refinement module in the breast tumor recognition model to obtain the first refined feature map of the target patient. The third multi-scale aggregated feature map and the first refined feature map of the target patient are input into the second frequency refinement module in the breast tumor recognition model to obtain the second refined feature map of the target patient. The second multi-scale aggregated feature map and the second refined feature map of the target patient are input into the third frequency refinement module in the breast tumor recognition model to obtain the third refined feature map of the target patient. The first multi-scale aggregated feature map and the third refined feature map of the target patient are input into the fourth frequency refinement module in the breast tumor recognition model to obtain the fourth refined feature map of the target patient. The fourth refined feature map of the target patient is input into the detection head of the breast tumor recognition model to obtain the target feature map of the target patient. The target feature map of the target patient is input into the Sigmoid activation function in the breast tumor recognition model to obtain the segmentation and recognition results of the target patient.
[0029] As an optional implementation, step 33 includes: The pixel values of each sample breast ultrasound image were normalized to obtain the corresponding normalized sample breast ultrasound image. Using a joint loss function, the integrated network is iteratively trained based on the normalized sample breast ultrasound images and their corresponding ground truth maps to obtain a trained integrated network. The training process at any given iteration number includes: Obtain the synthesized network at the current iteration number; if the current iteration number is the initial iteration number, the synthesized network at the current iteration number is the initialized synthesized network; Select any normalized sample breast ultrasound image as the current image; The current image is input into the initial feature extraction module at the current iteration number to obtain the initial feature map of the current image at the current iteration number; The initial feature map corresponding to the current image at the current iteration number is input into the ResNet34 network at the current iteration number to obtain the four encoded feature maps corresponding to the current image at the current iteration number; The initial feature map and four encoded feature maps corresponding to the current image at the current iteration number are respectively input into the corresponding scale aggregation modules at the current iteration number to obtain five multi-scale aggregated feature maps corresponding to the current image at the current iteration number. The fifth multi-scale aggregated feature map of the current image at the current iteration number is input into the channel dynamic mixing module at the current iteration number to obtain the weighted deep feature map of the current image at the current iteration number. The fourth multi-scale aggregated feature map and the weighted deep feature map of the current image at the current iteration number are input into the first frequency thinning module at the current iteration number to obtain the first thinned feature map of the current image at the current iteration number. The third multi-scale aggregated feature map and the first thinning feature map of the current image at the current iteration number are input into the second frequency thinning module at the current iteration number to obtain the second thinning feature map of the current image at the current iteration number. The second multi-scale aggregated feature map and the second thinning feature map corresponding to the current image at the current iteration number are input into the third frequency thinning module at the current iteration number to obtain the third thinning feature map corresponding to the current image at the current iteration number. The first multi-scale aggregated feature map and the third thinning feature map of the current image at the current iteration number are input into the fourth frequency thinning module at the current iteration number to obtain the fourth thinning feature map of the current image at the current iteration number. The fourth refined feature map of the current image at the current iteration number is input into the detection head at the current iteration number to obtain the target feature map of the current image at the current iteration number; The target feature map corresponding to the current image at the current iteration number is input into the Sigmoid activation function at the current iteration number to obtain the segmentation and recognition result of the current image at the current iteration number; The target feature map corresponding to the current image is input into the Softplus activation function at the current iteration number to obtain the evidence recognition result of the current image at the current iteration number; the evidence recognition result of the current image includes the evidence prediction probability that each pixel in the current image belongs to the tumor region; Using the joint loss function, the joint loss at the current iteration number is calculated based on the segmentation and recognition results and the evidence recognition results of the current image at the current iteration number. Determine if the stopping condition is met; the stopping condition is that the preset number of iterations has been reached or the joint loss at the current number of iterations meets the preset threshold. If so, the integrated network at the current iteration number will be used as the trained integrated network; If not, update the network parameters in the integrated network at the current iteration number to obtain the integrated network at the next iteration number, and perform training for the next iteration number until the stopping condition is met, and obtain the trained integrated network.
[0030] As an optional implementation, the joint loss function includes: ; ; ; ; in, For joint losses; Loss of evidence; For segmentation loss; The total number of pixels contained in all sample breast ultrasound images in the training set; The subjective confidence level that the nth pixel belongs to the tumor region; The value of the binary segmentation mask for the nth pixel in the corresponding ground truth map; Predict the segmentation probability that the nth pixel belongs to the tumor region; The probability of evidence that the nth pixel belongs to the tumor region is predicted.
[0031] As an optional implementation method, such as Figure 3 As shown, any scale aggregation module is represented as: ; ; ; ; ; in, This is the output feature map after a 3×3 dilated convolution operation with a dilation rate of 1. For a 3×3 dilated convolution operation with a dilation rate of 3 (Con_d1); The feature map is input from the scale aggregation module; This is the output feature map after a 3×3 dilated convolution operation with a dilation rate of 3. For a 3×3 dilated convolution operation with a dilation rate of 3 (Con_d3); This is the output feature map after a 3×3 dilated convolution operation with a dilation rate of 5. For a 3×3 dilated convolution operation with a dilation rate of 5 (Con_d5); This refers to the fused feature map in the scale aggregation module; For connection operation; This is the multi-scale aggregated feature map output by the scale aggregation module; This is a 1×1 convolution operation.
[0032] Specifically, a scale aggregation module is set at the skip connections (i.e., the four outputs) of the ResNet34 network to perform hierarchical multi-scale fusion. The scale aggregation module adaptively reweights the features of each channel, selectively enhancing important channels while suppressing redundant channels, thereby effectively reducing interference from noise and shadow artifacts common in breast ultrasound images. The scale aggregation module is used to capture hierarchical multi-scale contextual information, aiming to improve the accuracy of breast tumor segmentation by capturing features at different scales in breast ultrasound images. Figure 3 As shown, the scale aggregation module includes three parallel branches, which use 3×3 dilated convolutions with dilation rates of 1, 3 and 5 to extract features at different scales, then perform channel splicing, and finally output refined features (i.e., multi-scale aggregated feature maps) through 3×3 convolution.
[0033] As an optional implementation method, such as Figures 4-5 As shown, the channel dynamic mixing module is represented as follows: ; ; ; ; ; ; ; in, The feature map output by the channel attention module; This is the multi-scale aggregated feature map output by the 5th scale aggregation module; This is a dot product operation; For channel attention modules; The feature map output by the spatial attention module; For spatial attention modules; The feature map output by the channel cyclic translation module; This is a channel cyclic translation module; The feature map output by the first linear processing module; This is the first linear processing module; The learnable parameter matrix; The feature map output by the first linear processing module; This is the first linear processing module; The weighted deep feature map output by the channel dynamic mixing module; This is a regularization operation.
[0034] Specifically, the channel dynamic mixing module receives the multi-scale aggregated feature map output by the fifth scale aggregation module. First, it passes through the Channel-Spatial Attention Module (CSAM) for feature weighting, and then through the Channel Cyclic Translation Module (Q-Shift block) to achieve cyclic translation of the channel dimensions, realizing the initial interaction of spatial information. Subsequently, the channel dimensions are grouped, and local neighborhood information interaction is introduced on the channel dimensions to enhance the perception of spatial features. Then, channel interaction is performed in dual-path gating to achieve adaptive feature fusion. Finally, it is added to the feature residuals of the initial channel and spatial attention weighting to obtain the final output.
[0035] As an optional implementation method, such as Figures 6-8 As shown, any frequency refinement module is represented as follows: ; ; ; ; ; ; ; ; ; ; ; ; ; ; in, This is the feature map after the upsampling operation; This is an upsampling operation; The feature map for the input frequency refinement module; The feature map of the input FMamba block; This is the multi-scale aggregated feature map output by the scale aggregation module; The feature map is normalized for the instance; For instance normalization (IN); The feature map output by the first state space module; For processing operations of the state-space model; For the SLiU function; This is a 3×3 convolution operation; Linear layer; This is the second state space module; This is a 5×5 convolution operation; Feature maps output by FMamba blocks; For layer normalization (LN); The feature map is obtained after spatial discrete wavelet transform; for Approximate part; These are wavelet basis functions for approximate subbands; The feature map for the input spatial discrete wavelet transform (SDWT) module; for The horizontal part; For wavelet basis functions of horizontal detail subbands; for The vertical portion; For wavelet basis functions of vertical detail subbands; for The diagonal portion; For the wavelet basis functions of the diagonal detail subbands; The feature map is the result of stitching together the sub-parts; For connection operation; This is a 1×1 convolution operation; This is the Sigmoid function.
[0036] Step 4: Based on the segmentation and recognition results, determine the binary segmentation mask for the breast ultrasound image to be segmented, and complete the segmentation of the breast ultrasound image.
[0037] Specifically, in the binary segmentation mask, white represents the tumor region and black represents the background region. When the segmentation prediction probability of a pixel belonging to the tumor region is greater than the preset probability, the corresponding pixel in the binary segmentation mask is white; otherwise, it is black.
[0038] Furthermore, comparative experiments were conducted using different models. The method described in this application achieved the best segmentation performance on the UDIAT breast tumor segmentation dataset. The results are shown in Table 1. For UDIAT, the method described in this application performed the best, with a Dice value of 0.8304, higher than the second-best method, VMUNet (0.7994), indicating that the method described in this application has an advantage in accurately segmenting ultrasound-guided breast tumors. Meanwhile, the accuracy value of the method described in this application was 0.9891, and the sensitivity value was 0.8560, indicating that the method has relatively high efficiency in identifying breast tumor regions. In addition, the method described in this application also had the highest intersection-over-union ratio. Overall, it is particularly suitable for segmenting breast tumors in breast ultrasound images.
[0039] Table 1 Performance metrics for different models
[0040] Qualitative visualization results such as Figures 9-20 As shown. The method in this application can effectively extract multi-scale context between and within layers, and exhibits good segmentation performance when handling complex shapes. From Figures 9-20 As can be seen, it demonstrates excellent handling capabilities against problems such as varying locations, sizes, complex shapes, artifact interference, and blurred boundaries. Furthermore, the method in this application performs well even under conditions of blurred boundaries and low contrast. It exhibits a good ability to handle various common uncertainties. In contrast, other methods have certain limitations. For example, some methods exhibit undersegmentation or oversegmentation in low-contrast regions, indicating their sensitivity to noise and complex backgrounds. They even fail to identify breast tumors. Conversely, the method in this application performs exceptionally well in visual comparisons, demonstrating its superior performance not only in accuracy but also in detail and structure extraction.
[0041] In one exemplary embodiment, a computer device is provided, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the computer program to implement a breast ultrasound image segmentation method.
[0042] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements a breast ultrasound image segmentation method.
[0043] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements a method for segmenting breast ultrasound images.
[0044] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 21 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a breast ultrasound image segmentation method.
[0045] Those skilled in the art will understand that Figure 21 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0046] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0047] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0048] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0049] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0050] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for segmenting breast ultrasound images, characterized in that, The breast ultrasound image segmentation method includes: Acquire a breast ultrasound image to be segmented; the breast ultrasound image to be segmented is a breast ultrasound image of the target patient. The pixel values of the breast ultrasound image to be segmented are normalized to obtain the normalized breast ultrasound image to be segmented. The normalized breast ultrasound image to be segmented is input into a breast tumor recognition model to obtain the segmentation and recognition results for the target patient. The breast tumor recognition model is determined based on a pre-trained integrated network, which is trained using a joint loss function. The integrated network is constructed based on a scale aggregation module, a channel dynamic mixing module, and a frequency refinement module. The joint loss function includes segmentation loss and evidence loss. The segmentation and recognition results are the segmentation prediction probabilities of each pixel in the breast ultrasound image to be segmented belonging to the tumor region. Based on the segmentation and recognition results, a binary segmentation mask for the breast ultrasound image to be segmented is determined, thereby completing the segmentation of the breast ultrasound image.
2. The breast ultrasound image segmentation method according to claim 1, characterized in that, The process of determining the trained integrated network includes: Obtain a training set; the training set includes multiple sample breast ultrasound images and corresponding ground truth maps; the sample breast ultrasound images are breast ultrasound images containing tumors from sample patients, and the ground truth maps are binary segmentation masks corresponding to the sample breast ultrasound images; Initialize the synthesis network; The integrated network is trained using the joint loss function based on the training set to obtain the trained integrated network.
3. The breast ultrasound image segmentation method according to claim 2, characterized in that, The integrated network includes an initial feature extraction module, an encoder, a channel dynamic mixing module, a decoder, a recognition module, and a Softplus activation function; The encoder includes a ResNet34 network and five scale aggregation modules. The output of the initial feature extraction module is connected to the input of the ResNet34 network; the input of the first scale aggregation module is connected to the output of the initial feature extraction module; and the input of the i-th scale aggregation module is connected to the (i-1)-th output of the ResNet34 network; i = 2, 3, 4, 5. The input of the channel dynamic mixing module is connected to the output of the fifth scale aggregation module; The decoder includes four frequency refinement modules; The input of the first frequency refinement module is connected to the output of the channel dynamic mixing module and the output of the fourth scale aggregation module, respectively. The input of the j-th frequency refinement module is connected to the output of the (j-1)-th frequency refinement module and the output of the (5-j)-th scale aggregation module, respectively; j=2,3,4. The recognition module includes a detection head and a Sigmoid activation function; the output of the fourth frequency refinement module is connected to the input of the detection head; the output of the detection head is connected to the input of the Sigmoid activation function and the input of the Softplus activation function, respectively.
4. The breast ultrasound image segmentation method according to claim 3, characterized in that, The breast tumor recognition model includes an initial feature extraction module, an encoder, a channel dynamic mixing module, a decoder, and a recognition module in a pre-trained integrated network. The normalized breast ultrasound image to be segmented is input into the breast tumor recognition model to obtain the segmentation and recognition results for the target patient, including: The normalized breast ultrasound image to be segmented is input into the initial feature extraction module of the breast tumor recognition model to obtain the initial feature map of the target patient; The initial feature map is input into the ResNet34 network in the breast tumor recognition model to obtain four encoded feature maps of the target patient; The initial feature map and four coded feature maps of the target patient are input into the scale aggregation module of the corresponding breast tumor recognition model to obtain five multi-scale aggregated feature maps of the target patient. The fifth multi-scale aggregated feature map of the target patient is input into the channel dynamic mixing module in the breast tumor recognition model to obtain the weighted deep feature map of the target patient. The fourth multi-scale aggregated feature map and the weighted deep feature map of the target patient are input into the first frequency refinement module in the breast tumor recognition model to obtain the first refined feature map of the target patient. The third multi-scale aggregated feature map and the first refined feature map of the target patient are input into the second frequency refinement module in the breast tumor recognition model to obtain the second refined feature map of the target patient. The second multi-scale aggregated feature map and the second refined feature map of the target patient are input into the third frequency refinement module in the breast tumor recognition model to obtain the third refined feature map of the target patient. The first multi-scale aggregated feature map and the third refined feature map of the target patient are input into the fourth frequency refinement module in the breast tumor recognition model to obtain the fourth refined feature map of the target patient. The fourth refined feature map of the target patient is input into the detection head of the breast tumor recognition model to obtain the target feature map of the target patient. The target feature map of the target patient is input into the Sigmoid activation function in the breast tumor recognition model to obtain the segmentation and recognition results of the target patient.
5. The breast ultrasound image segmentation method according to claim 4, characterized in that, Using the joint loss function, the integrated network is trained on the training set to obtain the trained integrated network, including: The pixel values of each sample breast ultrasound image were normalized to obtain the corresponding normalized sample breast ultrasound image. Using a joint loss function, the integrated network is iteratively trained based on the normalized sample breast ultrasound images and their corresponding ground truth maps to obtain a trained integrated network. The training process at any given iteration number includes: Obtain the synthesized network at the current iteration number; if the current iteration number is the initial iteration number, the synthesized network at the current iteration number is the initialized synthesized network; Select any normalized sample breast ultrasound image as the current image; The current image is input into the initial feature extraction module at the current iteration number to obtain the initial feature map of the current image at the current iteration number; The initial feature map corresponding to the current image at the current iteration number is input into the ResNet34 network at the current iteration number to obtain the four encoded feature maps corresponding to the current image at the current iteration number; The initial feature map and four encoded feature maps corresponding to the current image at the current iteration number are respectively input into the corresponding scale aggregation modules at the current iteration number to obtain five multi-scale aggregated feature maps corresponding to the current image at the current iteration number. The fifth multi-scale aggregated feature map of the current image at the current iteration number is input into the channel dynamic mixing module at the current iteration number to obtain the weighted deep feature map of the current image at the current iteration number. The fourth multi-scale aggregated feature map and the weighted deep feature map of the current image at the current iteration number are input into the first frequency thinning module at the current iteration number to obtain the first thinned feature map of the current image at the current iteration number. The third multi-scale aggregated feature map and the first thinning feature map of the current image at the current iteration number are input into the second frequency thinning module at the current iteration number to obtain the second thinning feature map of the current image at the current iteration number. The second multi-scale aggregated feature map and the second thinning feature map corresponding to the current image at the current iteration number are input into the third frequency thinning module at the current iteration number to obtain the third thinning feature map corresponding to the current image at the current iteration number. The first multi-scale aggregated feature map and the third thinning feature map of the current image at the current iteration number are input into the fourth frequency thinning module at the current iteration number to obtain the fourth thinning feature map of the current image at the current iteration number. Input the fourth refined feature map of the current image at the current iteration number into the detection head at the current iteration number to obtain the target feature map of the current image at the current iteration number; The target feature map corresponding to the current image at the current iteration number is input into the Sigmoid activation function at the current iteration number to obtain the segmentation and recognition result of the current image at the current iteration number; The target feature map corresponding to the current image is input into the Softplus activation function at the current iteration number to obtain the evidence recognition result of the current image at the current iteration number; the evidence recognition result of the current image includes the evidence prediction probability that each pixel in the current image belongs to the tumor region; Using the joint loss function, the joint loss at the current iteration number is calculated based on the segmentation and recognition results and the evidence recognition results of the current image at the current iteration number. Determine whether the stopping condition is met; the stopping condition is that a preset number of iterations has been reached or the joint loss at the current number of iterations meets a preset threshold. If so, the integrated network at the current iteration number will be used as the trained integrated network; If not, update the network parameters in the integrated network at the current iteration number to obtain the integrated network at the next iteration number, and perform training for the next iteration number until the stopping condition is met, and obtain the trained integrated network.
6. The breast ultrasound image segmentation method according to claim 5, characterized in that, The joint loss function includes: ; ; ; ; in, For joint losses; Loss of evidence; For segmentation loss; The total number of pixels contained in all sample breast ultrasound images in the training set; The subjective confidence level that the nth pixel belongs to the tumor region; The value of the binary segmentation mask for the nth pixel in the corresponding ground truth map; Predict the segmentation probability that the nth pixel belongs to the tumor region; The probability of evidence that the nth pixel belongs to the tumor region is predicted.
7. The breast ultrasound image segmentation method according to claim 4, characterized in that, Any scale aggregation module is represented as: ; ; ; ; ; in, This is the output feature map after a 3×3 dilated convolution operation with a dilation rate of 1. This is a 3×3 dilated convolution operation with a dilation rate of 3; The feature map is input from the scale aggregation module; This is the output feature map after a 3×3 dilated convolution operation with a dilation rate of 3; This is a 3×3 dilated convolution operation with a dilation rate of 3; This is the output feature map after a 3×3 dilated convolution operation with a dilation rate of 5. This is a 3×3 dilated convolution operation with a dilation rate of 5; This refers to the fused feature map in the scale aggregation module; For connection operation; This is the multi-scale aggregated feature map output by the scale aggregation module; This is a 1×1 convolution operation.
8. The breast ultrasound image segmentation method according to claim 4, characterized in that, The channel dynamic mixing module is represented as follows: ; ; ; ; ; ; ; in, The feature map output by the channel attention module; This is the multi-scale aggregated feature map output by the 5th scale aggregation module; This is a dot product operation; For channel attention modules; The feature map output by the spatial attention module; For spatial attention modules; The feature map output by the channel cyclic translation module; This is a channel cyclic translation module; The feature map output by the first linear processing module; This is the first linear processing module; The learnable parameter matrix; The feature map output by the first linear processing module; This is the first linear processing module; The weighted deep feature map output by the channel dynamic mixing module; This is a regularization operation.
9. The breast ultrasound image segmentation method according to claim 4, characterized in that, Any frequency refinement module is represented as: ; ; ; ; ; ; ; ; ; ; ; ; ; ; in, This is the feature map after the upsampling operation; This is an upsampling operation; The feature map for the input frequency refinement module; The input is a feature map of an FMamba block; This is the multi-scale aggregated feature map output by the scale aggregation module; The feature map is normalized for the instance; Normalize the instances; The feature map output by the first state space module; For processing operations of the state-space model; For the SLiU function; This is a 3×3 convolution operation; Linear layer; This is the second state space module; This is a 5×5 convolution operation; Feature maps output by FMamba blocks; For layer normalization; The feature map is obtained after spatial discrete wavelet transform; for Approximate part; These are wavelet basis functions for approximate subbands; Feature map of the input spatial discrete wavelet transform module; for The horizontal part; For wavelet basis functions of horizontal detail subbands; for The vertical portion; For wavelet basis functions of vertical detail subbands; for The diagonal portion; For the wavelet basis functions of the diagonal detail subbands; The feature map is the result of stitching together the sub-parts; For connection operation; This is a 1×1 convolution operation; This is the Sigmoid function.
10. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the breast ultrasound image segmentation method according to any one of claims 1-9.