Brain tumor image accelerated diffusion network segmentation method based on fuzzy learning

Through the accelerated diffusion network method based on fuzzy learning, combined with CNN and Transformer models, the problems of texture blur and boundary disappearance in brain tumor images are solved, the accuracy and robustness of segmentation are improved, the model training process is simplified, and the model is adapted to different Image and noise mode of type and size.

CN119205819APending Publication Date: 2024-12-27NANTONG UNIV

Patent Information

Application Number
CN202411468561.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with texture blur and boundary disappearance in brain tumor image segmentation, resulting in low diagnostic accuracy and efficiency and requires a lot of manual intervention.

Method used

Using accelerating diffusion network method based on fuzzy learning, combined with CNN and Transformer models, pre-segmentation, multi-scale feature extraction and contrast enhancement are performed through fuzzy U-Net network and 3D U-Net network, and the denoising process is terminated in advance to improve segmentation accuracy. sex.

Benefits of technology

It significantly improves the accuracy and robustness of brain tumor image segmentation, reduces the number of denoising iterations, simplifies the model training process, enhances the generalization ability of the model, and adapts to images and noise patterns of different types and sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205819A_ABST
    Figure CN119205819A_ABST
Patent Text Reader

Abstract

The invention provides a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning, and belongs to the technical field of medical image intelligent segmentation. The technical problem of low segmentation accuracy caused by fuzzy texture and boundary disappearance of the brain tumor image is solved. According to the technical scheme, the method comprises the following steps of S1, performing data preprocessing on a brain tumor image data set; s2, performing pre-segmentation on the brain tumor image by using a 3D U-Net network, and performing iterative noise addition on the obtained segmented image to enable the segmented image to become a pure noise image; s3, performing iterative denoising on the pure noise image, and learning a denoising process by using a fuzzy U-Net network; and S4, stopping the denoising process in advance, and segmenting the segmented image by using a 3D U-Net network to obtain a final segmentation result. The method has the advantages that the segmentation accuracy is high, decision support is provided for segmentation of the brain tumor image, and convenience is provided for diagnosis of doctors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent processing of medical images, and in particular to a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning. Background Art

[0002] Brain tumors are abnormal growths that form in the brain tissue. They can be benign or malignant, which can have a serious impact on the patient's life and overall health. According to statistics, hundreds of thousands of people are diagnosed with brain tumors every year worldwide, and the incidence of malignant tumors is on the rise. At present, the early diagnosis and treatment of brain tumors have become one of the focuses of clinical attention. However, due to its complex location and structure in the brain tissue and the heterogeneity of different types of tumors, its diagnosis and treatment have become extremely challenging. In addition, the segmentation of multiple organs in the abdomen is an important medical image processing task, which aims to accurately extract the contours and boundaries of multiple organs, such as the liver, kidneys, and pancreas, from abdominal images to help doctors make diagnoses, surgical planning, and treatment monitoring. Traditional methods for brain tumor and abdominal multi-organ segmentation often require doctors to have rich experience and expertise, and the segmentation process is complex and time-consuming, and is easily affected by subjective factors and errors. Therefore, automated medical image segmentation technology is of great significance for improving diagnostic accuracy and clinical efficiency, helping doctors to detect lesions in a timely manner and improve patients' treatment effects and survival rates.

[0003] Medical image segmentation is a process that uses computer vision and image processing techniques to accurately mark or segment structures or regions of interest in medical images. It plays a vital role in medical image analysis, helping doctors diagnose, monitor diseases, and develop treatment plans. By automatically identifying and quantifying lesions in images, doctors can develop treatment plans more quickly and accurately, thereby improving patient outcomes. However, due to the complexity and diversity of medical images, such as noise, blurred textures in images, and vanishing boundaries, medical image segmentation currently still faces many challenges and difficulties. Summary of the invention

[0004] The present invention proposes a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning. The present invention can more effectively handle the situations of texture blur and boundary disappearance, and also enhances the accuracy and robustness of brain tumor image segmentation.

[0005] The inventive idea of ​​the present invention is: the present invention first pre-segments the brain tumor image, and secondly, considering the widespread existence of texture blur and boundary disappearance in brain tumor images, the fuzzy learning theory and contrast enhancement module are added to the denoising diffusion model, and CNN and Transfoemer are used to extract multi-scale features. Finally, the denoising process is terminated in advance and the segmentation map is segmented using the 3DU-Net network to obtain the final segmentation result.

[0006] The present invention is achieved through the following measures: a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning, comprising the following steps:

[0007] S1: Read the brain tumor image dataset and perform data preprocessing on the medical images. Convert each image to RGB mode, convert the corresponding labels to grayscale mode, and crop the brain tumor images and labels to a size of 132×132×116. Then, introduce random cropping, space filling, random flipping, intensity scaling, and offset to the medical images for data augmentation.

[0008] S2: Gradually superimpose the randomly generated Gaussian noise onto the segmented image. First, use the 3D U-Net network to pre-segment the brain tumor image to obtain a pre-segmented image, and then create an image containing only Gaussian noise. The pixel values ​​of this image are randomly sampled from the Gaussian distribution. Through multiple consecutive superposition processes, the noise level in the segmented image is gradually increased. This process is repeated until the segmented image is completely covered by the noise, and finally a pure noise image composed entirely of Gaussian noise is generated.

[0009] S3: De-noising the pure noise image in an iterative manner, using the fuzzy U-Net network model to learn this process. In each denoising time step, the CNN and Transformer models are used to extract multi-scale features of the brain tumor image as conditional information embedding of the fuzzy U-Net network;

[0010] S4: The denoising process is terminated early to obtain a segmentation map containing a small amount of Gaussian noise, and then the segmentation map is segmented using the 3D U-Net network to obtain the final segmentation result.

[0011] As a further optimization scheme of the brain tumor image accelerated diffusion network segmentation method based on fuzzy learning provided by the present invention, the specific steps of step S2 are as follows:

[0012] Step S2.1: Given a brain tumor image I∈R D×H×W×C , where D, H, W, and C represent the depth, height, width, and number of channels of the brain tumor image, respectively. First, the 3D U-Net network architecture is used to perform preliminary segmentation processing on this image to obtain the preliminary segmentation result xI ∈R D×H×W×C , whose size is the same as the original image, i.e., D×H×W×C. The 3D U-Net network consists of four layers, corresponding to different depth levels of the network, including both the encoding path and the decoding path. In each layer of the encoding path, the network consists of two 3×3×3 convolution kernels, which are responsible for extracting the features of the image in three dimensions. After each convolution operation, it is followed by batch normalization and ReLU activation function, and nonlinear characteristics are introduced. The network achieves downsampling through a 2×2×2 maximum pooling operation with a stride of 2, which helps to reduce the spatial dimension of the data while expanding on the feature channel. In the decoding path, the operation of each layer starts with a step of 2×2×2 transposed convolution operation, which is used to increase the spatial dimension of the feature map and achieve upsampling; the network further refines the details of the feature map through two 3×3×3 convolution layers, which are responsible for capturing local features in three dimensions. After each convolution layer, batch normalization and ReLu activation function are applied to speed up the network training process and enhance the expressiveness of the model. Finally, in the last layer of the decoding path, a 1×1×1 convolution layer is used to convert the number of channels of the feature map to the required number of output categories, and then a sigmoid activation function is applied to generate the final segmentation map;

