A three-dimensional MRI brain tumor segmentation method based on diffusion model

By constructing a brain tumor segmentation model based on diffusion model and U-Net, and introducing cross-attention mechanism and multi-level wavelet transform, the problem that MRI image segmentation cannot adapt to the multi-level anatomical structure of brain tumors is solved, and higher accuracy brain tumor segmentation is achieved.

CN119417843BActive Publication Date: 2026-03-17SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies cannot effectively adapt to the multi-level anatomical structure of brain tumors, resulting in insufficient segmentation accuracy of MRI images, which cannot meet the needs of clinical diagnosis.

Method used

A brain tumor segmentation model based on diffusion model and U-Net was constructed. Cross-attention mechanism and multi-level wavelet transform were introduced. Feature extraction and segmentation accuracy were improved through iterative training. The model was trained by combining multimodal MRI images and noisy segmentation data.

Benefits of technology

It significantly improves the accuracy of MRI brain tumor segmentation, can extract multi-scale features from multimodal MRI, enhances the feature expression of key regions, and improves the robustness and accuracy of the segmentation model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119417843B_ABST
    Figure CN119417843B_ABST
Patent Text Reader

Abstract

This invention proposes a three-dimensional MRI brain tumor segmentation method based on a diffusion model, belonging to the field of medical image generation technology. The method involves acquiring MRI images of different modalities of the brain tumor site and their corresponding ground truth values ​​for segmentation; adding noise to the ground truth values ​​for segmentation through forward diffusion to obtain noisy segmentation data; performing iterative discrete wavelet transform on the MRI images to obtain wavelet information at various levels; constructing a brain tumor segmentation model based on introducing a cross-attention mechanism into the U-Net network structure to improve the diffusion model; and training the model using the aforementioned data; sampling random noise from a prior distribution, concatenating it with the MRI image to be segmented, and inputting it into the trained model to obtain the corresponding inference target domain segmentation image. This method can extract multi-scale features from multimodal MRI and significantly reduce the number of model parameters, integrate conditional information into the network, and enhance the feature expression of key regions, thereby improving the accuracy of MRI brain tumor segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image generation technology, and more specifically, to a three-dimensional MRI brain tumor segmentation method based on a diffusion model. Background Technology

[0002] The brain, as one of the most important and vulnerable organs in the human body, can be fatal if it becomes cancerous. Brain tumors are abnormal clusters of cells growing within 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 tissue (cerebrospinal fluid, white matter, and gray matter). MRI imaging technology can provide significant contrast between different brain tissues, and different imaging modalities can provide information about brain tumors from different perspectives, allowing doctors to analyze and judge, quantify the response before and after brain tumor treatment, and thus make accurate diagnoses and formulate treatment plans.

[0003] Diffusion models have achieved significant success in various generative tasks, including medical image segmentation. For example, existing techniques disclose a self-supervised segmentation method for cervical spine MRI images using data generated by a diffusion model. This method includes image preprocessing such as cervical spine MRI slice selection and diffusion model-based super-resolution reconstruction to generate high-quality MRI images through an improved diffusion model. A self-supervised method is used to combine real and generated images, addressing the issue of insufficient label quantity. An Att-UNet network with an Encoder-Decoder structure is constructed to extract relevant features from the input data, and multi-scale consistency output is used to measure the loss, ultimately resulting in more accurate vertebral body and intervertebral disc segmentation results. However, while this method effectively expands the sample size and improves model robustness and segmentation accuracy, providing more accurate reference information for the clinical diagnosis of cervical spine diseases, it cannot adapt to the specific characteristics of brain tumor segmentation tasks, particularly the segmentation of the multi-level anatomical structures of brain tumors. Summary of the Invention

[0004] To address the problem that current MRI image segmentation methods cannot adapt to the multi-level anatomical structures of brain tumors, this invention proposes a three-dimensional MRI brain tumor segmentation method based on a diffusion model. The brain tumor segmentation model is constructed based on the diffusion model and deep learning models such as U-Net, and outputs different lesion regions with correct inclusion relationships, thereby promoting the accurate diagnosis and treatment of brain tumors.

