Ultrasonic image segmentation method and system based on difference perception and context enhancement

Through the method of difference perception and context enhancement, the problems of insufficient fine-grained feature extraction and blurred boundaries in medical ultrasound image segmentation are solved, and lesion area segmentation with higher accuracy and robustness is achieved.

CN120672773APending Publication Date: 2025-09-19SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510666833.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing medical ultrasound image segmentation methods have problems such as insufficient fine-grained feature extraction, limited context perception, unclear foreground and background distinction, and blurred boundaries, which affect segmentation accuracy and stability.

Method used

A method based on difference perception and context enhancement is adopted. Through a gradual downsampling and upsampling process, combined with skip connections and directionally separable convolutions, fine-grained differences are extracted and local context associations are modeled, contrastive attention maps and spatial weight maps are generated to enhance feature representation.

Benefits of technology

It improves the segmentation accuracy and robustness of lesion areas in medical ultrasound images, enhances the ability to distinguish foreground and background, and improves the clarity of lesion boundaries and the ability to capture details.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120672773A_ABST
    Figure CN120672773A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing. The invention provides an ultrasonic image segmentation method and system based on difference perception and context enhancement, and the method comprises the steps: carrying out the continuous down-sampling processing of a preprocessed ultrasonic image through employing a gradual down-sampling mode, generating a contrast attention graph through combining the deepest layer down-sampling features, foreground features and background features, taking the contrast attention graph as the input, and carrying out the segmentation of the deepest layer down-sampling features, foreground features and background features. The spatial resolution is recovered by adopting a step-by-step up-sampling mode, after each level of up-sampling, features of a corresponding layer of down-sampling are introduced into a decoder through jump connection, and in the process of each level of up-sampling, fine-grained differences between down-sampling features and up-sampling features are extracted, so that the spatial resolution is recovered. Respectively modeling local context association in the horizontal direction and the vertical direction through direction separable convolution, and finally obtaining a segmentation result of the ultrasonic image; and the modeling and segmentation capabilities of the key lesion area in the ultrasonic image are effectively improved, so that the segmentation precision and robustness are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an ultrasound image segmentation method and system based on difference perception and context enhancement. Background Art

