A breast ultrasound lesion segmentation method based on auxiliary branch contrastive aggregation network

CN121999008BActive Publication Date: 2026-09-22CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610187909.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-02-10
Publication Date
2026-09-22
Estimated Expiration
2046-02-10

AI Technical Summary

Technical Problem

现有方法采用的固定感受野无法适配器其病灶尺度的跨度,单一卷积无法同时适配所有尺寸的目标

Benefits of technology

[0013]与现有技术相比,本发明设计具有多尺度协同感知功能的特征提取模块,通过适配不同尺寸乳腺病灶的多路并行卷积结构,结合自适应权重融合机制,能够精准捕获不同尺度病灶的特征信息;本发明设计双辅助分支模块实现前景与背景特征的提取,通过通道注意力强化病灶、背景相关通道特征,为后续的前背景对比驱动特征聚合模块提供差异化的特征;本发明提出的前背景对比驱动特征聚合模块结合通道与空间注意力机制,将主干特征通过前景、背景特征的分级注意力加权与聚合,能够增强病灶与周围组织的特征对比度,提升乳腺病灶的分割精度与边界完整性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121999008B_ABST
    Figure CN121999008B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of medical image processing, and particularly relates to a breast ultrasound lesion segmentation method based on an auxiliary branch contrast aggregation network, which comprises inputting a processed image into an encoder-decoder architecture segmentation network, wherein the encoder comprises feature extraction modules which are cascaded from the first level to the fifth level in sequence, and after each feature extraction, a maximum pooling operation is used to down-sample the features and then the features are taken as the output of the level; the feature extraction module of the third level of the encoder is connected to a double auxiliary branch module, and the module extracts foreground features and background features from the feature map output by the feature extraction module of the third level. The application can enhance the feature contrast between the lesion and the surrounding tissue and improve the boundary segmentation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image processing technology, specifically relating to a method for segmenting breast ultrasound lesions based on an auxiliary branch contrast aggregation network. Background Technology

[0002] Breast cancer is one of the most common malignant tumors in women, and early detection and accurate diagnosis are crucial for improving patient survival rates. With the development of artificial intelligence technology, computer-aided diagnostic systems based on convolutional neural networks have been widely used in lesion segmentation and classification tasks in breast medical imaging.

[0003] While existing deep learning models perform well in conventional natural image processing, they face numerous challenges in automatic segmentation when applied to breast ultrasound images. Breast ultrasound images typically exhibit low contrast, high speckle noise, and shadow artifacts, resulting in unclear boundaries between different tissues and organs. Furthermore, the size, shape, and texture of lesions vary significantly among different cases in breast ultrasound images, often leading to poor performance of segmentation methods.

[0004] Breast lesions in different cases exhibit significant morphological heterogeneity. Existing methods using fixed receptive fields cannot adapt to the range of lesion scales, and a single convolution cannot simultaneously adapt to targets of all sizes. If the network is biased towards extracting local high-frequency details, it cannot capture the complete topological structure and global context of large masses, easily leading to incomplete identification of large targets or internal voids, and poor segmentation of malignant lesions. If the network obtains global semantics through deep downsampling, as the feature map resolution decreases, a large amount of spatial location information and edge details of small lesions will be lost, leading to missed detection of small lesions. Summary of the Invention

[0005] To address the problems existing in the prior art, this invention proposes a method for segmenting breast ultrasound lesions based on an auxiliary branch contrast aggregation network, comprising the following steps:

[0006] Preprocessing of breast ultrasound images reduces background noise and enhances the image quality;

[0007] The processed image is input into a segmentation network with an encoder-decoder architecture. The encoder in the segmentation network includes feature extraction modules cascaded from the first to the fifth level. After each feature extraction, the features are downsampled using max pooling and then used as the output of that level.

[0008] The feature extraction module of the third level of the encoder is connected to the dual auxiliary branch module, which extracts foreground and background features from the feature map output by the third-level feature extraction module.

[0009] The decoder in the segmentation network includes feature extraction modules cascaded from the fourth level to the first level. The output of the feature extraction module of the fifth level of the encoder is upsampled and concatenated with the output of the feature extraction module of the fourth level of the encoder as the input of the feature extraction module of the fourth level of the decoder.

