An unsupervised domain adaptation method for medical image segmentation

Through adversarial generative networks and decoupled learning methods, unsupervised domain adaptation of medical images is achieved, which solves the problem of differences in visual appearance and semantic distribution in medical image segmentation and improves the adaptability and segmentation performance of the model in the target domain.

CN118735948BActive Publication Date: 2025-09-12HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410970095.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2025-09-12
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

Existing unsupervised domain adaptation methods suffer from significant differences in visual appearance and semantic distribution in medical image segmentation, and fail to effectively alleviate the problem of category imbalance, resulting in insufficient adaptability of the model in the target domain.

Method used

A generative adversarial network is used for image style transfer. Combined with a decoupled learning strategy, unsupervised domain adaptation of medical images is achieved through denoising branch, source domain supervision branch and target domain supervision branch, using pseudo label generation and uncertainty estimation.

Benefits of technology

Through pixel-level image alignment and feature-level decoupling learning, domain shift is alleviated, the adaptability of the model in the target domain is improved, the robustness and generalization of medical image segmentation are enhanced, and the category imbalance problem is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735948B_ABST
    Figure CN118735948B_ABST
Patent Text Reader

Abstract

The present invention discloses an unsupervised domain adaptation method for medical image segmentation, which first expands the scale and diversity of medical image datasets. Secondly, a generative adversarial network is used to convert the source domain images in the dataset into the target domain style, and the cycle consistency loss is used to ensure that the converted images are semantically consistent with the original images. Then, a network structure including three decoder branches is designed, and the three trained decoder branches are used to predict and fuse the target domain images to obtain pseudo labels. Finally, the pseudo labels are used to train the segmentation decoder in the target domain, and the trained target domain segmentation decoder is used to predict the new target domain images to obtain the segmentation results. The present invention alleviates domain offset at multiple levels, improves the model's adaptability and generalization, and alleviates the category imbalance caused by domain offset.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to an unsupervised domain adaptation method for medical image segmentation. Background Art

[0002] In recent years, deep learning techniques, particularly convolutional neural networks, have achieved tremendous success in image segmentation. However, these methods typically require large amounts of labeled data for training. Acquiring high-quality labeled data in the medical imaging field is extremely expensive and time-consuming. Furthermore, medical images collected by different hospitals and equipment vary significantly in imaging methods, contrast, and resolution. Consequently, trained segmentation models often perform poorly on new data, a phenomenon known as domain shift.

[0003] To address the lack of labeled data and domain shift, unsupervised domain adaptation (UDA) methods have received widespread attention. UDA aims to utilize labeled data from the source domain and unlabeled data from the target domain, narrowing the distribution gap between the two domains and enabling the model to generalize well to the target domain. Existing UDA methods can be roughly divided into the following categories:

[0004] (1) Method based on adversarial learning: By training a domain discriminator to distinguish the source domain from the target domain, and at the same time training a feature extractor to maximize the similarity of features between the two domains, domain-invariant feature representation is obtained.

[0005] (2) Methods based on image style transfer: Through image-to-image conversion, the source domain image is converted to the target domain style, or vice versa, and then training is performed on the converted image.

[0006] (3) Pseudo-label based method: First, use the model trained in the source domain to predict the target domain image to obtain pseudo labels, and then use these pseudo labels to train the target domain images.

[0007] Although these methods have achieved good results in tasks such as natural image classification, they still face the following challenges in medical image segmentation:

[0008] (1) The anatomical structure and lesion areas of medical images are highly complex, which requires higher generalization ability of the segmentation model. Existing methods are not sufficiently adapted to the semantics of the target domain.

[0009] (2) The domain shift between different medical image datasets is more significant. For example, the visual differences between MRI and CT images are very large, and a single adversarial learning or style transfer method is difficult to completely narrow this difference.

[0010] (3) The distribution of foreground and background categories in medical images is usually very unbalanced. For example, the tumor area accounts for a very small proportion compared to normal tissue. Existing methods rarely consider the category imbalance problem, which easily affects the segmentation performance.

[0011] In summary, how to design a UDA method that comprehensively considers visual appearance differences and semantic distribution differences and can alleviate the impact of category imbalance, thereby improving the domain adaptation ability of medical image segmentation models, is an urgent problem to be solved in this field. Summary of the Invention