[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.

[0003] As a non-invasive, real-time, and low-cost imaging technology, medical ultrasound imaging plays an important role in clinical diagnosis and treatment, especially in the screening and follow-up of diseases such as lymph nodes, thyroid, and breast. Accurate segmentation of lesion areas in ultrasound images is critical for subsequent lesion detection, benign and malignant assessment, and treatment planning. However, ultrasound images are limited by the imaging mechanism and often have problems such as complex grayscale changes, blurred tissue boundaries, and severe artifact interference, which pose great challenges to manual interpretation and automatic segmentation. In recent years, deep learning methods have made significant progress in the field of medical image segmentation, especially encoder-decoder structures represented by UNet, which have been widely used in ultrasound image analysis tasks.

[0004] However, existing methods generally have the following shortcomings: (1) Direct jump connections between encoding features and decoding features easily lead to insufficient extraction of fine-grained variation features, limiting the ability to capture local details of the lesion; (2) Traditional convolution operations are limited in spatial perception range and cannot fully model the contextual relationship of the lesion area, resulting in blurred boundary positioning; (3) Under the complex background of ultrasound, existing models do not adequately distinguish between foreground and background areas and are easily disturbed, affecting segmentation accuracy and stability. Summary of the Invention

[0005] In order to overcome the problems of insufficient fine-grained feature extraction, limited context perception, unclear foreground and background distinction, and blurred boundaries in existing medical ultrasound image segmentation, the present invention provides an ultrasound image segmentation method and system based on difference perception and context enhancement, which effectively improves the modeling and segmentation capabilities of key lesion areas in ultrasound images, thereby improving segmentation accuracy and robustness.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides an ultrasound image segmentation method based on difference perception and context enhancement.

[0008] An ultrasound image segmentation method based on difference perception and context enhancement includes the following steps:

[0009] Acquiring and preprocessing the ultrasound image to be segmented;

[0010] The pre-processed ultrasound image is continuously downsampled using a step-by-step downsampling method, and the deepest downsampled features, foreground features, and background features are combined to generate a contrast attention map.

[0011] Taking the contrast attention map as input, the spatial resolution is restored by step-by-step upsampling. After each level of upsampling, the features of the corresponding downsampled layer are introduced into the decoder through jump connections. During each level of upsampling, the fine-grained differences between the downsampled features and the upsampled features are extracted. The local context associations in the horizontal and vertical directions are modeled respectively through directional separable convolution, and the segmentation result of the ultrasound image is finally obtained.

[0012] As a further limitation of the first aspect of the present invention, the background features are preprocessed ultrasound images, and the foreground features are downsampled output results of the penultimate layer;

[0013] Perform convolution, batch normalization, and activation function processing on the deepest downsampled features, foreground features, and background features respectively to generate corresponding feature representations. Calculate the difference between the deepest downsampled feature representation and the foreground feature representation and background feature representation to construct a contrast feature tensor.

[0014] The contrast feature tensor generates attention weights after convolution, batch normalization and activation function. The deepest downsampled feature representation is multiplied by the attention weights and residual connection is performed to form enhanced features. The enhanced features are further processed by convolution, batch normalization and activation function to obtain the contrast attention map.

[0015] As a further limitation of the first aspect of the present invention, after each level of upsampling, the features of the corresponding downsampled layer are introduced into the decoder through a skip connection, comprising:

[0016] It includes N downsampling processes and N upsampling processes, the N-1th downsampling process is jump-connected to the 1st upsampling process, the N-2th downsampling process is jump-connected to the 2nd upsampling process, and the preprocessed ultrasound image to be segmented is jump-connected to the Nth upsampling process.

[0017] As a further limitation of the first aspect of the present invention, extracting fine-grained differences between downsampled features and upsampled features includes:

[0018] Get the downsampled features of the skip connection and the upsampled features of the current level;

[0019] Calculate the difference between the upsampled features and the downsampled features to obtain the change feature map;

[0020] Input the change feature map into the attention module to generate a spatial weight map;

[0021] According to the spatial weight map and the up-sampled features, the first fusion feature is obtained.

[0022] As a further limitation of the first aspect of the present invention, fine-grained enhancement is performed on the basis of the first fused features to obtain enhanced features, including:

[0023]

[0024] Among them, F SRM is the enhanced feature, F o is the first fusion feature, μ(F o ) represents the spatial dimension mean of the feature map, N = H × W-1, ∈ is a small constant, and σ(·) is the Sigmoid activation.

[0025] As a further limitation of the first aspect of the present invention, modeling local context associations in the horizontal direction and the vertical direction respectively by directionally separable convolution includes:

[0026] The contrastive attention map undergoes an average pooling operation, performs feature projection through convolution, applies batch normalization and activation function, and obtains local context features;

[0027] The local context features are convolved in different directions to model different spatial relationships and generate two direction-aware features;

[0028] The two directional perception features are element-wise added to obtain a second fused feature. The second fused feature is fed into convolution, batch normalization, and activation functions for further encoding. An attention weight map is generated through a Sigmoid function. The attention weight map is multiplied with the comparison attention map to obtain the final output feature.

[0029] The final output feature is the superposition result of the enhanced feature, which is used as the output of the current level upsampling process.

[0030] In a second aspect, the present invention provides an ultrasound image segmentation system based on difference perception and context enhancement.

[0031] An ultrasound image segmentation system based on difference perception and context enhancement includes the following processes:

[0032] The preprocessing unit is configured to: acquire and preprocess the ultrasound image to be segmented;

[0033] The encoding processing unit is configured to: continuously downsample the preprocessed ultrasound image using a step-by-step downsampling method, and generate a contrast attention map by combining the deepest downsampled features, foreground features, and background features;

[0034] The decoding processing unit is configured to: take the contrast attention map as input, restore the spatial resolution by step-by-step upsampling, introduce the features of the corresponding down-sampled layer into the decoder through jump connections after each level of upsampling, extract the fine-grained differences between the down-sampled features and the up-sampled features during each level of upsampling, and model the local context associations in the horizontal and vertical directions respectively through directional separable convolution, and finally obtain the segmentation result of the ultrasound image.

[0035] In a third aspect, the present invention provides a computer device comprising: a processor and a computer-readable storage medium;

[0036] a processor adapted to execute a computer program;

[0037] A computer-readable storage medium having a computer program stored therein, wherein when the computer program is executed by the processor, the ultrasound image segmentation method based on difference perception and context enhancement as described in the first aspect of the present invention is implemented.

[0038] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor and executing the ultrasound image segmentation method based on difference perception and context enhancement as described in the first aspect of the present invention.

[0039] In a fifth aspect, the present invention provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the ultrasound image segmentation method based on difference perception and context enhancement as described in the first aspect of the present invention.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] 1. The present invention innovatively proposes an ultrasound image segmentation method based on difference perception and context enhancement. The features of the corresponding downsampling layer are introduced into the decoder through jump connections. In each level of upsampling, the fine-grained differences between the downsampling features and the upsampling features are extracted. The local context associations in the horizontal and vertical directions are modeled respectively through directional separable convolution. This method can effectively improve the fine-grained feature extraction and boundary restoration capabilities of the lesion area in medical ultrasound images, and at the same time integrate multi-scale context information to enhance the distinction between foreground and background areas.