[0013] Step S2.2: In the forward denoising process, in the pre-segmented image x I ∈R D×H×W×C Gradually add Gaussian noise to get the pure noise image x T ∈R D×H×W×C , where D, H, W, and C represent the depth, height, width, and number of channels of the brain tumor image, respectively. Set β t ∈(0,1) to control the degree of noise addition, that is, β t The value of gradually increases, and the corresponding noisy images x1,...,x are generated by gradually adding noise to the pre-segmented images. T , and the image x obtained at each step t Only the x obtained in the previous step t-1 Related, until the image x of step T T becomes a pure Gaussian noise image. The process is regarded as a Markov process, satisfying:

[0014]

[0015] Among them, q(·) represents the forward process, represents the normal distribution, β t ∈(0,1) is the variance hyperparameter of the Gaussian distribution, and β t Satisfies the condition β1<β2<…<β T ;

[0016] Then, using the re-parameterization technique, we sample x using formula (2) t , that is, generating random variables Let α t =1-β t ,as well as Thus we get:

[0017]

[0018] As a further optimization scheme of the brain tumor image accelerated diffusion network segmentation method based on fuzzy learning provided by the present invention, the specific steps of step S3 are as follows:

[0019] Step S3.1: In the denoising process, since it is impossible to directly infer q(x t-1 ∣x t ), so we use the deep learning model p θ To fit the distribution q(x t-1 ∣x t ), the model parameter is θ:

[0020]

[0021] Among them, p θ (·) is used to fit the distribution q(x t-1 ∣x t ) deep learning model, using the fuzzy U-Net network, μ θ is the mean, Σ θ is the variance, t is the number of steps of adding or denoising, although it is impossible to directly derive q(x t-1 ∣x t ), but when x0 is known, we can get q(x t-1 ∣x t ,x0) is:

[0022]

[0023] In the derivation process of formula (6), the reverse process of the denoising diffusion model is converted into a forward process by the Bayesian formula, and the exponential part of the probability density function and the Gaussian probability density function is obtained. Correspondingly, we have:

[0024]

[0025] According to formula (7) and formula (8), q(x t-1 ∣x t ,x0), according to formula (3):

[0026]

[0027] Substituting into formula (8) we get:

[0028]

[0029] Using deep learning model p θ To fit the distribution q(x t-1 ∣x t ), according to formula (5), we hope to train the model μ θ (x t ,t) According to the estimated formula (10), since x t In the training phase, it is used as input, and the model is asked to estimate the noise ∈ t , that is,

[0030]

[0031] According to formula (11), we finally get:

[0032]

[0033] Step S3.2: Use the fuzzy U-Net network to learn the denoising process. A fuzzy residual connection is designed on the jump connection path of the U-Net network to fuzzy the encoded features. First, a fuzzy learning module is designed to fuzzy the features, and then the processed features are connected to the encoded features through residual connections to obtain fused features. The fuzzy learning module includes fuzzy membership functions and fuzzy rules. For each channel, M fuzzy membership functions are applied to each feature point in the feature map. The fuzzy membership function remains unchanged on each channel, but changes on different channels. Each fuzzy membership function assigns a fuzzy class label to each feature point in each channel to describe the degree of similarity between it and other feature points. At the membership function layer, Gaussian function is used as the membership function:

[0034]

[0035] Among them, F x,y,z,c is a feature point in the feature map of channel C, (x, y, z) represents the position corresponding to the feature point, μ k,c and σ k,c is the mean and standard deviation of the kth Gaussian membership function, F x ' ,y,z,k,c represents the kth output fuzzy class label of the feature point at position (x, y, z) in channel C. Then, the fuzzy rule “AND” is applied to all fuzzy membership functions of each feature point, and the final fuzzy feature information F of the input feature map is obtained by formula (14):x,y,z,c :

[0036]

[0037] Formula (14) obtains the fuzzy feature information F of each feature point according to the output of each membership function: x,y,z,c , we get the fuzzy feature map F∈R after the feature map extracted by the U-Net encoder is processed by the fuzzy learning module D×H×W×C ;

[0038] As part of the network, the fuzzy learning module is viewed as a fuzzy layer described by multiple parameters from the Gaussian membership function, with the parameters μ k,c and σ k,c It remains unchanged in the same channel, but varies between different channels; finally, the output of the fuzzy learning module is the fuzziness tensor F, which has the same size as the encoding feature of the U-Net network. Therefore, they are fused through residual connections, as shown in formula (15):

[0039] F t =BN(FLM(f t ))+BN(f t ) (15)

[0040] Among them, the output feature map and fuzziness tensor of U-Net are processed by batch normalization BN to constrain its dynamic range, and then a simple addition operation is used to integrate the fuzzy logic information;

[0041] Step S3.3: A contrast enhancement module is designed after each convolution block of the encoding path of the blurred U-Net network to amplify the contrast of texture and boundary features in the encoding stage of the segmentation network. The module mainly consists of two parts: using fast Fourier transform FFT to enhance frequency domain information and improving feature information through attention mechanism while suppressing background information;

[0042] The contrast enhancement module uses a two-dimensional FFT layer to transform the encoded features from the spatial domain to the frequency domain to obtain the amplitude spectrum and phase spectrum:

[0043] M f =F(M e ) (16)

[0044] Among them, M e represents the encoded features, F(·) represents two-dimensional FFT, M fRepresents the frequency domain features after two-dimensional FFT processing. In the frequency domain, the amplitude spectrum usually conveys global information. On the contrary, the phase spectrum contains local information. This module uses two learnable frequency domain filters to weigh the amplitude and phase information to improve the contrast of the extracted features and capture high-frequency details. Subsequently, the weighted features are transformed from the frequency domain to the spatial domain through the inverse fast Fourier transform IFFT. The calculation is as follows:

[0045]

[0046] Among them, F -1 (·) represents two-dimensional IFFT, M i represents the output of the IFFT layer, the amplitude spectrum and phase spectrum are represented by M a and M p In addition, w a and w p Learnable frequency domain filters representing magnitude spectrum and phase spectrum respectively, the learnable frequency domain filters adjust the frequency components to effectively capture context information;

[0047] The output features obtained from the two-dimensional IFFT layer are input into the feature enhancement part. On the one hand, the channel attention module CAM compresses the spatial information in the feature map and emphasizes the semantic information of different channel features. It enhances the channel information related to the task by utilizing the channel attention weights; on the other hand, the spatial attention module SAM compresses the channel feature information and emphasizes the contextual spatial information in the feature map. This module uses the spatial attention weights to focus on the key areas that have a significant impact on the segmentation results. The joint channel and spatial attention modules enhance the features related to the task and suppress the features that are not related to the task. Subsequently, the enhanced features after different linear transformations are used as channel query Mc, spatial query Ms and value Mv, respectively. The channel and spatial queries are input into CAM and SAM to obtain channel and spatial attention weights, respectively. These attention weights emphasize the key channel and spatial information within the value. The attention weights are calculated as follows:

[0048] w c =σ(MLP(AvgPool(M c ))+MLP(MaxPool(M c ))) (18)

[0049] w s =σ(f 7×7 ([AvgPool(M s );MaxPool(M s )])) (19)

[0050] Where σ represents the sigmoid function, f 7×7represents a convolutional layer with a kernel size of 7×7. AvgPool and MaxPool are the global average pooling layer and the global maximum pooling layer, respectively. At the same time, w c and w s Represents the channel and spatial attention weights. These weights are multiplied to get the attention score. Integrating spatial and channel attention, the output is obtained by weighting M v with the attention score. The calculation process is as follows:

[0051]

[0052] Among them, M o Represents the output of CEM, which is used in various layers of the U-Net encoder to enhance feature maps at different scales. These enhanced features are then transferred to the U-Net decoder through residual connections to help it generate accurate segmentation masks;

[0053] Step S3.4: In each denoising iteration, the conditional encoder is first used to extract features from the brain tumor image. The encoder consists of four consecutive convolution modules, each of which contains a 3×3×3 convolution kernel to capture the local features of the image. After the convolution operation, the ReLU activation function is applied to introduce nonlinearity to enhance the expression ability of the network; then, the key features are screened out through the maximum pooling operation, and the spatial downsampling of the feature map is achieved. After each convolution module, the spatial size of the feature map is halved, and the number of feature channels is increased accordingly, and multi-scale feature representations are obtained in turn. These features are saved and fused with the feature map of the encoder of the fuzzy U-Net network; then, the feature map f I 4 After appropriate processing, including flattening and adding position encoding, it is fed into the Transformer module. Finally, the output of the Transformer module is added to the bottom-level skip path of the fuzzy U-Net network for feature fusion. First, label the x input feature map and reshape it into a series of 3D patches, denoted as The size of each 3D patch is P×P×P, and the total number of patches is Then the 3D patch x P Linear projection to d enc In the dimensional embedding space, a learnable position embedding is added to preserve the spatial information. The final embedding formula is as follows:

[0054]

[0055] in and E pos ∈R N×d Represents the corresponding linear projection and position embedding, and the feature extraction process of the Transformer module is as follows:

[0056]

[0057] head i =Attention(X i W i Q ,X i W i K ,X i W i V ) (twenty three)

[0058] MSA(Q,K,V)=Concat(head1,…,head i )W 0 (twenty four)

[0059] MLP(X)=max(0,XW1+b1)W2+b2 (25)

[0060] Among them, Q, K, and V are matrices obtained after linear transformation of X. Q represents the information to be queried, K represents the queried vector, and V represents the value obtained by the query. k represents the dimension of the query matrix or key-value matrix, softmax is the activation function, W i Q , W i K , W i V They represent the linear transformation matrix of the i-th self-attention, Concat represents the concatenation operation, and W 0 Represents the linear transformation matrix, max is the maximum value operation, W1 and W2 are weights, and b1 and b2 are constants.

[0061] As a further optimization scheme of the brain tumor image accelerated diffusion network segmentation method based on fuzzy learning provided by the present invention, the specific steps of step S4 are as follows:

[0062] Step S4.1: In order to reduce the number of inference iterations of the denoising process, the denoising process is stopped early. Although the segmentation prediction map in the final stage of the denoising process may have some noise at this time, it is often consistent with the final segmentation prediction result and will not introduce too much prediction randomness. The step where the denoising process is stopped early is represented by t′. t′ , through a separate denoising network f ψ (3D U-Net network) One-step denoising to obtain the final segmentation result x0;

[0063] x0=f(γ t′ ;ψ) (26)

[0064] The 3D U-Net network consists of an encoder and a decoder. The encoder includes multiple convolutional layers and downsampling layers. The convolutional layer uses a 3×3×3 convolution kernel to extract local features of the image, and the downsampling layer reduces the resolution of the image through the maximum pooling operation to expand the receptive field. The decoder is symmetrical to the encoder and includes multiple convolutional layers and upsampling layers. The convolutional layer is used to further refine the features and fuse the low-resolution features with the high-resolution features from the corresponding stage of the encoder. The upsampling layer uses a deconvolution operation to restore the resolution of the image. Finally, the output of the decoder is passed through a convolution operation with a convolution kernel of 1×1×1 to match the number of feature channels with the number of channels of the target image, that is, the number of feature channels is adjusted to 3.

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

[0066] 1. The introduced diffusion model directly learns the mapping from noisy images to clean images through end-to-end training, which greatly simplifies the model training process. In addition, end-to-end training not only improves the performance of the model, but also enhances its generalization ability, enabling the model to adapt to images of different types and sizes, as well as various noise patterns;

[0067] 2. The introduced fuzzy U-Net network is a deep learning model that combines the traditional U-Net architecture with fuzzy logic, and is designed specifically for medical image segmentation tasks with uncertainty and ambiguity. This network inherits the main features of U-Net, while introducing fuzzy logic and contrast enhancement to improve the segmentation ability and robustness of the model;

[0068] 3. Using 3D U-Net network to perform pre-segmentation and final segmentation of brain tumor images significantly reduced the number of iterations of the denoising and denoising operations of the diffusion model;

[0069] 4. Using CNN and Transformer modules to extract features from brain tumor images can give full play to the advantages of both models, provide more powerful and comprehensive feature representation, and help improve the accuracy and efficiency of image segmentation; BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings to make the technical solutions and beneficial effects of the present invention apparent.

[0071] Figure 1 Shown is a flow chart of a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning of the present invention;

[0072] Figure 2The figure shows the overall framework of a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning of the present invention;

[0073] Figure 3 It is a schematic diagram of a fuzzy learning module of a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning of the present invention;

[0074] Figure 4 The figure shows a 3DU-Net network architecture diagram of a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning of the present invention;

[0075] Figure 5 The figure shows a Transformer module architecture diagram of a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning of the present invention;

[0076] Figure 6 The figure shows a contrast enhancement module architecture diagram of a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning of the present invention;

[0077] Figure 7 The figure shows the result of segmenting the Brats2020 brain tumor dataset using a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning of the present invention;

[0078] Figure 8 Shown is a result diagram of segmenting the BTCV abdominal multi-organ data set using a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning in the present invention. DETAILED DESCRIPTION

[0079] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments. Of course, the examples described with reference to the accompanying drawings are only used to explain the present invention and cannot be interpreted as limiting the present invention.

[0080] Example 1

[0081] See also Figures 1 to 8 The technical solution provided in this embodiment is a brain tumor image accelerated diffusion network segmentation method based on fuzzy learning. Taking the first image in the Brats2020 brain tumor dataset as an example, from loading data to obtaining the segmentation result, the following steps are included:

[0082] S1: Read the first image in the Brats2020 brain tumor image dataset and perform data preprocessing on the image, that is, convert each image into RGB mode, where R, G, and B represent the red, green, and blue color channels of the image, respectively, convert the corresponding labels into grayscale mode, and crop the brain tumor image and label to a size of 132×132×116. Then, random cropping, space filling, random flipping, intensity scaling, and offset are introduced to the medical image for data enhancement.

[0083] S2: The randomly generated Gaussian noise is gradually superimposed on the segmented image, as shown in Formula 3. First, the brain tumor image is pre-segmented using the 3D U-Net network to obtain the pre-segmented image x I , and then create an image containing only Gaussian noise. The pixel values ​​of this image are randomly sampled from the Gaussian distribution. Through multiple consecutive superposition processes, the noise level in the pre-segmented image is gradually increased. This process is repeated until the segmented image is completely covered by the noise, and finally a pure noise image composed entirely of Gaussian noise is generated, as shown in Formula 2;

[0084] S3: Denoising the pure noise image in an iterative manner, as shown in Formula 12, using a fuzzy U-Net network model to learn this process. In addition, in each denoising time step, CNN and Transformer models are used to extract multi-scale features of brain tumor images as conditional information embedding of the fuzzy U-Net network;

[0085] S4: The denoising process is terminated early to obtain a segmentation map containing a small amount of Gaussian noise, and then the segmentation map is segmented using the 3D U-Net network to obtain the final segmentation result.

[0086] Specifically, the specific steps of step S2 are as follows:

[0087] Step S2.1: Given a brain tumor image I∈R D×H×W×C , where D, H, W, and C represent the depth, height, width, and number of channels of the brain tumor image, respectively. After preprocessing, the size of the brain tumor image is 132×132×116, and the number of channels is 4. First, the 3D U-Net network architecture is used to perform preliminary segmentation processing on this image to obtain the preliminary segmentation result x I ∈R D×H×W×C, whose size is the same as the original image, i.e., D×H×W×C. The 3D U-Net network consists of four layers, corresponding to different depth levels of the network, including both the encoding path and the decoding path. In each layer of the encoding path, the network consists of two 3×3×3 convolution kernels, which are responsible for extracting the features of the image in three dimensions. After each convolution operation, it is followed by batch normalization and ReLU activation function to introduce nonlinear characteristics. The network achieves downsampling through a 2×2×2 maximum pooling operation with a stride of 2, which helps to reduce the spatial dimension of the data while expanding on the feature channel; in the decoding path, the operation of each layer starts with a stride of 2. The 2×2×2 transposed convolution operation is used to increase the spatial dimension of the feature map to achieve upsampling, and the network further refines the details of the feature map through two 3×3×3 convolution layers. These convolution layers are responsible for capturing local features in three dimensions. After each convolution layer, batch normalization and ReLu activation function are applied to accelerate the training process of the network and enhance the expressiveness of the model. Finally, in the last layer of the decoding path, a 1×1×1 convolution layer is used to convert the number of channels of the feature map to the required number of output categories, and then the sigmoid activation function is applied to generate the final segmentation map, as shown in Figure 4 As shown;

[0088] Step S2.2: In the forward denoising process, in the pre-segmented image x I ∈R D×H×W×C Gradually add Gaussian noise to get the pure noise image x T ∈R D×H×W×C , where D, H, W, and C represent the depth, height, width, and number of channels of the brain tumor image, respectively. Set β t ∈(0,1) to control the degree of noise addition, and linear scheduling is mainly used to obtain β t , that is, β t The value of gradually increases, and the corresponding noisy images x1,...,x are generated by gradually adding noise to the pre-segmented images. T , and the image x obtained at each step t Only the x obtained in the previous step t-1 Related, until the image x of step T T becomes a pure Gaussian noise image. The process is regarded as a Markov process, satisfying:

[0089]

[0090] Among them, q(·) represents the forward process, represents the normal distribution, β t is a list of 1000 numbers, β t=[0.0001,0.00011992,…,0.01998,0.0200], the value of T is 1000;

[0091] Then, using the re-parameterization technique, we sample x using formula (2) t , that is, generating random variables Let α t =1-β t ,as well as Thus we get:

[0092]

[0093] Because β t is a list of 1000 numbers, β t =[0.0001,0.00011992,…,0.01998,0.0200], and the value of T is 1000, so α t =[0.9999,0.99988008,…,0.98002,0.9800], x0 is the initial medical image, ε t is randomly sampled Gaussian noise, and the calculation results are shown in formula (4) and formula (5):

[0094]

[0095] Specifically, the specific steps of step S3 are as follows:

[0096] Step S3.1: In the denoising process, since it is impossible to directly infer q(x t-1 ∣x t ), so the fuzzy U-Net network p is used θ To fit the distribution q(x t-1 ∣x t ), the model parameter is θ:

[0097]

[0098]

[0099] Among them, μ θ is the mean, Σ θ is the variance, t is the number of denoising steps, the value of T is 1000, and p θ (x 0:T ) represents the pure noise image x T Inversely generate the joint probability distribution of the clear image x0, p(x T ) represents a pure noise image x T The probability of p(x T ) is the standard normal distribution. pθ (x t-1 |x t ) represents the image x at a given time step t t Under the condition, the previous time step x t-1 probability. Represents a normal distribution with a mean of μ θ (x t ,t), represents the time step t and the given image x t Under the condition of t-1 The mean and variance are Σ θ (x t ,t), represents the time step t and the given image x t Under the condition of t-1 The variance of , t is the number of steps of adding noise (or denoising). Then, we can get q(x t-1 ∣x t ,x0) is:

[0100]

[0101] in, represents a normal distribution, with a mean of It depends on the image x at the current time step t and the initial time step image x0, the variance is In the derivation of formula (6), the reverse process of the denoising diffusion model is converted into a forward process by the Bayesian formula, and the exponential part of the probability density function and the Gaussian probability density function are obtained. Correspondingly, we have:

[0102]

[0103] Among them, x0 is the initial medical image, x t is the noise image corresponding to the t-th time step, α t =[0.9999,0.99988008,…,0.98002,0.9800],

[0104] According to formula (7) and formula (8), q(x t-1 ∣x t ,x0), according to formula (3):

[0105]

[0106] Substituting into formula (8) we get:

[0107]

[0108] Using deep learning model p θ To fit the distribution q(x t-1 ∣x t ), according to formula (5), we hope to train the model μ θ (x t ,t) According to the estimated formula (10), since x t In the training phase, it is used as input, and the model is asked to estimate the noise ∈ t , that is,

[0109]

[0110] Among them, ∈ θ (x t ,t) is obtained by blurring the U-Net network from the current noisy image x t and the noise component predicted at time step t. According to formula (11), we finally get:

[0111]

