Cross-domain medical image segmentation method based on discrete diffusion model and related device
By training a medical image segmentation method based on discrete diffusion model in a single source domain, the problem of performance degradation in the case of large differences between domains is solved, the accuracy and diversity of cross-domain medical image segmentation is achieved, and the uncertainty of the segmentation result is estimated.
Patent Information
- Application Number
- CN202411619364.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-13
AI Technical Summary
In the case where existing medical imaging segmentation techniques have large differences between the training domain and the testing domain, their performance may drop sharply, and it is difficult to generate accurate and diverse segmentation results, and it is impossible to estimate the uncertainty of segmentation results.
The cross-domain medical image segmentation method based on discrete diffusion model is used to train the model in a single source domain, and the network is generated through the forward diffusion processing module, a robust feature extraction sub-network and segmentation label generation, which generates accurate and diverse segmentation results, and estimates the uncertainty of the segmentation results.
The medical image segmentation model trained on the single source domain can generalize to unknown target domains, generate accurate and diverse segmentation results, and estimate the uncertainty of segmentation results, improving the accuracy and reliability of cross-domain medical image segmentation.
Smart Images

Figure CN119600035A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of medical image analysis, and specifically relates to a cross-domain medical image segmentation method and related devices based on a discrete diffusion model, which are used to train a medical image segmentation model in a single source domain and segment medical images in an unknown target domain. The cross-domains can be different modalities, different sequences, or different centers (hospitals). Background Art
[0002] Medical image segmentation is an important part of clinical practice, which helps in accurate diagnosis, treatment planning and disease monitoring. Most of the existing medical image segmentation techniques are targeted at scenarios where the training and test data come from the same domain (i.e., the same data distribution). When the test data comes from a different distribution (i.e., a different domain), the performance of these methods may drop sharply. This difference between the training domain and the test domain is very common in medical image segmentation and may be caused by different imaging methods, scanning protocols or equipment manufacturers. Therefore, medical image segmentation technology that can generalize across domains is of great clinical significance.
[0003] To address this problem, there are now some domain generalization medical image segmentation methods. Some multi-source domain generalization methods use labeled data from multiple source domains to train segmentation models, and generalize to unknown target domains based on meta-learning or domain-invariant feature learning. Although these methods have achieved satisfactory results, it is difficult to obtain the required training data in practice. In addition, some single-source domain generalization methods use training data from a single source domain to train domain generalization segmentation models through data augmentation or feature decoupling. However, these methods are based on deterministic segmentation models and cannot generate accurate and diverse segmentation results, nor can they estimate the uncertainty of the segmentation results, which limits the application of these methods in clinical scenarios. Summary of the invention
[0004] In order to overcome the technical problem of inaccurate medical image segmentation results in the prior art, the purpose of the present invention is to propose a cross-domain medical image segmentation method and related devices based on a discrete diffusion model. This method can train a medical image segmentation model in a single source domain and segment medical images in an unknown target domain.
[0005] To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0006] A cross-domain medical image segmentation method based on a discrete diffusion model comprises the following steps:
[0007] Obtaining a medical image to be segmented and a pseudo label of the medical image to be segmented;
[0008] Input the medical image to be segmented into the pre-trained domain generalization diffusion segmentation model to obtain the medical image segmentation result;
[0009] Among them, the pre-trained domain generalization diffusion segmentation model includes a forward diffusion processing module, a robust feature extraction subnetwork and a segmentation label generation network connected in sequence; the forward diffusion processing module is used to add noise to the medical image to be segmented to obtain a noise label, the robust feature extraction subnetwork is used to extract robust image features from the medical image to be segmented, and the segmentation label generation network is used to obtain a segmentation label based on the robust image features, the pseudo-label of the medical image to be segmented and the noise label.
[0010] Furthermore, a forward diffusion processing module is used to continuously damage the clean labels of medical images through a Markov chain to generate noisy labels.
[0011] Furthermore, the robust feature extraction subnetwork includes four 2D convolutional layers connected in sequence, an adaptive weighting layer to adaptively fuse features, and a normalization layer;
[0012] 2D convolutional layer, used to extract features from medical images and obtain input features;
[0013] The adaptive weighted layer is used to perform element-by-element squaring, weighted summing, and element-by-element square rooting of the input features using a learnable weight matrix to obtain adaptive fusion features;
[0014] The normalization layer is used to normalize the adaptive fusion features to obtain robust image features.
[0015] Furthermore, the segmentation label generation network includes three encoders, fourteen interactive improvement modules and two decoders connected in sequence;
[0016] The three encoders have the same structure, and the two decoders have the same structure; the encoder includes a convolutional layer, an element-wise summation layer with block position embedding, ten self-attention modules, and two convolutional layers connected in sequence; the decoder includes four deconvolutional layers and a convolutional layer connected in sequence.
[0017] Furthermore, the interactive improvement module is used to utilize the multi-head attention mechanism to iteratively interact between the block-level embeddings of noisy labels, robust image features and pseudo labels to generate improved noisy label embeddings and pseudo label embeddings.
[0018] Furthermore, the multi-head attention mechanism is used to iteratively interact between the block-level embeddings of the noisy label, the robust image features and the pseudo-label to generate improved noisy label embedding and pseudo-label embedding, including the following steps:
[0019] The self-attention mechanism is used to characterize the global dependencies within the noisy labels and generate the first improved noisy label embedding;
[0020] The first cross-attention mechanism is used to characterize the dependency between the image and the pseudo-label, and to generate an improved pseudo-label embedding according to the first improved noisy label embedding;
[0021] The third cross-attention mechanism is used to characterize the dependency between the pseudo-label and the noise label, and generates the second improved noise label embedding based on the improved pseudo-label embedding after the first improved noise label embedding;
[0022] The fourth cross-attention mechanism is used to characterize the dependency between the image and the noise label, and generates the third improved noise label embedding according to the second improved noise label embedding;
[0023] A residual module is used to generate a final improved noisy label embedding according to the third improved noisy label embedding, wherein the residual module includes a connected layer normalization layer and two linear projection layers.
[0024] Furthermore, the loss function of the pre-trained domain generalization diffusion segmentation model includes a denoising objective function, a robust feature constraint, and a pseudo-label improvement constraint.
[0025] A second aspect of the present invention provides a cross-domain medical image segmentation system based on a discrete diffusion model, comprising:
[0026] A medical image and pseudo-label acquisition module, used to acquire the medical image to be segmented and the pseudo-label of the medical image to be segmented;
[0027] A medical image segmentation module is used to input the medical image to be segmented into a pre-trained domain generalization diffusion segmentation model to obtain the medical image segmentation result;
[0028] Among them, the pre-trained domain generalization diffusion segmentation model includes a forward diffusion processing module, a robust feature extraction subnetwork and a segmentation label generation network connected in sequence; the forward diffusion processing module is used to add noise to the medical image to be segmented to obtain a noise label, the robust feature extraction subnetwork is used to extract robust image features from the medical image to be segmented, and the segmentation label generation network is used to obtain a segmentation label based on the robust image features, the pseudo-label of the medical image to be segmented and the noise label.
[0029] The third aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the cross-domain medical image segmentation method based on a discrete diffusion model when executing the computer program.
[0030] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the cross-domain medical image segmentation method based on a discrete diffusion model is implemented.
[0031] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0032] The present invention realizes accurate segmentation of medical images through a pre-trained domain generalization diffusion segmentation model. Compared with the existing domain generalization medical image segmentation method, the method of the present invention is based on a discrete diffusion generation model, which trains a medical image segmentation model that can be generalized to an unknown target domain on a single source domain, and can generate accurate and diverse segmentation results, realizing uncertainty estimation and model integration. Compared with the existing medical image segmentation method based on the diffusion model, the method of the present invention focuses on exploring and improving the cross-domain generalization ability of the diffusion segmentation model, and adopts a robust feature extraction subnetwork and a segmentation label generation network to realize cross-domain segmentation label generation. The present invention can be mainly used for accurate segmentation of medical images, that is, only using a single source domain data to train the segmentation model, and can be used for accurate segmentation of medical images in an unknown target domain. The cross-domains can be different modalities, different sequences or different centers (hospitals), and it has important application value in assisting clinicians in accurate diagnosis, treatment planning and disease monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a specific implementation flow chart of the present invention;
[0034] Figure 2 This is the framework diagram of the domain generalization diffusion segmentation model;
[0035] Figure 3 It is the structure diagram of the robust feature extraction subnetwork of the domain generalization diffusion segmentation model;
[0036] Figure 4 It is the network structure diagram of segmentation label generation of domain generalization diffusion segmentation model;
[0037] Figure 5 It is a diagram of the interactive improvement module structure of the segmentation label generation network;
[0038] Figure 6 is the segmentation result of the present invention on the unknown target domain; wherein (a) is the source domain image, (b) is the target domain image, and (c) is the result of the present invention;
[0039] Figure 7 is a flowchart of the segmentation method of the present invention;
[0040] Figure 8 Schematic diagram of the segmentation system of the present invention. DETAILED DESCRIPTION
[0041] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thoroughly and comprehensively understood.
[0042] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0043] like Figure 7 As shown, the present invention provides a cross-domain medical image segmentation method based on a discrete diffusion model, comprising the steps of:
[0044] S1, obtaining the medical image to be segmented and the pseudo label of the medical image to be segmented;
[0045] S2, inputting the medical image to be segmented into the pre-trained domain generalization diffusion segmentation model to obtain the medical image segmentation result;
[0046] Among them, the pre-trained domain generalization diffusion segmentation model includes a forward diffusion processing module, a robust feature extraction subnetwork and a segmentation label generation network connected in sequence; the forward diffusion processing module is used to add noise to the medical image to be segmented to obtain a noise label, the robust feature extraction subnetwork is used to extract robust image features from the medical image to be segmented, and the segmentation label generation network is used to obtain a segmentation label based on the robust image features, the pseudo-label of the medical image to be segmented and the noise label.
[0047] See also Figure 1 The present invention includes constructing a domain generalization segmentation model to realize cross-domain medical image segmentation: damaging the segmentation labels of medical images through a forward diffusion process to generate a series of noise labels, constructing a two-way reverse diffusion process, and designing a network learning domain generalization conditional distribution based on robust image features and pseudo labels for iterative denoising of noise labels. After the model is trained in a single source domain, the learned reverse diffusion process is applied to the medical images to be segmented in an unknown target domain, and iterative sampling from pure noise is performed until clean labels are restored, which is the segmentation result.
[0048] Network structure design in the back-diffusion process of the domain generalization segmentation model: Construct a deep network to learn the conditional distribution of domain generalization in the back-diffusion process. Construct a robust feature extraction subnetwork, including convolutional layers, adaptive weighting layers, and normalization layers, to extract robust image features from medical images. Construct a segmentation label generation network, including an encoder, an interactive improvement module, and a decoder, to interactively improve noisy labels using robust image features and pseudo labels, and output noise-free labels.
[0049] Loss function and training algorithm of the reverse diffusion process of the domain generalization segmentation model: Construct the loss function of the two-way reverse diffusion process, including the denoising objective function that constrains the noise-free labels generated by the two-way to be close to the real clean labels, the robust feature constraint that constrains the two-way robust image features to be equal, and the pseudo-label improvement constraint that constrains the pseudo-labels after the two-way improvement to be close to the real clean labels. Specifically, it includes the following steps:
[0050] 1. Forward Diffusion Process Construction
[0051] The present invention has no special requirements or designs for the forward diffusion process, and only requires a discrete process to continuously add noise to the clean segmentation labels until pure noise is obtained. Here, a feasible construction method of the forward diffusion process is described.
[0052] The forward diffusion process is carried out through the Markov chain q(x t |x t-1 ) continuously damages the clean label x0 of the medical image, generating a series of increasing noise labels x1, x2, ..., x T , where x T is a pure noise label. Consider the noise label x t The label x at any pixel in t ∈{0, 1, ..., K-1}, K represents the number of segmentation categories, then the forward diffusion process at the pixel point can be defined as:
[0053] q(x t |x t-1 )=v T (x t )Q t v(x t-1 ) (1)
[0054] Among them, v(x t ) is a one-hot column vector of length K, where the component index with value 1 corresponds to the noise label x t Category. Q t is the transfer matrix, where the element at position i,j represents the position of x t-1 =j transfer to x t =i. Specifically, we can introduce an additional category, namely [MASK] category, and define the transfer matrix for
[0055]
[0056] This means that when the noise label x t-1 When it belongs to the conventional first K category, γ t The probability of transfer to [MASK] class is α t +β t The probability remains unchanged, with β t The probability of transferring to other regular categories; when the noise label x t-1 When it belongs to the [MASK] class, it remains unchanged with a probability of 1. As t increases, α t It decreases linearly from 1 to 0, while γ t It increases linearly from 0 to 1, so that the pure noise label x T will fall squarely into the [MASK] category.
[0057] 2. Construction of the Backward Diffusion Process for Domain Generalization
[0058] The present invention uses a two-way back diffusion process in a single source domain, and utilizes the designed robust feature extraction subnetwork and segmentation label generation network to learn the conditional distribution p of domain generalization. θ (x t-1 |x t ,F(I),x pl ), used to continuously denoise the noise label until the noise label x T Recover the clean label x0, where F(I) is the robust image feature extracted from the image, x pl is a pseudo label. Conditional distribution p θ (x t-1 |x t ,F(I),x pl ) hopes to approximate the posterior distribution q(x) of the forward diffusion process t-1 |x t , x0), the latter can be derived from formula (1);
[0059]
[0060] in, From x0 to x t The cumulative transfer matrix, x0 is any pixel in the clean label x0, x t is the noise label x t For any pixel in Q t For x t-1 to x t The transfer matrix, x t-1 is the noise label xt-1 For any pixel in Q t-1 For X t-2 To X t-1 The transfer matrix, X t-2 is the noise label x t-2 Q1 is the transfer matrix from x0 to x1, and x1 is any pixel in the noise label x1.
[0061] like Figure 2 As shown, for the randomly sampled time point t and the noise label x′ t =x″ t =x t (generated from the clean label x0 by the forward diffusion process), the present invention first enhances the input image using the same geometric transformation and different brightness transformation to generate two enhanced images with the same structure but different contrasts, namely the first enhanced image I′ and the second enhanced image I″. The first enhanced image I′ and the second enhanced image I″ are respectively sent to the shared robust feature extraction subnetwork Extract the first robust image feature F(I′) and the second robust image feature F(I″). Then, the first robust image feature F(I′) and the second robust image feature F(I″), the pseudo label x pl With the noisy label x′ t , x t ″Send them to the shared segmentation label generation network Predict the noise-free label distribution p θ (x′0,t|x′ t F(I′), x pl ) and p θ (x″ 0,t |x″ t ,F(I″),x pl ),Right now
[0062]
[0063]
[0064] Furthermore, the present invention uses the above noise-free label distribution to calculate x′ t ,x″ t to x′ t-1 ,x″ t-1 The conditional transition probability is:
[0065]
[0066] Next, the robust feature extraction subnetwork and segmentation label generation network of the present invention will be introduced in detail.
[0067] 1) Robust feature extraction sub-network
[0068] The robust feature extraction subnetwork is used to extract robust image features F(I′) from the input image I′ during the back diffusion process to reduce the impact of different image distributions on the cross-domain performance of the diffusion model. Figure 3 As shown in the figure, the robust feature extraction subnetwork contains four 2D convolutional layers to extract features, an adaptive weighting layer to adaptively fuse features, and a normalization layer to normalize the feature map of each layer to 0 mean and 1 variance, and finally outputs robust image features.
[0069] 2D convolutional layer, used to extract features from the input image I′ to obtain input features F (in) (I′);
[0070] Adaptive weighting layer: given input features Contains M layers of feature maps j is the feature layer number, where W×H represents the input image size. The adaptive weighted layer uses a learnable weight matrix The input features are squared element by element, weighted summed, and squared element by element to generate output robust image features Contains M layers of feature maps Specifically, the feature map It can be defined as:
[0071]
[0072] Among them, ⊙ represents the element-by-element product, w ij Represents a learnable weight that satisfies w ij ≥0,∑ j w ij =1.
[0073] 2) Segmentation label generation network
[0074] The segmentation label generation network is constructed to use robust image features and pseudo labels to interact and improve the noise labels, and output noise-free labels. The segmentation label generation network is used to generate the noise label x′ at each time point t in the back diffusion process. t Estimate the noise-free label x′ 0,t , based on the robust image feature F(I′) and pseudo label x pl .like Figure 4 As shown, the segmentation label generation network contains three encoders that are respectively generated from the noise label x′ t , robust image features F(I′) and pseudo labels x pl Extract block-level embeddings, fourteen interactive improvement modules continuously improve the noisy label embedding and pseudo label embedding, and two decoders reconstruct the noise-free label x′ respectively 0,t And the improved pseudo label x′ 0,pl .
[0075] Encoder-Decoder: The three encoders in the segmentation label generation network have the same structure, and the two decoders have the same structure. Figure 4 As shown, the encoder contains one convolutional layer, one element-wise summation layer with the block position embedding, ten self-attention modules, and two convolutional layers, while the decoder contains four deconvolutional layers and one convolutional layer.
[0076] Interaction Improvement Module: This module uses a multi-head attention mechanism to iteratively interact between the block-level embeddings of noisy labels, robust image features, and pseudo labels to produce improved noisy label embeddings and pseudo label embeddings. Given the nth interaction improvement module CTB n , and the input noisy label embedding Pseudo-label embedding Robust Image Feature Embedding The multi-head attention mechanism is denoted as MHA(Q, K, V), where Q, K, and V represent query, key, and value, respectively. Figure 5 As shown, the interaction improvement module CTB of the present invention n Utilize four multi-head attention mechanism modules to interact:
[0077] Self-attention mechanism, characterizes the global dependency within the noisy labels, and produces improved noisy label embedding
[0078] The first cross-attention mechanism, which captures the dependency between images and pseudo-labels, produces the first improved pseudo-label embedding
[0079] The second cross-attention mechanism characterizes the dependency between pseudo labels and noise labels, and produces the second improved noise label embedding
[0080] The third cross-attention mechanism describes the dependency between the image and the noisy label, and produces the third improved noisy label embedding
[0081] Finally, the interaction improvement module uses a residual module to produce the final improved noisy label embedding The residual module consists of a layer normalization layer and two linear projection layers. n It can be expressed as
[0082]
[0083] 3. Training Objectives of Domain Generalization Diffusion Segmentation Model
[0084] In the training phase, the present invention uses an early stopping strategy to train a U-Net segmenter to generate segmentation labels of the training set as pseudo labels when training the domain generalization diffusion segmentation model. In order to make the learned back diffusion process accurate and domain generalized, the present invention uses the following three training loss functions.
[0085] Denoising objective function This loss function is used to constrain the first noise-free label distribution pθ(x′0,t|x′ t ,F(I′),x pl ) and the second noise-free label distribution p θ (x″ 0,t |x″ t ,F(I″),x pl ) approximates the clean noise label distribution q(x0), that is:
[0086]
[0087] Among them, L CE represents the cross entropy loss.
[0088] Robust feature constraints This loss function is used to constrain the first robust image feature F(I′) and the second robust image feature F(I″) extracted by the two-way back diffusion process to be equal, that is,
[0089]
[0090] Here, ||·||1 represents the 1-norm.
[0091] Pseudo-labeling to improve constraints This loss function is used to constrain the first improved pseudo-label distribution p obtained by learning the two-way back diffusion process. θ (x′ 0,pl |x′ t ,F(I′),x pl ) and the second improved pseudo-label distribution p θ (x″ 0,pl |x″ t ,F(I″),x pl ) approximates the clean noise label distribution q(x0), that is
[0092]
[0093] The final training target of the domain generalization diffusion segmentation model of the present invention is the total loss function of the two-way reverse diffusion process for
[0094]
[0095] Wherein, λ1 and λ2 are the first system and second coefficients, which are used for the relative importance of the high control loss term, and are set to 0.0001 and 0.1 respectively in the present invention.
[0096] The labeled data of the source domain is used as training data, and the AdamW optimization algorithm and the above loss function are used to train the reverse diffusion process of the domain generalization segmentation model.
[0097] 4. Applying the trained domain generalization diffusion segmentation model to perform medical image segmentation in unknown target domains
[0098] After the single source domain is trained in step 3, the learned domain generalization diffusion segmentation model can be directly applied to generate medical image segmentation labels in the unknown target domain. Specifically, Figure 2 As shown, for a target image in an unknown target domain and a corresponding pseudo label xpl, the present invention directly feeds the target image into a trained robust feature extraction subnetwork to extract robust image features F(I) and samples random discrete noise labels x T , in the present invention, all the segmentation labels are [MASK] categories. pl The trained segmentation label generation network is fed as a condition, and the noise label x T Starting from, using p in formula (6) θ (x t-1 |x t ,F(I),x pl ) Iteratively improve and obtain a series of noise labels x T , x T-1 , ..., x0. Wherein, x0 is the segmentation label of the target image generated by the present invention.
[0099] Fast inference process: The present invention can skip some time points when inferring the segmentation labels of the target image to improve the inference speed. Specifically, assuming that the time point interval is Δt, the present invention can use the conditional distribution p θ (x t-Δt |x t ,F(I),x pl ) Iteratively improve to obtain a series of noise labels x T , x T-Δt ,...,x0, where the conditional distribution p θ (x t-Δt |x t ,F(I),x pl ) can be calculated as:
[0100]
[0101] In the numerical experiment, under the cross-modal abdominal segmentation setting, the present invention uses abdominal CT data of 30 subjects and abdominal MR data of 20 subjects, each time using one modality as training data and the other modality as test data; under the cross-sequence cardiac segmentation setting, the present invention uses cardiac bSSFP MR data of 45 subjects as training data, and cardiac LGE MR data of 45 subjects as test data; under the cross-center prostate segmentation setting, the present invention uses data from 6 centers, including prostate MR data of 30, 30, 19, 13, 12, and 12 subjects, respectively, each time using the data of one center as training data, and the data of the remaining five centers as test data.
[0102] As shown in Table 1, the domain generalization diffusion segmentation model (DG-DDM-Seg) of the present invention is compared with an empirical risk minimization baseline method (ERM), a feature decoupling-based single-source domain generalization method (CCSDG) and four data enhancement-based single-source domain generalization methods (AdvBias, FreeSDG, SLAug and CSDG) on three cross-domain generalization problems, including cross-modal abdominal segmentation, cross-sequence heart segmentation and cross-center prostate segmentation. The domain generalization diffusion segmentation model designed by the present invention achieves the best reconstruction accuracy under different cross-domain segmentation settings. Figure 6 (a), (b) and (c) are visualization results of the cross-domain segmentation of the present invention. It can be seen that the present invention can accurately segment medical images of unknown target domains.
[0103] Table 1 Comparison results of different domain generalization medical image segmentation methods on the test set under different cross-domain settings
[0104]
[0105] Referring to Table 1, it can be seen that the medical image segmentation method of the present invention has high accuracy.
[0106] The present invention can train a medical image segmentation model in a single source domain and accurately segment medical images in an unknown target domain. Compared with existing domain generalization medical image segmentation methods, the method of the present invention is based on a discrete diffusion generation model, which trains a medical image segmentation model that can be generalized to an unknown target domain on a single source domain, and can generate accurate and diverse segmentation results, achieving uncertainty estimation and model integration. Compared with existing medical image segmentation methods based on diffusion models, the method of the present invention focuses on exploring and improving the cross-domain generalization ability of the diffusion segmentation model, and uses a robust feature extraction subnetwork and a two-way back diffusion process to learn the conditional distribution of domain generalization for cross-domain segmentation label generation.
[0107] See also Figure 8In another embodiment of the present invention, a cross-domain medical image segmentation system based on a discrete diffusion model is provided, comprising:
[0108] A medical image and pseudo-label acquisition module, used to acquire the medical image to be segmented and the pseudo-label of the medical image to be segmented;
[0109] A medical image segmentation module is used to input the medical image to be segmented into a pre-trained domain generalization diffusion segmentation model to obtain the medical image segmentation result;
[0110] Among them, the pre-trained domain generalization diffusion segmentation model includes a forward diffusion processing module, a robust feature extraction subnetwork and a segmentation label generation network connected in sequence; the forward diffusion processing module is used to add noise to the medical image to be segmented to obtain a noise label, the robust feature extraction subnetwork is used to extract robust image features from the medical image to be segmented, and the segmentation label generation network is used to obtain a segmentation label based on the robust image features, the pseudo-label of the medical image to be segmented and the noise label.
[0111] All relevant contents of each step involved in the embodiment of the aforementioned cross-domain medical image segmentation method based on discrete diffusion model can be referred to the functional description of the functional modules corresponding to the cross-domain medical image segmentation system based on discrete diffusion model in the embodiment of the present invention, and will not be repeated here.
[0112] In another embodiment of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the cross-domain medical image segmentation method based on a discrete diffusion model when executing the computer program. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions in a computer storage medium to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of the epilepsy signal detection method in the electroencephalogram signal.
[0113] In another embodiment of the present invention, a computer-readable storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in a computer device and, of course, an extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the cross-domain medical image segmentation method based on a discrete diffusion model in the above embodiment.
[0114] The above description is only for the best embodiment of the present invention, but it should not be understood as limiting the claims. The present invention is not limited to the above embodiments, and its specific structure is allowed to be changed. However, all changes made within the protection scope of the independent claims of the present invention are within the protection scope of the present invention.
[0115] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
Claims
1. A cross-domain medical image segmentation method based on discrete diffusion model, characterized in that: The steps include: Obtaining a medical image to be segmented and a pseudo label of the medical image to be segmented; Input the medical image to be segmented into the pre-trained domain generalization diffusion segmentation model to obtain the medical image segmentation result; Among them, the pre-trained domain generalization diffusion segmentation model includes a forward diffusion processing module, a robust feature extraction subnetwork and a segmentation label generation network connected in sequence; the forward diffusion processing module is used to add noise to the medical image to be segmented to obtain a noise label, the robust feature extraction subnetwork is used to extract robust image features from the medical image to be segmented, and the segmentation label generation network is used to obtain a segmentation label based on the robust image features, the pseudo-label of the medical image to be segmented and the noise label.
2. The cross-domain medical image segmentation method based on discrete diffusion model according to claim 1, characterized in that: The forward diffusion processing module is used to continuously damage the clean labels of medical images through the Markov chain to generate noisy labels.
3. The cross-domain medical image segmentation method based on discrete diffusion model according to claim 1, characterized in that: The robust feature extraction subnetwork consists of four 2D convolutional layers connected in sequence, an adaptive weighting layer to adaptively fuse features, and a normalization layer; 2D convolutional layer, used to extract features from medical images and obtain input features; The adaptive weighted layer is used to perform element-by-element squaring, weighted summing, and element-by-element square rooting of the input features using a learnable weight matrix to obtain adaptive fusion features; The normalization layer is used to normalize the adaptive fusion features to obtain robust image features.
4. The cross-domain medical image segmentation method based on discrete diffusion model according to claim 1, characterized in that: The segmentation label generation network consists of three encoders, fourteen interactive improvement modules and two decoders connected in sequence; The three encoders have the same structure, and the two decoders have the same structure; the encoder includes a convolutional layer, an element-wise summation layer with block position embedding, ten self-attention modules, and two convolutional layers connected in sequence; the decoder includes four deconvolutional layers and a convolutional layer connected in sequence.
5. The cross-domain medical image segmentation method based on discrete diffusion model according to claim 4, characterized in that: The interactive improvement module is used to utilize the multi-head attention mechanism to iteratively interact between the block-level embeddings of noisy labels, robust image features and pseudo labels to generate improved noisy label embeddings and pseudo label embeddings.
6. The cross-domain medical image segmentation method based on discrete diffusion model according to claim 5, characterized in that: It is used to utilize the multi-head attention mechanism to iteratively interact between the block-level embeddings of the noisy label, the robust image features and the pseudo-label to generate improved noisy label embedding and pseudo-label embedding, including the following steps: The self-attention mechanism is used to characterize the global dependencies within the noisy labels and generate the first improved noisy label embedding; The first cross-attention mechanism is used to characterize the dependency between the image and the pseudo-label, and to generate an improved pseudo-label embedding according to the first improved noisy label embedding; The third cross-attention mechanism is used to characterize the dependency between the pseudo-label and the noise label, and generates the second improved noise label embedding based on the improved pseudo-label embedding after the first improved noise label embedding; The fourth cross-attention mechanism is used to characterize the dependency between the image and the noise label, and generates the third improved noise label embedding according to the second improved noise label embedding; A residual module is used to generate a final improved noisy label embedding according to the third improved noisy label embedding, wherein the residual module includes a connected layer normalization layer and two linear projection layers.
7. The cross-domain medical image segmentation method based on discrete diffusion model according to claim 1, characterized in that: The loss function of the pre-trained domain generalization diffusion segmentation model includes a denoising objective function, a robust feature constraint, and a pseudo-label improvement constraint.
8. A cross-domain medical image segmentation system based on discrete diffusion model, characterized in that: include: A medical image and pseudo-label acquisition module, used to acquire the medical image to be segmented and the pseudo-label of the medical image to be segmented; A medical image segmentation module is used to input the medical image to be segmented into a pre-trained domain generalization diffusion segmentation model to obtain the medical image segmentation result; Among them, the pre-trained domain generalization diffusion segmentation model includes a forward diffusion processing module, a robust feature extraction subnetwork and a segmentation label generation network connected in sequence; the forward diffusion processing module is used to add noise to the medical image to be segmented to obtain a noise label, the robust feature extraction subnetwork is used to extract robust image features from the medical image to be segmented, and the segmentation label generation network is used to obtain a segmentation label based on the robust image features, the pseudo-label of the medical image to be segmented and the noise label.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the cross-domain medical image segmentation method based on the discrete diffusion model as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the cross-domain medical image segmentation method based on a discrete diffusion model as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Medical image segmentation method based on multi-field semi-supervision
CN115861164A
Image segmentation method based on residual diffusion model
CN116993770A
Medical image segmentation method, system and equipment based on space-spectrum cross-domain coding and entropy perception double decoding
CN118552565A
Unsupervised domain adaptation method for medical image segmentation
CN118735948A
Medical image segmentation method and system based on diffusion model and domain adaptation
CN118799337A
Cited By
Unsupervised pavement crack detection method and system based on de-noising diffusion model
CN119784764A
A cross-device ultrasound kidney image segmentation method based on statistical spectral difference guided diffusion model
CN122597786A