Double-encoder breast cancer medical image segmentation method based on spatial entropy enhancement
Through a dual encoder method based on spatial entropy enhancement, the problems of low contrast and noise interference in breast ultrasound images are solved, and more accurate lesion boundary recognition and more stable segmentation effects are achieved, which can adapt to complex ultrasound images.
Patent Information
- Application Number
- CN202510773920.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-16
AI Technical Summary
In existing technologies, breast ultrasound images have low contrast, speckle noise interference and blurred lesion boundaries, which makes detection and segmentation difficult using traditional methods. In addition, single-modality or single-path methods based on deep learning fail to fully extract and fuse multiple valuable features.
A dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement is adopted. The grayscale distribution uncertainty of the local area is extracted through the spatial entropy feature calculation module. The main encoder and entropy enhancement encoder are combined to extract multi-scale features respectively. The cross-dimensional information is integrated through the information fusion module to finally generate the breast tumor segmentation mask.
It enhances the ability to express edge features, fully integrates multi-dimensional features, improves segmentation accuracy and robustness, can more accurately identify lesion boundaries, adapt to complex ultrasound images, and overcome the effects of low contrast and noise interference.
Smart Images

Figure CN120655662A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image segmentation, and in particular to a dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement. Background Art
[0002] Breast cancer is one of the most common malignant tumors worldwide, accounting for approximately 25% of female cancer patients and posing a serious threat to women's health. Early detection and accurate diagnosis are crucial for effective treatment and prevention of disease progression. In clinical practice, ultrasound imaging has become an important method for detecting breast lesions due to its non-invasiveness, radiation-free nature, and cost-effectiveness. However, this imaging technology has inherent limitations, including severe speckle noise and low contrast, which lead to blurred lesion boundaries and hinder accurate diagnostic assessment. Breast lesion segmentation achieves pixel-level depiction of pathological areas. Due to its potential to reduce the subjectivity of clinical decision-making while improving diagnostic accuracy, it has attracted extensive research attention in recent years.
[0003] In early breast ultrasound segmentation research, traditional methods such as active contours and watershed algorithms were widely used. These methods mainly rely on hand-crafted image features for boundary detection. However, due to their limited adaptability and representation capabilities, such manually designed features are usually not robust in complex imaging scenarios. Recently, deep learning technology, especially convolutional neural networks (CNNs), has demonstrated significant advantages in medical image analysis tasks. Classic CNN architectures, such as UNet, have achieved remarkable success in medical image segmentation. However, direct application to breast ultrasound images is often affected by factors such as noise, low contrast, and irregular lesion shapes, making it difficult for standard UNet models to simultaneously capture global and fine-grained lesion features. Summary of the Invention
[0004] The purpose of the present invention is to provide a dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement to solve the problems mentioned in the above background technology, such as low contrast, speckle noise interference, and unclear lesion boundaries in the existing breast ultrasound images, which make manual interpretation and traditional detection and segmentation difficult, as well as the problem that the existing single-modality or single-path method based on deep learning fails to fully extract and fuse multiple valuable features in the image.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement, the image segmentation method comprising the following steps: S1. Acquire a breast ultrasound image to be segmented and preprocess it to obtain a preprocessed image; S2. Inputting the pre-processed image into a spatial entropy feature calculation module, performing a quantitative calculation of the grayscale distribution uncertainty of a local area of the pre-processed image, and generating a spatial entropy map reflecting local complexity characteristics; S3, inputting the preprocessed image into a main encoder, and the main encoder extracting multi-scale image features from the preprocessed image; S4, inputting the spatial entropy map into an entropy enhancement encoder, and the entropy enhancement encoder extracting multi-scale entropy features from the spatial entropy map; S5. At the corresponding levels of the main encoder and the entropy enhancement encoder, input the image features from the main encoder and the entropy features from the entropy enhancement encoder into an information fusion module to perform cross-dimensional information integration to generate a fused feature map; S6. Input the fused feature map into the decoder, which gradually restores the spatial resolution through upsampling operations and performs skip connections in combination with the features of the corresponding level from the main encoder; S7. The decoder finally outputs a breast tumor segmentation mask corresponding to the preprocessed image.
[0006] Preferably, the spatial entropy feature calculation module in S2 constructs a hard histogram by analyzing the local neighborhood pixel values of the preprocessed image, and calculates the Shannon entropy based on the hard histogram to obtain the spatial entropy map.
[0007] Preferably, the local neighborhood in S2 preferably uses a circular mask to select pixels.
[0008] Preferably, the information fusion module in S5 uses an element-by-element addition method or a multi-attention fusion mechanism to perform feature integration.
[0009] Preferably, the multi-attention fusion mechanism includes: Performing channel attention calibration on the image features from the main encoder and the entropy features from the entropy enhanced encoder respectively; Performing spatial aggregation on the image features and entropy features after the channel attention calibration respectively; The spatially aggregated image features and entropy features are gated and fused to obtain the fused feature map.
[0010] Preferably, the channel attention calibration mechanism generates channel attention weights by combining the average pooling and maximum pooling structures, through a parameter sharing mapping function and a sigmoid activation function, and applies them to the original feature map channel by channel.
[0011] Preferably, the spatial aggregation module generates a spatial feature map by applying average and maximum pooling across channel dimensions, and then generates a spatial attention map through a convolutional layer along the channel direction, and multiplies it element-wise with the input feature map.
[0012] Preferably, the gated fusion cascades the spatially aggregated image features and entropy features along the channel dimension, learns the gate value through a convolutional layer and a sigmoid activation function, and performs a weighted combination of the image features and entropy features based on the gate value.
[0013] Preferably, the main encoder adopts an encoder architecture based on ResNet.
[0014] Preferably, the breast tumor segmentation model is optimized during training using a hybrid loss function that combines binary cross entropy (BCE) loss and DICE loss.
[0015] Compared with the prior art, the beneficial effects of the present invention are: the dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement: 1. Enhanced edge feature representation capabilities. By calculating and utilizing the entropy information of local image regions, this approach effectively captures and emphasizes the statistical characteristics and uncertainty of fuzzy boundary regions, such as lesion edges, in ultrasound images. This improves the model's ability to identify and represent lesion boundaries, addressing challenges associated with unclear lesion boundaries. 2. Fully integrate multi-dimensional features and build a dual-path network structure to extract deep texture features and entropy-based statistical features respectively. Through the designed information fusion module, effective complementarity and integration between different dimensional features are achieved, overcoming the limitations of insufficient single-modal feature extraction; 3. Improve segmentation accuracy and robustness by combining global semantic information and local uncertainty information, making full use of the rich texture details in the background and the unique characteristics of the lesion boundary, making the segmentation results more accurate and stable, and better adaptable to the complexity of ultrasound images. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of the overall process of the present invention; Figure 2 This is a schematic diagram of the overall network structure of the present invention; Figure 3 Schematic diagram of the structure of the spatial entropy feature calculation module of the present invention; Figure 4 Schematic diagram of the structure of the multi-attention fusion module of the present invention; Figure 5 This is a visualization diagram of the comparison results between the present invention and the prior art. DETAILED DESCRIPTION
[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0018] See also Figure 1-Figure 5 The present invention provides a technical solution: a dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement. Unlike traditional single-encoder architectures such as UNet, this method adopts a dual-encoder structure to extract original ultrasound image features and additional spatial entropy features respectively. These two complementary paths coordinately enhance the network representation and improve the feature extraction capability of complex ultrasound images.
[0019] The specific implementation of the segmentation method of the present invention includes: image acquisition and preprocessing, a spatial entropy feature calculation module, a dual encoder module (including a main encoder and an entropy enhancement encoder), an information fusion module and a decoder module.
[0020] The ultrasound image segmentation method of the present invention includes an image acquisition and preprocessing module, whose function is to acquire and standardize original breast ultrasound images to meet the input requirements of the subsequent deep learning model and improve the model's training effect and generalization ability. Since the original ultrasound images may have any pixel size, to adapt to the fixed-size input layer of the deep learning model, all acquired original images are uniformly adjusted to a preset fixed resolution, such as 256×256 pixels. To improve the generalization ability of the model and reduce overfitting, a variety of data augmentation methods can be used before deep learning training, including but not limited to random flipping (randomly flipping the image horizontally or vertically), random rotation (randomly rotating the image within a certain angle range, for example, -15 degrees to +15 degrees), and random scaling (randomly scaling the image within a certain ratio range). After processing by the image acquisition and preprocessing module, the original breast ultrasound images are converted into input images of uniform size as input to the subsequent deep learning network.
[0021] Refer to the attached Figure 3 The spatial entropy feature calculation module (SEFM) receives the preprocessed breast ultrasound image as input and calculates its spatial entropy map. The spatial entropy map reflects the uncertainty or complexity of the grayscale distribution in the local area of the image and can effectively capture the edge and texture information of the lesion. The specific processing flow of SEFM includes: local neighborhood extraction, selection of valid pixels using a circular mask, histogram construction based on hard-binning, and Shannon entropy calculation.
[0022] First, the input ultrasound feature map is represented as X. After Min-Max normalization, a sliding window with a kernel size of 2r+1 (preferably, kernel size r=3) and a width of r is applied to extract a local patch centered on each pixel. Unlike the common square receptive field, this method uses a circular mask to select valid pixels within each neighborhood. Mask And the resulting patch can be expressed as:
[0023] in are the pixel coordinates in the neighborhood, with the center being Since local structures in ultrasound images are usually isotropic, sampling within a given radius around the pixel center can better align with the underlying tissue morphology and avoid including irrelevant corner pixels, thereby reducing redundancy in distribution statistics; Next, to quantify the gray level distribution within each neighborhood, a hard-binning strategy is applied to the normalized intensity values:
[0024] Where bins represents the number of histogram buckets (preferably set to 64), for each valid pixel value in the neighborhood , calculate its corresponding , and accumulate their counts into the corresponding bin to form a local histogram, and then normalize the histogram to obtain the probability distribution ,in: , indicating the The probability of a bin, yes The count of bins, is the total number of valid pixels within the circular mask:
[0025] After obtaining the probability distribution of each neighborhood, the uncertainty of the grayscale distribution is quantified by Shannon entropy. , its spatial entropy It can be expressed as:
[0026] in It is in pixels The probability in the local neighborhood of the center, channel c, is a very small constant to avoid numerical problems such as ln(0). Finally, the calculated entropy value is reshaped back to the same spatial resolution as the input feature map to obtain a spatial entropy map that reflects the local intensity complexity of each pixel. The spatial entropy map is used as the input of the entropy enhancement encoder.
[0027] The ultrasound image segmentation system of the present invention comprises a dual encoder module, which consists of a main encoder and an entropy enhancement encoder, responsible for extracting deep features from the preprocessed original ultrasound image and the generated spatial entropy map, respectively; The main encoder is the first path in the dual-path architecture of the present invention, responsible for extracting multi-scale, multi-level deep texture features and semantic information from the original breast ultrasound image. In this embodiment, the main encoder is constructed using the ResNet-34 architecture as the backbone network of the entire segmentation model. The main encoder is designed to include five layers of attention downsampling and feature extraction to capture image features of different sizes. Specifically, the main encoder structure can be constructed with reference to the typical ResNet-34 architecture, including: Initial convolutional and pooling layers: accept an input image of, for example, 256×256×3, and pass it through a convolutional layer (7×7 kernel size, stride 3), batch normalization, and ReLU activation function, followed by a max pooling layer (3×3 pooling, stride 2). These operations perform preliminary feature extraction and the first downsampling. Five-layer downsampling and residual block stacking stage: This is the core part of the main encoder, which is composed of a series of stacked residual blocks, and downsampling is performed at the beginning of each stage. The residual block of ResNet-34 is mainly composed of two 3×3 convolutional layers. The input is directly added to the output through the jump connection to alleviate the gradient disappearance problem of the deep network. After these five stages, feature maps with decreasing resolution layer by layer can be obtained. For example, for an input of 256x256, the output feature map resolution of the five stages is 128x128, 64x64, 32x32, 16x16, 8x8, and the number of channels increases layer by layer. These feature maps will be used for subsequent information fusion and as jump connection input to the decoder.
[0028] The entropy enhancement encoder is the second path of the dual-path structure of the present invention. Its input is the spatial entropy map generated by the spatial entropy feature calculation module. The encoder is responsible for further processing and abstracting the local statistical features carried by the spatial entropy map.
[0029] In this embodiment, the entropy enhancement encoder adopts an encoder structure based on a convolutional neural network. Since the features in the entropy map represent local details, the convolution kernel size and step size used in the input layer are different from those of the main encoder (preferably a 3×3 convolution kernel with a step size of 1 is used for preliminary processing, which can be expanded to 5×5 or 7×7). In addition, its subsequent structure is the same as the downsampling stage of the main encoder, including multiple convolution layers, batch normalization, activation functions and downsampling layers.
[0030] The entropy enhanced encoder has a downsampling level corresponding to the main encoder, and has the same spatial resolution and number of channels as the feature map of the main encoder at the corresponding level for subsequent fusion. The features extracted by the entropy enhanced encoder are a deep expression of statistical features such as local uncertainty and complexity of the original image, which complements the texture semantic features extracted by the main encoder and are used together for subsequent feature fusion.
[0031] In the proposed dual encoder, the main encoder captures basic image details and texture information (ultrasound features), while the spatial entropy features captured by the entropy enhancement encoder quantify the uncertainty within the image and provide additional information about the image complexity. However, since the two encoders are processed independently in parallel, there is a lack of direct information interaction between the entropy map and the ultrasound original image features, which may limit the overall model performance. To solve this problem, an information fusion module is introduced into the dual encoder architecture of the present invention. This module is located between the outputs of each layer of the dual encoder and is used to integrate features from the two paths.
[0032] The information fusion module provides multiple implementation methods: Solution 1: Feature fusion is achieved through element-wise addition. This is the simplest fusion method. The feature maps output by the main encoder and the entropy enhancement encoder at the corresponding layer are directly added element by element to generate a fused feature map, which can be expressed as .
[0033] Solution 2: Use multiple attention fusion modules, refer to the attached Figure 4 , which is a more refined and adaptive feature integration method, which contains three stages: channel attention calibration, spatial aggregation and gated fusion.
[0034] First, the channel attention calibration mechanism is applied to the ultrasonic features output by the main encoder (denoted as ) and the entropy map features output by the entropy enhancement encoder, enhancing the representation of key channels and improving feature quality, which can be expressed as:
[0035] in represents the average pooling layer, represents the maximum pooling layer, Represents a parameter-sharing mapping function that first reduces the feature dimension and then restores the dimension by combining the average pooling and maximum pooling structures and passing through the sigmoid function Generate channel attention weights , and compare it with the original feature map channel by channel Element-wise multiplication is performed to obtain the channel-attention-calibrated output. This operation is performed independently for the feature maps from the main encoder and the entropy-enhanced encoder. This process enables the network to focus on the most important channels, thereby improving the quality of ultrasound and entropy features.
[0036] Based on the channel attention, these features are further processed using a spatial aggregation module to emphasize key spatial regions and capture spatial dependencies, which can be expressed as:
[0037] in and Respectively represent the generation of spatial feature maps by applying average and maximum pooling across channel dimensions, and then and Splicing is performed along the channel direction and a spatial attention map is generated through a convolutional layer (preferably using a 7×7 convolution kernel) ,This figure reflects the importance of different spatial positions. Finally, With the input feature map Perform element-by-element multiplication to highlight important spatial areas, and obtain the spatially aggregated feature map by performing this operation and .
[0038] After enhancing features through channel attention and spatial aggregation, ultrasound features and entropy characteristics is passed to the gated fusion stage for effective cross-modal integration, where the attention-processed ultrasound and entropy features are concatenated along the channel dimension to form a combined representation , the gate value is learned from it through a 1×1 convolution layer and a sigmoid activation function , which can be expressed as:
[0039] Based on the gate value , ultrasonic features and entropy features are fused through weighted combination:
[0040] By jointly using channel attention for channel selection, spatial aggregation for highlighting key areas, and gated fusion for integrating the two modalities, this method effectively enhances the interaction between ultrasound and entropy features. Not only is the texture information from the ultrasound images and the complexity quantification provided by the entropy map preserved, but the spatial expressiveness of the combined features is also improved, thus addressing the limitations associated with the independence of the dual encoders.
[0041] The decoder adopts a classic five-level upsampling structure. Its input is the fused feature map output by the information fusion module (at the deepest layer). During the upsampling process, multi-scale features from the main encoder (preferably, the fused features output by the information fusion module at the corresponding layer) are integrated through jump connections to gradually restore detailed spatial information. Each level of upsampling usually includes an upsampling operation (preferably using bilinear interpolation) and a convolution layer. After that, it is concatenated or added with the feature map of the corresponding level from the encoder (via jump connections), and then feature processing is performed through additional convolution layers. Finally, in the last layer of the decoder, the final segmentation output is generated after a convolution layer and a sigmoid activation function to obtain a pixel-level breast tumor segmentation mask.
[0042] In order to optimize the performance of the model, the method of the present invention adopts a hybrid loss function that combines binary cross-entropy (BCE) loss and DICE loss during training. The hybrid loss function can be expressed as:
[0043] in and is the weight coefficient (preferably using = ), BCE loss focuses on the classification accuracy of each pixel, while DICE loss focuses on the degree of overlap between the predicted mask and the true mask, which is very effective in dealing with category imbalance problems (tumor pixels are usually far less than background pixels). By minimizing the hybrid loss function, the model is able to strike a balance between pixel-level accuracy and overall consistency of the lesion area, thereby improving segmentation performance.
[0044] Effect verification of the embodiment
[0045] To evaluate the effectiveness of the proposed method, performance testing and comparative analysis were conducted on two independent public breast ultrasound image datasets (BUSI and DatasetB). The proposed method was compared with other representative advanced medical image segmentation models in the current field on the two datasets. The fusion strategy used was a multi-attention fusion module. The comparative experimental results showed that the proposed method achieved leading or optimal performance in multiple commonly used segmentation evaluation indicators, which fully demonstrated the superiority of the present invention in the breast ultrasound image segmentation task.
[0046] Table 1 Experimental results of different models on two datasets
[0047] At the same time, the segmentation results are visualized (see Appendix Figure 5 ), it can be intuitively observed that the method of the present invention can more accurately and completely depict the boundaries and morphology of breast lesions, especially for lesions with irregular morphology or unclear boundaries, and can effectively avoid missed or over-segmentation, thereby achieving high-quality pixel-level segmentation.
[0048] In summary, the above experimental results fully verify the significant effects of the method of the present invention in improving the accuracy of breast ultrasound image segmentation, enhancing the ability to express edge features, and overcoming low contrast and noise interference, achieving the expected purpose of the invention and beneficial effects.
[0049] The above specific embodiments further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific embodiments of the present invention and do not limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.
Claims
1. A dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement, characterized by: The image segmentation method comprises the following steps: S1. Acquire a breast ultrasound image to be segmented and preprocess it to obtain a preprocessed image; S2. Inputting the pre-processed image into a spatial entropy feature calculation module, performing a quantitative calculation of the grayscale distribution uncertainty of a local area of the pre-processed image, and generating a spatial entropy map reflecting local complexity characteristics; S3, inputting the preprocessed image into a main encoder, and the main encoder extracting multi-scale image features from the preprocessed image; S4, inputting the spatial entropy map into an entropy enhancement encoder, and the entropy enhancement encoder extracting multi-scale entropy features from the spatial entropy map; S5. At the corresponding levels of the main encoder and the entropy enhancement encoder, input the image features from the main encoder and the entropy features from the entropy enhancement encoder into an information fusion module to perform cross-dimensional information integration to generate a fused feature map; S6. Input the fused feature map into the decoder, which gradually restores the spatial resolution through upsampling operations and performs skip connections in combination with the features of the corresponding level from the main encoder; S7. The decoder finally outputs a breast tumor segmentation mask corresponding to the preprocessed image.
2. The dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement according to claim 1, characterized in that: The spatial entropy feature calculation module in S2 constructs a hard histogram by analyzing the local neighborhood pixel values of the preprocessed image, and calculates the Shannon entropy based on the hard histogram to obtain the spatial entropy map.
3. The dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement according to claim 1, characterized in that: The local neighborhood in S2 preferably uses a circular mask to select pixels.
4. The dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement according to claim 1, characterized in that: The information fusion module in S5 uses element-by-element addition or multi-attention fusion mechanism to perform feature integration.
5. The dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement according to claim 4, characterized in that: The multi-attention fusion mechanism includes: Performing channel attention calibration on the image features from the main encoder and the entropy features from the entropy enhanced encoder respectively; Performing spatial aggregation on the image features and entropy features after the channel attention calibration respectively; The spatially aggregated image features and entropy features are gated and fused to obtain the fused feature map.
6. The dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement according to claim 5, characterized in that: The channel attention calibration mechanism combines the average pooling and maximum pooling structures, generates channel attention weights through parameter sharing mapping function and sigmoid activation function, and applies them to the original feature map channel by channel.
7. The dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement according to claim 5, characterized in that: The spatial aggregation module generates a spatial feature map by applying average and maximum pooling across the channel dimension, and then generates a spatial attention map through a convolutional layer along the channel direction and multiplies it element-wise with the input feature map.
8. The dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement according to claim 5, characterized in that: The gated fusion cascades the spatially aggregated image features and entropy features along the channel dimension, learns a gating value through a convolutional layer and a sigmoid activation function, and performs a weighted combination of the image features and entropy features based on the gating value.
9. The dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement according to claim 1, characterized in that: The main encoder adopts a ResNet-based encoder architecture.
10. The dual-encoder breast cancer medical image segmentation method based on spatial entropy enhancement according to claim 1, characterized in that: The breast tumor segmentation model is optimized using a hybrid loss function that combines binary cross entropy (BCE) loss and DICE loss during training.
Citation Information
Cited By
Method for training segmentation model for cerebrovascular segmentation and related product
CN121438026A
Method for training a segmentation model for brain vessel segmentation and related products
CN121438026B