[0005] To achieve the above-mentioned 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 includes:

[0007] S1. Acquire multiple sets of MRI images of different modalities of brain tumor sites in patients and the corresponding true values ​​of segmentation benchmarks;

[0008] S2. Noise is added to the ground truth segmentation value corresponding to the MRI image through a forward diffusion operation to obtain 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, which is based on the introduction of a cross-attention mechanism in the 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 random noise from the prior distribution, concatenate the random noise with the MRI image to be segmented, and input the concatenated random noise into the trained brain tumor segmentation model to obtain the target domain segmentation image corresponding to the inference.

[0012] This technical solution constructs a brain tumor segmentation model based on diffusion models and deep learning models such as U-Net. It introduces multi-level wavelet transform to extract multi-scale features from MRI. In U-Net, a cross-attention mechanism is introduced. By calculating the cross-spatial attention between each convolutional layer of the encoder and wavelet signals at each level, the feature fusion of the decoder is achieved. This integrates conditional information into the network and enhances the feature representation of key regions, thereby improving the accuracy of MRI brain tumor segmentation.

[0013] Preferably, in step S1, four modalities of MRI images are acquired, including: T1-weighted images, contrast-enhanced T1-weighted images, T2-weighted images, and liquid attenuation inversion recovery pulse images.

[0014] Preferably, in step S1, the corresponding baseline truth value is at the pixel level, including: whether it is a segmentation map of the whole 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, then the pixel is recorded as the image background.

[0015] Preferably, in step S2, for the reference truth value of the segmentation By progressively adding T steps of Gaussian noise, noisy segmentation data is obtained. This causes it to tend towards a Gaussian distribution.

[0016] Preferably, in step S3, wavelet information at each level is obtained through a four-level iterative discrete wavelet transform. This wavelet information includes approximate low-frequency and high-frequency details of the MRI image. The process includes:

[0017] S31. Set up a three-dimensional Haar wavelet filter bank, including a low-pass filter h and a high-pass filter g;

[0018] S32. Take each channel from the MRI image I4×D×W×H to obtain a three-dimensional signal V. Perform a three-dimensional convolution operation on the three-dimensional signal V to obtain sub-signals in the X-axis, Y-axis and Z-axis directions in sequence.

[0019] S33. Repeat step S32 on the obtained sub-signal to obtain approximate details of lower and higher frequencies; specifically, repeat this operation four times, that is, perform a total of four levels of transformation, up to the fourth level.

[0020] Here, wavelet transform based on Haar wavelets is introduced to realize 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 and feature extraction on the input feature map; the decoder is used to perform upsampling and generate segmentation results; the CSA module is used to calculate the cross-spatial attention between each convolutional layer of the encoder and wavelet information at each level, and to concatenate the obtained fused output with the decoder layer of the corresponding size.

[0022] Preferably, the U-Net network is a time-dependent U-Net network, encoding time t into the network; the decoder connects a 1×1×1 convolutional layer and a sigmoid layer, mapping to the predicted noise at step t+1. .

[0023] Preferably, the brain tumor segmentation model is trained through a reverse diffusion process, wherein:

[0024] MRI images Noisy segmented data spliced ​​in the channel direction This serves as input for the brain tumor segmentation model; simultaneously, MRI images are used as input. Parallel iterative discrete wavelet transform is performed, and the wavelet signals at each level are introduced into the brain tumor segmentation model through the CSA module.

[0025] Here, a cross-attention mechanism is introduced into 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. The feature fusion of the decoder is achieved through an improved skip connection mechanism, so as to integrate conditional information into the network and enhance the feature representation of key regions.

[0026] Preferably, in step S4, the brain tumor segmentation model updates its parameters through gradient backpropagation until a predetermined total number of training epochs is reached; during the training phase, the brain tumor segmentation model is used as prediction noise. The predictive noise network, denoted as , The input is an MRI image;

[0027] The loss function during the training phase takes the following form:

[0028]

[0029] in, The loss function for the diffusion model is essentially the MSE of the baseline segmentation and the predicted segmentation image at a certain time step. ; and These represent the current number of training cycles and the total number of training cycles, respectively. Jaccard coefficient; This represents the segmentation probability mask matrix for the corresponding region. 'o' indicates the default value; here, we substitute WT, TC, and ET. Corresponding to the whole tumor, Corresponding to the tumor core, Corresponds to enhancing tumors; For hyperparameters, the Make The weights in the loss function gradually increase with the number of training cycles; ;

[0030] The The expression is as follows:

[0031]

[0032]

[0033] in, ,and It is a coefficient calculated at each time step t based on a predefined noise variance scheduler. This coefficient is used to control the amount of noise added to the data at each step.

[0034] At the very beginning of training This represents the error between the predicted and actual segmentation, and is the main component. Since the parameters of the brain tumor segmentation model are randomly initialized, the model lacks discriminative power and can only output random probabilities. Therefore, it rarely outputs segments with correct inclusion relationships. Thus, it directly introduces... This may cause the model to converge to an incorrect segmentation result in the early stages of training, thus leading to a decrease in model performance;

[0035] In the later stages of training, the brain tumor segmentation model had nearly converged to a local optimum. It will also stabilize around a relatively small value, becoming a secondary component. At this point, the brain tumor segmentation model's resolution and performance are already quite good, and it can output segments with correct inclusion relationships to a certain extent, making it a suitable time to introduce... The timing is such that hyperparameters can be used. make During model training, the weights in the loss function gradually increase with the increase of training cycles.

[0036] Here, In the early stages of training, the weights are relatively small, so it has little impact. It plays a central role in the loss function, and its weight will gradually increase in the later stages of training in order to fine-tune the model and improve its performance, thereby inducing the model to output three different lesion regions with correct inclusion relationships.

[0037] Preferably, in step S5, every Each step involves sampling, and the specific process is as follows:

[0038] From the set of accelerated sampling time steps A random noise is obtained by sampling. ,Will With the MRI image to be segmented The images are stitched together as input to the encoder; simultaneously, the MRI images to be segmented are... Wavelet signals at various levels are obtained through iterative discrete wavelet transform and used as input to the CSA module;

[0039] The brain tumor segmentation network passes through After time encoding of the steps, the output is... Prediction noise of the step ;

[0040] Calculate prediction noise corresponding The calculation process is as follows:

[0041]

[0042] in, , It follows a standard Gaussian distribution;

[0043] Will and After being concatenated, the signals are used again as input to the encoder, while wavelet signals at each stage are used as input to the CSA module; the brain tumor segmentation network is then processed... After time encoding of the steps, the output is... Prediction noise of the step ;

[0044] By iterating through the above steps, the final prediction result is obtained. This refers to the segmented image of the target domain for inference.

[0045] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0046] This invention proposes a three-dimensional MRI brain tumor segmentation method based on a diffusion model. It involves acquiring multiple sets of MRI images of different modalities of the brain tumor site from patients, along with corresponding ground truth values ​​for segmentation. Noise is added to the ground truth values ​​corresponding to the MRI images through a forward diffusion operation, resulting in noisy segmentation data. Iterative discrete wavelet transform is performed on the MRI images to obtain wavelet information at various levels. The diffusion model is improved by introducing a cross-attention mechanism into the U-Net network structure to construct a brain tumor segmentation model. The brain tumor segmentation model is trained using the MRI images, noisy segmentation data, and wavelet information at various levels. Random noise is then sampled from the prior distribution, concatenated with the MRI image to be segmented, and input into the trained brain tumor segmentation model. Finally, the target domain segmentation image corresponding to the inference is obtained. This method can extract multi-scale features from multimodal MRI and significantly reduce the number of model parameters. It integrates conditional information into the network and enhances the feature expression of key regions, thereby improving the accuracy of MRI brain tumor segmentation. Attached Figure Description