[0012] To address these issues, this paper proposes an unsupervised domain adaptation method for medical image segmentation. This method leverages adversarial learning to perform image style transfer at the pixel level, combined with a decoupled learning strategy to mitigate domain adaptation in the feature space. Finally, the target domain segmentation model is trained unsupervised to improve its adaptability and segmentation performance for target domain images.

[0013] Method To solve the above technical problems, the present invention proposes an unsupervised domain adaptation method for medical image segmentation. The main steps of the method are as follows:

[0014] Step 1: Data augmentation: Expand the size and diversity of medical image datasets to improve the robustness and generalization ability of segmentation models.

[0015] Step 2: Image Style Transfer: Use a generative adversarial network to convert the source domain image to the target domain style, while using a cycle consistency loss to ensure that the converted image is semantically consistent with the original image. The converted image is used to train the target domain supervised branch in step 3.

[0016] Step 3: Decoupled representation learning: Design a network structure with three decoder branches: the denoising branch uses noisy labels to learn domain-independent segmentation features; the source domain supervision branch is trained on source domain images; and the target domain supervision branch is trained on the converted target domain style images and adapts to the target domain.

[0017] Step 4: Pseudo-label generation: Use the three trained decoder branches to predict and fuse the target domain image to obtain the pseudo-label.

[0018] Step 5: Unsupervised training: Train the segmentation decoder in the target domain using pseudo labels.

[0019] Step 6. Prediction: Use the trained target domain segmentation decoder to predict the new target domain image and obtain the segmentation result.

[0020] Preferably, the step 2 comprises the following steps:

[0021] Step 2.1. Build the generator network G t and the discriminator network Dt Generator G t Receive the source domain image x s , convert it into the target domain style image x s→t Discriminator D t Receive x s→t and the real target domain image x t , to determine the probability that they are from the target domain. By minimizing the generator G t and the discriminator D t The adversarial loss makes G t Learn to generate target domain style images that are as realistic as possible.

[0022] Step 2.2: In order to maintain the semantic consistency of the converted image, the reverse generator G is introduced in the source domain. s and the corresponding discriminator D s . Reverse generator G s It consists of a shared encoder based on a diffusion model and an upsampling decoder, which transforms the target domain style image x s→t Rebuild the domain back to the source domain.

[0023] Step 2.3, in addition to training G separately t and G s In addition to the adversarial loss, the cycle consistency reconstruction loss is also introduced. s Through G t and G s After the transformation, the original image should be reconstructed as much as possible. Similarly, the target domain image x t Through G s and G t After the transformation, the original image should also be reconstructed.

[0024] Step 2.4: During the training process, alternately optimize the three loss functions mentioned above: source domain to target domain adversarial loss, target domain to source domain adversarial loss, and bidirectional cycle consistency reconstruction loss. Through multiple cycles of alternating training, the two generators G t and G s It can convert the styles of images without changing the semantic content of the images, thereby narrowing the distribution difference between the source domain and the target domain at the pixel level.

[0025] Preferably, the step three of decoupling representation learning comprises the following steps:

[0026] Step 3.1, denoising branch D(x s ; δ), where δ represents the parameters of the denoising decoder. The goal is to learn domain-invariant semantic representations. s and its label y sInput denoising branch, apply Gaussian noise to the label through the diffusion model, and obtain the noise label y t . Shared encoder E(x s , x t , x s→t ;δ) The noise label y t and the source domain image x s As input, denoising multi-scale features are generated. Denoising decoder D(x s ; δ) Take the denoised multi-scale features as input and predict the denoised labels.

[0027] Step 3.2, source domain supervision branch D(x s ; φ), where φ represents the parameters of the source domain supervised decoder. The purpose is to ensure the segmentation performance of the model on the source domain. s Input shared encoder E(x s , x t , x s→t ;δ) Extract the multi-scale features of the source domain, and then input the multi-scale features of the source domain into the source domain supervision decoder D(x s φ), predicts the segmentation result of the source domain image. Considering the imbalanced distribution of foreground and background categories in medical images, the source domain supervision branch adopts a category weight loss function to give greater weight to difficult-to-classify samples.

