Three-dimensional MRI (Magnetic Resonance Imaging) brain tumor segmentation method based on diffusion model
By introducing a three-dimensional segmentation method based on diffusion model in MRI image segmentation, combined with U-Net network and cross-attention mechanism, the problem that the existing technology cannot adapt to the multi-level anatomy of brain tumors is solved, and higher segmentation accuracy is achieved and feature expression.
Patent Information
- Application Number
- CN202411427119.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-14
AI Technical Summary
The existing MRI image segmentation technology cannot adapt to the multi-level anatomical structure of brain tumors, resulting in poor segmentation effect.
A three-dimensional MRI brain tumor segmentation method based on diffusion model is adopted, combined with the U-Net network and the cross attention mechanism, multi-scale features are extracted through iterative discrete wavelet transformation, and the model is trained using noise-added segmentation data.
It significantly improves the accuracy of MRI brain tumor segmentation, can extract multi-scale features of multimodal MRI, reduce the amount of model parameters, and enhance the feature expression of key areas.
Smart Images

Figure CN119417843A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image generation, and more specifically, to a three-dimensional MRI brain tumor segmentation method based on a diffusion model. Background Art
[0002] The brain is one of the most important and fragile organs in the human body. Once cancer occurs, it will be fatal. Brain tumors are abnormal cell groups growing inside the brain. In the medical field, brain tumor segmentation refers to the process of separating different tumor tissues (active tumors, edema and necrosis) from normal brain tissues (cerebrospinal fluid, white matter and gray matter). MRI imaging technology can provide significant contrast for different brain tissues. Different imaging modalities can provide information about brain tumors from different angles for doctors to analyze and judge, quantify the response of brain tumors before and after treatment, and make accurate diagnoses and formulate treatment plans.
[0003] Diffusion Model has achieved significant success in various generative tasks including medical image segmentation. For example, the prior art discloses a self-supervised segmentation method for cervical MRI images using diffusion model generated data, including image preprocessing such as cervical MRI slice screening and super-resolution reconstruction based on diffusion model to generate high-quality MRI images through improved diffusion model; using self-supervision method, combining real images and generated images to solve the problem of insufficient label quantity; constructing Att-UNet network with Encoder-Decoder structure to extract relevant features of input data, and using multi-scale consistency output to measure loss, finally obtaining more accurate vertebral and intervertebral disc segmentation results. However, although this method effectively expands the number of samples, improves the model robustness and segmentation accuracy, and provides more accurate reference information for clinical cervical disease diagnosis, it cannot adapt to the particularity of brain tumor segmentation tasks and segment the multi-level anatomical structure of brain tumors. Summary of the invention
[0004] In order to solve the problem that the current MRI image segmentation cannot adapt to the multi-level anatomical structure of brain tumors, the present invention proposes a three-dimensional MRI brain tumor segmentation method based on the diffusion model. A brain tumor segmentation model is constructed based on the diffusion model and deep learning models such as U-Net, and different lesion areas with correct inclusion relationships are output to promote the accurate diagnosis and treatment of brain tumors.
[0005] In order to achieve the above technical effects, the technical solution of the present invention is as follows:
[0006] A three-dimensional MRI brain tumor segmentation method based on a diffusion model, comprising:
[0007] S1. Collect multiple sets of MRI images of different modalities of the patient's brain tumor and the corresponding segmentation benchmark truth values;
[0008] S2. adding noise to the segmentation reference truth value corresponding to the MRI image through a forward diffusion operation to obtain the noisy segmentation data;
[0009] S3. Perform iterative discrete wavelet transform on the MRI image to obtain wavelet information at each level;
[0010] S4. construct a brain tumor segmentation model, wherein the brain tumor segmentation model is based on introducing a cross-attention mechanism in a U-Net network structure to improve the diffusion model; train the brain tumor segmentation model using MRI images, noisy segmentation data, and wavelet information at all levels to obtain a trained brain tumor segmentation model;
[0011] S5. Sample a random noise from the prior distribution, concatenate the random noise with the MRI image to be segmented, and input the concatenated image into the trained brain tumor segmentation model to obtain the corresponding inferred target domain segmentation image.
[0012] This technical solution builds a brain tumor segmentation model based on deep learning models such as diffusion model and U-Net, introduces multi-level wavelet transform to extract multi-scale features of MRI, introduces cross-attention mechanism in U-Net, and realizes feature fusion of decoder by calculating the cross-spatial attention between each convolutional layer of encoder and each level of wavelet signal, so as to integrate conditional information into the network and enhance the feature expression of key areas, thereby improving the accuracy of MRI brain tumor segmentation.
[0013] Preferably, in step S1, MRI images of four modes are acquired, and the four modes of MRI images include: TI-weighted image, contrast-enhanced T1-weighted image, T2-weighted image and fluid-attenuated inversion recovery pulse image.
[0014] Preferably, in step S1, the corresponding reference true value is at the pixel level, including: whether it is a segmentation map of the entire tumor, whether it is a segmentation map of the tumor core, and whether it is a segmentation map of the enhanced tumor; for a pixel in the MRI image, if the pixel is not any of the above, the pixel point is recorded as the image background.
[0015] Preferably, in step S2, for the segmented reference truth value x 0 , gradually add T steps of Gaussian noise to obtain the noisy segmentation data x T , making it tend to Gaussian distribution.
[0016] Preferably, in step S3, four levels of iterative discrete wavelet transform are performed to obtain wavelet information at each level, wherein the wavelet information at each level includes approximate details of low-frequency and high-frequency of the MRI image. The process includes:
[0017] S31. Setting a three-dimensional Haar wavelet filter bank, including a low-pass filter h and a high-pass filter g;
[0018] S32. From MRI image I 4×D×W×H Take each channel to obtain a three-dimensional signal V, perform a three-dimensional convolution operation on the three-dimensional signal V, and obtain sub-signals in the directions of the X axis, Y axis, and Z axis in turn;
[0019] S33. Repeat the operation of step S32 for the obtained sub-signal to obtain approximate details of lower and higher frequencies; specifically, repeat the operation four times, that is, perform a total of four levels of transformation, until the fourth level.
[0020] Here, the wavelet transform based on Haar wavelet is introduced to realize the information interaction between network structures.
[0021] Preferably, the brain tumor segmentation model includes an encoder, a decoder and a CSA module; the encoder is used to perform downsampling operations and feature extraction on the input feature map; the decoder is used for upsampling operations and generating segmentation results; the CSA module is used to calculate the cross-spatial attention between each convolutional layer of the encoder and each level of wavelet information, and splice the obtained fusion output with the decoder layer of the corresponding size.
[0022] Preferably, the U-Net network is a time-dependent U-Net network, and the time t is encoded into the network; the decoder is connected with a 1×1×1 convolution and Sigmoid layer, mapped to the predicted t+1th step noise
[0023] Preferably, the brain tumor segmentation model is trained by a reverse diffusion process, wherein:
[0024] The MRI image I and the noisy segmentation data x t+1 In the channel direction, it is spliced as (I,x t+1 ) as the input of the brain tumor segmentation model; at the same time, the MRI image I is iteratively discrete wavelet transformed in parallel, and the obtained wavelet signals at all levels are introduced into the brain tumor segmentation model through the CSA module.
[0025] Here, a cross-attention mechanism is introduced in U-Net. The cross-spatial attention between each convolutional layer of the encoder and the wavelet signals at each level is calculated through a self-designed CSA module, and the feature fusion of the decoder is realized through an improved skip connection mechanism, so as to integrate the conditional information into the network and enhance the feature expression of key areas.
[0026] Preferably, in step S4, the brain tumor segmentation model updates the model parameters by gradient back propagation until a predetermined total number of training cycles is reached; during the training phase, the brain tumor segmentation model is used as the prediction noise ∈t The prediction noise network is denoted by ∈ θ (x t ,t;I), I is the input MRI image;
[0027] The loss function in the training phase takes the following form:
[0028]
[0029] in, is the loss function of the diffusion model, which is essentially the MSE of the baseline segmentation and the predicted segmentation image at a certain time step; e and E are the current training cycle and total training cycle respectively; D K is the Jaccard coefficient; M o represents the segmentation probability mask matrix of the corresponding region, o represents the default, here we substitute WT, TC and ET, M WT Corresponding to the whole tumor, M TC Corresponding to the tumor core, M ET corresponding to enhancing tumors; is a hyperparameter, Make d K The weight in the loss function gradually increases as the training cycle increases;
[0030] Said The expression is as follows:
[0031]
[0032] in, And α t It is a coefficient calculated at each time step t according to a predefined noise variance scheduler. This coefficient is used to control the amount of noise added to the data at each step.
[0033] When training just started, Represents the error between the predicted segmentation and the true segmentation, which is the main part; since the parameters of the brain tumor segmentation model are randomly initialized and specified, the brain tumor segmentation model has no resolution ability and can only output some random probabilities, so it basically does not output the segmentation with the correct inclusion relationship. Therefore, d is directly introduced at this time. K This may cause the model to converge to incorrect segmentation results in the early stages of training, resulting in a decrease in model performance;
[0034] In the later stage of training, the brain tumor segmentation model has almost converged to the local optimum. At this point, the resolution and performance of the brain tumor segmentation model are already good, and it can output segmentations with correct inclusion relationships to a certain extent. This is the appropriate introduction of d K , so we can use hyperparameters Make K During the model training process, the weight in the loss function gradually increases with the increase of training cycles.
[0035] Here, d K In the early stage of training, the weight is small and has little effect The dominant position in the loss function, and the weight will gradually increase in the later stages of training to achieve the purpose of fine-tuning the model to improve performance and induce the model to output three different lesion areas with the correct inclusion relationship.
[0036] Preferably, in step S5, every The specific process is as follows:
[0037] From the set of time steps {τ 1 ,…,τ S} to obtain a random noise x τS , x τS It is concatenated with the MRI image I′ to be segmented as the input of the encoder; at the same time, the MRI image I′ to be segmented is subjected to iterative discrete wavelet transform to obtain wavelet signals at all levels as the input of the CSA module;
[0038] The brain tumor segmentation network passes through t = τ S After the time encoding of the step, the output is τ S The prediction noise of the step
[0039] Calculating prediction noise Corresponding The calculation process is as follows:
[0040]
[0041] in, ε follows a standard Gaussian distribution;
[0042] Will After being spliced with I′, it is used as the input of the encoder again, and the wavelet signals at all levels are used as the input of the CSA module; the brain tumor segmentation network is S-1 After the time encoding of the step, the output is τ S-1 The prediction noise of the step
[0043] Iterate the above steps to get the final prediction result That is the target domain segmentation image for reasoning.
[0044] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0045] The present invention proposes a three-dimensional MRI brain tumor segmentation method based on a diffusion model, which collects multiple sets of MRI images of different modes of brain tumor parts of patients and corresponding segmentation benchmark truth values; through forward diffusion operation, the segmentation benchmark truth values corresponding to the MRI images are denoised to obtain noisy segmentation data; the MRI images are iteratively discrete wavelet transformed to obtain wavelet information at all levels; based on the introduction of a cross-attention mechanism in a U-Net network structure, the diffusion model is improved to construct a brain tumor segmentation model; the brain tumor segmentation model is trained using MRI images, noisy segmentation data and wavelet information at all levels; then a random noise is sampled from a priori distribution, the random noise is spliced with the MRI image to be segmented, and then input into the trained brain tumor segmentation model, and finally the corresponding inferred target domain segmentation image is obtained. The method can extract multi-scale features of multi-modal MRI and significantly reduce the number of parameters of the model, integrate conditional information into the network and enhance the feature expression of key areas, thereby improving the accuracy of MRI brain tumor segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram showing the flow of the diffusion model-based 3D MRI brain tumor segmentation method proposed in Example 1 of the present invention;
[0047] Figure 2 A schematic diagram showing a framework of a diffusion model-based 3D MRI brain tumor segmentation method proposed in Example 1 of the present invention;
[0048] Figure 3 A schematic diagram showing an iterative discrete wavelet transform process in Embodiment 1 of the present invention;
[0049] Figure 4 A schematic diagram showing the structure of a brain tumor segmentation model in Example 2 of the present invention;
[0050] Figure 5 A schematic diagram of the CSA module structure in Example 2 of the present invention is shown. DETAILED DESCRIPTION
[0051] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;
[0052] In order to better illustrate the present embodiment, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the actual size;
[0053] It is understandable to those skilled in the art that descriptions of certain well-known contents in the drawings may be omitted.
[0054] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0055] The positional relationships described in the drawings are only for illustrative purposes and should not be construed as limiting the present patent;
[0056] Example 1
[0057] like Figure 1 and Figure 2 As shown, this embodiment proposes a three-dimensional MRI brain tumor segmentation method based on a diffusion model, comprising the following steps:
[0058] S1. Collect multiple sets of MRI images of four modalities of the patient's brain tumor and the corresponding segmentation benchmark truth values, the four modal MRI images are:
[0059] TI-weighted images (T1-weighted): T1-weighted images are easy to implement and are often used for structural analysis of brain tumors.
[0060] Contrast enhanced T1-weighted images: Contrast enhanced T1-weighted images help distinguish the boundary between tumors and surrounding normal tissues.
[0061] T2-weighted images: T2-weighted images are often used to provide an initial assessment, identify tumor type, and separate tumor from non-tumor tissue;
[0062] Fluid attenuated inversion recovery pulse image FLAIR (fluid attenuated inversion recovery): The boundaries of the edema area in FLAIR are clearly visible, and it is currently one of the most effective imaging methods for brain tumor segmentation.
[0063] The corresponding reference truth value is at the pixel level and includes:
[0064] Segmentation map to distinguish whether it is whole tumor (WT);
[0065] Segmentation map to distinguish whether it is a tumor core (TC);
[0066] The segmentation map for distinguishing whether it is an enhancing tumor (ET) for a pixel;
[0067] If none of the above three are true, it is the image background (BG).
[0068] S2. Through the forward diffusion operation, the segmentation reference truth value corresponding to the MRI image is denoised to obtain the noisy segmentation data; specifically, for the segmentation reference truth value x 0 , gradually add T steps of Gaussian noise to obtain the noisy segmentation data x T, making it tend to Gaussian distribution.
[0069] S3. Perform iterative discrete wavelet transform on the MRI image to obtain wavelet information at each level; Figure 3 As shown, in this embodiment, through four-level iterative discrete wavelet transform, wavelet information at each level is obtained, and the wavelet information at each level includes the approximate details of the low frequency and high frequency of the MRI image. The process includes:
[0070] S31. Setting a three-dimensional Haar wavelet filter bank, including a low-pass filter h and a high-pass filter g;
[0071] Among them, the low-pass filter l = [1, 1], the high-pass filter h = [-1, 1];
[0072] S32. From MRI image I 4×D×W×H Take each channel to get a three-dimensional signal V, and perform a three-dimensional convolution operation on the three-dimensional signal V. The process is as follows:
[0073] (a) Perform a convolution operation on the three-dimensional signal V in the X-axis direction to obtain two sub-signals:
[0074] L=V*l,H=V*h
[0075] (b) Perform convolution operation on sub-signals L and H in the Y-axis direction to obtain four sub-signals:
[0076] LL=L*l,LH=L*h,HL=H*l,HH=H*h
[0077] (c) Perform convolution operation on sub-signals LL, LH, HL and HH in the Z-axis direction to obtain eight sub-signals:
[0078] LLL=LL*l, LLH=LL*h, LHL=LH*l, LHH=LH*h,
[0079] HLL=HL*l, HLH=HL*h, HHL=HH*l, HHH=HH*h
[0080] S33. Repeat the operation of step S32 for the obtained sub-signal to obtain approximate details of lower and higher frequencies; specifically, repeat the operation four times, that is, perform a total of four levels of transformation, until the fourth level.
[0081] S4. construct a brain tumor segmentation model, wherein the brain tumor segmentation model is based on introducing a cross-attention mechanism in a U-Net network structure to improve the diffusion model; train the brain tumor segmentation model using MRI images, noisy segmentation data, and wavelet information at all levels to obtain a trained brain tumor segmentation model;
[0082] S5. Sample a random noise from the prior distribution, concatenate the random noise with the MRI image to be segmented, and input the concatenated image into the trained brain tumor segmentation model to obtain the corresponding inferred target domain segmentation image.
[0083] Example 2
[0084] In this embodiment, the brain tumor segmentation model described in Embodiment 1 is further described.
[0085] like Figure 4 As shown, the brain tumor segmentation model is based on introducing a cross-attention mechanism into the U-Net network structure to improve the diffusion model;
[0086] Furthermore, the brain tumor segmentation model includes an encoder, a decoder and a CSA module; the encoder is used to downsample and extract features from the input feature map; the decoder is used to upsample and generate segmentation results; the CSA module is used to calculate the cross-spatial attention between each convolutional layer of the encoder and each level of wavelet information, and splice the obtained fusion output with the decoder layer of the corresponding size.
[0087] The U-Net network is a time-dependent U-Net network, which encodes time t into the network; the decoder is connected to a 1×1×1 convolution and Sigmoid layer, mapped to the predicted t+1th step noise
[0088] like Figure 5 In this embodiment, the structure of the CSA module is shown in FIG. X. The input of the CSA module is the 8-signal DWT obtained by the i-th level wavelet transform. i (I) and the output of the i+1th downsampling module before passing through the maximum pooling layer, both have a size of But the number of channels is different. First, the convolution layer is normalized by layer, 1*1*1 convolution and ReLU to calculate Q, and its number of channels and size remain unchanged. On the other hand, DWT i (I) Through layer normalization, 1×1×1 convolution and ReLU calculation, 8 different Ks are obtained, and the number of channels becomes C, which is consistent with the input convolution layer; at the same time, DWT i (I) In parallel, another 1×1×1 convolution is performed to obtain V, whose number of channels becomes C. Then, Q is added to the 8 Ks respectively and passes through 8 different 1×1×1 convolution, ReLU and Softmax layers to obtain 8 spatial attention weights.
[0089] Example 3
[0090] In this embodiment, the brain tumor segmentation model training process described in Embodiments 1 and 2 is further described.
[0091] The training of the brain tumor segmentation model is divided into the forward process and the reverse process of the diffusion process:
[0092] In the forward diffusion process, the ground truth of the segmentation Transformed to x by gradually adding T steps of Gaussian noise T The reason why the number of channels is 3 here is to transform the problem of segmenting four regions into three binary classification problems, namely, whether it is WT, TC, or ET.
[0093] In the reverse diffusion process, first, the MRI image I 4×D×W×H And the noisy segmentation data x t+1 Splice in the channel direction to obtain (I,x t+1 ) 7×D×W×H As the input of the brain tumor segmentation model; at this time, the brain tumor segmentation model is used as the prediction noise ∈ t The prediction noise network is denoted by ∈ θ (x t ,t;I). In this process, the brain tumor segmentation model updates the model parameters through gradient back propagation until the predetermined total number of training cycles is reached.
[0094] In this embodiment, in view of the particularity of the brain tumor segmentation task, a loss function is introduced by designing a Jaccard-like coefficient as a constraint to induce the model to output three different lesion regions with correct inclusion relationships;
[0095] Given two sets A and B, the Jaccard coefficient is defined as follows:
[0096]
[0097] That is: the Jaccard coefficient is the ratio of the potential of the intersection of A and B to the potential of the union of A and B. When sets A and B are both empty sets, J(A,B)=1.
[0098] The Jaccard distance is derived from it and is used to describe the dissimilarity between sets. The larger the distance, the lower the sample similarity. It is defined as follows:
[0099]
[0100] Based on the definition of the Jaccard coefficient, this embodiment proposes a new asymmetric binary set coefficient, namely, the inclusion coefficient K. Given two non-empty finite sets A and B, the inclusion coefficient of B to A is defined as the ratio of the potential of the intersection of A and B to the potential of B, and is therefore asymmetric, and is defined as follows:
[0101]
[0102] Definition K (A,B) is as follows:
[0103] d K (A,B)=1-K(A,B)
[0104] Easy to get K (A,B)∈[0,1]. When d K When (A,B)=0, B is completely contained in A; when d K When (A,B) = 1, B is not contained in A at all, that is, B is completely separated from A. K When (A,B)∈(0,1), B is partially contained in A. K As part of the loss function, the model is introduced to optimize d K The process of reducing it is the process of inducing B to be included in A as much as possible.
[0105] Segmentation mask matrix A for two different types of tumor regions D×W×H , B D×W×H , whose element a ijk ,b ijk ∈{0,1}. If the element at a certain position is 1, it means that the voxel is segmented as the foreground, and if it is 0, it means that the position is the background. Then the foreground area represented by the three-dimensional segmentation mask matrix A can be expressed as a set of three-element arrays representing the positions of the matrix elements, that is:
[0106] Region A ={(i,j,k)|a ijk =1,1≤u≤D,1≤j≤W,1≤k≤H}
[0107] Region A ∩Region B ={(i,j,k)|a ijk =b ijk =1,1≤i≤D,1≤j≤W,1≤k≤H}
[0108] So it is easy to get
[0109]
[0110] Assume that the three-dimensional matrix A D×W×H , B D×W×H Representing two different types of tumor regions, the segmentation results are output in the form of probability, so there is a ijk ,b ijk ∈[0,1]. In application, take d kThe algorithm for (A,B) is as follows:
[0111]
[0112] Easy to prove K (A,B)∈[0,1].
[0113] Based on this, the loss function of the training phase is taken as follows:
[0114]
[0115] in, is the loss function of the diffusion model, e and E are the current training cycle and total training cycle respectively; d K is the Jaccard coefficient; M o Represents the segmentation probability mask matrix of the corresponding area, o represents the default; M WT Corresponding to the whole tumor, M TC Corresponding to the tumor core, M ET corresponding to enhancing tumors;
[0116] is a hyperparameter, Make d K The weight in the loss function gradually increases as the training cycle increases;
[0117] Said The expression is as follows:
[0118]
[0119] in, is the coefficient calculated at each time step t by the predefined noise variance scheduler, which is used to control the amount of noise added at each step.
[0120] Based on the above training process, in the process of reasoning in step S5 (i.e. actually segmenting the brain tumor image), every The specific process is as follows:
[0121] From the set of time steps {τ 1 ,…,τ S} to obtain a random noise x τs It is concatenated with the MRI image I′ to be segmented as the input of the encoder; at the same time, the MRI image I′ to be segmented is subjected to iterative discrete wavelet transform to obtain wavelet signals at all levels as the input of the CSA module;
[0122] The brain tumor segmentation network passes through t = τS After the time encoding of the step, the output is τ S The prediction noise of the step
[0123] Calculating prediction noise Corresponding The calculation process is as follows:
[0124]
[0125] in, ε follows a standard Gaussian distribution, which helps increase the randomness of generated samples;
[0126] Will After being concatenated with I′, it is used as the input of the encoder again, and the wavelet signals at all levels are used as the input of the CSA module; the brain tumor segmentation network is After the time encoding of the step, the output is τ S-1 The prediction noise of the step
[0127] Iterate the above steps to get the final prediction result That is the target domain segmentation image for reasoning.
[0128] Obviously, the above embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A three-dimensional MRI brain tumor segmentation method based on a diffusion model, characterized in that: include: S1. Collect multiple sets of MRI images of different modalities of the patient's brain tumor and the corresponding segmentation benchmark truth values; S2. adding noise to the segmentation reference truth value corresponding to the MRI image through a forward diffusion operation to obtain the noisy segmentation data; S3. Perform iterative discrete wavelet transform on the MRI image to obtain wavelet information at each level; S4. construct a brain tumor segmentation model, wherein the brain tumor segmentation model is based on introducing a cross-attention mechanism in a U-Net network structure to improve the diffusion model; train the brain tumor segmentation model using MRI images, noisy segmentation data, and wavelet information at all levels to obtain a trained brain tumor segmentation model; S5. Sample a random noise from the prior distribution, concatenate the random noise with the MRI image to be segmented, and input the concatenated image into the trained brain tumor segmentation model to obtain the corresponding inferred target domain segmentation image.
2. The method for 3D MRI brain tumor segmentation based on diffusion model according to claim 1, characterized in that: In step S1 , MRI images of four modes are acquired, wherein the MRI images of the four modes include: TI-weighted image, contrast-enhanced T1-weighted image, T2-weighted image and fluid-attenuated inversion recovery pulse image.
3. The method for 3D MRI brain tumor segmentation based on diffusion model according to claim 2, characterized in that: In step S1, the corresponding reference true value is at the pixel level, including: whether it is a segmentation map of the entire tumor, whether it is a segmentation map of the tumor core, and whether it is a segmentation map of the enhanced tumor; for a pixel in the MRI image, if the pixel is not any of the above, the pixel point is recorded as the image background.
4. The method for 3D MRI brain tumor segmentation based on diffusion model according to claim 1, characterized in that: In step S2, T steps of Gaussian noise are gradually added to the segmented reference truth value x0 to obtain noisy segmented data, so that it tends to Gaussian distribution.
5. The method for 3D MRI brain tumor segmentation based on diffusion model according to claim 1, characterized in that: In step S3, four levels of iterative discrete wavelet transform are performed to obtain wavelet information at each level, wherein the wavelet information at each level includes approximate details of low and high frequencies of the MRI image. The process includes: S31. Setting a three-dimensional Haar wavelet filter bank, including a low-pass filter h and a high-pass filter g; S32. Extract a three-dimensional signal V from the MRI image, perform a three-dimensional convolution operation on the three-dimensional signal V, and obtain sub-signals in the X-axis, Y-axis and Z-axis directions in sequence; S33. Repeat the operation of step S32 for the obtained sub-signal to obtain approximate details of lower and higher frequencies.
6. The method for 3D MRI brain tumor segmentation based on diffusion model according to claim 1, characterized in that: The brain tumor segmentation model includes an encoder, a decoder and a CSA module; the encoder is used to downsample and extract features from the input feature map; the decoder is used to upsample and generate segmentation results; the CSA module is used to calculate the cross-spatial attention between each convolutional layer of the encoder and each level of wavelet information, and splice the obtained fusion output with the decoder layer of the corresponding size.
7. The method for 3D MRI brain tumor segmentation based on diffusion model according to claim 6, characterized in that: The U-Net network is a time-dependent U-Net network, which encodes time t into the network; the decoder is connected to a 1×1×1 convolution and Sigmoid layer, mapped to the predicted t+1th step noise 8. The method for 3D MRI brain tumor segmentation based on diffusion model according to claim 7, characterized in that: The brain tumor segmentation model is trained via a reverse diffusion process, where: The MRI image I and the noisy segmentation data x t+1 In the channel direction, it is spliced as (I,x t+1 ) as the input of the brain tumor segmentation model; at the same time, the MRI image I is iteratively discrete wavelet transformed in parallel, and the obtained wavelet signals at all levels are introduced into the brain tumor segmentation model through the CSA module.
9. The method for 3D MRI brain tumor segmentation based on diffusion model according to claim 8, characterized in that: In step S4, the brain tumor segmentation model updates the model parameters through gradient back propagation until the predetermined total number of training cycles is reached; during the training phase, the brain tumor segmentation model is used as the prediction noise ∈ t The prediction noise network is denoted by ∈ θ (x t ,t;I), I is the input MRI image; The loss function in the training phase takes the following form: in, is the loss function of the diffusion model, e and E are the current training cycle and total training cycle respectively; d K is the Jaccard coefficient; M WT Corresponding to the whole tumor, M TC Corresponding to the tumor core, M ET corresponding to enhancing tumors; is a hyperparameter, Make d K The weight in the loss function gradually increases as the training cycle increases; Said The expression is as follows: in, is the coefficient calculated at each time step t by the predefined noise variance scheduler, which is used to control the amount of noise added at each step.
10. The method for 3D MRI brain tumor segmentation based on diffusion model according to claim 9, characterized in that: In step S5, every The specific process is as follows: From the set of accelerated sampling time steps {τ1,…,τ S } to obtain a random noise Will It is concatenated with the MRI image I′ to be segmented as the input of the encoder; at the same time, the MRI image I′ to be segmented is subjected to iterative discrete wavelet transform to obtain wavelet signals at all levels as the input of the CSA module; The brain tumor segmentation network passes through t = τ S After the time encoding of the step, the output is τ S The prediction noise of the step Calculating prediction noise Corresponding The calculation process is as follows: in, ε follows a standard Gaussian distribution; Will After being spliced with I′, it is used as the input of the encoder again, and the wavelet signals at all levels are used as the input of the CSA module; the brain tumor segmentation network is S-1 After the time encoding of the step, the output is τ S-1 The prediction noise of the step Iterate the above steps to get the final prediction result That is the target domain segmentation image for reasoning.
Citation Information
Patent Citations
Medical image tumor segmentation method based on diffusion model and multi-modal fusion
CN116664605A
Detection of prostate cancer in multi-parametric MRI using random forest with instance weighting & mr prostate segmentation by deep learning with holistically-nested networks
US20190370965A1
Cited By
Lightning wave generation method and system based on diffusion model
CN120386986A
Steel structure guided wave detection signal generation method and system based on diffusion probability model
CN121350424A