[0047] Figure 1 This is a schematic diagram of the three-dimensional MRI brain tumor segmentation method based on a diffusion model proposed in Embodiment 1 of the present invention;

[0048] Figure 2 This is a schematic diagram illustrating the framework of the three-dimensional MRI brain tumor segmentation method based on a diffusion model proposed in Embodiment 1 of the present invention.

[0049] Figure 3 This diagram illustrates the iterative discrete wavelet transform process in Embodiment 1 of the present invention.

[0050] Figure 4 This is a schematic diagram of the brain tumor segmentation model structure in Embodiment 2 of the present invention;

[0051] Figure 5 This is a schematic diagram of the CSA module structure in Embodiment 2 of the present invention. Detailed Implementation

[0052] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent.

[0053] To better illustrate this embodiment, some parts of the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual dimensions;

[0054] It is understandable to those skilled in the art that some well-known details may be omitted from the accompanying drawings.

[0055] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0056] The positional relationships depicted in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent.

[0057] Example 1

[0058] like Figure 1 and Figure 2 As shown, this embodiment proposes a three-dimensional MRI brain tumor segmentation method based on a diffusion model, including the following steps:

[0059] S1. Acquire multiple sets of MRI images of the patient's brain tumor site in four modalities and the corresponding segmentation baseline values. The four modalities of MRI images are as follows:

[0060] T1-weighted images: T1-weighting is easy to implement and is often used for structural analysis of brain tumors;

[0061] Contrast-enhanced T1-weighted images: Contrast-enhanced T1-weighted images help distinguish the boundary between the tumor and the surrounding normal tissue;

[0062] T2-weighted images: T2-weighted images are typically used to provide preliminary assessments, identify tumor types, and separate tumors from non-tumor tissues;

[0063] Fluid attenuated inversion recovery (FLAIR) imaging: FLAIR clearly shows the boundaries of edema areas and is one of the most effective imaging methods for brain tumor segmentation.

[0064] The corresponding baseline truth value is at the pixel level, including:

[0065] Segmentation diagrams to distinguish whether a tumor is a whole tumor (WT);

[0066] Segmentation diagrams to distinguish whether it is a tumor core (TC);

[0067] A segmentation map for a single pixel distinguishes whether it is an enhancing tumor (ET).

[0068] If none of the above three are true, then it is an image background (BG).

[0069] S2. Noise is added to the ground truth segmentation value corresponding to the MRI image through a forward diffusion operation to obtain noisy segmentation data; specifically, for the ground truth segmentation value... By progressively adding T steps of Gaussian noise, noisy segmentation data is obtained. This causes it to tend towards a Gaussian distribution.

[0070] S3. Perform iterative discrete wavelet transform on the MRI images to obtain wavelet information at each level; such as... Figure 3 As shown, in this embodiment, wavelet information at each level is obtained through a four-level iterative discrete wavelet transform. This wavelet information includes approximate low-frequency and high-frequency details of the MRI image. The process includes:

[0071] S31. Set up a three-dimensional Haar wavelet filter bank, including a low-pass filter h and a high-pass filter g;

[0072] Wherein, the low-pass filter l = [1, 1], and the high-pass filter h = [-1, 1];

[0073] S32. Extract a three-dimensional signal V from each channel of the MRI image I4×D×W×H, and perform a three-dimensional convolution operation on the three-dimensional signal V. The process is as follows:

[0074] (a) Perform a convolution operation on the three-dimensional signal V along the X-axis to obtain two sub-signals:

[0075] L = V * l, H = V * h

[0076] (b) Convolve sub-signals L and H along the Y-axis to obtain four sub-signals:

[0077] LL= L * l, LH = L * h, HL = H * l, HH = H * h

[0078] (c) Convolve the sub-signals LL, LH, HL, and HH along the Z-axis to obtain eight sub-signals:

[0079] LLL = LL * l, LLH = LL * h, LHL = LH * l, LHH = LH * h,

[0080] HLL = HL * l, HLH = HL * h, HHL = HH * l, HHH = HH * h

