Medical image segmentation method and system based on diffusion model and double-frequency cascade graph model
Through methods based on diffusion models and dual-frequency cascade graph models, the problem of insufficient utilization of noise and global context information in ultrasound image segmentation is solved, efficient and accurate medical image segmentation is achieved, data annotation costs are reduced, and privacy is protected. .
Patent Information
- Application Number
- CN202410902078.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-10-01
AI Technical Summary
Existing medical image segmentation technology has noise problems, insufficient contrast, and difficulty in effectively utilizing global context information when processing ultrasound images. It also relies on a large amount of labeled data, resulting in high data collection and labeling costs, and it is difficult to obtain labeled data due to privacy and ethical issues.
Using a method based on diffusion model and dual-frequency cascade graph model, unlabeled data is generated through LDM, combined with a graph cascade decoder and multiple auxiliary decoders, using a large convolution kernel in the frequency domain and a multi-scale dual-frequency attention gate to alleviate Noise effects, extract global context information, and achieve semi-supervised learning and image segmentation.
It improves the accuracy and efficiency of medical image segmentation, reduces the need for annotated data, reduces costs, and trains models without exposing personal data, protecting privacy and enhancing the model's generalization ability and detail recovery capabilities.
Smart Images

Figure CN118735933A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image segmentation, and in particular to a medical image segmentation method and system based on a diffusion model and a dual-frequency cascade graph model. Background Art
[0002] In medical diagnosis, the quality of ultrasound images depends largely on the configuration and resolution of the equipment, which often leads to problems such as speckle noise, reduced contrast, and insufficient resolution. In recent years, significant progress has been made in the automatic processing of ultrasound images by applying deep learning in medical image segmentation. Medical image segmentation is a fundamental problem in medical image analysis. The latest methods for this task use deep learning methods, which require a large amount of labeled data to improve performance, which not only increases the cost of data collection and annotation, but also makes it increasingly difficult to obtain large amounts of labeled data due to privacy and ethical issues.
[0003] Generative models generate a large number of unlabeled medical images from existing datasets, which can solve the challenge of insufficient unlabeled medical images. This approach effectively solves ethical issues and improves the model training performance of medical images. In the past decade, there has been an increasing number of studies on generative models for synthetic medical images, especially deep autoencoders and generative adversarial networks (GANs). However, despite the success of GANs in various applications, medical image diagnosis is a more complex challenge than processing natural images because it involves detecting subtle changes in the appearance of organs. In addition, GANs also encounter problems such as unstable training and limited ability to capture a wide range of detailed features. Currently, diffusion models including the Denoised Diffusion Probabilistic Model (DDPM) and the Latent Diffusion Model (LDM) have achieved promising results in the field of medical image generation by generating high-quality samples. Synthetic samples are affected to some extent by the distribution of the original data. Semi-supervised learning and generative learning have opened up new avenues for further research and application in medical image segmentation.
[0004] The U-Net architecture and its successors have greatly advanced the field of medical image segmentation. However, the fully convolutional U-Net model also has some limitations. First, the inherent locality restrictions of convolutions in fully convolutional networks mean that these layers prioritize local information, which affects the performance of lesion boundary segmentation. Second, many networks are unable to effectively address the scattered noise problem unique to ultrasound data, and the generated samples often retain the residual noise typical of LDM. Finally, the lack of a systematic way to integrate global contextual information leads to missed opportunities to exploit context-dependent relationships, such as those achieved by the decision-guided decoder at different scales. Summary of the invention
[0005] One of the objectives of the present invention is to address the deficiencies in the above-mentioned prior art and provide a medical image segmentation method based on a diffusion model and a dual-frequency cascade graph model to achieve medical image segmentation more accurately and efficiently.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions: a medical image segmentation method based on a diffusion model and a dual-frequency cascade graph model, comprising the following steps: establishing an image segmentation model, loading a training set image, and using LDM to generate a large amount of unlabeled data from the training set image for training the image segmentation model to improve its segmentation performance, and then inputting the image to be segmented into the trained image segmentation model for image segmentation, wherein the segmentation steps of the image segmentation model include:
[0007] (1) Preprocess the image;
[0008] (2) The image is input into the encoder and large frequency domain convolution kernels of different lengths are added to reduce the computational burden of large convolution after frequency domain processing and mix different long-range spatial locations;
[0009] (3) By introducing a multi-scale dual-frequency attention gate, key features are selected in different frequency domains and receptive fields to reduce noise and enhance the transfer of valuable encoder features, which are then input into the decoder;
[0010] (4) The global context information is optimized by graph cascade decoders and further enhanced by adding multiple auxiliary decoders to ensure the consistency of the decoding output, ultimately obtaining the segmented image.
[0011] Preferably, in the encoder, image pixels are converted to the frequency domain by a frequency domain large convolution kernel module based on Fourier frequency domain and depthwise separable convolution, thereby highlighting texture features indicating specific patterns, and global context information is comprehensively extracted from each channel by deep convolution with enlarged kernel size.
[0012] More preferably, the frequency domain large convolution kernel module uses multi-point convolution to enhance the integration of channel and spatial information, and the module is expressed as:
[0013] f l ′=BN(GELU(DepthwiseConv(FFT(f l-1 ))))+f l-1 ;
[0014] f l =BN(ReLU[PointωiseConv(BN(GELU(PointωiseConv(f l ′))))]);
[0015] Among them, f lIt represents the output feature map of the lth layer in the frequency domain large convolution kernel module. BN and GELU represent batch normalization and GELU activation respectively. BN represents batch normalization.
[0016] More preferably, the multi-scale dual-frequency attention gate effectively integrates feature information in different frequency domains by distinguishing high frequencies from low frequencies in the encoder and decoder stages.
[0017] More preferably, in the decoder, valuable feature information of the unlabeled dataset and global context information from different spaces are utilized to enhance the generalization ability of the model, a consistency loss is applied to the unlabeled data, and the difference between the outputs of the graph cascade decoder and the auxiliary decoder is calculated.
[0018] More preferably, the consistency of the decoded output is ensured by a graph cascade decoder and multiple standard U-Net auxiliary decoders as:
[0019]
[0020]
[0021] In addition, the present invention also provides a medical image segmentation system based on a diffusion model and a dual-frequency cascade graph model, which comprises:
[0022] Image segmentation model, used to load and preprocess images, generate a large amount of unlabeled data from the training set images through LDM, and then input the image into the encoder. In the encoder, large frequency domain convolution kernels of different lengths are added to reduce the computational burden of large convolution after frequency domain processing, and different remote spatial positions are mixed to obtain encoder features. Then, by introducing multi-scale dual-frequency attention gates, key features are selected in different frequency domains and receptive fields to reduce noise and enhance the transfer of valuable encoder features, which are then input into the decoder. Finally, the global context information is optimized and utilized through the graph cascade decoder, and further enhanced by adding multiple auxiliary decoders to ensure the consistency of the decoding output, and finally the segmented image is obtained;
[0023] An image training module, used to train the image segmentation model using a sufficient amount of images to improve its segmentation performance;
[0024] The image segmentation module is used to input the image to be segmented into the trained image segmentation model for image segmentation.
[0025] The system operates using the above-mentioned medical image segmentation method based on diffusion model and dual-frequency cascade graph model.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] 1. LDM is used to generate unlabeled image data, which is combined with the labeled image data of the training set to achieve a semi-supervised learning medical image segmentation framework technology. Semi-supervised learning is used to analyze the relationship between the diffusion probability distribution of the generated samples and the probability distribution of ultrasonic noise in the original target domain, thus achieving effective knowledge transfer from the probability distribution of medical image generation to the semantic representation learning of medical image segmentation.
[0028] 2. By introducing a graph cascade decoder to maintain the consistency of the global context, and introducing multiple auxiliary decoders, using large kernel convolution and Fourier transform to extract spatial information, the network's detail recovery ability is significantly improved, which helps to more skillfully segment complex lesion areas of various shapes in medical images and improve the efficiency of image segmentation.
[0029] 3. By using a multi-scale attention gate based on Fourier transform to distinguish high and low frequencies in the encoder and decoder stages, this mechanism effectively integrates feature information in different frequency domains to reduce the impact of noise on network training, thereby improving the accuracy of image segmentation. The gate can also regulate multiple layers of information within the attention mechanism, including decision direction, channel interdependence, and spatial location information. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a schematic diagram of the process of the present invention;
[0031] Figure 2 Schematic diagram of the model structure of the method of the present invention;
[0032] Figure 3 It is a structural schematic diagram of a frequency domain large convolution kernel module (FCMxier Block) in the embodiment;
[0033] Figure 4 FIG. 1 is a schematic diagram of the structure of a cascade decoder module (GCD Block) in the embodiment. DETAILED DESCRIPTION
[0034] To facilitate understanding by those skilled in the art, the present invention is further described below in conjunction with embodiments and drawings. An existing ultrasound image dataset is used as a training set image of this embodiment, and the contents mentioned in the implementation manner are not intended to limit the present invention.
[0035] like Figure 1 The medical image segmentation method based on the diffusion model and the dual-frequency cascade graph model is shown in FIG. Figure 2The dual-frequency cascade graph model (DFCG) shown in FIG. The model includes two stages. In the generation stage, LDM is used in this embodiment to generate a large amount of unlabeled data from existing ultrasound images. The segmentation stage includes the development of a semi-supervised learning medical image segmentation model. The segmentation model introduces a graph cascade decoder (GCD) to optimize the use of global context information and effectively use data from labeled and unlabeled sources for training. The model is further enhanced by adding multiple standard U-Net auxiliary decoders to ensure the consistency of the decoded output. Specifically, this embodiment adds large frequency domain convolution kernels (FCMixer) of different lengths to the shared encoder, thereby reducing the computational burden of large convolutions after frequency domain processing. This approach is also conducive to mixing different long-range spatial locations, capturing various global context information through multiple auxiliary decoder outputs, while maintaining consistency between the graph cascade and auxiliary decoder outputs. In addition, in order to reduce noise and enhance the transfer of valuable encoder features, a multi-scale dual-frequency attention gate (MDAG) is introduced in the jump connection stage to select key features in different frequency domains and receptive fields.
[0036] In this embodiment, the method combines the ability to generate unlabeled data with the efficacy of a semi-supervised learning framework to improve the performance of the segmentation model. LDM simulates the diffusion and denoising process of data through a low-dimensional latent space, thereby generating new data that approximates the real data distribution and helps the semi-supervised learning segmentation model understand the underlying data distribution. LDM uses an autoencoder to compress high-dimensional medical image data into a low-dimensional latent space. In this space, important feature information is extracted and retained, while unnecessary noise and background information are partially removed. The smooth data distribution in the latent space helps the model capture and learn complex data structures. Similar lesion area features are located closer in the latent space, enhancing the model's ability to learn the intrinsic structure of the data. In addition, the data generated by LDM is similar to the original data, but there are differences in the size, shape or location of the lesion area. This diversity enables the model to learn a wider range of scenarios, thereby improving its generalization ability. Therefore, LDM provides strong data support for semi-supervised learning medical image segmentation and allows the segmentation model to learn complex and varied medical image lesion features by generating representative heterogeneous samples.
[0037] Those skilled in the art should know that the noise removal process of LDM is carried out in the latent representation space rather than the traditional pixel space. It designs the "latent diffusion adversarial process" through the idea of GAN, gradually learns the distribution p(x) of the original data, and obtains the diffusion probability distribution p(x') similar to the original probability distribution through iterative optimization. The loss function of LDM is as follows:
[0038]
[0039] In this embodiment, if Figure 3 As shown in the figure, the FCMixer module integrates the advantages of the ConvMixer module based on Fourier frequency domain and depthwise separable convolution. The FCMxier layer combines depthwise convolution (kernel size is k×k) and pointwise convolution (kernel size is 1×1). It uses Fourier space to transform image pixels into the frequency domain, thereby highlighting texture features that indicate specific patterns. In addition, large convolution kernels are used to merge information from different spatial locations, capture global insights, and ensure the consistency of the decoder in semi-supervised learning. FCMxier comprehensively extracts global context information from each channel by expanding the depthwise convolution of the kernel size. Inspired by the inverted bottleneck architecture of ConvNeXt and CMUNeXt, it uses multi-point convolution to strengthen the integration of channel and spatial information. This approach extends the depthwise convolution, refines the global contextual information into the spatial dimension, and broadens the hidden dimension through the inverted bottleneck design. The specific details of the FCMxier module are shown in the following formula:
[0040] f l ′=BN(GELU(DepthwiseConv(FFT(f l-1 ))))+f l-1 ;
[0041] f l =BN(ReLU[PointωiseConv(BN(GELU(PointωiseConv(f l ′))))]).
[0042] Among them, f l represents the output feature map of the lth layer in the FCMxier module, BN and GELU represent batch normalization and GELU activation respectively, and BN represents batch normalization. By using a normal convolution block (kernel size is 1×1) to increase the number of channels by four times, feature information can be better extracted. However, since the input and output feature maps of the FCMxier module still need to maintain the same resolution and channel size, this embodiment still uses the same convolution block to restore the channel to its original size.
[0043] like Figure 4As shown, for the graph cascade decoder module (GCD Block), in order to effectively utilize the unlabeled data generated by LDM, this embodiment uses multiple auxiliary decoders to enhance the representation ability of the shared decoder by utilizing the feature encoding information extracted from the unlabeled data. This strategy has shown high efficiency in semi-supervised learning image segmentation. However, some studies have also adopted two-dimensional convolution blocks in the decoder to effectively identify discriminative local features. Although convolution blocks are good at extracting and integrating local information, they may not be able to fully capture long-range attention and global information. In addition, although the FCMxier module solves the long-range dependency problem to a certain extent, it cannot completely make up for the lack of long-range attention mechanism. To solve this problem, this embodiment introduces a graph cascade module in the graph convolution decoder, aiming to stabilize the enhanced feature representation. In order to ensure consistent learning of global context information and effective pseudo-labeling between the graph cascade decoder and the auxiliary decoder, this embodiment deploys FCMxier at different scales to capture unique global context information. By integrating multiple auxiliary decoders, key features can be extracted from the global context information across spatial positions, thereby enhancing the model's understanding of details and global structures in ultrasound images. In addition, this embodiment also utilizes the outputs of multiple auxiliary decoders to share the same structural design to achieve cross-scale feature representation. Due to its unique structural design, the different outputs of the graph cascade decoder and the auxiliary decoder represent different data views or representation methods. Its goal is to improve the generalization ability of the model for medical imaging tasks by implementing semi-supervised learning consistency learning. As shown in the formula, this strategy enables the model to learn consistent features across scales, thereby improving its ability to recognize image structures of different scales and promoting more discriminative feature representations:
[0044]
[0045]
[0046] In order to ensure the consistency of output predictions between the graph cascade decoder and the auxiliary decoder, this embodiment uses valuable feature information of unlabeled datasets and global context information from different spaces to enhance the generalization ability of the model. A consistency loss is applied to the unlabeled data, and the difference between the outputs of the graph cascade decoder and the auxiliary decoder is calculated.
[0047] The present invention utilizes unlabeled data through semi-supervised learning, reducing the need for a large amount of labeled data, thereby reducing costs. More importantly, in applications involving sensitive data, such as medical records, semi-supervised learning can train models without exposing personal data, thereby better protecting privacy.
[0048] In addition, by using the graph cascade decoder (GCD) and auxiliary decoder, the model can better understand and utilize global context information, thereby improving the segmentation accuracy of complex lesion areas. The added large frequency domain convolution kernel (FCMixer) helps to mix features at different remote spatial positions, enhancing the model's ability to extract key features. The multi-scale dual-frequency attention gate (MDAG) selects key features in the jump connection stage, reduces noise interference, and ensures that valuable encoder features are effectively transferred. Moreover, the application of FCMixer in the shared encoder reduces the computational burden of large convolutions and improves the efficiency of model training and reasoning. It can be seen that the method of the present invention provides new research directions and tools for the field of medical image analysis. It is an efficient, accurate solution with good generalization ability, which is of great significance to improving the accuracy and efficiency of clinical diagnosis.
[0049] In order to make it easier for ordinary technicians in the field to understand the improvements of the present invention over the prior art, some drawings and descriptions of the present invention have been simplified, and the above-mentioned embodiments are preferred implementation schemes of the present invention. In addition, the present invention can also be implemented in other ways. Any obvious replacement without departing from the concept of the present technical solution is within the protection scope of the present invention.
Claims
1. A medical image segmentation method based on a diffusion model and a dual-frequency cascade graph model, characterized in that: An image segmentation model is established, training set images are loaded, and a large amount of unlabeled data is generated from the training set images using LDM to train the image segmentation model to improve its segmentation performance. The image to be segmented is then input into the trained image segmentation model for image segmentation. The segmentation steps of the image segmentation model include: (1) Preprocess the image; (2) The image is input into the encoder and large frequency domain convolution kernels of different lengths are added to reduce the computational burden of large convolution after frequency domain processing and mix different long-range spatial locations; (3) By introducing a multi-scale dual-frequency attention gate, key features are selected in different frequency domains and receptive fields to reduce noise and enhance the transfer of valuable encoder features, which are then input into the decoder; (4) The global context information is optimized by graph cascade decoders and further enhanced by adding multiple auxiliary decoders to ensure the consistency of the decoding output, ultimately obtaining the segmented image.
2. The medical image segmentation method based on the diffusion model and the dual-frequency cascade graph model according to claim 1, characterized in that: In the encoder, image pixels are converted to the frequency domain through a large convolution kernel module based on Fourier frequency domain and depthwise separable convolution, thereby highlighting the texture features indicating specific patterns, and global contextual information is comprehensively extracted from each channel through deep convolution with enlarged kernel size.
3. The medical image segmentation method based on the diffusion model and the dual-frequency cascade graph model according to claim 2, characterized in that: The frequency domain large convolution kernel module uses multi-point convolution to enhance the integration of channel and spatial information. The module is expressed as: f′ l =BN(GELU(DepthwiseConv(FFT(f l-1 ))))+f l-1 ; f l =BN(ReLU[PointωiseConv(BN(GELU(PointωiseConv(f l ′)))]); Among them, f l It represents the output feature map of the lth layer in the frequency domain large convolution kernel module. BN and GELU represent batch normalization and GELU activation respectively. BN represents batch normalization.
4. The medical image segmentation method based on the diffusion model and the dual-frequency cascade graph model according to claim 1, characterized in that: The multi-scale dual-frequency attention gate effectively integrates feature information in different frequency domains by distinguishing high and low frequencies in the encoder and decoder stages.
5. The medical image segmentation method based on the diffusion model and the dual-frequency cascade graph model according to claim 1, characterized in that: In the decoder, valuable feature information of unlabeled datasets and global context information from different spaces are used to enhance the generalization ability of the model. A consistency loss is applied to the unlabeled data, and the difference between the outputs of the graph cascade decoder and the auxiliary decoder is calculated.
6. The medical image segmentation method based on the diffusion model and the dual-frequency cascade graph model according to claim 5, characterized in that: The consistency of the decoded output is ensured by using a graph cascade decoder and multiple standard U-Net auxiliary decoders as follows:
7. A medical image segmentation system based on a diffusion model and a dual-frequency cascade graph model, characterized in that: include: Image segmentation model, used to load and preprocess images, generate a large amount of unlabeled data from the training set images through LDM, and then input the image into the encoder. In the encoder, large frequency domain convolution kernels of different lengths are added to reduce the computational burden of large convolution after frequency domain processing, and different remote spatial positions are mixed to obtain encoder features. Then, by introducing multi-scale dual-frequency attention gates, key features are selected in different frequency domains and receptive fields to reduce noise and enhance the transfer of valuable encoder features, which are then input into the decoder. Finally, the global context information is optimized and utilized through the graph cascade decoder, and further enhanced by adding multiple auxiliary decoders to ensure the consistency of the decoding output, and finally the segmented image is obtained; An image training module, used to train the image segmentation model using a sufficient amount of images to improve its segmentation performance; The image segmentation module is used to input the image to be segmented into the trained image segmentation model for image segmentation.
8. The medical image segmentation system based on the diffusion model and the dual-frequency cascade graph model according to claim 7, characterized in that: The method is operated by the medical image segmentation method based on the diffusion model and the dual-frequency cascade graph model as described in any one of claims 1 to 7.
Citation Information
Cited By
Shadow removing method and system based on diffusion, segmentation and super-resolution model
CN119048357A
Shadow removal method and system based on diffusion, segmentation and super-resolution model
CN119048357B
Unmanned aerial vehicle flight path planning method based on semantic guidance and visual perception
CN120293149A
Medical image segmentation method and system based on diffusion difference learning model
CN121811411A