[0112] Formula (12) describes the conditional probability distribution of the denoising diffusion network from time step t to time step t-1, and is a normal distribution. The mean is Indicates x t-1 The mean of the current time step x t and a neural network ∈ θ The predicted noise component is calculated. Σ θ (x t ,t) is the corresponding variance, which represents the variance of the noise in each dimension.

[0113] Step S3.2: Use the fuzzy U-Net network to learn the denoising process. A fuzzy residual connection is designed on the jump connection path of the U-Net network to fuzzy the encoded features. First, a fuzzy learning module is designed to fuzzy the features, and then the processed features are connected to the encoded features through residual connections to obtain fused features. The fuzzy learning module includes fuzzy membership functions and fuzzy rules. For each channel, M fuzzy membership functions are applied to each feature point in the feature map. The fuzzy membership function remains unchanged on each channel, but changes on different channels. Each fuzzy membership function assigns a fuzzy class label to each feature point in each channel to describe the degree of similarity between it and other feature points. At the membership function layer, Gaussian function is used as the membership function:

[0114]

[0115] Among them, F x,y,z,cis a feature point in the feature map of channel C, F x ' ,y,z,k,c represents the kth output fuzzy class label of the feature point at position (x, y, z) in channel C, where (x, y, z) represents the position corresponding to the feature point, and μ k,c and σ k,c is the mean and standard deviation of the kth Gaussian membership function. Taking the value of k as 1 as an example, the calculation results are shown in formula (16) and formula (17):

[0116] μ 1,c =[-1.3304 -0.6636 ... -0.7864 0.2716] (16)

[0117] σ 1,c =[-0.5695 1.6758 … -1.0369 0.8419] (17)

[0118] Then, the fuzzy rule “AND” is applied to all fuzzy membership functions of each feature point, and the final fuzzy feature information F of the input feature map is obtained by formula (14): x,y,z,c :

[0119]

[0120] Formula (14) obtains the fuzzy feature information F of each feature point according to the output of each membership function. x,y,z,c , we get the fuzzy feature map F∈R after the feature map extracted by the U-Net encoder is processed by the fuzzy learning module D×H×W×C ;

[0121] As part of the network, the fuzzy learning module is viewed as a fuzzy layer described by multiple parameters from the Gaussian membership function, with the parameters μ k,c and σ k,c It remains unchanged in the same channel, but varies between different channels; finally, the output of the fuzzy learning module is the fuzziness tensor F, which has the same size as the encoding feature of the U-Net network. Therefore, they are fused through residual connections, as shown in formula (15):

[0122] F t =BN(FLM(f t ))+BN(f t ) (19)

[0123] Among them, the output feature map and fuzziness tensor of U-Net are processed by batch normalization BN to constrain their dynamic range. Then, a simple addition operation is used to integrate the fuzzy logic information. The calculation result is shown in formula (20):

[0124]

[0125] Step S3.3: A contrast enhancement module is designed after each convolution block of the encoding path of the blurred U-Net network to amplify the contrast of texture and boundary features in the encoding stage of the segmentation network. The module mainly consists of two parts: using fast Fourier transform FFT to enhance frequency domain information and improving feature information through attention mechanism while suppressing background information;

[0126] The contrast enhancement module uses a two-dimensional FFT layer to transform the encoded features from the spatial domain to the frequency domain to obtain the amplitude spectrum and phase spectrum:

[0127] M f =F(M e ) (twenty one)

[0128] Among them, M e represents the encoded features, F(·) represents two-dimensional FFT, M f Represents the frequency domain features after two-dimensional FFT processing. In the frequency domain, the amplitude spectrum usually conveys global information. On the contrary, the phase spectrum contains local information. This module uses two learnable frequency domain filters to weigh the amplitude and phase information to improve the contrast of the extracted features and capture high-frequency details. Subsequently, the weighted features are transformed from the frequency domain to the spatial domain through the inverse fast Fourier transform IFFT. The calculation is as follows:

[0129]

[0130] Among them, F -1 (·) represents two-dimensional IFFT, M i represents the output of the IFFT layer, the amplitude spectrum and phase spectrum are represented by M a and M p In addition, w a and w p The learnable frequency domain filters represent the amplitude spectrum and the phase spectrum respectively. The learnable frequency domain filters adjust the frequency components to effectively capture the context information. The calculation results are shown in formulas (20) and (21):

[0131] The output features obtained from the two-dimensional IFFT layer are input into the feature enhancement part. On the one hand, the channel attention module CAM compresses the spatial information in the feature map and emphasizes the semantic information of different channel features. It enhances the channel information related to the task by utilizing the channel attention weights; on the other hand, the spatial attention module SAM compresses the channel feature information and emphasizes the contextual spatial information in the feature map. This module uses the spatial attention weights to focus on the key areas that have a significant impact on the segmentation results. The joint channel and spatial attention modules enhance the features related to the task and suppress the features that are not related to the task. Subsequently, the enhanced features after different linear transformations are used as channel query Mc, spatial query Ms and value Mv, respectively. The channel and spatial queries are input into CAM and SAM to obtain channel and spatial attention weights, respectively. These attention weights emphasize the key channel and spatial information within the value. The attention weights are calculated as follows:

[0132] w c =σ(MLP(AvgPool(M c ))+MLP(MaxPool(M c ))) (twenty three)

[0133] w s =σ(f 7×7 ([AvgPool(M s );MaxPool(M s )])) (twenty four)

[0134] Where σ represents the sigmoid function, f 7×7 represents a convolutional layer with a kernel size of 7×7. AvgPool and MaxPool are the global average pooling layer and the global maximum pooling layer, respectively. At the same time, w c and w s Represents the channel and spatial attention weights. These weights are multiplied to get the attention score. Integrating spatial and channel attention, the output is obtained by weighting M v with the attention score. The calculation process is as follows:

[0135]

[0136] Among them, M o Represents the output of CEM, which is used in various layers of the U-Net encoder to enhance feature maps at different scales. These enhanced features are then transferred to the U-Net decoder through residual connections to help it generate accurate segmentation masks;

[0137] Step S3.4: In each denoising iteration, the conditional encoder is first used to extract features from the brain tumor image. The encoder consists of four consecutive convolution modules, each of which contains a 3×3×3 convolution kernel to capture the local features of the image. After the convolution operation, the ReLU activation function is applied to introduce nonlinearity to enhance the expression ability of the network; then, the key features are screened out through the maximum pooling operation, and the spatial downsampling of the feature map is achieved. After each convolution module, the spatial size of the feature map is halved, and the number of feature channels is increased accordingly, and multi-scale feature representations are obtained in turn. These features are saved and fused with the feature map of the encoder of the fuzzy U-Net network; then, the feature map f I 4 After appropriate processing, including flattening and adding position encoding, it is fed into the Transformer module. Finally, the output of the Transformer module is added to the bottom-level skip path of the fuzzy U-Net network for feature fusion. First, label the x input feature map and reshape it into a series of 3D patches, denoted as The size of each 3D patch is P×P×P, and the total number of patches is Then the 3D patch x P Linear projection to d enc In the dimensional embedding space, a learnable position embedding is added to preserve the spatial information. The final embedding formula is as follows:

[0138]

[0139] in and E pos ∈R N×d Represents the corresponding linear projection and position embedding, and the feature extraction process of the Transformer module is as follows:

[0140]

[0141] head i =Attention(X i W i Q ,X i W i K ,X i W i V ) (28)

[0142] MSA(Q,K,V)=Concat(head1,…,head i )W 0 (29)

[0143] MLP(X)=max(0,XW1+b1)W2+b2 (30)

[0144] Among them, Q, K, and V are matrices obtained after linear transformation of X. Q represents the information to be queried, K represents the queried vector, and V represents the value obtained by the query. k represents the dimension of the query matrix or key-value matrix, softmax is the activation function, W i Q , W i K , W i V They represent the linear transformation matrix of the i-th self-attention, Concat represents the concatenation operation, and W 0 represents the linear transformation matrix, max is the maximum value operation, W1 and W2 are weights, and b1 and b2 are constants. Initialize the weight matrix Q, K, V as shown in formula (36):

[0145]

[0146] The self-attention of the image is then calculated, and the calculation results are as follows:

[0147]

[0148] Specifically, the specific steps of step S4 are as follows:

[0149] Step S4.1: In order to reduce the number of inference iterations of the denoising process, the denoising process is stopped early. Although the segmentation prediction map in the final stage of the denoising process may have some noise at this time, it is often consistent with the final segmentation prediction result and will not introduce too much prediction randomness. The step where the denoising process is stopped early is represented by t′. t′ , through a separate denoising network f ψ (3D U-Net network) One-step denoising to obtain the final segmentation result x0;

[0150] x0=f(γ t′ ;ψ) (33)

[0151] The 3D U-Net network consists of an encoder and a decoder. The encoder includes multiple convolutional layers and downsampling layers. The convolutional layer uses a 3×3×3 convolution kernel to extract local features of the image, and the downsampling layer reduces the resolution of the image through the maximum pooling operation to expand the receptive field. The decoder is symmetrical with the encoder and includes multiple convolutional layers and upsampling layers. The convolutional layer is used to further refine the features and fuse the low-resolution features with the high-resolution features from the corresponding stage of the encoder. The upsampling layer uses a deconvolution operation to restore the resolution of the image. Finally, the output of the decoder is passed through a convolution operation with a convolution kernel of 1×1×1 to match the number of feature channels with the number of channels of the target image, that is, the number of feature channels is adjusted to 3.

[0152] like Figure 7 As shown in the figure, given a brain tumor image I′ of size 256×256×256, after data preprocessing operations, a brain tumor image I of size 132×132×116 is obtained. D, H, and W are used to represent the size of the three dimensions of the image respectively, and the number of channels is 3. The image I is pre-segmented using the 3D U-Net network, and then the pre-segmented image x is I ∈R D×H×W×3 Add Gaussian noise to get a pure Gaussian noise medical image x T ∈R D×H×W×4 .like Figure 2 As shown, the brain tumor image I is input into the conditional encoder to obtain multi-scale features. The convolution kernel size is set to 3×3×3, the stride is 1, and padding is performed; the maximum pooling is selected in the pooling layer to reduce the size of the feature map; the activation function is the ReLu activation function. Figure 5 As shown, f I 4 The input is processed in the Transformer module, and then the output of the conditional encoder and the Transformer module are added to the encoder of the fuzzy U-Net network as the conditional prior. Figure 6 As shown in the figure, each convolution operation on the encoding path of the blurred U-Net network is followed by a contrast enhancement module, which enables the network to extract more detailed features in brain tumor images by using fast Fourier transform and attention mechanism. Figure 3As shown in the figure, the fuzzy residual connection is used to fuzzy the fuzzy U-Net network encoder features. First, the encoding features are processed by fuzzy membership functions and fuzzy rules, and then the processing results are added to the encoding features through residual connections to obtain fusion features. Then, the prediction results of this time step are obtained through the decoder of the fuzzy U-Net network. Finally, the denoising process is terminated early, and the segmentation map is segmented using the 3D U-Net network to obtain the final prediction result of the model x0∈R D×H×W×3 ,like Figure 7 As shown. Our model was compared with the classic segmentation model 3D U-Net model and Diff-UNet model. The results show that our model has the best average Dice score and HD95 distance on the three segmentation regions, reaching 83.94% and 2.54mm respectively. The average Dice score and HD95 distance of the U-Net and Diff-UNet models are 80.36%, 5.68mm and 83.14%, 2.63mm respectively.

[0153] In order to verify the accuracy and robustness of our model segmentation, we conducted corresponding training and testing on the BTCV abdominal multi-organ dataset, and conducted comparative experiments with the traditional segmentation models U-Net model and Diff-UNet model. Figure 8 As shown, given an abdominal multi-organ image I∈R D×H×W×3 , use the 3D U-Net network to pre-segment the image I, and then perform the pre-segmentation on the image x I ∈R D×H×W×3 Add Gaussian noise to get a pure Gaussian noise medical image x T ∈R D ×H×W×4 .like Figure 2 As shown, the abdominal multi-organ image I is input into the conditional encoder to obtain multi-scale features The convolution kernel size is set to 3×3×3, the stride is 1, and padding is performed; the maximum pooling is selected in the pooling layer to reduce the size of the feature map; the activation function is the ReLu activation function. Figure 5 As shown, f I 4 The input is processed in the Transformer module, and then the output of the conditional encoder and the Transformer module are added to the encoder of the fuzzy U-Net network as the conditional prior. Figure 6 As shown in the figure, each convolution operation on the encoding path of the blurred U-Net network is followed by a contrast enhancement module, which enables the network to extract more detailed features in brain tumor images by using fast Fourier transform and attention mechanism. Figure 3As shown in the figure, the fuzzy residual connection is used to fuzzy the fuzzy U-Net network encoder features. First, the encoding features are processed by fuzzy membership functions and fuzzy rules, and then the processing results are added to the encoding features through residual connections to obtain fusion features. Then, the prediction results of this time step are obtained through the decoder of the fuzzy U-Net network. Finally, the denoising process is terminated early, and the segmentation map is segmented using the 3D U-Net network to obtain the final prediction result of the model x0∈R D×H×W×C ,like Figure 8 As shown. Our model was compared with the classic segmentation model 3DU-Net model and Diff-UNet model. The results showed that our model had the best average Dice score and HD95 distance on 8 organs, reaching 83.91% and 7.64mm respectively. The average Dice score and HD95 distance of U-Net and Diff-UNet models were 69.75%, 22.74mm and 82.17%, 10.23mm respectively.