[0042] 2. The present invention innovatively introduces difference refinement, direction-aware context modeling and contrast-driven feature enhancement strategies. The model demonstrates excellent segmentation accuracy and boundary clarity in the segmentation tasks of ultrasound images of different organs (including lymph nodes, thyroid, and breast), and has good robustness and broad clinical application prospects.

[0043] 3. The present invention calculates the difference between the deepest downsampled feature representation and the foreground feature representation and background feature representation, and constructs a contrast feature tensor, which can clearly highlight the differences between different features. This difference information helps the model better understand the relationship between the target object and the surrounding environment, as well as the uniqueness of the target object in different levels of features.

[0044] 4. The present invention obtains a change feature map based on the difference between the upsampled features and the downsampled features, inputs the change feature map into the attention module, generates a spatial weight map, and obtains a first fusion feature based on the spatial weight map and the upsampled features. By fusing the spatial weight map with the upsampled features, the upsampled features can be weighted according to the importance and degree of change of the features. The weighted fusion method can make full use of the information provided by the spatial weight map, optimize the effect of feature fusion, and make the fused first fusion feature more accurately reflect the key features and spatial distribution information of the target object.

[0045] 5. Based on the first fusion feature, the present invention performs fine-grained enhancement to obtain enhanced features. This enhancement method can mine fine-grained information in the feature map. In tasks such as image processing, fine-grained information often corresponds to detailed features such as texture and edges of the target object. By enhancing this fine-grained information, the model can more accurately identify and distinguish different target objects and improve its ability to capture the details of the target objects.

[0046] 6. The present invention models the local context associations in the horizontal and vertical directions respectively through directionally separable convolution, which can accurately capture the feature information in different directions in the image. By modeling the features of these directions respectively, the feature discrimination can be increased, so that the model can better distinguish different target objects and scenes. The two directional perception features are added element by element to obtain the second fusion feature, thereby realizing the fusion of multi-directional information. This fusion method enables the model to comprehensively consider the feature information in the horizontal and vertical directions, and improves the model's ability to represent the features of the target objects in different directions.

[0047] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0049] Figure 1 A schematic diagram illustrating the principle of an ultrasound image segmentation method based on difference perception and context enhancement provided in Example 1 of the present invention;

[0050] Figure 2 This is a schematic diagram of the structure of the difference refinement module provided in Example 1 of the present invention;

[0051] Figure 3 A schematic diagram of the structure of the direction-aware context module provided in Example 1 of the present invention;

[0052] Figure 4 A schematic structural diagram of a comparative driving feature generation module provided in Example 1 of the present invention;

[0053] Figure 5 A schematic diagram of an ultrasound image segmentation system based on difference perception and context enhancement provided in Example 2 of the present invention;

[0054] Figure 6 A schematic diagram of a computer device provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0055] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0056] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0057] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.

[0058] Example 1:

[0059] This implementation proposes an ultrasound image segmentation method based on difference perception and context enhancement, based on the improved UNet structure, such as Figure 1 As shown in the figure, by introducing the Difference Refinement Module (DRM), Directional Context Attention Module (DCA) and Contrastive Context Module (CCM), the modeling and segmentation capabilities of key lesion areas in ultrasound images are effectively improved, thereby improving segmentation accuracy and robustness.

[0060] Specifically, the process includes the following:

[0061] S1: Data preprocessing.

[0062] The collected ultrasound images were uniformly resized, cropped to 224*224 pixels, and normalized. Subsequently, the dataset was divided into training, validation, and test sets using a fixed ratio of 8:1:1 to ensure the scientific nature of training and evaluation.

[0063] S2: Encoder feature extraction.

