A generalized segmentation method and system in the field of medical images
Through the method of frequency domain style alignment and contrast decoupling, the domain offset problem of multi-center medical image data is solved, the generalization ability and segmentation accuracy of the model are improved, and better cross-domain adaptation and feature decoupling effects are achieved.
Patent Information
- Application Number
- CN202510848487.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-24
AI Technical Summary
Existing medical image segmentation methods suffer from insufficient model generalization and limited segmentation accuracy when faced with the domain shift problem of multi-center data. In particular, feature alignment methods easily destroy the discriminability and semantic information of domain-related features, while feature decoupling methods have complex decoupling processes and do not consider pixel-level semantic features.
The frequency domain style alignment and contrast decoupling method is adopted. The input image features are converted into frequency domain representation through the frequency domain decomposition module. The low-frequency amplitude is extracted as style information and style projection reconstruction is performed. The prototype-like contrast learning and pixel-level semantic contrast learning are combined to achieve the decoupling of domain-independent features and domain-dependent features, and the model is optimized to generate the final segmentation result.
The model's generalization ability and segmentation accuracy are improved, and it can better adapt to unknown target domains, retain the discriminability of domain-related features, and improve the model's prediction performance and generalization through comparative learning of class-level and pixel-level semantic features.
Smart Images

Figure CN120355929B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image processing, and in particular to a generalized segmentation method and system in the field of medical images. Background Art
[0002] In recent years, deep learning methods have made significant progress in automated medical image segmentation. However, most existing medical image segmentation methods assume that training and test samples follow the same statistical distribution. In real-world medical scenarios, data from different centers exhibit distributional differences, often referred to as domain shift, due to variations in imaging equipment and protocols. This multi-center data presents a multi-center problem in the field of medical imaging. In this context, model generalization is crucial for addressing the issue of unstable performance when models are deployed across different centers, and is therefore of great significance for clinically assisted diagnosis.
[0003] Current medical image segmentation methods for multi-source domain generalization can be categorized into three approaches: data-level, model-level, and feature-level generalization. Data-level generalization methods enhance model generalization capabilities by increasing the diversity and quantity of training data through explicit or learnable transformation functions. However, these enhancements are limited in scope and can produce unrealistic images, limiting generalization performance. Model-level generalization methods mitigate the domain shift issue by utilizing meta-learning strategies or improving transfer learning frameworks of pre-trained models. However, these methods carry the risks of complex optimization and overfitting the meta-task. Feature-level generalization methods aim to improve model generalization performance by leveraging domain-independent features of the input image. These methods are categorized into feature alignment and feature decoupling. Feature alignment enhances generalization by aligning or normalizing cross-domain feature distributions, but this can easily destroy the discriminativeness and semantic information of domain-dependent features. Feature decoupling decomposes the input sample feature vector to separate domain-specific and task-specific features. Existing methods suffer from complex decoupling processes and most fail to consider pixel-level semantic features.
[0004] In summary, existing medical image segmentation methods have many limitations when dealing with the domain shift problem of multi-center data, and there is an urgent need for a new method that can effectively solve these defects and deficiencies. Summary of the Invention
[0005] The purpose of the present invention is to provide a generalized segmentation method and system in the field of medical images, which solves the problem of multi-center data domain offset in medical images through frequency domain style alignment and contrast decoupling, and improves the model generalization ability and segmentation accuracy.
[0006] To achieve the above objectives, the present invention provides a generalized segmentation method in the field of medical images, comprising the following steps:
[0007] Step S1, preprocessing multi-center medical image data;
[0008] Step S2: constructing an encoder-decoder network architecture based on U-Net and ResNet for feature extraction and segmentation prediction of medical images;
[0009] Step S3: Convert the input image features into frequency domain representation through the frequency domain decomposition module, extract the low-frequency amplitude as style information, and retain the phase as content information;
[0010] Step S4: construct a multi-source domain style representation space through the frequency domain style projection reconstruction module, project the low-frequency amplitude style of the unknown domain into the source domain style library, and perform statistical perturbation to expand the feature distribution space;
[0011] Step S5: Decoupling domain-independent features from domain-dependent features by combining class prototype contrast learning with pixel-level semantic contrast learning through a multi-level contrast decoupling module;
[0012] Step S6: Combine the segmentation loss and contrastive learning loss to optimize the model and generate the final segmentation result.
[0013] Preferably, in step S1, the preprocessing is: uniformly cropping the multi-center medical images and scaling the values to 0-1, performing random rotation and random flipping operations on the data to obtain enhanced medical image data.
[0014] Preferably, in step S2, the encoder adopts a four-level residual structure of ResNet-50, and the decoder adopts a deconvolution architecture, each level including a transposed convolution upsampling layer and a skip connection fusion unit.
[0015] Preferably, in step S3, the frequency domain decomposition module specifically includes:
[0016] Decompose image features into amplitude and phase components using Fourier transform;
[0017] The low-frequency amplitude is extracted as the global style information, and the phase is retained as the domain-independent global edge texture information.
[0018] Preferably, in step S4, the frequency domain style projection reconstruction module specifically includes:
[0019] Initialize the style basis of each source domain, including mean and variance parameters;
[0020] Calculate the similarity between the input feature style and the style base based on the Wasserstein distance and generate a normalized similarity coefficient;
[0021] The style affine parameters are generated by weighted style basis, and low-frequency amplitude features are instance-normalized and reconstructed.
[0022] Noise perturbation based on variance estimation is introduced into the statistics of the reconstructed style to simulate the style distribution of the unknown domain.
[0023] Preferably, in step S5, the multi-level contrast decoupling module specifically includes:
[0024] Through class prototype comparison learning, the class prototypes before and after style reconstruction of each domain are calculated and the moving average strategy is used to update the historical class prototypes to promote feature separation between categories in different domains;
[0025] Through pixel-level semantic contrast learning, anchor points, positive samples and negative samples are constructed for easily confused pixel features to optimize the semantic consistency in the feature space.
[0026] Preferably, prototype contrast learning is implemented by the following formula:
[0027] ;
[0028] in, Represent the height and width of the feature map respectively, Representing pixel features One-hot label, that is, when belong Class time, that is , The index representing the current pixel feature;
[0029] The prototype of the class using the moving average strategy update is as follows:
[0030] ;
[0031] in, Respectively Class updates and historical class prototypes, represents momentum, set to 0.999.
[0032] Preferably, in step S6, the segmentation loss function is:
[0033] ;
[0034] in, represents the segmentation loss, represents the binary cross entropy loss, represents Dice loss;
[0035] ;
[0036] in, Indicates the total number of pixels. Indicates the The true category of pixels, Indicates the The predicted probability value of pixels;
[0037] .
[0038] Preferably, the contrastive learning loss function is:
[0039] ;
[0040] in, represents the contrast loss, Represent the embedding vectors of anchor points, positive samples and negative samples respectively, represents the temperature hyperparameter, which is used to adjust the smoothness of the distribution. represents the negative sample set.
[0041] The present invention also provides a generalized segmentation system in the field of medical images, comprising:
[0042] Data preprocessing module, used for preprocessing multi-center medical image data;
[0043] The network construction module is used to build an encoder-decoder network architecture based on U-Net and ResNet. The encoder adopts the four-level residual structure of ResNet-50, and the decoder adopts a deconvolution architecture. Each level includes a transposed convolution upsampling layer and a skip connection fusion unit.
[0044] Frequency domain decomposition module, which converts input image features into frequency domain representation, separating low-frequency amplitude as style information and phase as content information;
[0045] The frequency domain style projection and reconstruction module is used to construct a multi-source domain style representation space, project the low-frequency amplitude style of the unknown domain into the source domain style library, and perform statistical perturbations to expand the feature distribution space;
[0046] A multi-level contrast decoupling module, which combines prototype-class contrast learning with pixel-level semantic contrast learning to decouple domain-independent features from domain-dependent features.
[0047] The model optimization module is used to optimize the model by combining segmentation loss and contrastive learning loss to generate the final segmentation result.
[0048] Therefore, the present invention adopts the above-mentioned generalized segmentation method and system in the field of medical images, and the beneficial technical effects are as follows:
[0049] (1) By performing low-frequency amplitude style transfer on paired images and visually analyzing their amplitude and phase, we found that the low-frequency amplitude of the image contains the main style-related information, while the phase contains more content information. The two can be well separated. Therefore, the low-frequency amplitude is regarded as style information and introduced into the feature level. The target domain style is then projected onto the source domain statistical style library for style alignment. While aligning the features, the discriminability of domain-related features is retained. In addition, we consider performing statistical transformation perturbations on the low-frequency amplitude to simulate more low-frequency style feature distributions, better adapt to the unknown target domain, and help the model emphasize the high-frequency components that retain global detail information.
[0050] (2) Combining class-level semantic prototypes and pixel-level semantic features for comparative learning, the comparison of class prototype features can promote the model to comprehensively separate and identify different categories of source images and style-reconstructed images, achieving preliminary class separation and domain decoupling. Pixel-level semantic features further refine the recognition ability of pixel features, decouple different domain features and easily confused features, promote semantic consistency between different domain features, and further improve the prediction performance and generalization of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a flow chart of a generalized segmentation method for medical images according to the present invention;
[0052] Figure 2 It is the frequency domain style projection reconstruction and low-frequency perturbation module;
[0053] Figure 3 It is a multi-level contrast decoupling module;
[0054] Figure 4 Visual comparison of fundus data segmentation;
[0055] Figure 5 Comparison of prostate MRI segmentation visualization. DETAILED DESCRIPTION
[0056] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.
[0057] Unless otherwise defined, technical or scientific terms used in the present invention shall have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs.
[0058] Example 1
[0059] like Figure 1-Figure 3 FIG. 1 is a flowchart of a generalized segmentation method for medical images according to the present invention, which specifically includes the following steps:
[0060] Step S1: preprocessing multi-center medical image data.
[0061] Step S11: In this embodiment, the multi-center medical image data includes 3D prostate MRI data and 2D retinal fundus data set, the 3D prostate MRI data is sliced, and the 2D slice results are saved in pkl format;
[0062] Step S12: When loading data, randomly perform data augmentation processing on the data and the corresponding labels, including random rotation, random flipping and other operations, and set the data of each source domain to be randomly included in a batch.
[0063] Step S2: Construct an encoder-decoder network architecture based on U-Net and ResNet for feature extraction and segmentation prediction of medical images.
[0064] The encoder consists of four convolutional stages of the ResNet-50 network, each of which contains multiple layers of residual units with 3×3 convolution kernels. The mathematical expression is:
[0065] ;
[0066] in, represents the network generated features, Represents input data, Indicates containing output channels Convolution operation, represents the LeakyReLU activation function, Represents a batch normalization layer.
[0067] The feature dimensionality reduction mechanism is implemented through a cascade of maximum pooling layers. A 2×2 maximum pooling layer with a stride of 2 is set at the end of each coding unit. The dimensionality reduction formula is:
[0068] ;
[0069] in, represents the dimension reduction feature, represents the maximum pooling operation, Represents the original feature, 1×1 convolution adjusted for the number of channels;
[0070] The decoder adopts a deconvolution architecture. Each level contains a transposed convolution upsampling layer and a jump connection fusion unit. Its feature reconstruction process is expressed as:
[0071] ;
[0072] in, Indicates the decoder Level feature map, express Convolution operation, Indicates the decoder Level feature map, represents bilinear interpolation upsampling, Indicates channel splicing operation, Indicates the corresponding encoding stage Level feature map.
[0073] Step S3: Convert the input image features into frequency domain representation through the frequency domain decomposition module, and separate the low-frequency amplitude as style information and the phase as content information.
[0074] Step S31: Decompose the input feature representation into amplitude and phase using Fourier transform;
[0075] The low-frequency part of the feature amplitude mainly contains global style information, while the phase information contains domain-independent global structural information;
[0076] Step S32: Use the low-frequency amplitude statistics of the target domain image to perform style transfer and alignment on the source domain image. This can achieve alignment of styles from different domains while preserving global structural information. The specific formula is as follows:
[0077] ;
[0078] ;
[0079] in, represents the representation of the original two-dimensional signal in the spatial domain, denote the real and imaginary parts of the Fourier transform, respectively. and represent the amplitude and phase respectively, Indicates the frequency domain corresponding to the frequency The complex value of Indicates the width of the image, Indicates the height of the image, Represents the pixel index in the horizontal direction, Represents the pixel index in the vertical direction, is an imaginary unit, represents the index of the horizontal frequency component, Indicates the index of the vertical frequency component.
[0080] After moving the low-frequency component of the amplitude to the center of the spectrum, a binary mask is introduced , whose values are zero except in the central region:
[0081] ;
[0082] in, Display Control The ratio of size is used to distinguish high-frequency and low-frequency components. , Represent the height and width of the frequency respectively.
[0083] Low frequency amplitude and high frequency amplitude :
[0084] ;
[0085] ;
[0086] in, Represents element-wise multiplication.
[0087] Step S4: Construct a multi-source domain style representation space through the frequency domain style projection reconstruction module, project the low-frequency amplitude style of the unknown domain into the source domain style library, and perform statistical perturbation to expand the feature distribution space.
[0088] Step S41: Initialization of style base.
[0089] This module randomly initializes a set of corresponding style bases for each processing domain. .in Indicates the The mean parameter of the style basis of the domain, Indicates the The standard deviation parameter of the style basis of the domain.
[0090] During the initialization process, Initialized with zero mean, Initialized with unit standard deviation.
[0091] Step S42: low-frequency amplitude style similarity measurement.
[0092] For the low-frequency amplitude style statistics of the input features, the sample distance of each source domain style basis is estimated and weighted as the similarity coefficient. Specifically, the low-frequency amplitude of the input features is averaged along the channel dimension. and standard deviation , and then use Wasserstein distance to measure the low-frequency amplitude style of the input feature and the The style distribution difference between the style bases is shown in the following formula:
[0093] ;
[0094] in, and Respectively represent the mean and variance of the features along the channel dimension, Indicates the The distance between the style bases, Indicates the The mean parameter of the style basis of the domain, represents the Euclidean distance square operation, Indicates the The standard deviation parameter of the style basis of each domain;
[0095] Step S43: To characterize the similarity between the input feature style and the style base, the reciprocals of all style bases are normalized and the Softmax operation is used to make The sum of each item is 1, which is used as the similarity index. The process is as follows:
[0096] ;
[0097] in, Indicates the The style similarity of the domains, Indicates the total number of source domains.
[0098] Step S44: Generate style affine parameters.
[0099] Based on the normalized similarity coefficient, each style basis is weighted to obtain the final style affine parameter , the calculation formula is:
[0100] ;
[0101] in, represents the mean of the reconstructed style representation, represents the standard deviation of the reconstructed style representation;
[0102] Step S45: low-frequency amplitude disturbance.
[0103] Assuming that the distribution of each statistic of the reconstructed style follows a Gaussian distribution, the standard deviation of these statistics is calculated as follows:
[0104] ;
[0105] ;
[0106] in, Represents the mean The variance within the current batch, Indicates standard deviation The variance within the current batch, Indicates the batch size, Indicates the current batch, Indicates the calculation of the mean
[0107] A Gaussian distribution of low-frequency probability statistics is established, and new means and standard deviations are randomly sampled:
[0108] ;
[0109] ;
[0110] in, represents the mean after perturbation, represents the standard deviation after disturbance, represents random noise sampled from a normal distribution added to the mean, represents random noise sampled from a normal distribution with added standard deviation, Indicates the intensity of the disturbance;
[0111] Step S46: style projection and alignment reconstruction.
[0112] The low-frequency amplitude feature is instance-normalized and converted into a standard normal distribution to remove the original style information. The normalized feature is denoted as , the normalized formula is:
[0113] ;
[0114] in, represents the original amplitude characteristics, Represents a small positive number that avoids division by zero;
[0115] Then, the perturbed style affine parameter pair Perform style projection reconstruction to obtain the amplitude features after style alignment ,Right now:
[0116] ;
[0117] Step S47: Update the momentum of the style information.
[0118] In the training phase, in order to maintain the accuracy and stability of the style information of each domain, this module adopts the momentum update strategy to update the style basis of each domain. Let the momentum coefficient be , the update formula is as follows:
[0119] ;
[0120] ;
[0121] in, is the momentum coefficient, which is set to 0.9 here. This ensures that the style base can smoothly track the changes in style information in different domains during network training, further improving the system's adaptability to generalized styles.
[0122] Step S5: Decoupling domain-independent features from domain-dependent features is achieved through a multi-level contrast decoupling module that combines class prototype contrast learning with pixel-level semantic contrast learning.
[0123] Step S51: Class prototype comparative learning. This involves comparative learning of class prototype features from different domains to promote the separation of feature spaces between different domains and different categories, thereby enhancing the recognition of domain-independent features. First, the features are mapped to a unified high-dimensional representation space through a nonlinear projection head P.
[0124] The construction of the class prototype is calculated by averaging the features in each class region:
[0125] ;
[0126] in, Represent the height and width of the feature map respectively. is the pixel feature One-hot label, that is, when belong Class time, that is .
[0127] In order to obtain the class prototypes in the entire training dataset, the moving average strategy is used to update the class prototypes:
[0128] ;
[0129] in, yes Class updates and historical class prototypes, is the first A class prototype, The momentum is set to 0.999.
[0130] Suppose the original image category prototype is predicted to be category 1, 2, and 3, and the corresponding features are 、 、 ; The predicted category prototype of the style reconstructed image is category 1 and the corresponding feature is . Then: opposite: ; Negative pair: 、 、 .
[0131] Step S52: Confusion-prone pixel contrast learning. Using traditional cross entropy as task loss only penalizes pixel-level predictions independently, while ignoring the semantic relationship between pixels. In order to further refine the semantic classification of features and reduce the impact of domain, we introduce contrastive learning of features of different domains that are easily confused, and promote the separation of features that are difficult to classify due to style influence. The above style reconstruction samples are called domain enhancement samples. First, the anchor point is set on the sampled features that are easily confused by the domain enhancement samples, and the corresponding predicted label category is , and the corresponding true label category is ( ), the positive sample is the feature sampled from the original image, and its predicted category label is ( ), the negative sample is the feature sampled from the enhanced image, and its predicted category label is ( ).
[0132] Assume that the original image correctly predicts the category The corresponding features are ; The corresponding position of the domain enhanced image is incorrectly predicted as a category The corresponding features are , other correctly predicted categories The characteristics of . Then: opposite: 、 ; Negative pair: 、 .
[0133] Step S6: Combine the segmentation loss and contrastive learning loss to optimize the model and generate the final segmentation result.
[0134] To achieve both medical image segmentation and cross-domain feature alignment, the overall loss function is decomposed into two parts: segmentation loss and contrastive learning loss. The segmentation loss is used to guide the segmentation network to accurately segment the target region at the pixel level, while the contrastive learning loss is used to further align features from different domains, ensuring that the extracted features not only have excellent segmentation performance but also have cross-domain generalization capabilities. The overall training objective function expression is as follows:
[0135] ;
[0136] in, represents the total loss, represents the segmentation loss, represents the contrast loss, represents the hyperparameters that control the weights;
[0137] The segmentation loss function is:
[0138] ;
[0139] in, represents the binary cross entropy loss, represents Dice loss;
[0140] ;
[0141] in, Indicates the total number of pixels. Indicates the The true category of pixels, Indicates the The predicted probability value of pixels;
[0142] .
[0143] The contrastive learning loss function is:
[0144] ;
[0145] in, Represent the embedding vectors of anchor points, positive samples and negative samples respectively, represents the temperature hyperparameter, which is used to adjust the smoothness of the distribution. represents the negative sample set.
[0146] Segmentation performance index calculation module: the indicators are Dice coefficient, Hausdorff distance HD, and average surface distance ASD.
[0147] The present invention will be further described below through specific examples.
[0148] Training and testing on retinal fundus datasets and prostate MRI datasets fully demonstrate the superiority of the proposed method. The specific dataset characteristics and processing flow are as follows.
[0149] A multi-center retinal fundus image dataset was used to evaluate optic cup (OC) and optic disc (OD) segmentation performance and measure model generalization. This dataset integrates four public fundus image datasets, covering images acquired at different locations and using different scanners. Center 1 contains 50 training images and 51 test images; Center 2 contains 99 training images and 60 test images; Centers 3 and 4 each contain 320 training images and 80 test images. During preprocessing, all images were converted to 2D three-channel color images of 256×256 size and normalized to ensure data consistency and stability.
[0150] The Prostate MRI Dataset is a publicly available, multi-center dataset designed for prostate segmentation in T2-weighted MRI. The data is sourced from lower abdominal MRI images collected from six different institutions, with the following distribution: Centers 1 and 2 are from the NCI-ISBI13 dataset, each containing 30 patient images; Center 3 is from the I2CVB dataset, containing 19 patient images; and Centers 4, 5, and 6 are from the PROMISE12 dataset, containing 13, 12, and 12 patient images, respectively. Preprocessing steps include resizing the images to 384×384 in the axial plane, normalizing pixel intensities to a distribution with a mean of 0 and a standard deviation of 1, and cropping the images to retain slices containing the prostate region, removing irrelevant information, and focusing on key regions.
[0151] To validate the effectiveness of our method, we conducted comparative experiments with several recently demonstrated methods. Model performance was primarily evaluated based on two segmentation metrics: Dice and ASD. Furthermore, for 3D prostate data, all 2D slice predictions were converted to 3D predictions and compared with mainstream methods. The experimental results, detailed in Tables 1, 2, 3, and 4, demonstrate the strong competitiveness and excellent generalization performance of our method in the field of medical image segmentation.
[0152] Table 1 Dice index (%) for prostate MRI multicenter data segmentation
[0153] ;
[0154] Table 2 ASD index (mm) of prostate MRI multi-center data segmentation
[0155] ;
[0156] Table 3 Dice index (%) for fundus multicenter data segmentation
[0157] ;
[0158] Table 4 ASD index (mm) of fundus multicenter data segmentation
[0159] ;
[0160] The experimental results are qualitatively compared with other methods. The visualization results of the specific segmentation effects are shown in the figure. Figure 4 、 Figure 5As shown in the figure, the segmentation effects of these methods on the first three domains of the two datasets are compared. For the retinal fundus data segmentation task, the optic cup and optic disc segmentation results obtained by the present invention are closer to the true labels, while the baseline and other domain generalization methods have more over- and under-segmented regions, especially the fuzzy segmentation at the junction of the optic cup and optic disc. For the prostate MRI segmentation task, the present invention provides more precise and smooth segmentation of the target area, while other methods are often prone to positioning errors in some low-light images.
[0161] Example 2
[0162] A generalized segmentation system for medical images, comprising:
[0163] Data preprocessing module, used for preprocessing multi-center medical image data;
[0164] The network construction module is used to build an encoder-decoder network architecture based on U-Net and ResNet. The encoder adopts the four-level residual structure of ResNet-50, and the decoder adopts a deconvolution architecture. Each level includes a transposed convolution upsampling layer and a skip connection fusion unit.
[0165] Frequency domain decomposition module, which converts input image features into frequency domain representation, separating low-frequency amplitude as style information and phase as content information;
[0166] The frequency domain style projection and reconstruction module is used to construct a multi-source domain style representation space, project the low-frequency amplitude style of the unknown domain into the source domain style library, and perform statistical perturbations to expand the feature distribution space;
[0167] A multi-level contrast decoupling module, which combines prototype-class contrast learning with pixel-level semantic contrast learning to decouple domain-independent features from domain-dependent features.
[0168] The model optimization module is used to optimize the model by combining segmentation loss and contrastive learning loss to generate the final segmentation result.
[0169] It is worth noting that the contents not elaborated in detail in the present invention are all prior art and are well known to those skilled in the art.
[0170] Therefore, the present invention adopts the above-mentioned generalized segmentation method and system in the field of medical images, solves the problem of multi-center data domain offset in medical images through frequency domain style alignment and contrast decoupling, and improves the model generalization ability and segmentation accuracy.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solutions of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A generalized segmentation method for medical images, characterized in that: The following steps are involved: Step S1, preprocessing multi-center medical image data; Step S2: constructing an encoder-decoder network architecture based on U-Net and ResNet for feature extraction and segmentation prediction of medical images; Step S3: Convert the input image features into frequency domain representation through the frequency domain decomposition module, extract the low-frequency amplitude as style information, and retain the phase as content information; Step S4: construct a multi-source domain style representation space through the frequency domain style projection reconstruction module, project the low-frequency amplitude style of the unknown domain into the source domain style library, and perform statistical perturbation to expand the feature distribution space; Step S5: Decoupling domain-independent features from domain-dependent features by combining class prototype contrast learning with pixel-level semantic contrast learning through a multi-level contrast decoupling module; Step S6: Combine the segmentation loss and contrastive learning loss to optimize the model and generate the final segmentation result; In step S4, the frequency domain style projection reconstruction module specifically includes: Initialize the style basis of each source domain, including mean and variance parameters; Calculate the similarity between the input feature style and the style base based on the Wasserstein distance and generate a normalized similarity coefficient; The style affine parameters are generated by weighted style basis, and low-frequency amplitude features are instance-normalized and reconstructed. Introducing noise perturbations based on variance estimation into the statistics of reconstructed style to simulate the style distribution of unknown domain; In step S5, the multi-level comparison decoupling module specifically includes: Through class prototype comparison learning, the class prototypes before and after style reconstruction of each domain are calculated and the moving average strategy is used to update the historical class prototypes to promote feature separation between categories in different domains; Through pixel-level semantic contrast learning, anchor points, positive samples, and negative samples are constructed for easily confused pixel features to optimize semantic consistency in the feature space. Class prototype contrastive learning is achieved through the following formula: ; in, Represent the height and width of the feature map respectively, Representing pixel features One-hot label, that is, when belong Class time, that is , The index representing the current pixel feature; The prototype of the class using the moving average strategy update is as follows: ; in, Respectively Class updates and historical class prototypes, represents momentum, set to 0.
999.
2. A generalized segmentation method for medical images according to claim 1, characterized in that: In step S1, the preprocessing is: uniformly cropping the multi-center medical images and scaling the values to 0-1, performing random rotation and random flipping operations on the data to obtain enhanced medical image data.
3. The generalized segmentation method for medical images according to claim 1, characterized in that: In step S2, the encoder adopts the four-level residual structure of ResNet-50, and the decoder adopts the deconvolution architecture, where each level includes a transposed convolution upsampling layer and a skip connection fusion unit.
4. The generalized segmentation method for medical images according to claim 1, characterized in that: In step S3, the frequency domain decomposition module specifically includes: Decompose image features into amplitude and phase components using Fourier transform; The low-frequency amplitude is extracted as the global style information, and the phase is retained as the domain-independent global edge texture information.
5. The generalized segmentation method for medical images according to claim 1, characterized in that: In step S6, the segmentation loss function is: ; in, represents the segmentation loss, represents the binary cross entropy loss, represents Dice loss; ; in, Indicates the total number of pixels. Indicates the The true category of pixels, Indicates the The predicted probability value of pixels; 。 6. The generalized segmentation method for medical images according to claim 1, characterized in that: The contrastive learning loss function is: ; in, represents the contrast loss, Represent the embedding vectors of anchor points, positive samples and negative samples respectively, represents the temperature hyperparameter, which is used to adjust the smoothness of the distribution. Represents the negative sample set.
7. A generalized segmentation system for medical images, characterized in that: Used to perform the generalized segmentation method for medical images according to any one of claims 1 to 6, comprising: Data preprocessing module, used for preprocessing multi-center medical image data; The network construction module is used to build an encoder-decoder network architecture based on U-Net and ResNet. The encoder adopts the four-level residual structure of ResNet-50, and the decoder adopts a deconvolution architecture. Each level includes a transposed convolution upsampling layer and a skip connection fusion unit. Frequency domain decomposition module, which converts input image features into frequency domain representation, separating low-frequency amplitude as style information and phase as content information; The frequency domain style projection and reconstruction module is used to construct a multi-source domain style representation space, project the low-frequency amplitude style of the unknown domain into the source domain style library, and perform statistical perturbations to expand the feature distribution space; A multi-level contrast decoupling module, which combines prototype-class contrast learning with pixel-level semantic contrast learning to decouple domain-independent features from domain-dependent features. The model optimization module is used to optimize the model by combining segmentation loss and contrastive learning loss to generate the final segmentation result.
Citation Information
Patent Citations
Few-sample medical image segmentation method based on Fourier meta-learning field generalization
CN116051494A
Semi-supervised domain generalization medical image segmentation method and system
CN118657790A