[0028] Step 3.3, target domain supervision branch D(x s→t ; ψ), where ψ represents the parameters of the target domain supervisory decoder. This branch plays a key role in connecting the previous and next steps in this framework. s→t Perform semantic segmentation and achieve adaptation from pixel level to feature level. s→t Input shared encoder E(x s , x t , x s→t ;δ) Extract the multi-scale features of the target domain and then input them into the target domain supervision decoder D(x s→t ψ), predict the segmentation result. To alleviate the domain shift caused by the imbalanced distribution of categories in the source and target domains, this branch designs a domain-adaptive weighted cross-entropy loss, which gives greater weight to categories that are high-frequency in the target domain but low-frequency in the source domain, and vice versa.

[0029] Preferably, the step 4 comprises the following steps:

[0030] Step 4.1: Input the target domain image into the trained denoising, source domain supervision, and target domain supervision decoder branches to obtain three probability maps.

[0031] Step 4.2: Calculate the entropy of each probability map as the uncertainty measure, and perform weighted average fusion on the three probability maps. The weight depends on their respective uncertainties. The greater the uncertainty, the smaller the weight.

[0032] Step 4.3: Perform threshold processing on the fused probability map to obtain pseudo labels.

[0033] Preferably, the step 4 of generating pseudo labels comprises the following steps:

[0034] Given a target domain image x t , and input them into the trained denoising decoder D(x s ;δ), source domain supervised decoder and the target domain supervised decoder D(x s→t ; ψ), we get three probability maps:

[0035] p t;δ =D(x t ;δ): The probability map obtained by inputting the target domain image into the denoising decoder.

[0036] The target domain image is fed into the source domain supervised decoder to obtain the probability map.

[0037] p t;ψ =D(x t ; ψ): The probability map obtained by inputting the target domain image into the target domain supervised decoder.

[0038] In order to fuse the three probability maps into one pseudo label, a weighted average method based on uncertainty estimation is introduced. First, the uncertainty of each probability map is estimated by calculating its entropy. The probability map p of the i-th decoder branch is i The uncertainty u i Defined as Where N is the number of pixels in the probability map, The larger the entropy, the higher the uncertainty, indicating that the branch's prediction of the image is less reliable.

[0039] According to the estimated uncertainty, the fusion weight w of each probability map is calculated i =exp(-λu i ), where λ is a hyperparameter that controls the degree of influence of uncertainty on the weight. The branch with greater uncertainty has a smaller weight and a smaller contribution during fusion.

[0040] The three probability maps are weighted averaged according to the fusion weight to obtain the fused probability map:

[0041]

[0042] The probability map after fusion Perform threshold processing and mark pixels with a probability greater than the threshold h as foreground, otherwise mark them as background to obtain pseudo labels Where I(·) is an indicator function, which takes the value of 1 when the condition is met and 0 otherwise.

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

[0044] First, pixel-level image alignment is combined with feature-level decoupling learning to alleviate domain offset at multiple levels and improve the model's adaptability.

[0045] Secondly, decoupled representation learning addresses complex domain shifts from multiple angles: the denoising branch learns domain-invariant semantics, the source domain supervision branch ensures source domain performance, and the target domain supervision branch adapts to target domain data to enhance model generalization.

[0046] Finally, uncertainty estimation weights are introduced during pseudo-label fusion to alleviate the category imbalance caused by domain shift and make unsupervised training more robust. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 This is a flowchart of the unsupervised domain adaptation network structure used in the present invention. DETAILED DESCRIPTION

[0048] This paper proposes an unsupervised domain-adaptive medical image segmentation method. The core concept of this method is to fully utilize the annotation information of the source domain and the image information of the target domain through image alignment and decoupled learning. This method achieves high-precision prediction of the segmentation model in the target domain, reduces the annotation burden on medical personnel, and promotes the widespread application of medical image segmentation technology in clinical practice. To further explain the present invention in detail, the following is combined with specific examples and referenced to the accompanying drawings.

[0049] refer to Figure 1 , Figure 1 The flowchart of the structure of the present invention using labeled MRI images and unlabeled CT images to train an unsupervised domain adaptation network includes the following steps:

[0050] Step 1: Data augmentation: Expand the size and diversity of the medical image dataset to improve the robustness and generalization ability of the segmentation model. This includes the following steps:

[0051] The source domain annotation dataset is expanded through rotation transformation. The source domain images and their labels are rotated clockwise by 90°, 180°, and 270°, respectively, to obtain an expanded source domain dataset. The new data volume is four times that of the original dataset. This helps improve the model's robustness to multi-directional changes.

[0052] Random cropping is used. Based on the set output size, when the original image is larger than the output size, a subregion is randomly cropped from the source image and the label. When the original image is smaller than the output size, the image is expanded by padding. This increases data diversity.

[0053] Use elastic deformation. This applies a random displacement field to the image, simulating the stretching and compression of tissue. Each slice and channel in the image is transformed separately, with labels only transformed in the first channel to maintain consistency.

[0054] Use grid distortion. Divide the image into multiple grid blocks and apply random displacement to each grid to simulate complex nonlinear deformation.

[0055] Sharpen the image. Use the sharpening operator to emphasize the edges and details of the image based on the random alpha value.

[0056] Adjust brightness and contrast. Adjusts the overall brightness of the image by a random multiplier, or adjusts the contrast of the image by a random exponent. This simulates exposure and lighting variations in imaging devices.

[0057] Gamma transform uses an exponential function to perform nonlinear mapping on image pixel values, changing the dynamic range of the image.

[0058] These data augmentation transformations can be randomly combined and superimposed to increase data diversity and generalization. During training, a specified number of these transformations are randomly sampled and executed serially. Finally, the transformed images and labels are converted into tensors and fed into the network.

[0059] Step 2: Use a generative adversarial network to convert the MRI image into the visual style of the CT image. By jointly optimizing the cycle consistency loss and the adversarial loss, we ensure that the visual style of the converted image is consistent with the target domain and the semantic information is unchanged.

[0060] Step 2.1. Build the generator network G t and the discriminator network D t Generator G t Receive the source domain image x s , convert it into the target domain style image x s→t Discriminator D t Receive x s→t and the real target domain image x t , to determine the probability that they are from the target domain. By minimizing the generator G t and the discriminator D t The adversarial loss makes G t Learn to generate target domain style images that are as realistic as possible. Adversarial loss formula:

[0061]

[0062] Make G t Learn to generate target domain style images that are as realistic as possible. is the minimum generator G t and the discriminator D t The confrontation loss, represents the expectation on the target domain data distribution, Represents the expectation on the source domain data distribution. During the training process, the discriminator D t Try to maximize this loss function to better distinguish the real target domain images from the generated pseudo target domain images. t We try to minimize this loss function to generate realistic target domain style images that can fool the discriminator.

[0063] Step 2.2: In order to maintain the semantic consistency of the converted image, the reverse generator G is introduced in the source domain. s and the corresponding discriminator D s . Reverse generator G s It consists of a shared encoder based on a diffusion model and an upsampling decoder, which transforms the target domain style image x s→t Reconstruct the source domain. Use the formula:

[0064]

[0065] By minimizing this loss function, the reverse generator G s It can learn to convert the target domain style image back to the source domain style while keeping the semantic content of the image unchanged. is the minimum generator G s and the discriminator D s The adversarial loss, represents the expectation on the target domain data distribution, Represents the expectation on the source domain data distribution.

[0066] Step 2.3, in addition to training G separately t and G s In addition to the adversarial loss, the cycle consistency reconstruction loss is also introduced. s Through G t and G s After the transformation, the original image should be reconstructed as much as possible. Similarly, the target domain image x t Through G s and G t After the transformation, the original image should also be reconstructed. Using the formula:

[0067]

[0068] Among them L cyc is to minimize the cycle reconstruction loss, represents the expectation on the target domain data distribution, Represents the expectation on the source domain data distribution. By minimizing the cycle reconstruction loss, G t and G s Learn semantically consistent style transfer to ensure that the content of the image does not change before and after the conversion.

[0069] Step 2.4: During the training process, alternately optimize the three loss functions mentioned above: source domain to target domain adversarial loss, target domain to source domain adversarial loss, and bidirectional cycle consistency reconstruction loss. Through multiple cycles of alternating training, the two generators G t and G s It can convert the styles of images without changing the semantic content of the images, thereby narrowing the distribution difference between the source domain and the target domain at the pixel level.