[0064] A step-by-step downsampling approach is adopted to extract feature representations of different scales through four consecutive downsampling modules (downsampling 1, downsampling 2, downsampling 3 and downsampling 4). Each level consists of a maximum pooling and double convolution structure, which gradually compresses the spatial size and expands the number of channels to extract multi-scale feature representations. Among them, with each downsampling level, the feature map size decreases by a factor of 2 and the number of channels increases accordingly.

[0065] S3: Contrastive Context Module (CCM).

[0066] After the output of the deepest encoder, the CCM module is introduced to fuse the foreground features (the downsampling output results of the penultimate layer) with the background features (the preprocessed ultrasound image) to construct a comparative relationship between the foreground features and the background features, generate a comparative attention map, and enhance the ability to distinguish between the foreground and background areas in the deep features, thereby improving the overall semantic segmentation performance.

[0067] S4: Decoder feature recovery.

[0068] The upsampling modules (upsampling 1, upsampling 2, upsampling 3 and upsampling 4) are used to gradually restore the spatial resolution. After each level of upsampling, the features of the corresponding layer of the encoder are introduced into the decoder through skip connections to retain key information details.

[0069] S5: Difference Refinement Module (DRM) and Directional Context Attention (DCA).

[0070] To further improve the information utilization efficiency of skip connections, at each level of the decoder, the DRM module first extracts fine-grained differences between the encoded and upsampled features, highlighting lesion boundaries and detailed areas. Subsequently, the DCA module uses directionally separable convolutions to model local contextual dependencies in the horizontal and vertical directions, further enhancing spatial perception. These processed features are fused with the upsampled features and fed into the next decoding stage.

[0071] S6: Spatial Response Modulation (SRM).

[0072] Within the local module, the SRM mechanism is introduced to perform fine-grained dynamic modulation of the feature response at each location, enhance local important features, suppress background noise, and further improve the feature expression capability of the lesion area.

[0073] S7: Segmentation mask output.

[0074] After the final upsampling and convolution processing, a segmentation mask with the same size as the input image is generated, and the lesion area and background area are marked. During the training process, the output of the main branch and the auxiliary branch are combined, and weighted cross entropy and Dice loss are used for joint optimization to further improve the segmentation accuracy and boundary detail restoration ability.

[0075] In step S3 of this implementation, the CCM module encodes the foreground and background features respectively through dual-branch convolution, generates an attention map based on the feature differences, and dynamically adjusts the response of the main feature map.

[0076] More specifically, Figure 2 As shown in the figure, the contrast-driven feature generation module (ContrastiveContext Module, CCM) proposed in the present invention aims to enhance the foreground discriminability in deep coding features and improve the segmentation accuracy of lesion areas in medical ultrasound images by contrast modeling between foreground features and background features.

[0077] The input includes the current layer encoder features (i.e. the result of the deepest downsampling 4), foreground feature F fg (Result of shallow encoder downsampling 3) and background features F bg (preprocessed input features), B is batch size, C is the number of channels, H and W are the height and width of the feature map. in 、F fg 、F bg Perform convolution, BN (batch normalization) and activation function processing to generate the corresponding feature representation F in ′、F fg ′、F bg ′, calculate the input feature representation F in ′ and foreground feature representation F fg ′, background feature representation F bg ', construct the contrast feature tensor F diff :

[0078] F diff =(F in ′-F fg ′)+(F in ′-F bg′) (1);

[0079] F diff After convolution, BN and activation function, attention weight A is generated and input feature F is in ′ is multiplied by A and the residual connection is performed to form the enhanced feature F enhance ,Finally, the enhanced features are further integrated through convolution, BN and ,activation functions, and the final fused features are output as the ,contrast attention map for subsequent segmentation tasks.

[0080] In steps S3 and S4 of this implementation, the DRM module uses dual-branch difference extraction and SIMAM fine-grained difference enhancement to highlight the subtle changes between the encoding features and the decoding features in the jump connection; the SRM module generates an independent weight factor for each position of the input feature map through local mean difference calculation, modulates the local salient area in a fine-grained manner, and improves the feature discriminability in complex backgrounds; the DCA module uses a combination of horizontal convolution and vertical convolution to capture long-range local dependencies and improve spatial modeling capabilities.

[0081] More specifically, Figure 3 As shown in Figure 3, the DRM module is designed to effectively extract fine-grained difference information between the encoded features and the upsampled features, highlight the boundary features of the lesion area, and further refine the local salient area through spatial response modulation.

