Breast ultrasound image segmentation method based on category embedding separation contrastive learning network
Through category embedding of separation and contrast learning network, the problem of inconsistency between fuzzy boundaries and tumor morphology in breast ultrasound image segmentation is solved. The network is optimized by using potential representation and contrast learning loss to achieve higher precision breast tumor segmentation.
Patent Information
- Application Number
- CN202510877275.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-06-27
AI Technical Summary
The existing breast ultrasound image segmentation method is difficult to accurately segment when dealing with fuzzy lesion boundaries and different tumor morphology. Deep learning algorithms are difficult to effectively distinguish various components when the texture similarity between the tissue and the surrounding microenvironment and the differences between the patient's tissues.
A category embedding separate contrast learning network is adopted to optimize the network through potential representation calculations of weak transformation and strong transformation images, combining KL divergence alignment and contrast learning loss, to improve the overall representation ability of feature maps and the differences between different organizations and surrounding microenvironments.
It improves the accuracy and consistency of breast ultrasound image segmentation, improves the segmentation ability of images of different patients, and achieves a more comprehensive and distinctive feature representation.
Smart Images

Figure CN120374990B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to a breast ultrasound image segmentation method based on a category embedding separation contrast learning network. Background Art
[0002] Breast ultrasound imaging is a radiation-free, real-time, and cost-effective diagnostic tool. Consequently, it has been rapidly accepted by medical professionals and patients alike and is increasingly being used for breast tumor detection. Segmenting tumors from breast ultrasound images is a critical step in helping physicians accurately locate and describe tumor regions. However, breast tumor ultrasound images inherently present uncontrollable issues, such as blurred lesion boundaries and varying tumor morphology. These challenges make it difficult for physicians to accurately segment breast tumors manually. To improve diagnostic objectivity and accuracy, creating computer-aided diagnosis systems to assist physicians in segmenting breast ultrasound images is an urgent research need.
[0003] Traditional methods, such as threshold segmentation, region growing, and edge detection, which rely on manually designed features and rules, can typically only process images where there are significant differences between the target and background. Consequently, these methods have limitations, such as high requirements for image quality and parameter sensitivity. With the advancement of machine learning toward deep learning, a growing number of researchers are turning to deep learning methods to improve segmentation accuracy. Deep learning convolutional neural networks (CNNs) have been widely used in medical image segmentation because they offer significant advantages over traditional segmentation methods. Driven by recent developments, CNNs have been repeatedly applied to breast ultrasound image segmentation. However, the high similarity in texture and morphology between tissue and the surrounding microenvironment, as well as the large differences in tissue between different patients, make it extremely challenging for deep learning algorithms to better distinguish each component in breast ultrasound images. Summary of the Invention
[0004] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide a breast ultrasound image segmentation method based on a category embedding separation contrast learning network, which solves the problems in the existing technology.
[0005] The purpose of the present invention can be achieved through the following technical solutions:
[0006] The method for breast ultrasound image segmentation based on a category embedding separation contrastive learning network includes the following steps:
[0007] Construct an ultrasound image training set, which includes ultrasound images and their corresponding segmentation labels;
[0008] The ultrasound image training set is input into the category embedding separation contrastive learning network for training. The ultrasound images are weakly transformed and strongly transformed respectively, and their respective latent representations are calculated; the average latent representation and the cumulative average latent representation of a batch of images are aligned using KL divergence, and the total loss is formed together with the weak transformation image contrastive learning loss, strong transformation image contrastive learning loss, strong transformation image to weak transformation image contrastive learning loss, weak transformation image to strong transformation image contrastive learning loss, and segmentation loss; and the total loss is used to optimize the category embedding separation contrastive learning network;
[0009] Breast ultrasound image segmentation using an optimized class embedding separable contrastive learning network.
[0010] Furthermore, the formula for calculating the potential representation is:
[0011]
[0012]
[0013]
[0014] in, and represent weakly transformed images and strongly transformed images respectively, E represents the feature extractor, and Represent weak transformation image features and strong transformation image features respectively, Represents the number of channels, height and width of the feature respectively; Represents a weakly transformed image No. latent representation of a class; express No. pixel features; express No. pixel features; Represents a strongly transformed image No. latent representation of a class; For indexing features 、 All pixels; Representation Label No. Pixel class labels, Represents a weakly transformed image Corresponding labels; express No. non-zero pixels, express The number of non-zero pixels in the middle; Representation Label No. Pixel class labels, Represents a strongly transformed image Corresponding labels; express No. non-zero pixels, express The number of non-zero pixels in the middle; express Middle The pixel at the position corresponding to the class label is 1, and the rest of the pixels are 0; express Middle The pixel at the position corresponding to the class label is 1, and the rest of the pixels are 0.
[0015] Furthermore, the average potential representation for:
[0016]
[0017] in, Indicates the number of categories for segmentation; represents the first Class average latent representation, represents the first class-averaged latent representation; Indicates the number of images in a batch of images; represents the softmax function; represents KL divergence;
[0018] The cumulative average potential for:
[0019]
[0020]
[0021]
[0022] in, represents a weighting coefficient between 0 and 1; Indicates the Iterative weak transformation of the image class cumulative average latent representation; Indicates the Iterative weak transformation of the image class cumulative average latent representation; Indicates the Iterative strong transformation of image class cumulative average latent representation; Indicates the Iterative strong transformation of image Class cumulative average latent representation.
[0023] Furthermore, the weakly transformed image contrast learning loss for:
[0024]
[0025]
[0026] in, represents the exponential function; represents the contrast coefficient; Indicates the Cumulative covariance of the latent representation of the iteratively weakly transformed image; Indicates the Cumulative covariance of the latent representation of iteratively strongly transformed images;
[0027] The robust image contrastive learning loss for:
[0028]
[0029]
[0030] The strong-to-weak-transformation image contrastive learning loss for:
[0031]
[0032]
[0033] The weakly transformed image to strongly transformed image contrastive learning loss for:
[0034]
[0035] .
[0036] Furthermore, the calculation formula of the cumulative covariance is:
[0037]
[0038]
[0039]
[0040] in, Indicates the Cumulative covariance of the latent representation of the iteratively weakly transformed image; Indicates the Cumulative covariance of the latent representation of iteratively strongly transformed images; Represents matrix transpose; represents the first covariance of class latent representations; represents the first Covariance of class latent representations.
[0041] Furthermore, the segmentation loss The calculation process is:
[0042] 1) Merge the features extracted by the feature extractor E by adding the accumulated average potential representation:
[0043]
[0044] in, represents the combined features of the weakly transformed image, express No. pixel features; express No. pixel features; represents the combined features of the strongly transformed image, express No. pixel features; express No. pixel features;
[0045] 2) The merged features and Send to decoder separately , output the segmentation result of the weakly transformed image Segmentation results with strong transformation images , and calculate the segmentation loss :
[0046]
[0047] in, Indicates the number of pixels in the image, express No. pixels, express No. Class pixels, express No. pixels, express No. Class pixels.
[0048] Furthermore, the total loss of the class embedding separation contrastive learning network is for:
[0049] .
[0050] The breast ultrasound image segmentation system based on the category embedding separation contrastive learning network includes:
[0051] Training set construction module: constructs an ultrasound image training set, which includes ultrasound images and their corresponding segmentation labels;
[0052] Network training module: The ultrasound image training set is input into the category embedding separation contrastive learning network for training. The ultrasound images are weakly transformed and strongly transformed respectively, and their respective latent representations are calculated. The average latent representation and the cumulative average latent representation of a batch of images are aligned using KL divergence, and the total loss is combined with the weak transformation image contrastive learning loss, strong transformation image contrastive learning loss, strong transformation image to weak transformation image contrastive learning loss, weak transformation image to strong transformation image contrastive learning loss, and segmentation loss. The category embedding separation contrastive learning network is optimized using the total loss.
[0053] And, image segmentation module: breast ultrasound images are segmented using the optimized class embedding separation contrastive learning network.
[0054] A computer storage medium stores a readable program, which, when executed by a processor, can execute the above-mentioned breast ultrasound image segmentation method based on a category embedding separation contrast learning network.
[0055] An electronic device comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;
[0056] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned breast ultrasound image segmentation method based on the category embedding separation contrast learning network.
[0057] Beneficial effects of the present invention:
[0058] 1. The present invention provides a breast ultrasound image segmentation method based on a category embedding separation contrastive learning network, which can obtain a unified representation in the latent space, which helps to improve the overall representation ability of the feature map; and utilizes the differences between the category latent representations to refine the learned features, thereby obtaining a more comprehensive and differentiated representation.
[0059] 2. The present invention separates different categories in ultrasound images from the surrounding microenvironment through category embedding separation, thereby improving the difference and separability between different tissues and the surrounding microenvironment. By using KL divergence and comparative learning loss on the average latent representation and cumulative average latent representation of weakly transformed images and strongly transformed images, the network's ability to segment images of different patients is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0061] Figure 1 It is a flow chart of the image segmentation method of the present invention;
[0062] Figure 2 Schematic diagram of the network structure of category embedding separation contrast learning of the present invention;
[0063] Figure 3 This is a comparison chart of the segmentation results of the image segmentation method of the present invention and the existing method. DETAILED DESCRIPTION
[0064] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0065] Example 1
[0066] In this embodiment, a category embedding separation contrastive learning network is introduced, whose structure is as follows Figure 2 As shown, it includes: weak transformation ot, strong transformation at, feature extractor E, category embedding separation contrast learning CC, and decoder D;
[0067] Among them, the weak transformation ot, for each ultrasound image and its corresponding segmentation label ( ,N represents the number of ultrasound images in the training set) and performs weak transformation (including random selection of image rotation, scaling, translation, inversion, etc.) to obtain the transformed weakly transformed image. and its corresponding tags ;
[0068] Strong transformation at, for each ultrasound image and its corresponding segmentation label , and randomly select another ultrasound image and its corresponding segmentation label ( ), perform strong transformation (image mask operation) to obtain the transformed strong transformation image and its corresponding tags ;
[0069] Among them, the feature extractor E is respectively extracted from the weakly transformed image With strong transformation image Extract the corresponding weak transformation image features Strong transformation image features ,in Represents the number of channels, height and width of the feature respectively;
[0070] Among them, the category embedding separation contrast learning CC, first, calculate the weak transformation image No. Latent representation of a class , represents a strong transformation image No. Latent representation of a class ; Then, calculate the first Class average latent representation , a batch of strongly transformed images Class average latent representation ; Again, update the Iterative weak transformation of the image Class cumulative average latent representation , No. Iterative strong transformation of image Class cumulative average latent representation ;
[0071] Decoder D, first, the features extracted by feature extractor E are combined with the cumulative average potential representation; then, the combined features of the weakly transformed image are combined Feed into decoder Output the segmentation result of the weakly transformed image ; and strongly transform the merged features of the image Feed into decoder Output the segmentation result of the transformed image .
[0072] Example 2
[0073] Based on the category embedding separation contrast learning network mentioned in Example 1, this embodiment proposes a breast ultrasound image segmentation method, such as Figure 1 As shown, the following steps are included:
[0074] S1, constructs an ultrasound image training set, which contains ultrasound images and their corresponding segmentation labels, and serves as the input of the category embedding separation contrastive learning network;
[0075] Ultrasound image training set, containing ultrasound images and its corresponding segmentation label , , N Represents the number of ultrasound images in the training set.
[0076] S2: Input the ultrasound image training set into the category embedding separation contrastive learning network for training, wherein the ultrasound images are weakly transformed and strongly transformed respectively and their respective latent representations are calculated; the average latent representation and the cumulative average latent representation of a batch of images are aligned using KL divergence, and the total loss is formed together with the weak transformation image contrastive learning loss, strong transformation image contrastive learning loss, strong transformation image to weak transformation image contrastive learning loss, weak transformation image to strong transformation image contrastive learning loss and segmentation loss; and the total loss is used to optimize the category embedding separation contrastive learning network;
[0077] The steps for training a class embedding separation contrastive learning network include:
[0078] S21, for each ultrasound image and its corresponding segmentation label Perform weak transformation (including random selection of image rotation, scaling, translation, inversion, etc.) to obtain the transformed weak transformation image and its corresponding tags ; At the same time, for each ultrasound image and its corresponding segmentation label Perform a strong transformation (image mask operation) to obtain the transformed strong transformation image and its corresponding tags ;
[0079] The process of the image mask operation is to construct an image of the same size as the ultrasound image. , All pixel values in are initialized to 0, and then, Add a number of random-sized rectangles, triangles, etc. and set them to 1. Then, randomly select another ultrasound image and its corresponding segmentation label , and with ultrasound images and its corresponding segmentation label To perform the merge:
[0080]
[0081] S22, using a feature extractor based on U-Net encoder , respectively from the weakly transformed images With strong transformation image Extract the corresponding weak transformation image features Strong transformation image features ,in Represent the number of channels, height, and width of the features respectively; their respective potential representations are calculated as follows:
[0082]
[0083] in, Represents a weakly transformed image No. latent representation of a class; Represents a strongly transformed image No. latent representation of a class; For indexing features 、 All pixels; express No. pixel features; express No. pixel features; Representation Label No. Pixel Class labels; express No. non-zero pixels, express The number of non-zero pixels in the middle; Representation Label No. Pixel Class labels; express No. non-zero pixels, express The number of non-zero pixels in the middle; express Middle The pixel at the position corresponding to the class label is 1, and the rest of the pixels are 0; express Middle The pixel at the position corresponding to the class label is 1, and the rest of the pixels are 0.
[0084] S23, based on their respective potential representations, calculate the average potential representation and align the average potential representation of a batch of images using KL divergence :
[0085]
[0086] in, Indicates the number of categories for segmentation; represents the first Class average latent representation, represents the first class-averaged latent representation; Indicates the number of images in a batch of images; represents the softmax function; represents the KL divergence.
[0087] S24, based on the average potential representation, in each batch of image iterations, the cumulative average potential representation is updated and the cumulative average potential representation is aligned using KL divergence;
[0088] The cumulative average potential is expressed as:
[0089]
[0090]
[0091] in, represents a weighting coefficient between 0 and 1; Indicates the Iterative weak transformation of the image class cumulative average latent representation; Indicates the Iterative weak transformation of the image class cumulative average latent representation; Indicates the Iterative strong transformation of image class cumulative average latent representation; Indicates the Iterative strong transformation of image Class cumulative average latent representation.
[0092] Aligning the cumulative average latent representations using KL divergence :
[0093] .
[0094] S25, in each batch of image iterations, calculate the covariance of the latent representation based on the features and the average latent representation, and update the cumulative covariance of the latent representation:
[0095]
[0096]
[0097] in, Indicates the Cumulative covariance of the latent representation of the iteratively weakly transformed image; Indicates the Cumulative covariance of the latent representation of the iteratively weakly transformed image; Indicates the Cumulative covariance of the latent representation of iteratively strongly transformed images; Indicates the Cumulative covariance of the latent representation of iteratively strongly transformed images;
[0098]
[0099] in, Represents matrix transpose; represents the first covariance of class latent representations; represents the first Covariance of class latent representations.
[0100] S26, in order to improve the difference between the potential representations of different categories and the similarity between the potential representations of the same category, contrastive learning is used for the potential representation of weakly transformed images to improve the model's ability to distinguish different categories and recognize the same category. The contrastive learning loss of weakly transformed images The specific implementation is as follows:
[0101]
[0102]
[0103] in, represents the exponential function; Represents the contrast coefficient.
[0104] In order to improve the difference between the potential representations of different categories and the similarity between the potential representations of the same category, contrastive learning is used on the potential representation of strongly transformed images to improve the model's ability to distinguish different categories and recognize the same category. The specific implementation is as follows:
[0105]
[0106]
[0107] In order to improve the difference between the potential representations of different categories and the similarity between the potential representations of the same category, contrastive learning is used for the potential representation of strong transformation images to weak transformation images, which improves the ability of the model to distinguish different categories and recognize the same category. The specific implementation is as follows:
[0108]
[0109]
[0110] In order to improve the difference between the potential representations of different categories and the similarity between the potential representations of the same category, contrastive learning is used for the potential representation of weakly transformed images to strongly transformed images, which improves the model's ability to distinguish different categories and recognize the same category. The specific implementation is as follows:
[0111]
[0112]
[0113] S27, the features extracted by the feature extractor E are added to the accumulated average potential representation and merged, specifically in the following manner:
[0114]
[0115] in, represents the combined features of the weakly transformed image, express No. pixel features; express No. pixel features; represents the combined features of the strongly transformed image, express No. pixel features; express No. pixel features; The pixel features and Add together to get the updated three-dimensional features The features of the corresponding pixels in ; The pixel features and Add together to get the updated three-dimensional features The features of the corresponding pixels in ;
[0116] The merged features are fed into the decoder Output the segmentation result of the weakly transformed image Segmentation results with strong transformation images , and then calculate the segmentation loss :
[0117]
[0118] in, Indicates the number of pixels in the image, express No. pixels, express No. Class pixels, express No. pixels, express No. Class pixels.
[0119] In summary, the total loss of the category embedding separation contrastive learning network for:
[0120] .
[0121] S3, segmentation of breast ultrasound images using the optimized class embedding separation contrastive learning network;
[0122] Based on similar inventive concepts, an embodiment of the present invention further provides a computer storage medium storing a readable program, which, when executed by a processor, can execute the above-mentioned breast ultrasound image segmentation method based on the category embedding separation contrast learning network.
[0123] Based on similar inventive concepts, an embodiment of the present invention provides an electronic device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;
[0124] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned breast ultrasound image segmentation method based on the category embedding separation contrast learning network.
[0125] Based on similar inventive concepts, an embodiment of the present invention further provides a computer program product, including computer instructions, which instruct a computing device to execute operations corresponding to the above-mentioned breast ultrasound image segmentation method based on class embedding separation contrastive learning network.
[0126] Example 3
[0127] In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and experiments.
[0128] First, the ultrasound data used in this embodiment was collected from patients with breast cancer. The dataset BUSI is provided online by AlDhabyani et al. It consists of 780 ultrasound images in PNG format and corresponding segmentation labels. The average size of the images in this dataset is 500px×500px. The dataset includes three categories: benign, malignant, and normal. The benign category contains 487 breast tumor images, while the malignant category contains 210 images. In this study, we only focus on the malignant and benign categories because benign and malignant ultrasound images involve tumor area segmentation, while normal category images do not contain any tumor areas. The above 697 images were randomly divided into 5 folds for cross-experimental validation.
[0129] This example uses the PyTorch deep learning framework, Torch version 1.13.0. All training and validation processes were performed on an NVIDIA GeForce RTX 3090 graphics card with 24GB of video memory. During training, the neural network reads data using a mini-batch approach, with a batch size of 2. The Stochastic Gradient Descent (SGD) optimizer is used, with an initial learning rate of 0.01, an optimizer momentum of 0.9, and an optimizer regularization coefficient of 0.0001. The Poly method is used as the learning rate adjustment strategy.
[0130] The experimental results are as follows:
[0131] In order to quantitatively evaluate the performance of the proposed method, two different evaluation metrics were selected to evaluate the performance of the neural network on the breast tumor segmentation task: Dice similarity coefficient (DSC) and intersection over union (IoU). The DSC calculation formula is:
[0132]
[0133] in, is the number of true positive segmented pixels, is the number of false positive segmented pixels, is the number of false negative segmented pixels. The calculation formula of the intersection-over-union ratio is:
[0134]
[0135] The present invention compares the segmentation results with those of existing methods, including hybrid architecture network, information selection fusion network, regional ease-difficulty perception network, lightweight spatial channel attention network, and consistent multi-scale multi-target segmentation network, as shown in Table 1. Table 1 compares the segmentation results of the present invention with those of others.
[0136] Table 1 Comparison of experimental results between the method of the present invention and the existing method
[0137]
[0138] As shown in Table 1, compared to other existing methods, the proposed method outperforms other existing methods in terms of segmentation accuracy, both in terms of DSC and IoU. Compared with the best hybrid architecture network method among other methods, the proposed method improves IoU by 0.87, reaching IoU 92.84%; the proposed method improves DSC by 0.92, reaching DSC 96.64%.
[0139] The image segmentation method of the present invention is compared with the segmentation results of the existing method. Figure 3 As shown, Figure 3 (a)-(f) represent the segmentation results of the segmentation method of the present invention, the hybrid architecture network, the information selection fusion network, the regional ease-difficulty perception network, the lightweight spatial channel attention network, and the consistent multi-scale multi-target segmentation network method, respectively. The red area represents the tumor segmentation by each method, and the green area represents the expert's label.
[0140] from Figure 3 It can be seen that the method of the present invention is very close to the label, while other methods still have many incorrect segmentation situations, such as Figure 3 The first row of (b)-(f) shows that the segmentation area of the hybrid architecture network, information selection fusion network, regional easy-difficulty perception network, lightweight spatial channel attention network, and consistent multi-scale multi-target segmentation network method is larger than the label area. For example Figure 3 The hybrid architecture network in the 4th row of (b)-(f) shows that the larger tumor segmentation area on the left is smaller than the label area, Figure 3The hybrid architecture network, regional ease-difficulty perception network, lightweight spatial channel attention network, and consistent multi-scale multi-target segmentation network methods represented in the 4th row of (c)-(f) are all larger than the label area for the smaller tumor segmentation area on the right.
[0141] In addition, in order to verify the effectiveness of each part of the present invention, an ablation experiment was conducted, and the baseline model was UNet and the segmentation loss using only weak image transformation. ; Add the image weak transformation and strong transformation together 、 、 、 、 、 and The ablation experiment results are shown in Table 2:
[0142] Table 2 Ablation experiment results
[0143]
[0144] From the ablation experiment in Table 2 above, it can be seen that compared with the 、 、 、 、 、 and With the same loss, both DSC and IoU are gradually improving, which shows that each part of the method proposed in this paper is helpful to improve the segmentation accuracy.
[0145] Example 4
[0146] Based on the breast ultrasound image segmentation method based on the category embedding separation contrastive learning network proposed in Example 2, this embodiment proposes a breast ultrasound image segmentation system based on the category embedding separation contrastive learning network, which specifically includes:
[0147] Training set construction module: Construct an ultrasound image training set, which includes ultrasound images and their corresponding segmentation labels, and serves as the input of the category embedding separation contrast learning network;
[0148] Network training module: The ultrasound image training set is input into the category embedding separation contrastive learning network for training. The ultrasound images are weakly transformed and strongly transformed respectively, and their respective latent representations are calculated. The average latent representation and the cumulative average latent representation of a batch of images are aligned using KL divergence, and the total loss is combined with the weak transformation image contrastive learning loss, strong transformation image contrastive learning loss, strong transformation image to weak transformation image contrastive learning loss, weak transformation image to strong transformation image contrastive learning loss, and segmentation loss. The category embedding separation contrastive learning network is optimized using the total loss.
[0149] And, image segmentation module: breast ultrasound images are segmented using the optimized class embedding separation contrastive learning network.
[0150] The method of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CDROM, RAM, floppy disk, hard disk or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded over a network and will be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware (such as an ASIC or FPGA). It will be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the method shown here.
[0151] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention, and such changes and modifications fall within the scope of the invention as claimed.
Claims
1. A breast ultrasound image segmentation method based on a class embedding separation contrastive learning network, characterized by: The following steps are involved: Construct an ultrasound image training set, which includes ultrasound images and their corresponding segmentation labels; The ultrasound image training set is input into the category embedding separation contrastive learning network for training. The ultrasound images are weakly transformed and strongly transformed respectively, and their respective latent representations are calculated; the average latent representation and the cumulative average latent representation of a batch of images are aligned using KL divergence, and the total loss is formed together with the weak transformation image contrastive learning loss, strong transformation image contrastive learning loss, strong transformation image to weak transformation image contrastive learning loss, weak transformation image to strong transformation image contrastive learning loss, and segmentation loss; and the total loss is used to optimize the category embedding separation contrastive learning network; Breast ultrasound images were segmented using an optimized class embedding separation contrastive learning network. The formula for calculating the potential representation is: in, and represent weakly transformed images and strongly transformed images respectively, E represents the feature extractor, and Represent weak transformation image features and strong transformation image features respectively, Represents the number of channels, height and width of the feature respectively; Represents a weakly transformed image No. latent representation of a class; Represents a strongly transformed image No. latent representation of a class; For indexing features 、 All pixels; express No. pixel features; express No. pixel features; Representation Label No. Pixel class labels, Represents a weakly transformed image Corresponding labels; express No. non-zero pixels, express The number of non-zero pixels in the middle; Representation Label No. Pixel class labels, Represents a strongly transformed image Corresponding labels; express No. non-zero pixels, express The number of non-zero pixels in the middle; express Middle The pixel at the position corresponding to the class label is 1, and the rest of the pixels are 0; express Middle The pixel at the position corresponding to the class label is 1, and the rest of the pixels are 0; The weakly transformed image contrastive learning loss for: in, represents the exponential function; represents the contrast coefficient; Indicates the Cumulative covariance of the latent representation of the iteratively weakly transformed image; Indicates the number of categories for segmentation; Indicates the number of images in a batch of images; Indicates the Iterative weak transformation of the image class cumulative average latent representation; The robust image contrastive learning loss for: in, Indicates the Iterative strong transformation of image class cumulative average latent representation; Indicates the Cumulative covariance of the latent representation of iteratively strongly transformed images; The strong-to-weak-transformation image contrastive learning loss for: The weakly transformed image to strongly transformed image contrastive learning loss for: 。 2. The breast ultrasound image segmentation method based on the class embedding separation contrastive learning network according to claim 1 is characterized in that: The average latent representation for: in, represents the first Class average latent representation, represents the first class-averaged latent representation; represents the softmax function; represents KL divergence; The cumulative average potential for: in, represents a weighting coefficient between 0 and 1; Indicates the Iterative weak transformation of the image class cumulative average latent representation; Indicates the Iterative strong transformation of image Class cumulative average latent representation.
3. The breast ultrasound image segmentation method based on the class embedding separation contrastive learning network according to claim 2 is characterized in that: The calculation formula of the cumulative covariance is: in, Indicates the Cumulative covariance of the latent representation of the iteratively weakly transformed image; Indicates the Cumulative covariance of the latent representation of iteratively strongly transformed images; Represents matrix transpose; represents the first covariance of class latent representations; represents the first Covariance of class latent representations.
4. The breast ultrasound image segmentation method based on class embedding separation contrastive learning network according to claim 3 is characterized in that: The segmentation loss The calculation process is: 1) Merge the features extracted by the feature extractor E by adding the accumulated average potential representation: in, represents the combined features of the weakly transformed image, express No. pixel features; represents the combined features of the strongly transformed image, express No. pixel features; 2) The merged features and Send to decoder separately , output the segmentation result of the weakly transformed image Segmentation results with strong transformation images , and calculate the segmentation loss : in, Indicates the number of pixels in the image, express No. pixels, express No. Class pixels, express No. pixels, express No. Class pixels.
5. The breast ultrasound image segmentation method based on class embedding separation contrastive learning network according to claim 4 is characterized in that: The class embeddings separate the total loss of the contrastive learning network for: 。 6. A breast ultrasound image segmentation system based on a class embedding separation contrastive learning network, characterized by: include: Training set construction module: constructs an ultrasound image training set, which includes ultrasound images and their corresponding segmentation labels; Network training module: The ultrasound image training set is input into the category embedding separation contrastive learning network for training. The ultrasound images are weakly transformed and strongly transformed respectively, and their respective latent representations are calculated. The average latent representation and the cumulative average latent representation of a batch of images are aligned using KL divergence, and the total loss is combined with the weak transformation image contrastive learning loss, strong transformation image contrastive learning loss, strong transformation image to weak transformation image contrastive learning loss, weak transformation image to strong transformation image contrastive learning loss, and segmentation loss. The category embedding separation contrastive learning network is optimized using the total loss. And, the image segmentation module: uses the optimized class embedding separation contrast learning network to segment breast ultrasound images; The formula for calculating the potential representation is: in, and represent weakly transformed images and strongly transformed images respectively, E represents the feature extractor, and Represent weak transformation image features and strong transformation image features respectively, Represents the number of channels, height and width of the feature respectively; Represents a weakly transformed image No. latent representation of a class; Represents a strongly transformed image No. latent representation of a class; For indexing features 、 All pixels; express No. pixel features; express No. pixel features; Representation Label No. Pixel class labels, Represents a weakly transformed image Corresponding labels; express No. non-zero pixels, express The number of non-zero pixels in the middle; Representation Label No. Pixel class labels, Represents a strongly transformed image Corresponding labels; express No. non-zero pixels, express The number of non-zero pixels in the middle; express Middle The pixel at the position corresponding to the class label is 1, and the rest of the pixels are 0; express Middle The pixel at the position corresponding to the class label is 1, and the rest of the pixels are 0; The weakly transformed image contrastive learning loss for: in, represents the exponential function; represents the contrast coefficient; Indicates the Cumulative covariance of the latent representation of the iteratively weakly transformed image; Indicates the number of categories for segmentation; Indicates the number of images in a batch of images; Indicates the Iterative weak transformation of the image class cumulative average latent representation; The robust image contrastive learning loss for: in, Indicates the Iterative strong transformation of image class cumulative average latent representation; Indicates the Cumulative covariance of the latent representation of iteratively strongly transformed images; The strong-to-weak-transformation image contrastive learning loss for: The weakly transformed image to strongly transformed image contrastive learning loss for: 。 7. A computer storage medium storing a readable program, characterized in that: When the program is executed by a processor, the breast ultrasound image segmentation method based on a category embedding separation contrast learning network according to any one of claims 1 to 5 can be executed.
8. An electronic device, characterized in that: include: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the breast ultrasound image segmentation method based on category embedding separation contrast learning network according to any one of claims 1 to 5.
Citation Information
Patent Citations
Semi-supervised medical image segmentation method based on united feature consistency of difficult pixels and effective images
CN117893760A
Semi-supervised remote sensing image semantic segmentation method and system based on region contrast learning
CN118710906A