[0070] Step 3: Construct three decoupled supervised learning branches. The denoising branch uses a diffusion model, taking the source domain MRI image and its noisy label as input, to learn domain-unbiased feature representations. The source supervision branch is trained on the original MRI images and uses Focal Loss to mitigate class imbalance. The target supervision branch is trained on style-transferred CT images and introduces a domain-adaptive weighted cross-entropy loss to address inter-domain class distribution differences.

[0071] The denoising branch D(x s ; δ), where δ represents the parameters of the denoising decoder. The goal is to learn domain-invariant semantic representations. s and its label y s Input denoising branch, apply Gaussian noise to the label through the diffusion model, and obtain the noise label y t . Shared encoder E(x s , x t , x s→t ;δ) The noise label y t and the source domain image x s As input, denoising multi-scale features are generated. Denoising decoder D(x s δ) Take the denoised multi-scale features as input and predict the denoised labels. By optimizing the denoising reconstruction loss, the denoising branch can learn domain-invariant semantic information.

[0072] The source domain supervision branch D(x s ; φ), where φ represents the parameters of the source domain supervised decoder. The purpose is to ensure the segmentation performance of the model on the source domain. s Input shared encoder E(x s , xt , x s→t ;δ) Extract the multi-scale features of the source domain, and then input the multi-scale features of the source domain into the source domain supervision decoder D(x s φ), predicting the segmentation results of the source domain image. Considering the imbalanced distribution of foreground and background classes in medical images, the source domain supervision branch uses a class-weighted loss function to assign greater weight to difficult-to-classify samples. By optimizing the source domain supervision loss, the model's segmentation accuracy on source domain data is guaranteed.

[0073] The target domain supervision branch D(x s→t ; ψ), where ψ represents the parameters of the target domain supervisory decoder. This branch plays a key role in connecting the previous and next steps in this framework. s→t Perform semantic segmentation and achieve adaptation from pixel level to feature level. s→t Input shared encoder E(x s , x t , x s→t ;δ) Extract the multi-scale features of the target domain and then input them into the target domain supervision decoder D(x s→t ; ψ), predict the segmentation result. In order to alleviate the domain shift caused by the imbalance of source and target domain category distribution, this branch designs a domain adaptive weighted cross entropy loss, which gives greater weight to categories with high frequency in the target domain but low frequency in the source domain, and vice versa. By optimizing this loss, the decoder D(x s→t ;ψ) Adapt to the semantic information of the target domain data.

[0074] The three decoder branches share the same diffusion model-based encoder E(x s , x t , x s->t ; δ), but the decoder parameters are independent of each other. The features extracted by the encoder are subjected to tasks such as denoising and reconstruction, source domain segmentation, and target domain segmentation in different branches, learning representations that contain domain-invariant semantics while taking into account the individual characteristics of the source and target domains.

[0075] Step 4: Input the target domain CT image into the three branches to obtain segmentation probability maps. The uncertainty of each probability map is estimated based on the entropy value, and then the weighted average is used to obtain the fused pseudo-label.

[0076] The target domain image is input into the trained denoising, source domain supervision, and target domain supervision decoder branches to obtain three probability maps.

[0077] The entropy of each probability map is calculated as an uncertainty measure, and the three probability maps are fused by weighted average. The weight depends on their respective uncertainties. The greater the uncertainty, the smaller the weight.

[0078] Threshold processing is performed on the fused probability map to obtain pseudo labels.

[0079] Step 5: Use the pseudo-label as a supervisory signal and optimize the target domain segmentation model by minimizing the Dice loss and cross entropy loss to adapt it to the characteristics of CT images.

[0080] Step 6: Use the trained target domain segmentation decoder to predict the new CT image and obtain the final segmentation result.

[0081] Table 1. Domain adaptation experimental results of the heart segmentation dataset MMWHS from MR to CT

[0082]

[0083] Table 2 Domain adaptation experimental results of the heart segmentation dataset MMWHS from CT to MR

[0084]