[0010] After the output of the fourth-level feature extraction module of the decoder is upsampled, the foreground-background contrast-driven feature aggregation module uses foreground and background features to filter the upsampled feature map. The filtered feature map is then concatenated with the third-level output features of the encoder and used as the input of the next level decoding layer.

[0011] The output of the previous stage of the decoder is upsampled and then concatenated with the output of the corresponding encoder of the current stage to serve as the input of the current stage;

[0012] The first-level feature extraction module of the decoder outputs the feature map, which is then processed by point convolution to output the final segmentation result.

[0013] Compared with existing technologies, this invention designs a feature extraction module with multi-scale collaborative perception capabilities. By adapting to a multi-path parallel convolutional structure for breast lesions of different sizes and combining it with an adaptive weight fusion mechanism, it can accurately capture feature information of lesions at different scales. This invention designs a dual-auxiliary branch module to extract foreground and background features. By strengthening the lesion and background-related channel features through channel attention, it provides differentiated features for the subsequent foreground-background contrast-driven feature aggregation module. The foreground-background contrast-driven feature aggregation module proposed in this invention combines channel and spatial attention mechanisms. By weighting and aggregating the main features through hierarchical attention of foreground and background features, it can enhance the feature contrast between the lesion and surrounding tissues, and improve the segmentation accuracy and boundary integrity of breast lesions. Attached Figure Description

[0014] Figure 1 This is a flowchart of a breast ultrasound lesion segmentation method based on an auxiliary branch contrast aggregation network according to the present invention;

[0015] Figure 2 This is a schematic diagram of the feature extraction module structure of the present invention;

[0016] Figure 3 This is a schematic diagram of the dual auxiliary branch module structure of the present invention;

[0017] Figure 4 This is a schematic diagram of the data processing of the foreground and background contrast-driven feature aggregation module of the present invention;

[0018] Figure 5 This is a schematic diagram of the segmentation network structure of the encoder-decoder architecture of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] This invention proposes a method for segmenting breast ultrasound lesions based on an auxiliary branch-contrast aggregation network, the process of which is as follows: Figure 1 As shown, it includes the following steps:

[0021] Preprocessing of breast ultrasound images reduces background noise and enhances the image quality;

[0022] The processed image is input into a segmentation network with an encoder-decoder architecture. The encoder in the segmentation network includes feature extraction modules cascaded from the first to the fifth level. After each feature extraction, the features are downsampled using max pooling and then used as the output of that level.

[0023] The feature extraction module of the third level of the encoder is connected to the dual auxiliary branch module, which extracts foreground and background features from the feature map output by the third-level feature extraction module.

[0024] The decoder in the segmentation network includes feature extraction modules cascaded from the fourth level to the first level. The output of the feature extraction module of the fifth level of the encoder is upsampled and concatenated with the output of the feature extraction module of the fourth level of the encoder as the input of the feature extraction module of the fourth level of the decoder.

[0025] After upsampling the output of the fourth-level feature extraction module of the decoder, the upsampled feature map is filtered using foreground and background features. The filtered feature map is then concatenated with the third-level output features of the encoder and used as the input of the next coding layer.

[0026] The output of the previous stage of the decoder is upsampled and then concatenated with the output of the corresponding encoder of the current stage to serve as the input of the current stage;

[0027] The first-level feature extraction module of the decoder outputs the feature map, which is then processed by point convolution to output the final segmentation result.

[0028] In this embodiment, the breast ultrasound image is preprocessed to reduce background noise interference and enhance the image. The processed image is then input into a segmentation network with an encoder-decoder architecture for segmentation. The specific steps include:

[0029] The encoder performs multi-level feature extraction on the input image through a feature extraction module, obtaining features at each level. Then, the features are downsampled using max pooling.

[0030] In the third-level features of the encoder The module then uses two auxiliary branches to extract foreground features. and background features ;

[0031] Decoder decodes features of each layer Upsampled features and corresponding coding layer features After being spliced ​​and fused, the data is input into the feature extraction module to obtain the decoding features at each level. ;

[0032] In the decoding layer corresponding to the third-level coding layer, the decoding features are... After upsampling, the features are input together with the foreground and background features to drive the feature aggregation module for feature splicing and decoding.

