Breast ultrasound image segmentation method based on state propagation and edge prior and application thereof
By using the hybrid feature enhancement module and cross-resolution collaborative mechanism of the SP-EdgeNet network, the problems of insufficient long-range dependency modeling, edge detail degradation, and inadequate feature fusion in breast ultrasound image segmentation are solved, achieving high-precision and high-robustness breast ultrasound image segmentation.
Patent Information
- Application Number
- CN202610044316.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2046-01-14
AI Technical Summary
Existing deep learning-based breast ultrasound image segmentation methods suffer from insufficient long-range dependency modeling capabilities, degradation of edge detail information, and a lack of targeted and dynamic feature fusion mechanisms when processing complex breast ultrasound images, resulting in poor segmentation performance.
The SP-EdgeNet network is adopted, and the Hybrid Feature Enhancement Module (HFEM) is combined with the state propagation path and the edge prior path to achieve the collaborative enhancement of global context and local details. The Structure-Semantic Decoupling Module (SID) and the Cross-Resolution Collaboration Mechanism (CR) are used to perform deep feature cleansing and cross-scale alignment.
It significantly improves the integrity and accuracy of segmentation boundaries, reduces the problems of fuzzy and discontinuous segmentation boundaries, enhances the clinical generalization ability and dynamic adaptability of the model, and reduces the risk of missed diagnosis and misdiagnosis.
Smart Images