[0085] Table 1 and Table 2 respectively show the comparative results of the present invention in bidirectional unsupervised domain adaptation (MRI to CT and CT to MRI) on the heart segmentation dataset MMWHS. In order to verify the effectiveness of the present invention, it was compared with several existing unsupervised domain adaptation methods, including SIFA, PnP-AdaNet, AdaOutput, CycleGAN, CyCADA, FPL+ and A&D. The experimental results show that the present invention achieved the best performance in both directions (MRI to CT and CT to MRI). In these comparative experiments, the Dice coefficient and ASD (average surface distance) were used as evaluation indicators. The Dice coefficient is used to measure the overlap between the segmentation result and the true annotation. The higher the value, the closer the segmentation result is to the true annotation. ASD is used to measure the average distance between the segmentation result surface and the true annotation surface. The lower the value, the closer the segmentation result is to the true annotation. Compared with the latest method A&D method in 2023, the present invention improved the Dice average by 0.6 percentage points (from 90.1% to 90.7%) and reduced the ASD by 0.1 percentage points (from 1.7 to 1.6) in the experiment from MRI to CT. In the experiment from CT to MRI, the Dice average increased by 6.1 percentage points (from 71.4% to 77.5%), and the ASD decreased by 2.3 percentage points (from 7.9 to 5.6). These results highlight the effectiveness of the present invention in adapting heart segmentation between different modalities. This superior performance is mainly due to the two key modules of decoupled representation learning and pixel-level image alignment in the present invention, which together promote the effective migration and adaptation of cross-modal features. In this way, the present invention is able to achieve robust segmentation performance between two completely different imaging modalities, MRI and CT, demonstrating its powerful ability and stability in dealing with the problem of cross-modal domain adaptation of medical images.

[0086] The above is merely a basic example of the present invention, and is intended only to help understand the technical solution and core concept of the present invention. It should be noted that those skilled in the art may make various improvements and modifications to the present invention without departing from the principles of the present invention, and such improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. An unsupervised domain adaptation method for medical image segmentation, characterized in that The following steps are involved: Step 1: Perform data augmentation to expand the scale and diversity of medical image datasets; Step 2: Use the generative adversarial network to convert the source domain images in the dataset into the target domain style, and use the cycle consistency loss to ensure that the converted images are semantically consistent with the original images; Step 3: Design a network structure with three decoder branches: the denoising branch uses the noisy labels to learn domain-independent segmentation features; The source domain supervision branch is trained on the source domain image; the target domain supervision branch is trained on the converted target domain style image and adapts to the target domain; Step 4: Use the three trained decoder branches to predict and fuse the target domain image to obtain a pseudo label; The specific implementation process of the three decoder branches is as follows: Step 3.1, denoising branch D(x s ; δ), where δ represents the parameters of the denoising decoder; the source domain image x s and its label y s Input denoising branch, apply Gaussian noise to the label through the diffusion model, and obtain the noise label y t ; Shared encoder E(x s , x t , x s →t ; δ) The noise label y t and the source domain image x s As input, generate denoised multi-scale features; Denoising decoder D(x s ; δ) Take the denoised multi-scale features as input and predict the denoised labels; by optimizing the denoising reconstruction loss, the denoising branch can learn domain-invariant semantic information; Step 3.2, source domain supervision branch D(x s ; φ), where φ represents the parameters of the source domain supervised decoder; the source domain image x s Input shared encoder E(x s , x t , x s→t ;δ) Extract the source domain multi-scale features and input the source domain multi-scale features into the source domain supervision decoder D(x s ; φ), predict the segmentation result of the source domain image. The source domain supervision branch adopts the category weight loss function and optimizes the source domain supervision loss to ensure the segmentation accuracy on the source domain data; Step 3.3, target domain supervision branch D(x s→t ; ψ), where ψ represents the parameters of the target domain supervision decoder, which is obtained by s→t Perform semantic segmentation to achieve pixel-level to feature-level adaptation; s→t Input shared encoder E(x s , x t , x s→t ;δ) Extract the multi-scale features of the target domain and then input them into the target domain supervision decoder D(x s→t ; ψ), predict the segmentation result; the target domain supervision branch designs a domain adaptive weighted cross entropy loss to promote the decoder D(x s→t ; ψ) semantic information of adaptive target domain data; Step 5: Use pseudo labels to train the segmentation decoder in the target domain; Step 6: Use the trained target domain segmentation decoder to predict the new target domain image and obtain the segmentation result.