[0033] The decoder is fed into the feature extraction module after being upsampled and feature splicing and fusion at each stage, and finally outputs the lesion segmentation result.

[0034] In this example, the encoder includes a feature extraction module and a downsampling operation, wherein the feature extraction module, such as... Figure 2 As shown, the encoder of this invention extracts and encodes feature information layer by layer from ultrasound breast cancer images. Through continuous downsampling operations, it gradually reduces the spatial resolution of the feature map and increases the number of channels to obtain semantic information at different scales, ultimately obtaining the encoder features for each layer. .

[0035] The feature extraction module proposed in this invention comprises three units. Specifically, the multi-path parallel feature extraction unit includes three parallel convolution operations, each using a different kernel size: 1×1, 3×3, and 5×5. Batch normalization and LeakyReLU activation functions are applied after the convolutions in all branches to accelerate convergence and introduce nonlinearity. The input image is processed through these three paths to obtain three output feature maps. , , Finally, the three output feature maps are concatenated together as the output of the multi-path parallel feature extraction unit. This process can be represented as:

[0036]

[0037] in, This indicates a splicing operation. This represents the spliced ​​feature map;

[0038] The adaptive attention weight generation unit receives the output of the aforementioned multi-path parallel feature extraction unit. This unit includes a CBR operation, a global average pooling layer, a 1×1 convolutional layer, and an activation function. The CBR operation compresses the concatenated output feature map along the channels, followed by spatial compression through the global average pooling layer. It learns the importance of features from the global context and finally generates the corresponding normalized adaptive weights. This process can be represented as:

[0039]

[0040] The CBR operation represents performing convolution, batch normalization, and LeakyReLU activation sequentially. This represents the obtained adaptive weights, which consist of three sub-weight vectors. , , tensor, This indicates a global pooling operation; This represents point convolution dimensionality upscaling transformation. Represents the Sigmoid function;

[0041] The dynamic weighted fusion unit uses tensor block operations to split the weight tensor generated by the adaptive weight unit into three weight tensors along the channel dimension. , , The split weight tensors are then multiplied element-wise with the features generated by the multi-path parallel feature extraction units, and the weighted results are linearly superimposed. Finally, after CBR operation, the fused multi-scale features are output, represented as:

[0042]

[0043] in, This represents the output features of each feature extraction module in the coding layer; Indicates the encoder level.

[0044] In this example, the output of the third level of the encoder is connected to a dual auxiliary branch module, such as... Figure 3 As shown, the input to the module is the feature map of the third-level coding layer. At this point, the feature map contains rich semantic information, but because it has passed through the first two encoding layers, the foreground and background information are highly coupled. Therefore, the input feature map... The input is simultaneously fed into two parallel branches with identical structures but independent parameters. The foreground branch aims to extract lesion-related features, while the background branch aims to extract background-related features, such as normal gland texture and sound shadow.

[0045] Within each branch, local spatial features are extracted through convolution, followed by channel dimensionality reduction to reduce computation and compress features. Batch normalization and activation are then performed, and finally, point convolution adjusts the number of channels to the target dimension. Using independent convolution parameters and an auxiliary loss function during training, the two branches can learn different feature representation patterns. The data processing process of one branch is represented as follows:

[0046] First, feature extraction and dimensionality transformation are performed on the input feature map sequentially using a 3×3 CBR operation and a 1×1 CBR operation, i.e.:

[0047]

[0048] in, Indicates input features, This indicates a 3×3 CBR operation. This represents a 1×1 CBR operation;

[0049] Next, to achieve adaptive feature selection and self-calibration, the auxiliary branch uses an attention mechanism for channel selection. Global average pooling is performed on the features extracted from the convolution, compressing the spatial dimension (H, W) of the feature map to 1×1 to aggregate global context information and obtain channel features. This feature is then transformed through a sequence of fully connected layers containing dimensionality reduction, non-linear activation, and dimensionality increase. Finally, the channel attention weights are output using the Sigmoid function. ,Right now:

[0050]

[0051] in, Indicates the sequence transformation of fully connected layers;