Figure CN121504945B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical image processing technology, specifically relating to a breast ultrasound image segmentation method based on state propagation and edge prior and its application. Background Technology
[0002] Breast ultrasound imaging, with its advantages of being radiation-free and highly real-time, has become an important tool for early screening and clinical diagnosis of breast cancer. However, due to the limitations of ultrasound imaging principles, speckle noise, low contrast, and artifact interference are unavoidable in the images, resulting in blurred boundaries and varied morphologies of malignant lesions, posing a significant challenge to achieving fully automated and accurate segmentation of nodules.
[0003] Currently, deep learning-based segmentation methods, with encoder-decoder architectures represented by U-Net and its variants (such as U-Net++ and Attention U-Net), have become the mainstream technology in this field. Although these methods have improved segmentation performance to some extent, they still face three unresolved key technical bottlenecks when processing complex breast ultrasound images:
[0004] First, the modeling ability for long-range dependencies is insufficient. Existing networks mostly rely on convolutional operations, and their inherent local receptive field characteristics make it difficult to effectively capture the global spatial relationship between the lesion area and the overall image context, resulting in the model's inaccurate overall judgment of large or irregularly shaped nodules.
[0005] Secondly, edge detail information is severely degraded during feature transmission. Traditional skip connections employ an "indiscriminate transmission" mechanism, transmitting all features equally, failing to explicitly distinguish and enhance high-frequency edge information crucial for segmentation boundaries. In low-contrast ultrasound images, subtle lesion boundaries are easily masked by dominant low-frequency semantic features or speckle noise, resulting in blurred and discontinuous segmentation boundaries.
[0006] Finally, the feature fusion mechanism lacks specificity and dynamism. Existing multi-scale feature fusion often stops at simple linear splicing or weighted summation, failing to dynamically adjust for the attributes of different nodules (such as size, contrast, and boundary clarity). Furthermore, semantic gaps and spatial mismatches exist between multi-scale features, limiting the model's generalization ability and robustness in complex clinical scenarios. Summary of the Invention
[0007] This application provides a breast ultrasound image segmentation method based on state propagation and edge prior, and its application. It addresses the problems of existing encoder-decoder architecture segmentation models, which suffer from insufficient global context awareness due to the limitation of the convolutional receptive field, and the passive indiscriminate transmission mechanism of traditional skip connections causing key edge details to be masked by noise. In addition, the static and coarse feature fusion method cannot meet the high-precision and high-robustness segmentation requirements of complex nodules in breast ultrasound images.
[0008] The core technology of this invention is to propose an SP-EdgeNet network, which is based on the construction of a hybrid feature enhancement module (HFEM) to replace the traditional skip connections. It uses the state propagation path and the edge prior path to achieve dual enhancement of global context and local details, and is supplemented by the structure-semantic decoupling module (SID) and the cross-resolution collaboration mechanism (CR) to achieve deep feature cleansing and cross-scale alignment.
[0009] In a first aspect, this application provides a breast ultrasound image segmentation method based on state propagation and edge prior, the method comprising the following steps:
[0010] Acquire breast ultrasound images to be processed;
[0011] Breast ultrasound images are input into a pre-built segmentation model, which includes an encoder, a hybrid feature enhancement module, and a decoder.
[0012] The encoder is used to extract multi-scale features from the input breast ultrasound image to obtain multi-level encoded features. During the feature extraction process, structural information and semantic information are decoupled for each level of features to separate high-frequency edge features from low-frequency semantic features.
[0013] The decoupled multi-level encoded features are input into the hybrid feature enhancement module, and are enhanced collaboratively through parallel state propagation path and edge prior path respectively. The state propagation path maps the input features to the hidden state space and expands the receptive field through iterative state evolution operation to capture global context information. The edge prior path uses edge detection operators to explicitly extract geometric edge information in the feature map and performs feature transformation to preserve local structural details.
[0014] The features output from the state propagation path and the edge prior path are adaptively fused, and the fused features are redistributed to the corresponding levels of the decoder according to the channel dimension.
[0015] The decoder receives the enhanced features assigned by the hybrid feature enhancement module, and combines them with upsampling operations to perform hierarchical reconstruction, ultimately outputting a segmentation mask for breast nodules.
[0016] Furthermore, the structural and semantic information of the features at each level are decoupled, specifically including:
[0017] The feature map output by the current level of the encoder is divided into semantic feature branches and structural feature branches along the channel dimension;
[0018] For semantic feature branches, attention mechanisms and contrast enhancement operations are used to strengthen the semantic representation related to lesion categories.
[0019] For the structural feature branch, convolution operation is used to extract edge features, and the extracted edge features are then weighted and fused with the original structural feature branch;
[0020] The processed semantic feature branch and structural feature branch are concatenated and recombined to form the output feature of this level after decoupling.
[0021] Furthermore, before inputting the multi-level encoded features into the hybrid feature enhancement module, a cross-resolution collaborative processing step is also included:
[0022] Select deep and mid-level features from the encoder;
[0023] Deep features are upsampled to align with the resolution, and adaptive fusion weights are calculated.
[0024] Based on adaptive fusion weights, the local details of mid-level features are weighted and fused with the global semantics of deep features to generate collaborative features;
[0025] The collaborative features replace the original deep coding features and are input together with coding features from other levels into the hybrid feature enhancement module.
[0026] Furthermore, in the cross-resolution collaborative processing step, after fusing features, deformable convolution is used to perform spatial alignment correction on the features in order to learn the spatial offset.
[0027] Furthermore, the iterative state evolution operation of the state propagation path is specifically implemented through the following discrete dynamical system equations:
[0028] First, input features F fused Project onto the initial hidden state H0;
[0029] Then, N iterations are performed, and the state H is updated at the (t+1)th iteration. t+1 The calculation formula is:
[0030]
[0031] Where t = 0, 1, ..., N-1, W is the activation function. trans For a convolution kernel with fixed weights, btrans As a bias term, with H N This is the global context feature of the final output.
[0032] Furthermore, the specific processing steps for edge prior paths include:
[0033] The Sobel operator is used to perform convolution calculations on the input features in the horizontal and vertical directions to generate edge response maps.
[0034] Enhanced edge features are generated by performing nonlinear transformations on the edge response map using convolutional layers and activation functions.
[0035] The adaptive fusion process involves concatenating global context features with enhanced edge features, predicting dynamic weights through a convolutional network, and then weighting and fusing the two features based on these dynamic weights.
[0036] Furthermore, in the layered reconstruction process, the decoding operations at each level of the decoder include:
[0037] Receive upsampled features from the previous decoding level;
[0038] Receive enhanced features from the corresponding level of the hybrid feature enhancement module;
[0039] After fusing the upsampled features and the enhanced features, the structural information and semantic information are decoupled again to purify the features and suppress noise, and then the features are input to the next decoding layer or the output layer.
[0040] Secondly, this application provides a breast ultrasound image segmentation device based on state propagation and edge prior, comprising:
[0041] The image acquisition module is used to acquire breast ultrasound images to be processed;
[0042] The feature extraction and decoupling module includes an encoder with a structure-semantic decoupling unit, used to extract multi-scale features and separate structural and semantic information;
[0043] The hybrid feature enhancement module includes a parallel state propagation unit and an edge prior unit, which are used to capture global long-range dependencies and local edge details respectively, and dynamically fuse the two.
[0044] The image reconstruction module contains a decoder for reconstructing images based on enhanced features and outputting segmentation results.
[0045] Thirdly, this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the above-described breast ultrasound image segmentation method based on state propagation and edge prior.
[0046] Fourthly, this application provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the breast ultrasound image segmentation method based on state propagation and edge prior described above.
[0047] The main contributions and innovations of this invention are as follows:
[0048] 1. Significantly improves the integrity and accuracy of segmentation boundaries: By introducing edge prior paths into the Hybrid Feature Enhancement Module (HFEM) and explicitly extracting and enhancing high-frequency geometric information using the Sobel operator, the interference of ultrasonic speckle noise on the boundaries is effectively combated. Experimental data show that the HD95 index of this invention is reduced to 1.6126 mm, which is 14.8% lower than that of the mainstream nnUnet, significantly solving the problems of blurred and discontinuous segmentation boundaries in traditional methods.
[0049] 2. Solved the problem of balancing long-range dependency modeling and computational efficiency: This invention adopts a state propagation path based on discrete dynamic systems, and can obtain an effective receptive field equivalent to 7×7 through lightweight iterative calculation (such as N=3 iterations). Without increasing the computational burden (the computational amount is only 1 / 3 of that of traditional dilated convolution), it effectively captures global spatial dependencies across resolutions and improves the ability to locate nodules of different sizes.
[0050] 3. Achieved precise feature selection and pure feature supply: Through the structure-semantic decoupling module (SID), semantic and structural information are decoupled and specifically enhanced during the encoder feature extraction stage, removing noise redundancy; combined with the cross-resolution collaboration mechanism (CR), the semantic gap and spatial mismatch between deep and shallow features are resolved. Ablation experiments demonstrate that this end-to-end optimization mechanism from source to fusion significantly improves the purity of feature representation.
[0051] 4. Excellent clinical generalization ability and dynamic adaptability: The HFEM module adopts an adaptive dynamic fusion mechanism, which can automatically adjust the weight of global semantic and local structural information according to the attributes of the input nodules (such as boundary clarity and size). For example, it automatically increases the weight of edge features to 55% for nodules with blurred boundaries, thereby maintaining high precision while ensuring high recall (0.9337) and effectively reducing the risk of missed diagnosis and misdiagnosis.
[0052] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0053] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0054] Figure 1 This is a schematic diagram of the overall architecture of the improved encoder-decoder deep learning network (SP-EdgeNet) according to an embodiment of this application;
[0055] Figure 2 This is a schematic diagram of the Hybrid Feature Enhancement Module (HFEM) architecture design according to an embodiment of this application;
[0056] Figure 3 This is a schematic diagram of the complete architecture design of the Structure-Semantic Decoupling Module (SID) according to an embodiment of this application;
[0057] Figure 4 These are comparison images of breast ultrasound nodule segmentation results based on different segmentation models according to embodiments of this application;
[0058] Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0059] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0060] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0061] Example 1
[0062] like Figure 1As shown, this invention provides a breast ultrasound image segmentation method based on state propagation and edge priors, which is implemented using an improved encoder-decoder deep learning network (SP-EdgeNet). This network mainly includes an encoder, a structure-semantics decoupling module (SID), a cross-resolution coordination mechanism (CR), a hybrid feature enhancement module (HFEM), and a decoder.
[0063] The specific implementation steps are as follows:
[0064] Step 1: Image Acquisition and Preprocessing
[0065] Acquire the breast ultrasound (BUS) image to be segmented. Since ultrasound images typically contain speckle noise and have low contrast, the input image can be the original grayscale image, resized to meet the model's input requirements. For example, in this embodiment, the following is used: or The resolution.
[0066] Step 2: Feature Extraction and Decoupling (SID Module)
[0067] The preprocessed image is input into the encoder. The encoder contains four convolutional stages (Conv1 to Conv4) for extracting multi-scale features. To address the coupling issue between semantic and structural information within the features, a structure-semantic decoupling module (SID) is connected after each convolutional output of the encoder.
[0068] In this embodiment, the feature source is: the output features of the encoder in four stages { }( For shallow layer (For deeper layers), all features are first optimized by the Structure-Semantic Decoupling Module (SID):
[0069] Specifically, SID is uniformly divided by the channel dimension. semantic branches Perform "Channel Attention Calibration (GAP + Two-Layer MLP)" "Contrast enhancement" for structural branches While preserving the original spatial details, the boundary geometry information of the nodules is further enhanced to ensure that key structural features such as edges and shapes are not lost. After SID processing, the output optimized features effectively remove noise redundancy, providing input for the subsequent Hybrid Feature Enhancement (HFEM) module.
[0070] The core parameters of each layer of the encoder are clearly defined: Conv1 outputs 128×128×16 channels. Conv2 outputs 64×64×32 channels Conv3 outputs 32×32×64 channels Conv4 output 16×16×128 channels After SID processing, the number of valid channels is the same as the original number of channels (channels without channels are discarded).
[0071] like Figure 3 As shown, the processing flow of the SID module is as follows:
[0072] Let the characteristic of the output of the encoder at layer i be... First, the channel splitting function is used to divide the channel into segments. It is uniformly divided into two parts along the channel dimension: semantic feature stream. and structural feature flow Both have the same number of channels. These are used to process semantic information and structural information, respectively.
[0073]
[0074] in This represents a uniform segmentation function for the channel dimension.
[0075] For semantic feature stream A gated attention mechanism was employed to enhance key semantic features related to lesion category (compression ratio r was set to 4, optimized based on extensive experiments). The specific calculation is as follows:
[0076]
[0077]
[0078] in, Indicates global average pooling. and For learnable parameter matrix, It is a Sigmoid activation function (which maps values between 0 and 1 as weights). This indicates channel-by-channel multiplication. This step reinforces key semantics related to lesion category.
[0079] For structural feature flow We introduce explicit edge priors and utilize the Sobel operator. Convolution to extract edge features And it is integrated with the original structural features:
[0080]
[0081]
[0082] in express convolution, This represents the convolution operation. These are learnable equilibrium parameters.
[0083] Finally, the enhanced semantic features With structural features splicing, and through The convolutional recombination output yields the cleaned features:
[0084]
[0085] in This represents a 1×1 convolutional layer used for feature recombination and dimension adjustment.
[0086] Step 3: Cross-resolution collaborative processing (CR mechanism)
[0087] Before entering the hybrid feature enhancement module, to address the semantic gap between multi-scale features, the deepest features from the encoder (e.g., F4 output from Conv4) and mid-level features (e.g., F2 output from Conv2) are selected for collaborative processing. First, bilinear upsampling is used to align the resolution of the deep feature F4 with that of the shallow feature F2. Then, an adaptive fusion weight is generated through a convolutional network. This is used to weight and fuse features from different scales. Finally, spatial offsets are learned using deformable convolution. Spatial alignment correction is performed on the fused features to generate collaborative features. This feature preserves both deep abstract semantics and supplements shallow spatial details.
[0088] In this embodiment, the feature reconstruction process is as follows:
[0089] Let the deep features of the encoder be Shallow features are First, perform resolution alignment: ;in This indicates a bilinear upsampling operation.
[0090] Subsequently, fusion weights are generated using a small neural network (such as a 1×1 convolution). This is used to adaptively weight and fuse features from different scales to optimize the quality of the feature input. The process is as follows:
[0091] Adaptive weight learning mechanism:
[0092]
[0093]
[0094]
[0095] in The weight matrix (dimension 1) Z is the concatenated vector (dimension 2C) of deep and shallow features after global average pooling; the output is the fusion weight. .
[0096] Optimize fusion output:
[0097]
[0098] Spatial alignment correction module:
[0099]
[0100] in This represents a deformable convolution operation. This is the learned spatial offset.
[0101] In this embodiment, the encoder's deep features (After SID processing) additional processing is performed through the Cross-Resolution Collaboration Module (CR):
[0102] CR first selects the mid-layer features (After SID processing, 64×64×32) downsampled to The resolution is 16×16, and then fused using "dual-path convolution (InstanceNorm + LeakyReLU) + edge enhancement". Local details and The global semantics are represented by two paths: a "semantic collaboration path (1×1 convolution integrating channel information)" and a "detail preservation path (3×3 convolution enhancing edge features)," which are then added element-wise to generate collaborative features. (16×16×128, number of channels and) (Consistency) to bridge the semantic gap in multi-scale features.
[0103] Input integration and dimension alignment: The final input feature set of HFEM is { , , , }, through bilinear interpolation (128×128×16) (64×64×32) (32×32×64) Upsampled to 16×16 resolution, and stitched along the channel dimension to form a fused fundamental tensor. ( (channel), and Figure 2 The X1-X4 features marked in the text correspond one-to-one:
[0104] X1:(B,16,128,128)= (Original features of Conv1 after SID processing);
[0105] X2:(B,32,64,64)= (Original features of Conv2 after SID processing);
[0106] X3:(B,64,32,32)= (Original features of Conv3 after SID processing);
[0107] X4:(B,128,16,16)= (Conv4 collaborative features after CR processing).
[0108] Step 4: Hybrid Feature Enhancement (HFEM Module)
[0109] This is the core step of the invention. The HFEM module is located between the encoder and decoder; the input features need to be preprocessed by the preceding module to ensure "high purity and multi-scale collaboration." Figure 2 As shown, the HFEM module replaces the traditional skip connections. It receives features from each layer of the encoder after SID processing. , , and the collaborative features after CR processing These features are first uniformly upsampled to the same resolution (e.g., ... And splice them together into a fusion fundamental tensor F fused .
[0110] F fused Subsequently, two parallel and complementary paths are entered to achieve differentiated enhancement of "global semantics-local structure", mathematically expressed as a composite function. :
[0111] 1. State propagation path (State Propagation Path): Used to capture long-range dependencies. This path is based on discrete dynamical systems theory. It first uses a 1×1 convolution to... F fused Mapped to the initial hidden state H0;
[0112]
[0113] in It is a 1×1 convolution kernel. Use ReLU activation function to ensure the initial state is consistent with... F fused Consistent spatial dimensions;
[0114] Then, N iterations are performed using a 3×3 convolutional layer with fixed weights (N=3 is preferred in this embodiment), and the state evolution equation is:
[0115] ( )
[0116] in For (shared) fixed weights Convolutional kernel. Through iteration, the receptive field is effectively expanded (e.g., the receptive field reaches a certain size when N=3). This covers the overall morphological context of the breast nodule, ultimately outputting the global contextual feature H. N .
[0117] Specifically, iteration is essentially "information diffusion and propagation," and the receptive field can be rigorously derived as: ( (where the kernel size is), when hour, (Corresponding to the global range of 8-10mm micronodules in ultrasound images), the computational cost is only 1 / 3 of that of traditional 4x dilated convolution, avoiding the loss of spatial details. Final hidden state. (240 channels) is the global context feature, which can capture long-range dependencies across resolutions and ensure the model's accurate judgment of the overall morphology of nodules.
[0118] 2. Edge Prior Path (Edge Prior Path): Used to preserve high-frequency details. This path employs Sobel-X / Y bidirectional operator pairs. Perform edge detection and generate edge response map E:
[0119]
[0120] Where * denotes a convolution operation. For the Sobel operator convolution kernel, output dimension ;
[0121] Then, a 3×3 convolution layer was applied ( The ReLU activation function (with 240 output channels) is used to perform feature transformation on E, generating enhanced edge features. :
[0122]
[0123] Here, * represents the convolution operation. The learnable weight matrix for this convolutional layer has a dimension that ensures the input single-channel edge map E is transformed into a 240-dimensional augmented feature. This is the corresponding bias term vector. This represents the ReLU activation function. This step extracts geometric boundary features from the image by enhancing edge information, effectively improving the segmentation accuracy of blurred boundaries. At the same time, it aligns geometric priors with depth features, ensuring that edge information can be utilized by subsequent fusion modules.
[0124] Step 5: Dynamic fusion and recalibration allocation:
[0125] The output H of the state propagation path N With edge prior path output Channel splicing is performed. This is done through an adaptive fusion network (composed of...). Convolutional processing (using dynamic weights) predicts weights that automatically adjust the fusion ratio between the input image and the input image based on features such as nodule size and boundary sharpness, resulting in the final fused features. Subsequently, through Convolution will The number of channels is mapped back to the sum of the original number of channels in each layer of the encoder. The feature is then split into segments along the channel dimension using a Split operation. These correspond to the number of channels in encoders Conv1 to Conv4 (e.g., 16, 32, 64, 128). These segmented features are then injected into the corresponding layers of the decoder.
[0126] Specifically, through a 1×1 convolutional layer ( To achieve dynamic weight learning and balance the contributions of global and local information:
[0127]
[0128] Where Conv1×1 represents a 1×1 convolution operation, and its weight tensor and bias These are learnable parameters.
[0129] Compared to traditional static fusion (such as equal-weighted stitching in U-Net++), this layer can adaptively adjust weights based on breast nodule attributes (boundary sharpness, size):
[0130] For malignant nodules with blurred boundaries (grayscale gradient < 15), the weight of edge features is increased to 55%;
[0131] For large nodules (>25mm), the global semantic weight ratio is increased to 52%;
[0132] For small nodules (<8mm), the weights of the two paths are evenly distributed (50%:50%) to ensure both global localization and local details are taken into account.
[0133] In this embodiment, the channels are recalibrated and allocated through a 1×1 convolutional layer ( )Will The 240 channels are mapped back to the sum of the original channel counts of the four stages of the encoder (16+32+64+128=240), and then precisely split according to the original channel counts of each stage of the encoder using the torch.split operation:
[0134] Divided into 16 channels) (32 channels) (64 channels) (128 channels), respectively injected into the corresponding stages of the decoder (DeConv1-DeConv4), and the number of input channels of each layer of the decoder is exactly the same as the number of feature channels after segmentation:
[0135] DeConv1: Number of input channels = 16 (receive) ), 3×3 deconvolution kernel (stride 2, padding=1), output resolution 256×256;
[0136] DeConv2: Number of input channels = 32 (receive) ), 3×3 deconvolution kernel (stride 2, padding=1), output resolution 128×128;
[0137] DeConv3: Number of input channels = 64 (receive) ), 3×3 deconvolution kernel (stride 2, padding=1), output resolution 64×64;
[0138] DeConv4: Number of input channels = 128 (receive) ), 3×3 deconvolution kernel (stride 2, padding=1), output resolution 32×32;
[0139] Ensure that the number of feature channels received at each stage of the decoder is consistent with the output of the encoder, avoid information redundancy or loss, and achieve accurate feature supply.
[0140] The HFEM module achieves enhanced information collaboration through a unique dual-path design and adaptive fusion mechanism: the state propagation path directly tackles the problem of "long-range dependency modeling and efficiency balance", the edge prior path specifically addresses the pain point of "ultrasound image edge degradation", and dynamic fusion and hierarchical allocation break through the limitation of "insufficient adaptability of static fusion". The collaboration of the three fundamentally overcomes the segmentation accuracy bottleneck caused by the "indiscriminate copying" of traditional skip connections.
[0141] Step 6: Layered Reconstruction (Decoder):
[0142] The decoder consists of four deconvolutional layers, DeConv1 through DeConv4. At each layer, the decoder receives upsampled features from the previous layer and enhanced features from the HFEM module. It is worth noting that after each layer of the decoder is fused, a second purification process is performed through a SID module. This ensures that noise is not amplified during the upsampling process of image reconstruction, and that structural and semantic information remains highly pure. Finally, after layer-by-layer upsampling and SID optimization, the network outputs a binary mask with the same size as the input image, completing the segmentation of breast nodules.
[0143] Example 2
[0144] This embodiment describes the training strategy and system configuration of the method described in Embodiment 1 to verify its feasibility.
[0145] 1. Dataset and Preprocessing: A hybrid dataset containing real clinical data (such as the BUS-BRA dataset) and synthetic data (such as the BUSSynthetic Dataset) was used. The training set mainly consisted of real clinical images to learn realistic noise distribution; the test set contained synthetic images to accurately evaluate boundary localization capabilities. All images were resized and normalized.
[0146] For example, in this embodiment, the present invention uses a fusion-type breast ultrasound image dataset for experiments. This dataset consists of two publicly available data sources: one is the real clinical dataset BUS-BRA Breast Ultrasound Dataset, containing 1875 clinically acquired breast ultrasound images; the other is the synthetic dataset BUS Synthetic Dataset, containing 500 breast ultrasound images constructed based on a generative model. The entire fusion dataset contains 2375 images, comprehensively covering common clinical cases of normal breast tissue, benign nodules, and malignant nodules, which can fully support the segmentation performance verification of the model in diverse clinical scenarios.
[0147] To balance the clinical realism of model training with the controllability of testing and evaluation, this invention adopts a "real data training + synthetic data testing" strategy: 1875 real clinical images from the BUS-BRA Breast Ultrasound Dataset are used as the training set for the model to learn real features such as clinical noise and lesion morphology in breast ultrasound images, thereby optimizing parameters; 500 synthetic images from the BUS Synthetic Dataset are used as the testing set. This dataset has accurate annotation and controllable noise, which can eliminate interference factors such as clinical data annotation errors, and accurately evaluate the model's generalization ability and segmentation accuracy.
[0148] 2. Evaluation Indicators
[0149] The evaluation indicators of this invention are divided into three main categories, which quantify segmentation accuracy, boundary quality, and clinical application value respectively:
[0150] The Dice Similarity Coefficient (DSC) is calculated using the following formula: , where X is the predicted segmentation result and Y is the gold standard. This index directly reflects the segmentation overlap, and its value ranges from 0 to 1. The closer it is to 1, the higher the segmentation accuracy.
[0151] The Intersection over Union (IoU) ratio is calculated using the following formula: It is used to quantify the intersection ratio between the predicted region and the gold standard region, complementing DSC and more intuitively reflecting the accuracy of the segmentation region matching.
[0152] The 95th Percentile Hausdorff Distance (HD95) is the maximum distance between the quantitative prediction boundary and the gold standard boundary (using the 95th percentile and filtering out 5% outliers), in millimeters (mm). The smaller the value, the more accurate the boundary matching.
[0153] Average Surface Distance (ASD) is the average Euclidean distance between the predicted boundary and the gold standard boundary, measured in millimeters (mm), and is used to reflect the average error level of the boundary as a whole.
[0154] Precision is used to measure the proportion of areas predicted as lesions that are actually lesions, reducing the risk of false positive diagnoses.
[0155] Recall is used to measure the proportion of actual lesions that are successfully detected, reducing the risk of missed detection of malignant nodules;
[0156] Specificity measures a model’s ability to distinguish between normal breast tissue and lesion areas, ensuring that the misclassification rate of normal tissue remains low.
[0157] 3. Model Training Configuration
[0158] The model is built on the PyTorch framework. That is, the training of all breast ultrasound nodule segmentation models in this invention (including the comparative models U-Net, nnU-Net, UKAN, KM-UNet and the SP-EdgeNet of this invention) is uniformly implemented on the PyTorch framework (v1.12.0), and the configuration has been verified in multiple rounds, taking into account efficiency, convergence and stability.
[0159] Loss Function: A combination of Dice loss and Binary Cross-Entropy (BCE) loss (e.g., 1:1 weights) is used. Dice loss primarily addresses the class imbalance between foreground (nodules) and background, while BCE loss optimizes pixel-level classification accuracy, especially for edge pixels; the two work synergistically to improve accuracy. Optimizer: The AdamW optimizer is used. This optimizer effectively prevents overfitting on breast ultrasound images (characterized by low lesion proportions and high noise) by decoupling the weight decay mechanism. The initial learning rate is configured as 1e-4, gradually decreasing to 1e-5 during the training period using a Cosine decay strategy. This strategy aims to promote rapid model convergence in the early stages of training and to achieve fine-tuning of parameters in the later stages to avoid oscillations.
[0160] Training parameters: Batch size is set to 8 (to adapt to mainstream GPUs, avoid gradient oscillations and memory overflow, and ensure sample diversity), and the number of training epochs is 200. An early stopping mechanism is introduced: if the Dice coefficient on the validation set does not improve for 20 consecutive epochs, training is stopped to effectively suppress overfitting.
[0161] Gradient clipping: Set a gradient threshold (e.g., max_norm=0.5) to deal with gradient anomalies caused by ultrasonic noise (e.g., sudden increase in edge gradients). When the threshold is exceeded, the gradient is automatically scaled to ensure stable training convergence.
[0162] 4. Experimental Results
[0163] Table 1 below compares the overall performance of SP-EdgeNet with current mainstream segmentation models on the test set. All results are based on the mean ± standard deviation of 5 independent runs (n=5) to ensure statistical reliability and reproducibility.
[0164] Table 1: Overall Performance Comparison of SP-EdgeNet and Mainstream Segmentation Models
[0165]
[0166] Through systematic experimental evaluation, SP-EdgeNet demonstrated comprehensive leading technical advantages in breast ultrasound nodule segmentation. In terms of core segmentation accuracy, our method achieved a Dice coefficient of 0.9327 and an IoU of 0.8754, representing improvements of 0.59 and 1.24 percentage points respectively compared to the current mainstream nnUnet, and improvements of 1.3 and 2.57 percentage points compared to KM-UNet. This performance improvement stems from the synergistic effect of SID feature decoupling, CR cross-scale collaboration, and HFEM dual-path enhancement. The SID module effectively separates structural and semantic information to reduce feature redundancy, the CR module optimizes the semantic and spatial matching degree of multi-scale features, and the HFEM module accurately balances global dependency modeling and local detail preservation. These three modules collectively enhance the feature discrimination capability of complex lesions.
[0167] SP-EdgeNet achieved significant breakthroughs in boundary segmentation quality. HD95 (95% Hausdorff distance) decreased to 1.6126 mm, a 14.8% reduction compared to nnUnet and a 52.4% reduction compared to the traditional U-Net; ASD (mean surface distance) was as low as 0.3490 mm, a 15.5% reduction compared to nnUnet and a 66.1% reduction compared to U-Net. These results directly validate the innovative value of the "edge prior path" in the HFEM module: by explicitly injecting geometric edge priors through the Sobel operator, it effectively combats the inherent speckle noise interference in ultrasound images, fundamentally alleviating the technical bottleneck of "blurred and discontinuous boundaries" in traditional model segmentation results, and providing support for the accurate identification of key clinical features such as the integrity of the capsule and spiculations in malignant nodules.
[0168] Of particular note is that SP-EdgeNet achieved an optimal balance across key clinical metrics. Its recall rate reached 0.9337, the highest among all comparison models, a 1.75 percentage point improvement over nnUnet, significantly reducing the risk of missed detections of malignant nodules. Simultaneously, its precision remained high at 0.9325, only a slight decrease of 0.65 percentage points compared to nnUnet, effectively controlling the waste of clinical resources caused by false positive diagnoses while maximizing lesion detection capabilities. This balance stems from the dynamic fusion mechanism of the HFEM module: it adaptively adjusts the weight distribution of global semantics and local structural information based on nodule attributes (such as boundary clarity and size) (e.g., emphasizing edge features for nodules with blurred boundaries, and emphasizing global semantics for large nodules), enabling the model to flexibly adapt to different clinical scenarios.
[0169] Furthermore, SP-EdgeNet exhibits exceptional operational stability. The standard deviation of the core metric, the Dice coefficient, is only 0.0038, significantly lower than KM-UNet (0.0062) and UKAN (0.0092); the HD95 standard deviation is 0.1820, more stable than nnUnet (0.2105) and KM-UNet (0.2510). This low-fluctuation characteristic stems primarily from two design aspects: first, the SID module's "first-stage cleanup + second-stage optimization" feature quality management throughout the encoder and decoder process continuously suppresses noise accumulation; second, the lightweight state propagation path in the HFEM module (fixed-weight iteration, with computational cost only 1 / 3 of traditional dilated convolution), ensuring long-range dependency modeling capabilities while avoiding parameter oscillations, laying a solid foundation for the technology's transition from laboratory to clinical deployment.
[0170] To verify the technical contributions and synergistic effects of each core module of this invention, a systematic ablation experiment was designed. Using the complete architecture SP-EdgeNet as the baseline group (G0), five ablation experiments were constructed: G1 (removal of HFEM state propagation path), G2 (removal of HFEM edge prior path), G3 (removal of SID module), G4 (removal of CR mechanism), and G5 (dual ablation of HFEM-SSP+SID). All experiments used the same training configuration and evaluation criteria. The results are shown in Table 2.
[0171] Table 2: Experimental Results of Modular Ablation
[0172]
[0173] Experimental results show that:
[0174] Validation of the effectiveness of the HFEM dual-path mechanism: Removing the state propagation path (G1) resulted in a 2.38% decrease in the Dice coefficient and a 32.4% increase in HD95; removing the edge prior path (G2) resulted in a 2.63% decrease in the Dice coefficient, a 37.3% increase in HD95, and a 25.5% increase in ASD. This confirms that dual-path collaboration achieves a balance between long-range dependency modeling and edge detail preservation, resolving the "balance paradox" of single-path convolution.
[0175] Verification of the SID module's feature purification effect: After removing the SID module (G3), the Dice coefficient decreased by 1.83%, while HD95 and ASD increased by 23.1% and 18.1% respectively, verifying the effect of structure-semantic decoupling on improving feature purity.
[0176] Multi-scale collaborative value verification of the CR mechanism: Removing the CR mechanism (G4) reduces the Dice coefficient by 1.22% and increases HD95 by 17.6%, indicating that the mechanism effectively solves the semantic gap and spatial mismatch problem of multi-scale features.
[0177] Module synergy verification: In the double ablation experiment (G5), the Dice coefficient decreased by 4.61%, far exceeding the sum of the ablation losses of a single module (4.21%), while HD95 increased by 59.3%. This result confirms that there is a significant synergy between the SID module and the HFEM module, forming a closed-loop optimization link of "feature purification at the encoding end → feature enhancement → feature re-purification at the decoding end".
[0178] The ablation experiment system described above verified the independent contributions and synergistic value of the three core modules of this invention: the HFEM module solved the global-local balance problem, the SID module achieved feature decoupling and purification, and the CR mechanism optimized multi-scale feature fusion. Experimental data show that, through modular design and collaborative links, this invention effectively overcomes the technical bottlenecks of insufficient long-range dependency modeling, edge information degradation, and inaccurate feature fusion in breast ultrasound image segmentation, achieving a comprehensive improvement in segmentation accuracy and stability.
[0179] like Figure 4 As shown, the visualization results of this invention use four representative clinical cases to intuitively compare the segmentation performance of SP-EdgeNet of this invention with mainstream segmentation models (nnU-Net, KM-UNet, UKAN, U-Net). Figure 4 In the diagram, the green outline (GT) represents the gold standard annotated by experts, while the red outline represents the prediction results of each model. A comprehensive comparison shows that the SP-EdgeNet model proposed in this invention (third column) has the highest agreement on the segmentation boundary with the gold standard (second column), specifically in the following aspects:
[0180] Superiority in handling blurred and irregular nodules (e.g., cases in rows 1 and 3): For malignant or complex benign nodules with gentle changes in edge gray-level gradients and irregular shapes, the segmentation results of comparative models (such as U-Net and UKAN) show obvious boundary discontinuities, oversegmentation (predicted range exceeds the true boundary), or undersegmentation (failure to cover the true boundary). SP-EdgeNet, with its explicit enhancement of geometric information through edge prior paths and the dynamic adaptive fusion mechanism of the HFEM module, can generate continuous, smooth, and accurately conforming boundaries to the concave and convex structures of the real nodules.
[0181] Robustness to small and low-contrast nodules (e.g., cases in rows 2 and 4): For nodules with low visual contrast and small size, traditional models (such as KM-UNet) are easily affected by background noise, leading to segmentation failure or severe deviation. SP-EdgeNet, on the other hand, effectively models long-range dependencies through state propagation paths, captures the overall contextual information of the nodules, and combines the SID module to decouple and purify the structure-semantic aspects of features, significantly improving the model's target recognition ability and segmentation integrity in complex backgrounds.
[0182] The visualization results corroborate the quantitative indicators in Table 1 (such as the lowest HD95 and ASD values and the highest Dice coefficient of SP-EdgeNet), strongly demonstrating that the method described in this invention—especially through the collaborative feature decoupling (SID), cross-resolution collaboration (CR), and hybrid feature enhancement (HFEM) mechanisms—has significant advantages in accuracy and robustness compared to existing technologies when dealing with the inherent challenges of blurred boundaries and low contrast in breast ultrasound images.
[0183] Example 3
[0184] Based on the same concept, this application also proposes a breast ultrasound image segmentation device based on state propagation and edge prior, comprising:
[0185] Image acquisition module: used to connect to an ultrasound probe or read storage device to acquire B-mode ultrasound images to be processed.
[0186] Feature extraction and decoupling module: Runs the encoder and SID algorithm described above to extract downsampled features from the image and separate structural and semantic features.
[0187] Hybrid Feature Enhancement Module: Runs the HFEM algorithm, performs state propagation calculation and edge extraction calculation in parallel, and completes dynamic fusion and redistribution of features.
[0188] Image reconstruction module: Runs the decoder algorithm to restore the enhanced features to the segmentation mask.
[0189] Display module: Displays the segmentation mask overlaid on the original ultrasound image, marking the location and outline of nodules to assist doctors in diagnosis.
[0190] The system described above can be deployed in an electronic device that includes memory and a processor, such as a medical ultrasound workstation or a high-performance computer. The memory stores computer program instructions that implement the method described above, and the processor executes these instructions to complete the segmentation task.
[0191] Example 4
[0192] This embodiment also provides an electronic device, see reference. Figure 5It includes a memory 404 and a processor 402, the memory 404 storing a computer program and the processor 402 being configured to run the computer program to perform the steps in any of the above method embodiments.
[0193] Specifically, the processor 402 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0194] Memory 404 may include a mass storage device for data or instructions. For example, and not limitingly, memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 404 may include removable or non-removable (or fixed) media. Where appropriate, memory 404 may be internal or external to a data processing device. In a particular embodiment, memory 404 is non-volatile memory. In a particular embodiment, memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0195] The memory 404 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.
[0196] The processor 402 reads and executes the computer program instructions stored in the memory 404 to implement any of the breast ultrasound image segmentation methods based on state propagation and edge priors in the above embodiments.
[0197] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.
[0198] The transmission device 406 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 406 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0199] Input / output device 408 is used to input or output information.
[0200] Example 5
[0201] This embodiment also provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the breast ultrasound image segmentation method based on state propagation and edge prior according to Embodiment 1.
[0202] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0203] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0204] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products), including software routines, applets, and / or macros, can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. A computer program product may include one or more computer-executable components configured to perform embodiments when the program is run. One or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted that any block of a logical flow may represent a program step, or interconnected logical circuits, blocks and functions, or a combination of program steps and logical circuits, blocks and functions. The software may be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.
[0205] Those skilled in the art should understand that 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 have been 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.
[0206] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A breast ultrasound image segmentation method based on state propagation and edge prior, characterized in that, The method comprises the following steps: acquiring a breast ultrasound image to be processed; inputting the breast ultrasound image into a pre-constructed segmentation model, the segmentation model comprising an encoder, a mixed feature enhancement module and a decoder; using the encoder to perform multi-scale feature extraction on the input breast ultrasound image to obtain multiple levels of encoded features; during the feature extraction process, decoupling the structural information and semantic information of each level of features to separate high-frequency edge features and low-frequency semantic features; wherein the decoupling of the structural information and semantic information of each level of features specifically comprises: dividing the feature map output by the current level of the encoder into a semantic feature branch and a structural feature branch in the channel dimension; using an attention mechanism and a contrast enhancement operation to strengthen the semantic representation related to the lesion category for the semantic feature branch; using a convolution operation to extract edge features for the structural feature branch, and performing weighted fusion of the extracted edge features and the original structural feature branch; and splicing and reorganizing the processed semantic feature branch and the structural feature branch as the output features of the level after decoupling processing; selecting deep features and middle features of the encoder; performing up-sampling on the deep features to align the resolution and calculating adaptive fusion weights; based on the adaptive fusion weights, performing weighted fusion of the local details of the middle features and the global semantics of the deep features to generate collaborative features; and replacing the original deep encoded features with the collaborative features and inputting the collaborative features and the encoded features of other levels into the mixed feature enhancement module together; inputting the multiple levels of encoded features after decoupling processing into the mixed feature enhancement module for collaborative enhancement via parallel state propagation paths and edge prior paths; wherein the state propagation path maps the input features to a hidden state space and expands the receptive field through iterative state evolution operations to capture global context information; the edge prior path explicitly extracts geometric edge information in the feature map using an edge detection operator and performs feature transformation to retain local structural details; performing adaptive fusion on the features output by the state propagation path and the edge prior path, and re-distributing the fused features to the corresponding levels of the decoder in the channel dimension; using the decoder to receive the enhanced features distributed by the mixed feature enhancement module, combining up-sampling operations for layered reconstruction, and finally outputting a segmentation mask of the breast nodule; wherein the iterative state evolution operation of the state propagation path is implemented through the following discrete dynamical system equation: First, the input features F fused are projected to an initial hidden state H0; Subsequently, N iterations of updates are performed, and the state H t+1 The calculation formula is: where t = 0, 1,..., N-1, is an activation function, W trans is a fixed weight convolution kernel, b trans is a bias term, to H N is the global context feature of the final output.
2. The breast ultrasound image segmentation method of claim 1, wherein, In the cross-resolution collaborative processing step, after fusing the features, a deformable convolution is also used to correct the spatial alignment of the features to learn the spatial offset.
3. The breast ultrasound image segmentation method of claim 1, wherein, The specific processing process of the edge prior path comprises: using a Sobel operator to perform convolution calculation on the input features in the horizontal and vertical directions to generate an edge response map; performing nonlinear transformation on the edge response map through a convolution layer and an activation function to generate enhanced edge features; The adaptive fusion specifically refers to splicing the global context feature and the enhanced edge feature, predicting a dynamic weight through a convolution network, and performing weighted fusion on both according to the dynamic weight.
4. The breast ultrasound image segmentation method of any one of claims 1 to 3, wherein, In the hierarchical reconstruction process, the decoding operation of each level includes: receiving up-sampling features from a previous decoding level; receiving enhanced features from a corresponding level of the mixed feature enhancement module; fusing the up-sampling features and the enhanced features, and then performing decoupling processing of structure information and semantic information again to purify the features and suppress noise, and then inputting to a next decoding level or an output layer.
5. An apparatus for using the breast ultrasound image segmentation method according to any one of claims 1 to 4, characterized by The method comprises: an image acquisition module configured to acquire a breast ultrasound image to be processed; a feature extraction and decoupling module comprising an encoder with a structure-semantic decoupling unit, configured to extract multi-scale features and separate structure and semantic information; a mixed feature enhancement module comprising a parallel state propagation unit and an edge prior unit, configured to capture global long-range dependencies and local edge details respectively, and dynamically fuse the two; an image reconstruction module comprising a decoder, configured to reconstruct an image based on the enhanced features and output a segmentation result. 6.An electronic device comprising a memory and a processor, the electronic device comprising: The memory stores a computer program, and the processor is configured to run the computer program to perform the breast ultrasound image segmentation method of any one of claims 1-4.
7. A readable storage medium, characterized by, The readable storage medium stores a computer program, and the computer program comprises program code for controlling a process to perform the process, and the process comprises the breast ultrasound image segmentation method of any one of claims 1-4.
Citation Information
Patent Citations
Medical image segmentation method based on high-resolution modal guidance and cross-modal boundary perception
CN120765930A
Medical image super-resolution segmentation method based on multi-scale resolution self-encoding and task perception feature decoupling
CN120765931A