[0081] S33. Repeat step S32 on the obtained sub-signal to obtain approximate details of lower and higher frequencies; specifically, repeat this operation four times, that is, perform a total of four levels of transformation, up to the fourth level.

[0082] S4. Construct a brain tumor segmentation model, which is based on the introduction of a cross-attention mechanism in the 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;

[0083] S5. Sample random noise from the prior distribution, concatenate the random noise with the MRI image to be segmented, and input the concatenated random noise into the trained brain tumor segmentation model to obtain the target domain segmentation image corresponding to the inference.

[0084] Example 2

[0085] In this embodiment, the brain tumor segmentation model described in Example 1 is further explained.

[0086] like Figure 4 As shown, the brain tumor segmentation model is an improvement on the diffusion model by introducing a cross-attention mechanism into the U-Net network structure;

[0087] Furthermore, the brain tumor segmentation model includes an encoder, a decoder, and a CSA module; the encoder is used to perform downsampling and feature extraction on the input feature map; the decoder is used to perform upsampling and generate segmentation results; the CSA module is used to calculate the cross-spatial attention between each convolutional layer of the encoder and wavelet information at each level, and to concatenate the obtained fused output with the decoder layer of the corresponding size.

[0088] The U-Net network is a time-dependent U-Net network that encodes time t into the network; the decoder connects a 1×1×1 convolutional layer and a sigmoid layer, mapping to the predicted noise at step t+1. .

[0089] like Figure 5 As shown, in this embodiment, the structure of the CSA module is as follows: Figure 5 As shown, the input to the CSA module is the first... Eight signals obtained by wavelet transform Passing the exam The output of each downsampling module before passing through the max pooling layer has the following dimensions: However, the number of channels differs. First, the convolutional layer is normalized through layer normalization, and the result is obtained by 1*1*1 convolution and ReLU calculation. Its channel count and size remain unchanged. On the other hand, Through layer normalization, 1×1×1 convolution, and ReLU calculation, eight different values ​​are obtained. Its channel number becomes This is consistent with the input convolutional layer; at the same time, It is obtained in parallel through another 1×1×1 convolution. Its channel number becomes .then, Each and 8 The values ​​are summed and passed through eight different 1×1×1 convolutions, ReLU, and Softmax layers to obtain eight spatial attention weights. .

[0090] Example 3

[0091] In this embodiment, the training process of the brain tumor segmentation model described in Examples 1 and 2 is further explained.

[0092] The training of the brain tumor segmentation model is divided into a forward process and a reverse process of the diffusion process:

[0093] During the forward diffusion process, the baseline truth value of the segmentation. Transformed by gradually adding T steps of Gaussian noise The reason for having 3 channels here is to transform the problem of segmenting four regions into 3 binary classification problems, namely, whether it is WT, TC, or ET.

[0094] In the reverse diffusion process, firstly, MRI images Noisy segmented data By splicing along the channel direction, we can obtain... As input to the brain tumor segmentation model; at this time, the brain tumor segmentation model serves as prediction noise. The predictive noise network, denoted as During this process, the brain tumor segmentation model updates its parameters through gradient backpropagation until the predetermined total number of training cycles is reached.

[0095] In this embodiment, considering the specific characteristics of the brain tumor segmentation task, a Jaccard-like coefficient is designed as a constraint to introduce a loss function, thereby inducing the model to output three different lesion regions with correct inclusion relationships.

[0096] Given two sets A and B, the Jaccard coefficient is defined as follows:

[0097]

[0098] That is, the Jaccard coefficient is the ratio of the cardinality of the intersection of A and B to the cardinality of the union of A and B. When both sets A and B are empty sets, .

[0099] The Jaccard distance, derived from this, is used to describe the dissimilarity between sets. The larger the distance, the lower the sample similarity. It is defined as follows:

[0100]

[0101] Based on the definition of Jaccard coefficients, 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 with respect to A is defined as the ratio of the cardinality of the intersection of A and B to the cardinality of B, and is therefore asymmetric, as defined below:

[0102]

[0103] definition as follows:

[0104]

[0105] Easy to obtain .when hour, Completely included ;when hour, Not included at all ,Right now and Complete separation; when hour, Some are included in If Introduced into the model as part of the loss function, optimization The process of reducing it is called induction. Make it as much as possible to include The process.

[0106] Segmentation mask matrix for two different types of tumor regions , Its elements Where an element at a certain position is 1, it represents that the voxel is segmented as foreground, and a value of 0 represents that position as background. Therefore, the foreground region represented by the 3D segmentation mask matrix A can be represented as a set of triplet arrays representing the positions of the matrix elements, i.e.:

[0107]

[0108]

[0109] Therefore, it is easy to obtain , ;

[0110]

[0111] Let a three-dimensional matrix be used. , These represent segmentation results output in probabilistic form, indicating two different types of tumor regions. In application, take The algorithm is as follows:

[0112]

[0113] Easy proof .

[0114] Based on this, the loss function during the training phase is taken as follows:

[0115]

[0116] in, Let be the loss function of the diffusion model. ; and These represent the current number of training cycles and the total number of training cycles, respectively. Jaccard coefficient; This represents the segmentation probability mask matrix for the corresponding region; o indicates the default value. Corresponding to the whole tumor, Corresponding to the tumor core, Corresponds to enhancing tumors; For hyperparameters, the Make The weights in the loss function gradually increase with the number of training cycles; ;

[0117] The The expression is as follows:

[0118]

[0119]

[0120] in, The coefficients are calculated at each time step t based on a predefined noise variance scheduler and are used to control the amount of noise added at each step.

[0121] Based on the above training process, during the inference process in step S5 (i.e., actually segmenting the brain tumor image), every... Each step involves sampling, and the specific process is as follows:

[0122] From the set of accelerated sampling time steps A random noise is obtained by sampling. ,Will With the MRI image to be segmented The images are stitched together as input to the encoder; simultaneously, the MRI images to be segmented are... Wavelet signals at various levels are obtained through iterative discrete wavelet transform and used as input to the CSA module;

[0123] The brain tumor segmentation network passes through After time encoding of the steps, the output is... Prediction noise of the step ;

[0124] Calculate prediction noise corresponding The calculation process is as follows:

[0125]

[0126] in, , Following a standard Gaussian distribution helps increase the randomness of the generated samples;

[0127] Will and After being concatenated, the signals are used again as input to the encoder, while wavelet signals at each stage are used as input to the CSA module; the brain tumor segmentation network is then processed... After time encoding of the steps, the output is... Prediction noise of the step ;

[0128] By iterating through the above steps, the final prediction result is obtained. This refers to the segmented image of the target domain for inference.

[0129] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for three-dimensional MRI brain tumor segmentation based on diffusion model, characterized in that, The method comprises the following steps: S1. Collecting multiple sets of MRI images of different modalities of brain tumor sites of patients and corresponding segmentation ground truths; S2. Adding noise to the segmentation ground truths corresponding to the MRI images through a forward diffusion operation to obtain noisy segmentation data; S3. Performing iterative discrete wavelet transform on the MRI images to obtain wavelet information at each level; S4. Constructing a brain tumor segmentation model, wherein the brain tumor segmentation model is improved based on the introduction of a cross-attention mechanism into a U-Net network structure; the brain tumor segmentation model is trained using the MRI images, the noisy segmentation data, and the wavelet information at each level to obtain a trained brain tumor segmentation model; S5. Sample a random noise from the prior distribution, splice the random noise with the MRI image to be segmented, input the MRI image to be segmented into the trained brain tumor segmentation model, and obtain the corresponding inference target domain segmentation image, specifically: sample a random noise from the set of time steps of accelerated sampling , splice with the MRI image to be segmented as the input of the encoder; at the same time, input the MRI image to be segmented to the CSA module as the input of the CSA module through iterative discrete wavelet transform; and output the segmentation result of the CSA module.​ The brain tumor segmentation model outputs a prediction noise after time encoding of the brain tumor segmentation model at the step of the brain tumor segmentation model at the step ; Computing predicted noise Corresponding The computation proceeds as follows: wherein , obeys a standard Gaussian distribution; will be combined as the input of the encoder again, while the wavelet signals at each level are input into the CSA module; the brain tumor segmentation model is trained by encoding the time domain signals at each level, and outputs the prediction noise at the th step . ; Iterating step S5, the final prediction result is obtained is the target domain segmentation image of reasoning.