[0052] Finally, the generated weights Features extracted from branched volumes After performing element-wise multiplication, the output feature representation is as follows:

[0053]

[0054] in, This represents the foreground features obtained from the foreground branch;

[0055] In this invention, the following will be obtained The process is represented as , channel attention weight vector The acquisition process is simplified to Foreground features are extracted from the feature map output by the third-level feature extraction module, including:

[0056]

[0057] Similarly, the process of extracting background features is the same as that of extracting foreground features. The only difference is that during training, the auxiliary loss function constrains the output features of the foreground and background branches, thus guiding the dual-branch updates to obtain different weight matrices. Extracting background features from the feature map output by the third-level feature extraction module can be represented as:

[0058]

[0059] In this example, the decoder includes upsampling convolutional units and a feature extraction module. The decoder extracts features... Upsampled features and corresponding coding layer features After being spliced ​​and fused, the data is input into the decoding feature extraction module to obtain the decoding features. Each level of decoding features can be represented as:

[0060]

[0061] in, Indicates upsampling; This represents each stage of the feature extraction module in the decoder; Indicates the decoding features at each level; This indicates the number of decoder levels.

[0062] Specifically, after upsampling the fourth-level features of the decoder, a foreground-background contrast-driven feature aggregation module (FBEA) is introduced, such as... Figure 4 As shown, it utilizes the foreground and background features output by the dual auxiliary branch module as guiding signals to optimize the features. Differential filtering and enhancement are performed. The specific steps are as follows: Select the core features from the second layer of the decoder. After upsampling, it is used as the main feature input. Feature alignment is performed after a 3×3 CBR operation; then, the features are transformed into value feature vectors through linear mapping. Finally, the H×W value feature vectors are divided into H×K windows using a sliding window operation, sliding H×W times in total, with each window containing K blocks. 2 The feature dimension changes from (B,C,H,W) to (B,C×K) pixels. 2 (,H×W), and through the reshaping operation, C×K 2 It is disassembled into 8 heads, each window having K pixels. 2 Each head has a dimension of C / 8, and its dimensions are ultimately transformed to (B, 8, H × W, K). 2 (C / 8), to obtain the final set of local value feature vectors, and to combine the main feature vectors from the first layer of the decoder. The set of local value eigenvectors can be represented as:

[0063]

[0064]

[0065] in, This is a value feature vector based on the core features; The feature map is the output of the feature extraction module of the fourth level of the decoder; U represents upsampling, which uses the feature map obtained by upsampling the feature map output by the feature extraction module of the fourth level of the decoder as the backbone feature. , This represents the weights and biases of the linear mapping layer of the backbone features; This indicates a window sliding operation, which divides the complete feature map into a set of feature blocks through a window of a certain size; This indicates a reshaping operation, which changes the dimensional structure of the feature vector.

[0066] Foreground features output by the dual auxiliary branch module Background features This is used as the input feature for calculating the foreground and background attention weights. First, the features are processed through channel filtering to enhance important channels, resulting in filtered foreground and background features. , Then, the C-dimensional dimension is mapped to K through a linear mapping. 2 ×K 2 ×8 dimensions, using K 2 ×K 2 Because each window has K 2 To calculate the relationship between any two pixels, we need K pixels. 2 ×K 2 With weights, the feature output dimension after linear mapping is (B, H×W, K). 2 ×K 2 ×8); then after the Reshape operation, it becomes (B, 8, H × W, K). 2 ,K 2 Finally, the foreground feature weights based on the local window are obtained through Softmax probability normalization. The background attention weights based on the local window are obtained through the above steps of generating foreground attention weights. The foreground features output by the dual auxiliary branch module. Background features The foreground and background attention weights can be represented as:

[0067]

[0068]

[0069] in, , This represents the weight matrix of the fully connected layer. This indicates channel multiplication.

[0070]

[0071]

[0072] Where Softmax represents the weight normalization function; , This represents the weights and biases of the foreground linear mapping layer; , This represents the weights and biases of the background linear mapping layer;

