Medical image segmentation method based on semi-supervised adaptive and cross-domain collaborative learning
By constructing parallel target and source domain segmentation student-teacher models, and combining cross-domain collaborative loss function and pseudo-label relearning loss, the problem of insufficient segmentation accuracy in medical image segmentation is solved, and high-precision segmentation under different lesion conditions is achieved.
Patent Information
- Application Number
- CN202411988049.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing technologies suffer from low segmentation accuracy in medical image segmentation, especially in cases of different modalities of different lesions or different lesions of the same modality. This is due to insufficient segmentation accuracy caused by a lack of target domain supervision and semantic gaps.
We adopt a semi-supervised domain adaptive and cross-domain collaborative learning approach. By constructing parallel target domain and source domain segmentation models for students and teachers, and combining cross-domain collaborative loss function and pseudo-label relearning loss, we conduct iterative training to make full use of unlabeled target domain data and source domain data to improve segmentation accuracy.
It effectively improves the accuracy of medical image segmentation, especially in cases of different modalities of different lesions or different lesions of the same modality. By utilizing unlabeled data and cross-domain contrast loss function, it enhances the performance of the segmentation network.
Smart Images

Figure CN119785033B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision and relates to a medical image segmentation method, specifically a semi-supervised medical image segmentation method based on domain adaptation and cross-domain collaborative learning. Background Technology
[0002] Image segmentation is a key task in computer vision, involving the division of digital images into different parts or regions. Its purpose is to classify pixels in an image according to their semantic information, thereby enabling image separation and understanding. Image segmentation is currently widely used in fields such as autonomous driving, video surveillance, and medical imaging.
[0003] The purpose of medical image segmentation is to separate different structures, organs, or lesion areas from the background in medical images (such as CT, MRI, X-rays, etc.), thereby helping doctors and medical experts to better analyze and diagnose patients' health conditions. However, due to patient privacy protection and the specialized nature of required annotations, training medical image segmentation models often faces problems such as insufficient training data and a lack of annotations. In practice, many well-known open-source platforms host numerous medical challenges. These challenges provide large-scale open-source medical image datasets containing professional and detailed pixel-level segmentation annotations for tissue regions or lesion regions in medical images. These datasets can be used to help train models for the target task, that is, adapting models trained on existing open-source datasets (source domain) to specific target domain datasets (target domain). This type of method is called domain adaptation.
[0004] To reduce the performance gap caused by differences in data distribution between different domains, existing medical image segmentation methods based on semi-supervised domain adaptation, such as the patent application CN115731178A entitled "A Cross-Modal Unsupervised Domain Adaptive Medical Image Segmentation Method," disclose an unsupervised domain adaptive medical image segmentation method. The implementation steps are: data preprocessing; iterative training and parameter updating; acquisition of the segmentation model; acquisition of the segmentation result. This invention can learn the common features between two modalities without using any target domain annotation, and has good segmentation accuracy on both source and target modal images. However, its shortcomings lie in the fact that the method requires the source domain image and the target domain image to be different modalities of the same lesion. However, in reality, it is easier to obtain images of different modalities of different lesions or the same modality of different lesions in most cases. When training with such a dataset, due to the lack of supervision of the target domain and the large semantic gap between the style and content information of the source domain and the target domain, and when the content-specific information of the image is coupled with the style information of its specific domain, it is impossible to learn the correct representation of the content that is independent of the domain. At the same time, it is affected by the interference of the style of the specific domain, which affects the further improvement of the segmentation accuracy. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and propose a medical image segmentation method based on semi-supervised domain adaptation and cross-domain collaborative learning to solve the technical problem of low segmentation accuracy in the existing technology.
[0006] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:
[0007] (1) Obtain a mixed training sample set, a validation sample set, and a test sample set from the source and target domains:
[0008] For Z that includes multiple pixel categories and has labels s 3D source domain medical images and Z-band t Each unlabeled 2D medical image in the target domain is preprocessed. Then, based on the preprocessed 2D medical images, source domain hybrid training sample sets and target domain hybrid training sample sets, as well as validation and test sample sets, are obtained. Z... s ≥150, Z t ≥50;
[0009] (2) Construct a medical image segmentation network model based on cross-domain collaborative learning:
[0010] Construct a student model ξ for target domain segmentation, which includes parallel arrangement. t Target domain segmentation teacher model θ t Source domain segmentation student model ξ sSource domain segmentation teacher model θ s , and ξ s and ξ t The cross-domain collaborative loss function is O for the medical image segmentation network model with Loss, where:
[0011]
[0012] L unsup =L mse +λ asc L ASC1 +λ rel L rel
[0013] Where L sup L unsup Let λ represent the supervised loss function and the unsupervised loss function for cross-domain collaborative learning, respectively. ramp L represents unsup The weighting coefficients, R represents the maximum number of iterations, r represents the number of iterations, and L... mse L represents the cross-domain mean squared error consistency loss. ASC1 L represents the cross-domain contrast loss. rel λ represents the pseudo-label relearning loss. asc and λ rel L respectively ASC1 and L rel Weighting coefficients;
[0014] (3) Iteratively train the medical image segmentation network model:
[0015] The medical image segmentation network model O is iteratively trained by using a mixed training sample set and a validation sample set from the source and target domains to obtain a trained medical image segmentation network model O*.
[0016] (4) Obtain the segmentation results of medical images:
[0017] The target domain test sample set T tla As input to the trained medical image segmentation network model O*, the target domain segmentation student network ξ t * Forward reasoning is performed on each target domain test sample to obtain the segmentation result map of each test sample.
[0018] Compared with the prior art, the present invention has the following advantages:
[0019] 1. In the iterative training process of the image segmentation network model, the cross-domain contrast loss function in the loss functions of the target domain segmentation student model and the source domain segmentation student model can incorporate dice similarity into the loss, fully considering the contextual information of the region to be segmented. At the same time, the pseudo-label relearning loss function selects the labels generated by the network with higher segmentation accuracy in the source domain segmentation teacher network and the target domain segmentation teacher network as pseudo-labels for the unlabeled data in the target domain, making full use of the unlabeled target domain data and effectively improving the segmentation accuracy of medical images.
[0020] 2. This invention performs domain adaptation processing on the target domain training sample set and the source domain training sample set, and constructs a source domain hybrid training sample set and a target domain hybrid training sample set based on domain adaptation, which are used to train the source domain segmentation network and the target domain segmentation network, respectively. This effectively utilizes the source domain data and avoids the limitation of existing technologies that require the source domain image and the target domain image to be the same lesion, thus effectively improving the segmentation accuracy of medical images. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the implementation of the present invention;
[0022] Figure 2 This is a flowchart illustrating the implementation of domain adaptive processing of the target domain training sample set and the source domain training sample set in this invention.
[0023] Figure 3 This is a schematic diagram of the domain segmentation model of the present invention;
[0024] Figure 4 This is a schematic diagram of the structure of the convolution module of the present invention. Detailed Implementation
[0025] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0026] Reference Figure 1 The present invention includes the following steps:
[0027] Step 1) Obtain a mixed training sample set, a validation sample set, and a test sample set from the source and target domains:
[0028] Step 1a) Obtain Z from the BraTS brain tumor segmentation dataset s Aspect dimension is D s ×H s ×W s 3D brain tumor medical images in the Flair modality and their corresponding segmentation labels constitute 3D source domain medical images and their corresponding 3D segmentation labels. Z is obtained from the ICHS brain hemorrhage segmentation dataset. t Aspect dimension is D t ×Ht ×W t The 3D medical images of brain hemorrhage constitute the 3D target domain medical image. In this embodiment, Z s =246, D s =155, H s =240, W s =240, Z t =270, D t =32, H t =240, W t =255.
[0029] Step 1b) Along Z s Aspect dimension is D s ×H s ×W s The 3D source domain medical image and its corresponding dimension is D s ×H s ×W s The dimension D of the 3D segmentation label s Extracting the elements perpendicular to D sequentially s Slicing the axis yields K. s Aspect dimension H s ×W s Source domain medical image slices; simultaneously along Z t Aspect dimension is D t ×H t ×W t The dimension D of the 3D target domain medical image t Extracting the elements perpendicular to D sequentially t Slicing the axis yields K t Aspect dimension H t ×W t The target domain medical image slice, where K s =Z s ×D s K t =Z t ×D t In this embodiment, K s =38130, K t =8640.
[0030] Step 1c) For K s Aspect dimension H s ×W s Source domain medical image slices and their corresponding labels, and K t Aspect dimension H t ×W tThe target domain medical image slices are each center-cropped with dimensions H×W. The source domain medical image slices and the cropped target domain medical image slices are then normalized to obtain the preprocessed K. s Source domain medical image slices with aspect ratio H×W and their corresponding segmentation labels And the preprocessed dimension H×W of K t Aspect of target domain medical image slices In this embodiment, H = 256, W = 256.
[0031] Step 1d) Preprocessing K t The pixels in E images of the target domain medical images are labeled, and then P images of the target domain medical images and their labels are combined to form a labeled target domain training sample set. The remaining V t The target domain medical images and their labels constitute the target domain validation sample set. The remaining preprocessed unlabeled K t -E frames of medical images representing the target domain, and U frames of images representing the unlabeled target domain training sample set. The remaining N medical images of the target domain constitute the unlabeled target domain test sample set. Where E+U+N=K t P+V t =E, Where T tla ∪T tua Construct a partially labeled target domain training sample set; preprocess the K... s V in source domain medical images and their labels s The source domain medical images and their labels constitute the source domain validation sample set. The remaining K s -V s The source domain medical images and their labels constitute the source domain training sample set. in In this embodiment, E = 2560, P = 640, N = 3040, V t =1920, U=3040, V S =10000.
[0032] Step 1e) The process of performing domain adaptation processing on each target domain training sample and each source domain training sample is as follows: Figure 2 As shown, the source domain training samples x s Training samples x in the target domain t,l Perform grayscale histogram matching on the template image to obtain the grayscale matching image r. stl , for x s and rst Perform Fast Fourier Transform on each to obtain x s amplitude spectrum F A (x s ), x s Phase spectrum F P (x s ) and r stl amplitude spectrum F A (r stl ); to select x from the training sample set of the target domain t,l Using source domain training samples x s Perform grayscale histogram matching on the template image to obtain the grayscale matching image r. tls , for x t,l and r tls Perform Fast Fourier Transform on each to obtain x t,l amplitude spectrum F A (x t,l ), x t,l Phase spectrum F P (x t,l ) and r tls amplitude spectrum F A (r tls ); to select x from the training sample set of the target domain t,u Using source domain training samples x s Perform grayscale histogram matching on the template image to obtain the grayscale matching image r. tus , for x t,u and r tus Perform Fast Fourier Transform on each to obtain x t,u amplitude spectrum F A (x t,u ), x t,u Phase spectrum F P (x t,u ) and r tus amplitude spectrum F A (r tus ). Calculate F respectively A (r stl ), F A (r tls ), F A (r tus ) and binary rectangular mask M λ The Hadamard product yields r stl r tls r tus The low-frequency information is obtained, and F is calculated respectively. A (x s ), F A (x t,l ), F A (x t,u) and the inverse code of the binary rectangular mask 1 H,W -M λ The Hadamard product yields x s 、x t,l 、x t,u High-frequency information, and then for x s High-frequency information and r stl The amplitude spectrum and x of the domain adaptive image obtained by summing the low-frequency information s Phase spectrum F P (x s Perform an inverse Fourier transform to obtain x. s Domain-adaptive image x s→t ; for x t,l High-frequency information and r tls The amplitude spectrum and x of the domain adaptive image obtained by summing the low-frequency information t,l Phase spectrum F P (x t,l Perform an inverse Fourier transform to obtain x. t,l Domain-adaptive image x t,l→s ; for x t,u High-frequency information and r tus The amplitude spectrum and x of the domain adaptive image obtained by summing the low-frequency information t,u Phase spectrum F P (x t,u Perform an inverse Fourier transform to obtain x. t,u Domain-adaptive image x t,u→s The calculation formulas are as follows:
[0033]
[0034] Where, x s→t 、x t,l→s 、x t,u→s They represent x respectively s 、x t,l 、x t,u The domain-adaptive image, where λ represents the control binary mask M. λ The parameter for the size, λ∈(0,1), The function F represents the indicator function, where h∈(0,H], w∈(0,W], and H and W represent the number of pixels in the vertical and horizontal directions of the 2D medical image, respectively. -1 (·) denotes the inverse Fourier transform, 1 H,W This represents a matrix of dimension H×W with all elements equal to 1. Represents the Hadamard product, r stl Represents x s With x t,l The gray-level matching image after gray-level histogram matching, F A (r stl ) indicates that for rstl After performing a fast Fourier transform, r stl amplitude spectrum, F A (x s ) and F P (x s ) respectively represent x s After performing a Fast Fourier Transform, x s The amplitude spectrum and phase spectrum, r tls Represents x t,l With x s The gray-level matching image after gray-level histogram matching, F A (r tls ) indicates that for r tls After performing a fast Fourier transform, r tls amplitude spectrum, F A (x t,l ) and F P (x t,l ) respectively represent x t,l After performing a Fast Fourier Transform, x t,l The amplitude spectrum and phase spectrum, r tus Represents x t,u With x s The gray-level matching image after gray-level histogram matching, F A (r tus ) indicates that for r tus After performing a fast Fourier transform, r tus The amplitude spectrum. F A (x t,u ) and F P (x t,u ) respectively represent x t,u After performing a Fast Fourier Transform, x t,u The amplitude spectrum and phase spectrum. In this embodiment,
[0035] Step 1f) Mix the domain-adapted images and their labels corresponding to the source domain training sample set with all the preprocessed target domain training sample sets to form a target domain hybrid training sample set. The target domain training sample set is mixed with the corresponding domain-adapted image and its label with all preprocessed source domain training sample sets to form a source domain hybrid training sample set.
[0036] Step 2) Construct a medical image segmentation network model based on semi-supervised domain adaptation and cross-domain collaborative learning:
[0037] Step 2a) Construct a student model ξ for target domain segmentation, which includes parallel arrangement of students. t Target domain segmentation teacher model θ t Source domain segmentation student model ξs Source domain segmentation teacher model θ s The medical image segmentation network model O. All four domain segmentation models employ encoders that include sequential connections. decoder And the output module Out, whose structure is as follows: Figure 3 As shown, encoder Includes sequentially connected convolutional modules (Conv) and Level I convolutional Conv-encoder (En) modules; decoder It includes sequentially connected I-level convolutional Conv-decoding De modules; the input of the i-th level convolutional Conv-encoding En module is connected to the middle position of the (I-i+1)-th level convolutional Conv-decoding De module, and in this embodiment, I = 4.
[0038] The structure of the convolutional module Conv is as follows: Figure 4 As shown: First convolutional layer → First batch regularization layer → First nonlinear function layer → Dropout layer → Second convolutional layer → Second batch regularization layer → Second nonlinear function layer. All first and second nonlinear function layers in the Conv module use the Leakyrelu nonlinear activation function. The dropout probability of the Dropout layer is set to 0.5, randomly deactivating neurons in the network model with a probability of 0.5, i.e., setting the output of that neuron to 0. The first and second convolutional layers have the same structure. The convolutional kernels in the first and second convolutional layers of the Conv module are set to 3×3, with a quantity of 16, a stride of 1, and surrounding padding of 1. The first-level encoding submodule En1 includes sequentially connected max-pooling layers and the first convolutional module Conv1, where the first and second convolutional layers in Conv1... The convolutional kernels in the multilayer layer are set to 3×3, with a total of 32 kernels, a stride of 1, and padding of 1. The second-level encoding submodule En2 includes a sequentially connected max-pooling layer and a second convolutional module Conv2, where the first and second convolutional layers in Conv2 have 3×3 kernels, a total of 64 kernels, a stride of 1, and padding of 1. The third-level encoding submodule En3 includes a sequentially connected max-pooling layer and a third convolutional module Conv3, where the first and second convolutional layers in Conv3 have 3×3 kernels, a total of 128 kernels, a stride of 1, and padding of 1. The fourth-level encoding submodule En4 includes a sequentially connected max-pooling layer and a fourth convolutional module Conv4, where the first and second convolutional layers in Conv4 have 3×3 kernels, a total of 256 kernels, a stride of 1, and padding of 1.
[0039] decoder Includes four sequentially connected decoding submodules. jThe first-level decoding submodule De1 includes a first deconvolutional layer and a fifth-level convolutional module Conv5, connected sequentially. The first deconvolutional layer has 2×2 kernels, 128 kernels, a stride of 2, and 0 padding. The first and second convolutional layers in Conv5 have 3×3 kernels, 128 kernels, a stride of 1, and 1 padding. The second-level decoding submodule De2 includes a second deconvolutional layer and a sixth-level convolutional module Conv6, connected sequentially. The second deconvolutional layer has 2×2 kernels, 64 kernels, a stride of 2, and 0 padding. The first and second convolutional layers in Conv6 have 3×3 kernels, 64 kernels, a stride of 1, and 0 padding. The third-level decoding submodule De3 includes a third deconvolutional layer and a seventh-level convolutional module Conv7, where the third deconvolutional layer has a 2×2 kernel, a quantity of 32, a stride of 2, and 0 padding. The first and second convolutional layers in Conv7 have a 3×3 kernel, a quantity of 32, a stride of 1, and 1 padding. The fourth-level decoding submodule De4 includes a fourth deconvolutional layer and an eighth-level convolutional module Conv8, where the fourth deconvolutional layer has a 2×2 kernel, a quantity of 16, a stride of 2, and 0 padding. The first and second convolutional layers in Conv8 have a 3×3 kernel, a quantity of 16, a stride of 1, and 1 padding.
[0040] The output layer Out consists of sequentially connected output convolutional layers and softmax layers. The convolutional kernels in the output convolutional layers are set to 3×3, with a quantity of 2, a stride of 1, and surrounding padding of 1.
[0041] Step 2b) Define the ξ in the medical image segmentation network model O. s and ξ t The loss function is Loss:
[0042]
[0043] Where L sup L unsup Let λ represent the supervised loss function and the unsupervised loss function for cross-domain collaborative learning, respectively. ramp L represents unsup The weighting coefficients are denoted by R, where R represents the maximum number of iterations and r represents the number of iterations. In this example, λ... ramp =0.1.
[0044] Supervised loss is calculated using a hybrid loss function consisting of dice loss and cross-entropy loss. sup The calculation formula is as follows:
[0045]
[0046] Among them, pr t,l pr t,u pr s→t These represent the current B pr smix Li x s→t x t,l x t,u Student model ξ segmented by target domain .t The resulting predicted probability map, pr s pr t→s,l pr t→s,u These represent the current B pr smix Li x s x t→s,l x t→s,u Student model ξ by source domain segmentation s The resulting predicted probability map, y s y t These represent the current B pr tmix Li x s x t,l The segmentation label, L dice (·) denotes the dice loss function, L ce (·) represents the cross-entropy loss function.
[0047] To enable the model to take into account regional context information and fully mine the information in a large amount of unlabeled target domain data, thereby enhancing the consistency between the source and target domains, an unsupervised loss Li for cross-domain collaborative learning is proposed. unsup The calculation formula is as follows:
[0048] L unsup =L mse +λ asc L ASC1 +λ rel L rel
[0049] Among them, L mse Indicates cross-domain mean squared error consistency loss, L ASC1 L represents the cross-domain contrast loss. rel λ represents the pseudo-label relearning loss. asc , λ rel L respectively ASC1 and L rel The weighting coefficient; in this embodiment, λ asc =0.5, λ rel =0.5.
[0050] Specifically, mean squared error is used as the consistency loss for the output feature maps of the source domain segmentation student network and the target domain segmentation student network to help the two segmentation networks learn collaboratively.
[0051]
[0052] However, mean squared error (MSE) typically only calculates the predicted similarity between paired source and target domain image segmentation results, failing to consider the similarity between unpaired source and target domain image segmentation results. This makes the network prone to overfitting, causing it to focus only on easily learned inter-domain similarities and neglect deeper complementary information between unpaired source and target domains. Secondly, the MSE value only considers the Euclidean distance between each pixel in the two predictions, failing to consider the edge and region contextual information of the predicted target. This is a disadvantage for image segmentation tasks that require attention to the predicted target edges. Therefore, for deeper collaborative learning, this invention designs a cross-domain contrastive learning loss. Specifically, for a training batch with B... u unlabeled target domain training set image x t,u And its corresponding quantity is B u Unlabeled domain adaptive image x t→s,u Treating the two images before and after domain adaptation as positive sample pairs, a total of B is generated. u A positive sample pair is defined as the set X. + The remaining 2 (B) in the batch u -1) data points are considered negative samples, defined as set X. - The definitions of the sets of positive and negative samples in a batch are as follows:
[0053]
[0054] The set of predicted probability graphs P for the domain-segmented student network corresponding to positive samples in one batch. + The set of predicted probability graphs for the domain-segmented student network corresponding to negative samples is defined as follows:
[0055]
[0056] This invention uses dice similarity as a metric for contrastive learning, replacing the traditional cosine similarity. The designed cross-domain contrastive loss function allows the network to focus more on learning pixel-level information, making the algorithm more adaptable to the needs of image segmentation tasks. Cross-domain contrastive loss function L ASC1 The calculation formula is as follows:
[0057]
[0058] To further enhance the reliability of the two teacher models, specifically, this invention adds a 2D dropout layer to each convolutional module of the segmentation network for the input unlabeled sample x. t,u or x t→s,u By adding Gaussian noise, multiple distinct predicted probability maps are obtained after multiple forward propagations from the two teacher models. Based on the accuracy of the validation set in the student model, the average of the predicted probability map points from the teacher model with higher accuracy is selected to obtain a reliable pseudo-label P. This allows the more reliable pseudo-label P to guide the poorly performing student model in relearning. The pseudo-label relearning loss L... rel Teacher pseudo-label contrast loss L ASC2 And teacher pseudo-labeling supervision loss L sup2 The formula for calculating the sum is as follows:
[0059] L rel =L ASC2 +L sup2
[0060]
[0061] in, It is the target domain validation set The tags in It is the source domain verification set The tag.
[0062] {f q,r (x t→s,u ,θ sr ); 1≤q≤Q} represents θ sr Model θ with parameters s For x in the unlabeled samples in one iteration t→s,u The set of probability graphs obtained by performing Q calculations, {f q,r (x t,u ,θ tr ); 1≤q≤Q} represents θ tr Model θ with parameters t For x in the unlabeled samples in one iteration t,u The set of probability graphs obtained by performing Q calculations. Indicated by ξ sr Model ξ with parameters s right The calculated probability graph, Indicated by ξ tr Model ξ with parameters t right The calculated probability graph, P + X represents +The set of predicted probability maps corresponding to the samples in the dataset, P - X represents - The set consisting of predicted probability maps corresponding to the samples in the dataset. In this embodiment, λ asc =0.5, λ rel =0.5, H=W=256, Q=4, B=16, B u =2.
[0063] Step 3) Iteratively train the medical image segmentation network model:
[0064] Step 3a) Initialize the number of iterations to r, the maximum number of iterations to R, R > 10000, and the target domain segmentation student model ξ in the current medical image segmentation network model O. .t Target domain segmentation teacher model θ t and the source domain segmentation student model ξ s Source domain segmentation teacher model θ s The weight parameters are ξ tr θ tr and ξ sr θ sr And let r = 1. In this embodiment, R = 30000;
[0065] Step 3b) Take B samples from each of the source domain mixed training sample set and the target domain mixed training sample set as a batch for the medical image segmentation network model O. s and ξ .t The input is propagated forward to obtain the student model ξ for source domain segmentation in the r-th iteration. .t And the student model ξ for target domain segmentation s The predicted probability map of each source domain mixed training sample and each target domain mixed training sample. smix and pr tmix Through pr smix and pr tmix Calculate the segmentation model O using the formula for the loss function in step 2a). r The current loss value d r Where B ≥ 8. In this embodiment, B = 8.
[0066] Step 3c) According to d r For the weight parameter ξ tr θ tr and ξ sr θ sr Update to get O r The update formulas are as follows:
[0067]
[0068]
[0069] in They represent the weight parameters ξ respectively. tr ξ sr The update results Represent θ tr θ sr The updated result. α r Let α represent the learning rate. s α t Represent θ sr θ tr The update ratio.
[0070] Step 3f) Determine if r = R holds true. If yes, obtain the trained semi-supervised medical image segmentation network model O*; otherwise, let r = r + 1, O r =O and execute step (3b);
[0071] Step 4) Obtain the segmentation results of the medical image:
[0072] The target domain test sample set T tla As input to the trained medical image segmentation network model O*, the target domain segmentation student network Forward reasoning is performed on each target domain test sample to obtain the segmentation result map of each test sample.
Claims
1. A medical image segmentation method based on semi-supervised domain adaptation and cross-domain collaborative learning, characterized in that, Includes the following steps: (1) Obtain a mixed training sample set, a validation sample set, and a test sample set from the source and target domains: For those including multiple pixel categories and labeled 3D source domain medical images and Each unlabeled 2D medical image in the target domain is preprocessed, and a source domain hybrid training sample set and a target domain hybrid training sample set, as well as a validation sample set and a test sample set, are obtained from the preprocessed 2D medical images. , ; (2) Construct a medical image segmentation network model based on semi-supervised domain adaptation and cross-domain collaborative learning: Construct a student model for target domain segmentation that includes parallel arrangement. Target Domain Segmentation Teacher Model Source domain segmentation student model Source domain segmentation teacher model ,and and The cross-domain collaborative loss function is Medical image segmentation network model ,in: ; ; in , Let represent the supervised loss function and the unsupervised loss function for cross-domain collaborative learning, respectively. express The weighting coefficients, Indicates the maximum number of iterations. Indicates the number of iterations. This represents the cross-domain mean squared error consistency loss. Indicates cross-domain comparison loss. This indicates the relearning loss due to pseudo-labels. and They represent and Weighting coefficients; (3) Iteratively train the medical image segmentation network model: The medical image segmentation network model was trained and validated using a mixed source and target domain sample set. Iterative training is performed to obtain a well-trained medical image segmentation network model. ; (4) Obtain the segmentation results of medical images: target domain test sample set As a trained medical image segmentation network model Input, target domain segmentation student network Forward reasoning is performed on each target domain test sample to obtain the segmentation result map of each test sample.
2. The method according to claim 1, characterized in that, The step (1) described above involves multiple pixel categories and labels. 3D source domain medical images and Each unlabeled 3D medical image of the target domain is preprocessed, and the steps are as follows: (1a) Each labeled 3D source domain medical image and each unlabeled 3D target domain medical image are segmented along the depth direction to obtain... 2D source domain medical image slices and A 2D target domain medical image slice; (1b) Perform center cropping on each 2D source domain medical image slice and each 2D target domain medical image slice, and normalize the center cropping results to obtain the preprocessed results. 2D source domain medical image slices and A 2D target domain medical image slice.
3. The method according to claim 2, characterized in that, The steps described in step (1) for obtaining a mixed training sample set, a validation sample set, and a test sample set from the preprocessed 2D medical images are as follows: In this process, at least half of the preprocessed target domain medical images are labeled. Then, the preprocessed labeled target domain medical images form a target domain validation sample set. More than half of the unlabeled target domain medical images are used as a target domain test sample set. The remaining unlabeled and remaining labeled target domain medical images form a target domain training sample set. Next, at least half of the preprocessed labeled source domain medical images are used as a source domain validation sample set. The remaining images are used as a source domain training sample set. Finally, domain adaptation processing is applied to both the target domain training sample set and the source domain training sample set. The result is a combined set containing... The source domain mixed training sample set consists of the target domain training sample set and the source domain training sample set after domain adaptation processing. A mixed training sample set of target domains for each sample.
4. The method according to claim 3, characterized in that, The source domain medical image and target domain medical image mentioned in step (1) refer to labeled 3D medical images containing a certain modality of a certain lesion and unlabeled 3D medical images of the same lesion but different modalities, as well as different lesions but different modalities.
5. The method according to claim 4, characterized in that, The domain adaptation processing described in step (1) for the target domain training sample set and the source domain training sample set, wherein for each source domain training sample... Each unlabeled target domain training sample and each labeled target domain training sample The formulas for domain adaptive processing are as follows: ; ; ; ; in, , , They represent , , Domain-adaptive images, Represents the control binary mask Size parameters, , Indicates an indicator function, , , , These represent the number of pixels in the vertical and horizontal directions of a 2D medical image, respectively. This represents the inverse Fourier transform. The dimension is A matrix in which all elements are 1. It represents the Hadamah accumulation. express and The gray-level matched image after performing gray-level histogram matching. Indicates to After performing Fast Fourier Transform amplitude spectrum, and They represent respectively to After performing Fast Fourier Transform The amplitude spectrum and phase spectrum, express and The gray-level matched image after performing gray-level histogram matching. Indicates to After performing Fast Fourier Transform amplitude spectrum, and They represent respectively to After performing Fast Fourier Transform The amplitude spectrum and phase spectrum, express and The gray-level matched image after performing gray-level histogram matching. Indicates to After performing Fast Fourier Transform amplitude spectrum, and They represent respectively to After performing Fast Fourier Transform The amplitude spectrum and phase spectrum.
6. The method according to claim 5, characterized in that, The medical image segmentation network model described in step (2) , among them , , and All include cascaded encoders. decoder and output module encoder Includes cascaded convolutional modules and pooling layers; decoder Includes cascaded convolutional and deconvolutional modules; output module Including stacked convolutional layers and layer.
7. The method according to claim 6, characterized in that, The iterative training of the medical image segmentation network model described in step (3) is implemented as follows: (3a) Initialize the number of iterations to be The maximum number of iterations is , Current target domain segmentation student model Target Domain Segmentation Teacher Model Source domain segmentation student model Segmentation Teacher Model The weight parameters are respectively , , and and order ; (3b) Randomly sample from the source domain mixed training sample set and the target domain mixed training sample set respectively. Each sample is used as a medical image segmentation network model. middle and The input is propagated forward to obtain the first... Second iteration source domain segmentation student model And target domain segmentation student model Predicted probability maps of each source domain mixed training sample and each target domain mixed training sample and ,in ; (3c) By mixing the training samples from each source domain and the training samples from each target domain, the true labels and... , calculate and loss and through For weight parameters , , and The model is updated to obtain the medical image segmentation model for this iteration. ; (3d) judgment If true, then a well-trained medical image segmentation network model is obtained. Otherwise , Then proceed with step (3b).
8. The method according to claim 7, characterized in that, The steps described in step (3c) and loss It includes supervisory losses. Cross-domain mean squared error consistency loss Cross-domain comparison loss Pseudo-label relearning loss The calculation formulas are as follows: ; ; ; ; ; ; ; in, , , They represent the current indivual inside , , Student model segmented by target domain The resulting predicted probability map, , , They represent the current indivual inside , , Student model by source domain segmentation The resulting predicted probability map, , They represent the current indivual inside , The segmentation label, This represents the total number of unlabeled samples in each iteration. Represents the dice loss function. Represents the cross-entropy loss function. This indicates the contrast loss due to teacher pseudo-labels. This indicates the loss of supervision due to false labeling of teachers. This represents the set of predicted probability maps corresponding to paired samples from the unlabeled samples in each iteration. This represents the set of predicted probability maps corresponding to unpaired samples in each iteration of the unlabeled samples.
9. The method according to claim 7, characterized in that, The weight parameters described in step (3c) , , and The update is performed using the following formulas: ; ; ; ; ; ; in , They represent the weight parameters respectively. , The update results Indicates the first The loss value calculated in the next iteration. , They represent , The update results Indicates the learning rate. , They represent as well as The update ratio.
Citation Information
Patent Citations
Cross-modal unsupervised domain adaptive medical image segmentation method
CN115731178A
Semi-supervised medical image segmentation method and device based on dual-model interactive learning
CN114332135A
Eye fundus image segmentation method and system based on unsupervised domain self-adaption and consistency self-supervised learning and application
CN118505993A