2. The unsupervised domain adaptation method for medical image segmentation according to claim 1, characterized in that The data enhancement includes: The source domain annotation dataset is expanded through rotation transformation. The source domain images and their labels are rotated clockwise by 90°, 180°, and 270° respectively to obtain the expanded source domain dataset. Random cropping is used: according to the set output size, when the original image is larger than the output size, a sub-region is randomly cropped from the source domain image and the label; when the original image is smaller than the output size, the image is expanded by edge padding; Using elastic deformation: By applying a random displacement field to the image, the stretching and compression of the tissue are simulated; each slice and channel in the image are transformed separately, and the label is only transformed in the first channel; Use grid distortion: Divide the image into multiple grid blocks and apply random displacement to each grid to simulate nonlinear deformation; Sharpen the image: Use the sharpening operator to highlight the edges and details of the image based on the random alpha value; Adjust brightness and contrast: adjust the overall brightness of the image using a random multiplier, or adjust the contrast of the image using a random exponent; Gamma transformation: Use exponential function to perform nonlinear mapping on image pixel values ​​to change the dynamic range of the image.

3. The unsupervised domain adaptation method for medical image segmentation according to claim 1, characterized in that The implementation process of step 2 is as follows: Step 2.

1. Build the generator network G t and the discriminator network D t ; Generator G t Receive the source domain image x s , convert it into the target domain style image x s→t ; Discriminator D t Receive x s→t and the real target domain image x t , judge the probability that they come from the target domain; by minimizing the generator G t and the discriminator D t The adversarial loss makes G t Learn to generate realistic target domain style images; Step 2.2: Introduce the reverse generator G into the source domain s and the corresponding discriminator D s ; Reverse generator G s It consists of a shared encoder based on a diffusion model and an upsampling decoder, which transforms the target domain style image x s→t Rebuild back to the source domain; Step 2.3, in addition to training G separately t and G s In addition to the adversarial loss, the cycle consistency reconstruction loss is also introduced; that is, the source domain image x s Through G t and G s After the transformation, the original image should be reconstructed; similarly, the target domain image x t Through G s and G t After the transformation, the original image should also be reconstructed; minimizing the cycle reconstruction loss and prompting G t and G s Learn semantically consistent style transfer; Step 2.

4. During the training process, three loss functions are optimized alternately: the adversarial loss from the source domain to the target domain, the adversarial loss from the target domain to the source domain, and the bidirectional cycle consistency reconstruction loss.

4. The unsupervised domain adaptation method for medical image segmentation according to claim 3, characterized in that The specific process of step 4 is as follows: Step 4.1: Input the target domain image into the three decoder branches of denoising, source domain supervision, and target domain supervision to obtain three probability maps; Step 4.2: Calculate the entropy of each probability map as an uncertainty measure and perform weighted average fusion of the three probability maps. The weight depends on the uncertainty of each map. The greater the uncertainty, the smaller the weight. Step 4.3: Perform threshold processing on the fused probability map to obtain pseudo labels.

5. The unsupervised domain adaptation method for medical image segmentation according to claim 4, characterized in that The specific process of obtaining the pseudo-label is as follows: Given a target domain image x t , and input them into the trained denoising decoder D(x s ; δ), source domain supervised decoder and the target domain supervised decoder D(x s→t ; ψ), we get three probability maps: p t;δ =D(x t ;δ): The probability map obtained by inputting the target domain image into the denoising decoder; Input the target domain image into the source domain supervised decoder to obtain the probability map; p t;ψ =D(x t ; ψ): The probability map obtained by inputting the target domain image into the target domain supervised decoder; A weighted average method based on uncertainty estimation is introduced to estimate the uncertainty of each probability map by calculating its entropy. The probability map p of the i-th decoder branch i The uncertainty u i Defined as N is the number of pixels in the probability map, is the probability that the jth pixel belongs to the foreground; According to the estimated uncertainty, the fusion weight w of each probability map is calculated i =exp(-λu i ), where λ is a hyperparameter that controls the degree of influence of uncertainty on the weight; The three probability maps are weighted averaged according to the fusion weight to obtain the fused probability map: The probability map after fusion Perform threshold processing and mark pixels with a probability greater than the threshold h as foreground, otherwise mark them as background to obtain pseudo labels Where I(·) is an indicator function, which takes the value of 1 when the condition is met and 0 otherwise.

Citation Information

Patent Citations

  • Cross-modal unsupervised domain adaptive medical image segmentation method

    CN115731178A

  • Passive domain adaptive eye fundus image segmentation method and device

    CN118334062A