[0073] The foreground attention weights based on local windows are multiplied by the set of local value feature vectors, and then reconstructed through spatial dimensions to obtain the foreground enhancement intermediate feature map. This foreground enhancement intermediate feature map is then divided into blocks and reshaped using a sliding window, and then combined with the background attention weights based on local windows. Multiplying these components and then reconstructing them in spatial dimensions yields a refined feature map with enhanced contrast. The process of obtaining the refined feature map using foreground / background attention weights and the set of value feature vectors can be represented as:

[0074]

[0075]

[0076] in, This represents spatial dimension reconstruction, which involves reorganizing and aggregating weighted discrete local feature blocks according to their original spatial location indices to restore the two-dimensional global structure of the feature map. This represents the intermediate feature map for foreground enhancement. A refined feature map representing enhanced contrast.

[0077] In this example, a breast ultrasound lesion segmentation model based on an auxiliary branch contrast aggregation network is presented. Figure 5 As shown, it proposes an improved U-Net architecture. In the encoder part, the breast ultrasound image is preprocessed and input into the model. The encoding stage includes five cascaded feature extraction stages, consisting of five... It consists of modules and four max-pooling layers. Each level of features... Through feature extraction module Extraction, while doubling the number of feature channels, from the first-level feature map Up to the fifth level feature map The number of channels is 64, 128, 256, 512, and 1024 respectively. Max pooling layers are used for downsampling, causing the corresponding feature map sizes to change to (H,W), (H / 2,W / 2), (H / 4,W / 4), (H / 8,W / 8), and (H / 16,W / 16) respectively. This gradually expands the receptive field and extracts deeper semantics, enabling the network to simultaneously perceive benign small lesions, malignant large lesions, and tumor edges. The decoder consists of 4... The module consists of four upsampling convolutional units and a foreground / background contrast-driven feature aggregation module, responsible for progressively restoring deep semantic features to the original image resolution and outputting the final segmentation result. The output features of the 5th level encoder... After size restoration by the first upsampling convolutional unit, the features are obtained. , will feature The output features of the corresponding fourth-level coding layer The input to the decoding layer is concatenated along the channel dimension via skip connections. Features obtained from Specifically, regarding features After upsampling, the model is connected to the foreground-background contrast-driven feature aggregation module, which simultaneously receives three signals: the main upsampled features... Auxiliary foreground features and auxiliary background features The foreground features guide the model to focus on the lesion area within the main features; background features are used as an inverse suppression signal to eliminate artifact interference in the main features; therefore, the foreground-background contrast-driven feature aggregation module can enhance the feature contrast between the lesion and surrounding tissues. The feature map after processing by the foreground-background contrast-driven feature aggregation module is shown below. Then compare with the output features of the third-level encoder Feature concatenation is performed using skip connections, and the input is then fed into the decoder. Obtain the third-level decoding features The remaining decoding layers sequentially use the output of the previous decoding layer, upsampled and concatenated with the output of the corresponding encoder of the current layer, as the input to the current layer's feature extraction module. The output features of each decoding layer are then used to complete the process, with the last decoding layer being processed first. Output characteristics The final lesion segmentation result is output after point convolution.

[0078] This invention uses three publicly available breast ultrasound datasets to evaluate the performance of the proposed network model. Specifically, dataset A, the Breast Ultrasound Image (BUSI) dataset, comprises 780 images collected from 600 female patients aged 25 to 75 years. This dataset includes 437 benign cases, 210 malignant cases, and 133 normal cases. This invention utilizes only benign and malignant cases from this dataset for segmentation experiments. Dataset B (BUS), also known as Dataset B, contains 163 ultrasound images of breast lesions, including 109 benign cases and 54 malignant cases. Dataset C, BUSI-WHU collected by Wuhan University People's Hospital in China, contains 927 breast ultrasound images, including 560 benign samples and 367 malignant samples.

[0079] The loss function used in this invention includes a main loss function and an auxiliary loss function. The main loss function combines binary cross-entropy loss and dice loss, while the auxiliary loss function uses cross-entropy loss. For training, this invention utilizes the Adam optimizer and cosine annealing strategy to dynamically adjust the learning rate, initializing it to 0.0001. All images are resized to 224×224 pixels and trained in batches of 8 pixels over a total of 100 epochs.

[0080] The loss function used in this embodiment to train the segmentation network is expressed as follows:

[0081]

[0082]