[0082] The specific implementation process is as follows: the encoder output feature map and decoder upsampled feature maps Perform input processing (wherein, the input feature map of the DRM in upsampling 1 is the output feature map of downsampling 3 and the output feature map of CCM; the input feature map of the DRM in upsampling 2 is the output feature map of downsampling 2 and the output feature map of upsampling 1, and so on); where B represents the batch size, C represents the number of channels, H and W represent the height and width of the feature map, and the difference between the downsampled features and the upsampled features is calculated to obtain the changed feature map D:

[0083] D=F d -AvgPool(F d ) (2);

[0084] Among them, AvgPool(·) represents the average pooling operation, which inputs the change feature map D into a micro attention module containing convolution, BN and activation functions to generate a spatial weight map W:

[0085] W = σ(BN(Conv(D))) (3);

[0086] Where σ(·) represents the Sigmoid function, ensuring that the weight range is (0,1), and the spatial weight map W is applied to the original decoded features F d , and enhance the original feature expression through the residual connection mechanism to obtain the fused feature Fo (i.e. the first fused feature):

[0087] F o =W·F d +F d (4);

[0088] Based on the fused feature Fo, the spatial response modulation module (SRM) is further introduced to perform fine-grained enhancement. The specific calculation process is as follows:

[0089]

[0090] Where μ(Fo) is the spatial dimension mean of the feature map, N = H × W-1, ∈ is a small constant, and σ(·) is the Sigmoid activation. The SRM module further enhances the local difference-significant regions and suppresses redundant background information.

[0091] like Figure 4 As shown in the figure, the DCA module is designed to effectively capture the long-range dependencies of local spatial features through directional separable convolution and enhance the spatial perception of lesion areas in medical ultrasound images. First, the input feature map (The input feature map of the DCA module for upsampling 1 is the output feature map of CCM, the input feature map of the DCA module for upsampling 2 is the output feature map of upsampling 1, and so on.) B represents the batch size, C represents the number of channels, and H and W represent the height and width of the feature map. The input feature map first undergoes an average pooling operation, followed by feature projection through convolution, and applying BN and activation functions to obtain the local context feature Fctx:

[0092] F CTX =SiLU(BN(Conv(AvgPool(F in ))) (6);

[0093] The local context feature Fctx is convolved in different directions to model different spatial relationships and generate two directional perception features. The two directional features are summed element by element to obtain the fusion feature F fusion After the fusion features are fed into convolution, BN and activation functions for further encoding, the attention weight map is generated through the Sigmoid function. And with the original input feature F in Multiplying, the final output is:

[0094] F out =A×Fin (7);

[0095] F SEM and F out After superposition, they are used as the upsampled output of the current level.

[0096] Through innovative overall network architecture and improved local fine-grained feature modeling, this paper effectively improves the segmentation accuracy and boundary clarity of lesion regions in medical ultrasound images, enhancing the model's discriminative ability and robustness in complex backgrounds. Experimental verification demonstrates that the proposed method achieves excellent performance in multiple ultrasound image segmentation tasks, demonstrating its practical value and broad clinical application prospects.

[0097] Example 2:

[0098] like Figure 5 As shown, this implementation provides an ultrasound image segmentation system based on difference perception and context enhancement, including the following processes:

[0099] The preprocessing unit is configured to: acquire and preprocess the ultrasound image to be segmented;

[0100] The encoding processing unit is configured to: continuously downsample the preprocessed ultrasound image using a step-by-step downsampling method, and generate a contrast attention map by combining the deepest downsampled features, foreground features, and background features;

[0101] The decoding processing unit is configured to: take the contrast attention map as input, restore the spatial resolution by step-by-step upsampling, introduce the features of the corresponding downsampled layer into the decoder through jump connections after each level of upsampling, extract the fine-grained differences between the downsampled features and the upsampled features during each level of upsampling, and model the local context associations in the horizontal and vertical directions respectively through directional separable convolution, and finally obtain the segmentation result of the ultrasound image

[0102] The specific working process of each of the above units is described in Example 1 and will not be repeated here.

[0103] It is understandable that each of the above-mentioned units can be separately or entirely combined into one or several other units to constitute, or a certain unit (or units) thereof can also be further split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of a unit can also be realized by multiple units, or the function of multiple units can be realized by one unit. In other embodiments of the present application, the system can also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0104] According to another embodiment of the present application, the system described in this embodiment can be constructed and the method of Example 1 of the present application can be implemented by running a computer program (including program code) capable of executing the steps involved in the corresponding method described in Example 1 on a general-purpose computing device such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computing device through the computer-readable recording medium and run therein.