[0154] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A brain tumor image accelerated diffusion network segmentation method based on fuzzy learning, characterized in that: The following steps are involved: S1: Read the brain tumor image dataset and perform data preprocessing on the medical images. Convert each image to RGB mode, convert the corresponding labels to grayscale mode, and crop the brain tumor images and labels to a size of 132×132×116. Then, introduce random cropping, space filling, random flipping, intensity scaling, and offset to the medical images for data augmentation. S2: Gradually superimpose the randomly generated Gaussian noise onto the segmented image. First, use the 3D U-Net network to pre-segment the brain tumor image to obtain a pre-segmented image, and then create an image containing only Gaussian noise. The pixel values ​​of this image are randomly sampled from the Gaussian distribution. Through multiple consecutive superposition processes, the noise level in the segmented image is gradually increased. This process is repeated until the segmented image is completely covered by the noise, and finally a pure noise image composed entirely of Gaussian noise is generated. S3: De-noising the pure noise image in an iterative manner, using the fuzzy U-Net network model to learn this process. In each denoising time step, the CNN and Transformer models are used to extract multi-scale features of the brain tumor image as conditional information embedding of the fuzzy U-Net network; S4: The denoising process is terminated early to obtain a segmentation map containing a small amount of Gaussian noise, and then the segmentation map is segmented using the 3D U-Net network to obtain the final segmentation result.

2. The brain tumor image accelerated diffusion network segmentation method based on fuzzy learning according to claim 1 is characterized in that: The steps of step S2 are as follows: Step S2.1: Given a brain tumor image I∈R D×H×W×C , where D, H, W, and C represent the depth, height, width, and number of channels of the brain tumor image, respectively. First, the 3D U-Net network architecture is used to perform preliminary segmentation processing on this image to obtain the preliminary segmentation result x I ∈R D×H×W×C , whose size is the same as the original image, i.e., D×H×W×C. The 3D U-Net network consists of four layers, corresponding to different depth levels of the network, including both the encoding path and the decoding path. In each layer of the encoding path, the network consists of two 3×3×3 convolution kernels, which are responsible for extracting the features of the image in three dimensions. After each convolution operation, it is followed by batch normalization and ReLU activation function, and nonlinear characteristics are introduced. The network achieves downsampling through a 2×2×2 maximum pooling operation with a stride of 2, and expands on the feature channel at the same time. In the decoding path, the operation of each layer starts with a 2×2×2 max pooling operation with a stride of 2. The transposed convolution operation is used to increase the spatial dimension of the feature map and achieve upsampling. The network further refines the details of the feature map through two 3×3×3 convolutional layers, which are responsible for capturing local features in three dimensions. After each convolutional layer, batch normalization and ReLu activation function are applied to accelerate the training process of the network and enhance the expressiveness of the model. Finally, in the last layer of the decoding path, a 1×1×1 convolutional layer is used to convert the number of channels of the feature map to the required number of output categories, and then a sigmoid activation function is applied to generate the final segmentation map. Step S2.2: In the forward denoising process, in the pre-segmented image x I ∈R D×H×W×C Gradually add Gaussian noise to get the pure noise image x T ∈R D×H×W×C , where D, H, W, and C represent the depth, height, width, and number of channels of the brain tumor image, respectively. Set β t ∈(0,1) to control the degree of noise addition, that is, β t The value of gradually increases, and the corresponding noisy images x1,...,x are generated by gradually adding noise to the pre-segmented images. T , and the image x obtained at each step t Only the x obtained in the previous step t-1 Related, until the image x of step T T becomes a pure Gaussian noise image. The process is regarded as a Markov process, satisfying: Among them, q(·) represents the forward process, represents the normal distribution, β t ∈(0,1) is the variance hyperparameter of the Gaussian distribution, and β t Satisfies the condition β1<β2<…<β T ; Then, using the re-parameterization technique, we sample x using formula (2) t , that is, generating random variables Let α t =1-β t ,as well as Thus we get:

3. The brain tumor image accelerated diffusion network segmentation method based on fuzzy learning according to claim 1 is characterized in that: The steps of step S3 are as follows: Step S3.1: In the denoising process, since it is impossible to directly infer q(x t-1 ∣x t ), so we use the deep learning model p θ To fit the distribution q(x t-1 ∣x t ), the model parameter is θ: Among them, p θ (·) is used to fit the distribution q(x t-1 ∣x t ) deep learning model, using the fuzzy U-Net network, μ θ is the mean, Σ θ is the variance, t is the number of steps of adding or denoising, although it is impossible to directly derive q(x t-1 ∣x t ), but when x0 is known, we can get q(x t-1 ∣x t ,x0) is: In the derivation process of formula (6), the reverse process of the denoising diffusion model is converted into a forward process by the Bayesian formula, and the exponential part of the probability density function and the Gaussian probability density function is obtained. Correspondingly, we have: According to formula (7) and formula (8), q(x t-1 ∣x t ,x0), according to formula (3): Substituting into formula (8) we get: Using deep learning model p θ To fit the distribution q(x t-1 ∣x t ), according to formula (5), we hope to train the model μ θ (x t ,t) According to the estimated formula (10), since x t In the training phase, it is used as input, and the model is asked to estimate the noise ∈ t , that is, According to formula (11), we finally get: Step S3.2: Use the fuzzy U-Net network to learn the denoising process. A fuzzy residual connection is designed on the jump connection path of the U-Net network to fuzzy the encoded features. First, a fuzzy learning module is designed to fuzzy the features, and then the processed features and the encoded features are connected with the residual to obtain the fusion features. The fuzzy learning module includes fuzzy membership functions and fuzzy rules. For each channel, M fuzzy membership functions are applied to each feature point in the feature map. The fuzzy membership function remains unchanged on each channel, but changes on different channels. Each fuzzy membership function assigns a fuzzy class label to each feature point of each channel to describe the similarity between it and other feature points. At the membership function layer, Gaussian function is used as the membership function: Among them, F x,y,z,c is a feature point in the feature map of channel C, (x, y, z) represents the position corresponding to the feature point, μ k,c and σ k,c is the mean and standard deviation of the kth Gaussian membership function, F x ' ,y,z,k,c represents the kth output fuzzy class label of the feature point at position (x, y, z) in channel C. Then, the fuzzy rule "AND" is applied to all fuzzy membership functions of each feature point, and the final fuzzy feature information F of the input feature map is obtained by formula (14): x,y,z,c : Formula (14) obtains the fuzzy feature information F of each feature point according to the output of each membership function. x,y,z,c , we get the fuzzy feature map F∈R after the feature map extracted by the U-Net encoder is processed by the fuzzy learning module D×H×W×C ; As part of the network, the fuzzy learning module is viewed as a fuzzy layer described by multiple parameters from the Gaussian membership function, with the parameters μ k,c and σ k,c It remains unchanged in the same channel, but varies between different channels; finally, the output of the fuzzy learning module is the fuzziness tensor F, which has the same size as the encoding feature of the U-Net network. Therefore, they are fused through residual connections, as shown in formula (15): F t =BN(FLM(f t ))+BN(f t ) (15) Among them, the output feature map and fuzziness tensor of U-Net are processed by batch normalization BN to constrain its dynamic range, and then a simple addition operation is used to integrate the fuzzy logic information; Step S3.3: A contrast enhancement module is designed after each convolution block of the encoding path of the blurred U-Net network to amplify the contrast of texture and boundary features in the encoding stage of the segmentation network. The module mainly consists of two parts: using fast Fourier transform FFT to enhance frequency domain information and improving feature information through attention mechanism while suppressing background information; The contrast enhancement module uses a two-dimensional FFT layer to transform the encoded features from the spatial domain to the frequency domain to obtain the amplitude spectrum and phase spectrum: M f =F(M e ) (16) Among them, M e represents the encoded features, F(·) represents two-dimensional FFT, M f Represents the frequency domain features after two-dimensional FFT processing. In the frequency domain, the amplitude spectrum usually conveys global information. On the contrary, the phase spectrum contains local information. This module uses two learnable frequency domain filters to weigh the amplitude and phase information to improve the contrast of the extracted features and capture high-frequency details. Subsequently, the weighted features are transformed from the frequency domain to the spatial domain through the inverse fast Fourier transform IFFT. The calculation is as follows: where F -1 (·) represents two-dimensional IFFT, M i represents the output of the IFFT layer, the amplitude spectrum and phase spectrum are represented by M a and M p In addition, w a and w p Learnable frequency domain filters representing magnitude spectrum and phase spectrum respectively, the learnable frequency domain filters adjust the frequency components to effectively capture context information; The output features obtained from the two-dimensional IFFT layer are input into the feature enhancement part. On the one hand, the channel attention module CAM compresses the spatial information in the feature map and emphasizes the semantic information of different channel features. It enhances the channel information related to the task by utilizing the channel attention weights; on the other hand, the spatial attention module SAM compresses the channel feature information and emphasizes the contextual spatial information in the feature map. This module uses the spatial attention weights to focus on the key areas that have a significant impact on the segmentation results. The joint channel and spatial attention modules enhance the features related to the task and suppress the features that are not related to the task. Subsequently, the enhanced features after different linear transformations are used as channel query Mc, spatial query Ms and value Mv, respectively. The channel and spatial queries are input into CAM and SAM to obtain channel and spatial attention weights, respectively. These attention weights emphasize the key channel and spatial information within the value. The attention weights are calculated as follows: w c =σ(MLP(AvgPool(M c ))+MLP(MaxPool(M c ))) (18) w s =σ(f 7×7 ([AvgPool(M s );MaxPool(M s )])) (19) Where σ represents the sigmoid function, f 7×7 represents a convolutional layer with a kernel size of 7×7. AvgPool and MaxPool are the global average pooling layer and the global maximum pooling layer, respectively. At the same time, w c and w s Represents the channel and spatial attention weights. These weights are multiplied to get the attention score. Integrating spatial and channel attention, the output is obtained by weighting M v with the attention score. The calculation process is as follows: Among them, M o Represents the output of CEM, which is used in various layers of the U-Net encoder to enhance feature maps at different scales. These enhanced features are then transferred to the U-Net decoder through residual connections to help it generate accurate segmentation masks; Step S3.4: In each denoising iteration, the conditional encoder is first used to extract features from the brain tumor image. The encoder consists of four consecutive convolution modules, each of which contains a 3×3×3 convolution kernel to capture the local features of the image. After the convolution operation, the ReLU activation function is applied to introduce nonlinearity to enhance the expression ability of the network; then, the key features are screened out through the maximum pooling operation, and the spatial downsampling of the feature map is achieved. After each convolution module, the spatial size of the feature map is halved, and the number of feature channels is increased accordingly, and multi-scale feature representations are obtained in turn. These features are saved and fused with the feature map of the encoder of the fuzzy U-Net network; then, the feature map f I 4 After appropriate processing, including flattening and adding position encoding, it is fed into the Transformer module. Finally, the output of the Transformer module is added to the bottom-level skip path of the fuzzy U-Net network for feature fusion. First, label the x input feature map and reshape it into a series of 3D patches, denoted as The size of each 3D patch is P×P×P, and the total number of patches is Then the 3D patch x P Linear projection to d enc In the dimensional embedding space, a learnable position embedding is added to preserve the spatial information. The final embedding formula is as follows: in and E pos ∈R N×d Represents the corresponding linear projection and position embedding, and the feature extraction process of the Transformer module is as follows: head i =Attention(X i W i Q ,X i W i K ,X i W i V ) (23) MSA(Q,K,V)=Concat(head1,…,head i )W 0 (24) MLP(X)=max(0,XW1+b1)W2+b2 (25) Among them, Q, K, and V are matrices obtained after linear transformation of X. Q represents the information to be queried, K represents the queried vector, and V represents the value obtained by the query. k represents the dimension of the query matrix or key-value matrix, softmax is the activation function, W i Q , W i K , W i V They represent the linear transformation matrix of the i-th self-attention, Concat represents the concatenation operation, and W 0 Represents the linear transformation matrix, max is the maximum value operation, W1 and W2 are weights, and b1 and b2 are constants.

4. The brain tumor image accelerated diffusion network segmentation method based on fuzzy learning according to claim 1 is characterized in that: The steps of step S4 are as follows: Step S4.1: In order to reduce the number of inference iterations of the denoising process, the denoising process is stopped early. Although the segmentation prediction map in the final stage of the denoising process may have some noise at this time, it is often consistent with the final segmentation prediction result and does not introduce too much prediction randomness. The step of stopping the denoising process early is represented by t′, based on x t′ , through a separate denoising network f ψ (3D U-Net network) One-step denoising to obtain the final segmentation result x0; x0=f(γ t′ (26) The 3D U-Net network consists of an encoder and a decoder. The encoder includes multiple convolutional layers and downsampling layers. The convolutional layer uses a 3×3×3 convolution kernel to extract local features of the image, and the downsampling layer reduces the resolution of the image through the maximum pooling operation to expand the receptive field. The decoder is symmetrical to the encoder and includes multiple convolutional layers and upsampling layers. The convolutional layer is used to further refine the features and fuse the low-resolution features with the high-resolution features from the corresponding stage of the encoder. The upsampling layer uses a deconvolution operation to restore the resolution of the image. Finally, the output of the decoder is passed through a convolution operation with a convolution kernel of 1×1×1 to match the number of feature channels with the number of channels of the target image, that is, the number of feature channels is adjusted to 3.

Citation Information

Patent Citations

  • MRI (Magnetic Resonance Imaging) brain tumor segmentation method based on multi-scale feature fusion of improved U-Net

    CN117876399A

  • Dermoscope image segmentation method based on diffusion fuzzy learning

    CN118447031A

Cited By

  • Powder pneumatic conveying image processing method and equipment and storage medium

    CN119941524A

  • Powder pneumatic conveying image processing method, device and storage medium

    CN119941524B

  • Mammary gland ultrasound image segmentation method based on neural network

    CN119991689A

  • Geological body gravity data inversion method and system based on improved diffusion model

    CN120010017A

  • Brain tumor MRI image segmentation method based on soft clustering KAN network

    CN122023810A