[0083]

[0084] in, Represents the total loss function. Represents the main segmentation loss function. The weights represent the auxiliary loss function. Indicates the loss of the auxiliary branch; represents the feature probability mapping operation, used to map deep semantic feature vectors to a single-channel probability space; G represents the true segmentation result, and P represents the segmentation result output by the segmentation network; Represents the binary cross-entropy loss function; This represents the Dice loss function.

[0085] This invention compares the performance of the proposed model with 10 popular and state-of-the-art U-shaped medical image segmentation networks, including U-Net, UNet++, Att-Unet, TransUNet, Swin-Unet, MissFormer, DCSAU-Net, Roll_UNet, ScribFormer, and GED_Net. The proposed model and these 10 models were trained and tested on three public datasets. Five region-based evaluation metrics widely used in medical image segmentation—accuracy, precision, recall, dice coefficient, and intersection-over-union (IoU)—were used to evaluate the segmentation performance of the proposed model and the comparison models. Experimental results are shown in Tables 1-3. The results demonstrate that, compared to classic models and models proposed in recent years, the breast ultrasound lesion segmentation method based on an auxiliary branch contrast aggregation network proposed in this invention exhibits superior performance in the ultrasound breast image segmentation task.

[0086] Table 1. Comparison of the performance of the present invention and existing segmentation methods on dataset A.

[0087]

[0088] Table 2. Comparison of the performance of the present invention and existing segmentation methods on dataset B.

[0089]

[0090] Table 3. Comparison of the performance of the present invention and existing segmentation methods on dataset C.

[0091]

[0092] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for segmenting breast ultrasound lesions based on an auxiliary branch-contrast aggregation network, characterized in that, Includes the following steps: Preprocessing of breast ultrasound images reduces background noise and enhances the image quality; The processed image is input into a segmentation network with an encoder-decoder architecture. The encoder in the segmentation network includes feature extraction modules cascaded from the first to the fifth level. After each feature extraction, the features are downsampled using max pooling and then used as the output of that level. The feature extraction module of the third level of the encoder is connected to the dual auxiliary branch module, which extracts foreground and background features from the feature map output by the third-level feature extraction module. The decoder in the segmentation network includes feature extraction modules cascaded from the fourth level to the first level. The output of the feature extraction module of the fifth level of the encoder is upsampled and concatenated with the output of the feature extraction module of the fourth level of the encoder as the input of the feature extraction module of the fourth level of the decoder. After the output of the fourth-level feature extraction module of the decoder is upsampled, the foreground-background contrast-driven feature aggregation module uses foreground and background features to filter the upsampled feature map. The filtered feature map is then concatenated with the third-level feature extraction module of the encoder as the input for the next level. The output of the previous stage of the decoder is upsampled and then concatenated with the output of the corresponding encoder of the current stage to serve as the input of the current stage; The first-level feature extraction module of the decoder outputs the feature map, which is then processed by point convolution to output the final segmentation result. The dual-auxiliary-branch module extracts foreground and background features from the feature map output by the third-level feature extraction module, including: in, Indicates the output features of the foreground branch; Indicates the background branch output features; This indicates the convolutional feature transformation operation, which involves performing feature extraction and dimension transformation on the input feature map sequentially through a 3×3 CBR operation and a 1×1 CBR operation. The weight generation operation for channel attention is represented by a series of global average pooling layers, fully connected layer sequence transformations, and a sigmoid function to generate attention weights for each channel of the input feature map. This represents the output feature map of the third-level coding layer; The foreground-background contrast-driven feature aggregation module uses foreground and background features to upsample the output of the fourth-level feature extraction module of the decoder, and then filters the resulting feature map. Specifically, this includes: Channel filtering is used to process foreground and background features and suppress noise channels. Using a linear mapping mechanism, corresponding foreground attention weights and background attention weights based on local windows are generated based on foreground features and background features, respectively. The backbone features are extracted from the feature map output by the fourth-level feature extraction module of the decoder, and the backbone features are converted into value feature vectors through linear mapping. Then, the local value feature vector set is extracted through sliding window block operation and reshaping operation. The sliding window operation divides the complete feature map into a set of feature blocks through a window of a certain size, and the reshaping operation changes the dimensional structure of the feature vector. By using attention weights based on foreground features to weight the set of local value feature vectors within a local window, and then reconstructing the spatial dimension, a foreground-enhanced intermediate feature map focusing on the lesion region is generated. The foreground enhancement intermediate feature map is subjected to sliding window segmentation and reshaping operations again to obtain a set of local value feature vectors of the foreground enhancement intermediate feature map; and the set is then weighted twice using attention weights based on background features to suppress interference from irrelevant background regions in the feature map. Finally, spatial dimension reconstruction is performed on the double-weighted features to obtain a refined feature map with enhanced contrast.