[0105] Example 3:

[0106] like Figure 6 As shown, this implementation provides an electronic device, which includes a processor 1001, a communication interface 1002, and a computer-readable storage medium 1003. The processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 may be connected via a bus or other means.

[0107] Among them, the communication interface 1002 is used to receive and send data, the computer-readable storage medium 1003 can be stored in the memory of the electronic device, the computer-readable storage medium 1003 is used to store a computer program, the computer program includes program instructions, and the processor 1001 is used to execute the program instructions stored in the computer-readable storage medium 1003.

[0108] The processor 1001 (or CPU (Central Processing Unit)) is the computing core and control core of the electronic device, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to implement corresponding method processes or corresponding functions.

[0109] The processor 1001 is configured to execute the following process:

[0110] Acquiring and preprocessing the ultrasound image to be segmented;

[0111] The pre-processed ultrasound image is continuously downsampled using a step-by-step downsampling method, and the deepest downsampled features, foreground features, and background features are combined to generate a contrast attention map.

[0112] Taking the contrast attention map as input, the spatial resolution is restored by step-by-step upsampling. After each level of upsampling, the features of the corresponding downsampled layer are introduced into the decoder through jump connections. During each level of upsampling, the fine-grained differences between the downsampled features and the upsampled features are extracted. The local context associations in the horizontal and vertical directions are modeled respectively through directional separable convolution, and the segmentation result of the ultrasound image is finally obtained.

[0113] The specific working process is described in Example 1 and will not be repeated here.

[0114] Example 4:

[0115] This implementation provides a computer-readable storage medium (Memory). This computer-readable storage medium is a memory device in an electronic device that is used to store programs and data. It is understood that the computer-readable storage medium herein can include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The computer-readable storage medium provides storage space that stores the processing system of the electronic device.

[0116] Furthermore, the storage space also stores one or more instructions suitable for being loaded and executed by the processor. These instructions may be one or more computer programs (including program code). It should be noted that the computer-readable storage medium herein may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage; optionally, it may be at least one computer-readable storage medium located remotely from the aforementioned processor.

[0117] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor loads and executes the one or more instructions stored in the computer-readable storage medium to implement the following process:

[0118] Acquiring and preprocessing the ultrasound image to be segmented;

[0119] The pre-processed ultrasound image is continuously downsampled using a step-by-step downsampling method, and the deepest downsampled features, foreground features, and background features are combined to generate a contrast attention map.

[0120] Taking the contrast attention map as input, the spatial resolution is restored by step-by-step upsampling. After each level of upsampling, the features of the corresponding downsampled layer are introduced into the decoder through jump connections. During each level of upsampling, the fine-grained differences between the downsampled features and the upsampled features are extracted. The local context associations in the horizontal and vertical directions are modeled respectively through directional separable convolution, and the segmentation result of the ultrasound image is finally obtained.

[0121] The specific working process is described in Example 1 and will not be repeated here.

[0122] Example 5:

[0123] This implementation provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the following process:

[0124] Acquiring and preprocessing the ultrasound image to be segmented;

[0125] The pre-processed ultrasound image is continuously downsampled using a step-by-step downsampling method, and the deepest downsampled features, foreground features, and background features are combined to generate a contrast attention map.

[0126] Taking the contrast attention map as input, the spatial resolution is restored by step-by-step upsampling. After each level of upsampling, the features of the corresponding downsampled layer are introduced into the decoder through jump connections. During each level of upsampling, the fine-grained differences between the downsampled features and the upsampled features are extracted. The local context associations in the horizontal and vertical directions are modeled respectively through directional separable convolution, and the segmentation result of the ultrasound image is finally obtained.

[0127] The specific working process is described in Example 1 and will not be repeated here.