2. The diffusion model based three-dimensional MRI brain tumor segmentation method according to claim 1, wherein, In step S1, four modalities of MRI images are collected, including TI-weighted images, contrast-enhanced T1-weighted images, T2-weighted images, and liquid attenuated inversion recovery pulse images.

3. The diffusion model based three-dimensional MRI brain tumor segmentation method of claim 2, wherein, In step S1, the corresponding segmentation ground truths are at the pixel level and include segmentation maps of whether they are whole tumors, tumor cores, or enhanced tumors; for a pixel in the MRI image, if the pixel is not any of the above segmentation maps of whole tumors, tumor cores, or enhanced tumors, the pixel is recorded as image background.

4. The diffusion model based 3D MRI brain tumor segmentation method of claim 1, wherein, In step S2, for the segmented ground truth , the T-step Gaussian noise is added step by step to obtain the noisy segmented data, so as to tend to Gaussian distribution.

5. The diffusion model based 3D MRI brain tumor segmentation method according to claim 1, wherein, In step S3, wavelet information at each level is obtained through four-level iterative discrete wavelet transform, including low-frequency and high-frequency approximation details of the MRI images, and the process comprises: S31. Setting a three-dimensional Haar wavelet filter bank, including a low-pass filter h and a high-pass filter g; S32. Extracting a three-dimensional signal V from the MRI image, and performing three-dimensional convolution operation on the three-dimensional signal V to obtain sub-signals in X-axis, Y-axis, and Z-axis directions in sequence; S33. Repeating the operation of step S32 on the obtained sub-signals to obtain lower-frequency and higher-frequency approximation details.

6. The diffusion model based three-dimensional MRI brain tumor segmentation method according to claim 4, wherein, The brain tumor segmentation model comprises an encoder, a decoder, and a CSA module; the encoder is used for down-sampling operation and feature extraction on the input feature map; the decoder is used for up-sampling operation and generates a segmentation result; and the CSA module is used for calculating cross-space attention between each convolution layer of the encoder and the wavelet information at each level, and splicing the obtained fusion output with the decoder layer of the corresponding size.

7. The diffusion model based three-dimensional MRI brain tumor segmentation method according to claim 6, wherein, The U-Net network is a time-dependent U-Net network, which encodes time t into the network; the decoder is connected with a 1x1x1 convolution and a Sigmoid layer, which maps to the predicted t+1 step noise .

8. The diffusion model based three-dimensional MRI brain tumor segmentation method according to claim 7, wherein, The brain tumor segmentation model is trained through a reverse diffusion process, wherein: MRI images and the segmented data with noise are spliced in the channel direction as the input of the brain tumor segmentation model; meanwhile, the MRI images The obtained wavelet signals at each level are introduced into the brain tumor segmentation model through the CSA module by performing the iterative discrete wavelet transform in parallel.

9. The diffusion model based three-dimensional MRI brain tumor segmentation method according to claim 8, wherein, 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; in the training phase, the brain tumor segmentation model is used as a predictive noise network, denoted as , , , for input MRI images; The loss function in the training stage takes the following form: wherein, is a loss function of a diffusion model, ; and are the current trained epoch and the total epochs, respectively; is the Jaccard coefficient; corresponds to the whole tumor, corresponds to the tumor core, corresponds to the enhanced tumor; is a hyperparameter, the such that the weight in the loss function gradually increases as the training epoch increases; ; The The expression is as follows: wherein, is the coefficient calculated at each time step t according to the predefined noise variance scheduler, used to control the amount of noise added at each step.

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