2. The method for segmenting breast ultrasound lesions based on an auxiliary branch contrast aggregation network according to claim 1, characterized in that, Each stage of the feature extraction module in the encoder or decoder includes a cascaded multi-path parallel feature extraction unit, an adaptive attention weight generation unit, and a dynamic weighted fusion unit, wherein: The multi-path parallel feature extraction unit is used to extract features of different sizes from the input feature map by using convolution operations with kernel sizes of 1×1, 3×3, and 5×5 respectively. After batch normalization and LeakyReLU activation, the convolution results are stitched together as the output of the multi-path parallel feature extraction unit. The adaptive attention weight generation unit first performs channel dimensionality reduction on the concatenated feature map through CBR operation, then compresses the spatial dimension through a global average pooling layer, and finally generates the corresponding three adaptive weights using a 1×1 convolutional layer and a Sigmoid activation function. The CBR operation means performing convolution, batch normalization, and LeakyReLU activation in sequence. The dynamic weighted fusion unit uses generated weights to weight feature maps of different sizes obtained by the multi-path parallel feature extraction unit. After weighting, the feature maps are fused by addition. The fused feature maps are then processed by CBR operation to obtain the output of the feature extraction module.

3. The method for segmenting breast ultrasound lesions based on an auxiliary branch contrast aggregation network according to claim 2, characterized in that, The process by which the dynamic weighted fusion unit obtains the output of each feature extraction module includes: in, Indicates a splicing operation; This represents the spliced ​​feature map; These are the input feature maps processed by 1×1, 3×3, and 5×5 convolutional layers, and all after batch normalization and LeakyReLU activation. This represents the obtained adaptive weights, which consist of three sub-weight vectors. , , tensor; This indicates a global pooling operation; This represents point convolution up-dimensional transformation; Represents the Sigmoid function; This represents the output feature map of each coding layer; Indicates the encoder level.

4. The method for segmenting breast ultrasound lesions based on an auxiliary branch contrast aggregation network according to claim 1, characterized in that, Channel filtering-based processing of foreground and background features includes: in, Indicates the output features of the foreground branch; Indicates the background branch output features; This represents the output characteristics of the foreground branch based on channel filtering; This represents the background output characteristics based on channel filtering; This indicates a global average pooling operation; , This represents the weight matrix of the fully connected layer. This indicates channel multiplication.

5. The method for segmenting breast ultrasound lesions based on an auxiliary branch contrast aggregation network according to claim 1, characterized in that, Based on foreground and background features, corresponding foreground attention weights and background attention weights based on local windows are generated, including: in, This represents the foreground attention weights obtained based on a linear mapping; represents the background attention weights obtained based on linear mapping; Softmax represents the weight normalization function; Reshape represents the reshaping operation, that is, changing the dimensional structure of the feature vector; This represents the output characteristics of the foreground branch based on channel filtering; This represents the background output characteristics based on channel filtering; , This represents the weights and biases of the foreground linear mapping layer; , This represents the weights and biases of the background linear mapping layer.

6. The method for segmenting breast ultrasound lesions based on an auxiliary branch contrast aggregation network according to claim 1, characterized in that, The loss function used when training the segmentation network is expressed as: in, Represents the total loss function. Represents the main segmentation loss function. The weights represent the auxiliary loss function. Indicates the loss of the auxiliary branch; represents the feature probability mapping operation, used to map deep semantic feature vectors to a single-channel probability space; G represents the true segmentation result, and P represents the segmentation result output by the segmentation network; Represents the binary cross-entropy loss function; This represents the Dice loss function.