[0128] Those skilled in the art will appreciate that the units and algorithmic steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0129] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0130] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. An ultrasound image segmentation method based on difference perception and context enhancement, characterized in that: The following processes are included: Acquiring and preprocessing the ultrasound image to be segmented; The pre-processed ultrasound image is continuously downsampled using a step-by-step downsampling method, and the deepest downsampled features, foreground features, and background features are combined to generate a contrast attention map. Taking the contrast attention map as input, the spatial resolution is restored by step-by-step upsampling. After each level of upsampling, the features of the corresponding downsampled layer are introduced into the decoder through jump connections. During each level of upsampling, the fine-grained differences between the downsampled features and the upsampled features are extracted. The local context associations in the horizontal and vertical directions are modeled respectively through directional separable convolution, and the segmentation result of the ultrasound image is finally obtained.

2. The ultrasound image segmentation method based on difference perception and context enhancement according to claim 1, wherein: The background feature is the pre-processed ultrasound image, and the foreground feature is the down-sampling output result of the penultimate layer. Perform convolution, batch normalization, and activation function processing on the deepest downsampled features, foreground features, and background features respectively to generate corresponding feature representations. Calculate the difference between the deepest downsampled feature representation and the foreground feature representation and background feature representation to construct a contrast feature tensor. The contrast feature tensor generates attention weights after convolution, batch normalization and activation function. The deepest downsampled feature representation is multiplied by the attention weights and residual connection is performed to form enhanced features. The enhanced features are further processed by convolution, batch normalization and activation function to obtain the contrast attention map.

3. The ultrasound image segmentation method based on difference perception and context enhancement according to claim 1, wherein: After each level of upsampling, the features of the corresponding downsampled layer are introduced into the decoder through skip connections, including: It includes N downsampling processes and N upsampling processes, the N-1th downsampling process is jump-connected to the 1st upsampling process, the N-2th downsampling process is jump-connected to the 2nd upsampling process, and the preprocessed ultrasound image to be segmented is jump-connected to the Nth upsampling process.

4. The ultrasound image segmentation method based on difference perception and context enhancement according to claim 1, wherein: Extract fine-grained differences between downsampled and upsampled features, including: Get the downsampled features of the skip connection and the upsampled features of the current level; Calculate the difference between the upsampled features and the downsampled features to obtain the change feature map; Input the change feature map into the attention module to generate a spatial weight map; According to the spatial weight map and the up-sampled features, the first fusion feature is obtained.

5. The ultrasound image segmentation method based on difference perception and context enhancement according to claim 4, characterized in that: Based on the first fusion feature, fine-grained enhancement is performed to obtain enhanced features, including: Among them, F SRM is the enhanced feature, F o is the first fusion feature, μ(F o ) represents the spatial dimension mean of the feature map, N = H × W-1, ∈ is a small constant, and σ(·) is the Sigmoid activation.

6. The ultrasound image segmentation method based on difference perception and context enhancement according to claim 5, characterized in that: The local context associations in the horizontal and vertical directions are modeled separately by directional separable convolution, including: The input feature map undergoes an average pooling operation, feature projection is performed through convolution, batch normalization and activation function are applied to obtain local context features; The local context features are convolved in different directions to model different spatial relationships and generate two direction-aware features; The two directional perception features are element-wise added to obtain a second fused feature. The second fused feature is fed into convolution, batch normalization, and activation functions for further encoding. An attention weight map is generated through a Sigmoid function. The attention weight map is multiplied with the input feature map to obtain the final output feature. The final output feature is the superposition result of the enhanced feature, which is used as the output of the current level upsampling process.

7. An ultrasound image segmentation system based on difference perception and context enhancement, characterized in that: The following processes are included: The preprocessing unit is configured to: acquire and preprocess the ultrasound image to be segmented; The encoding processing unit is configured to: continuously downsample the preprocessed ultrasound image using a step-by-step downsampling method, and generate a contrast attention map by combining the deepest downsampled features, foreground features, and background features; The decoding processing unit is configured to: take the contrast attention map as input, restore the spatial resolution by step-by-step upsampling, introduce the features of the corresponding down-sampled layer into the decoder through jump connections after each level of upsampling, extract the fine-grained differences between the down-sampled features and the up-sampled features during each level of upsampling, and model the local context associations in the horizontal and vertical directions respectively through directional separable convolution, and finally obtain the segmentation result of the ultrasound image.

8. A computer device, characterized in that: include: a processor and a computer-readable storage medium; a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by the processor, implements the ultrasound image segmentation method based on difference perception and context enhancement according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the ultrasound image segmentation method based on difference perception and context enhancement according to any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the ultrasound image segmentation method based on difference perception and context enhancement according to any one of claims 1 to 6.