Medical image domain generalization method based on diffusion probability model

By extracting image structure information and guiding the learning of diffusion probability model, the problem of generalization processing in multi-sequence medical image data is solved, and the data distribution transfer maintained by structural information is realized, which improves the controllability and accuracy of data generation.

CN119673391APending Publication Date: 2025-03-21UNIV OF JINAN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411736931.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The prior art is difficult to achieve unified and high-precision generalization processing in multi-sequence medical image data, especially when the structural information remains unchanged, the controllability and accuracy of cross-domain data generation are insufficient.

Method used

By extracting image structure information, guiding the learning process of the diffusion probability model, using structure information as prompt information, controlling the learning process of the diffusion generation model, and realizing the data distribution transfer maintained by the structural information.

Benefits of technology

Effectively retaining the structural characteristics of the data, improving the controllability and accuracy of cross-domain data generation, and improving the model's ability to process multi-sequence images and downstream task accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119673391A_ABST
    Figure CN119673391A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and provides a medical image domain generalization method based on a diffusion probability model, and the method comprises the following steps: S1, obtaining image data needed by training; s2, extracting image structure information; s3, building a diffusion generation model network suitable for the image data size and characteristics; s4, using the extracted structure information as prompt information, and prompting and controlling a diffusion generation model learning process; and S5, using a diffusion generation model to realize data distribution transfer of structure information maintenance. Through the technical scheme of the invention, the diffusion generation model conforming to the medical image data is designed, and the image data structure information is extracted as a prompt, so that cross-image modal data conversion maintained by the structure information is realized, meanwhile, the diversity of training data is increased, the purpose of domain generalization in a reasoning stage is achieved, and the reasoning efficiency is improved. Therefore, the downstream segmentation task precision for various image modalities is improved, and rapid and accurate diagnosis is assisted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a medical image domain generalization method based on a diffusion probability model. Background Art

[0002] Computer-aided imaging diagnosis can assist doctors in observing images, making fast and efficient diagnostic decisions, and avoiding missed diagnoses or misdiagnoses. Learning clinical auxiliary diagnosis models based on artificial intelligence technology has been widely recognized in the research and medical fields. With the development of imaging equipment, more and more types of imaging modality data are being acquired, which requires auxiliary diagnosis models to have not only high precision but also high generalization performance. However, the deep learning model itself is based on the assumption that data distribution is consistent. How to achieve unified and high-precision generalization processing for multi-sequence imaging data (T1, T2, flair) is a challenge.

[0003] The diffusion model is a type of generative model based on the probabilistic diffusion process. In recent years, it has shown great potential and superiority in generating images, texts and other data types. The model uses the inverse process of the diffusion process, that is, gradually restoring from a simple distribution to a complex data distribution, and generating high-quality data samples by gradually denoising.

[0004] However, most of the research on diffusion models is aimed at the generation of natural images. Although high-resolution images can be obtained, the details of the image generation process are uncontrollable and the generated samples have diversity. How to use the diffusion model to achieve the migration of image sequences with structural information preserved, and then improve the model's ability to process multiple sequence images is a challenge. Summary of the invention

[0005] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.

[0006] To this end, the purpose of the present invention is to provide a medical image domain generalization method based on a diffusion probability model, which extracts image structure information to guide the diffusion model learning process, and then converts the target domain image data into source domain data while keeping the structural information unchanged, thereby achieving higher downstream task accuracy in the case of multi-sequence images.

[0007] In order to achieve the above-mentioned object, the technical solution of the first aspect of the present invention provides a medical image domain generalization method based on a diffusion probability model, comprising the following steps:

[0008] S1, obtain the image data required for training;

[0009] S2, extracting image structure information;

[0010] S3, build a diffusion generation model network suitable for image data size and characteristics;

[0011] S4, uses the extracted structural information as prompt information to prompt and control the learning process of the diffusion generation model;

[0012] S5, using the diffusion generation model to achieve data distribution transfer with structure information preserved.

[0013] Preferably, step S2, extracting structural information of input image data, specifically comprises the following steps:

[0014] S21, transforming the input image data into a frequency domain space by Fourier transform;

[0015] S22, separates the amplitude and phase components in the frequency domain, removes the amplitude difference, and then fuses the updated amplitude and phase;

[0016] S23, transform the fused frequency domain information back to the image data space through inverse Fourier transform, and output the image structure information C structure .

[0017] Preferably, step S22, only retaining the frequency domain spatial phase information, specifically includes the following steps:

[0018] S221, Image I img The corresponding frequency domain spatial spectrum I spec , first separate the amplitude F amp and phase F pha , that is, F amp =abs(I spec ), F pha =angle(I spec );

[0019] S222, the phase remains unchanged, and the amplitude F amp Assign the same constant a and get a new constant amplitude F amp a ;

[0020] S223, fusion constant amplitude F amp a and phase F pha , and get the spectrum Right now

[0021] Preferably, step S3, building a diffusion generation model network suitable for the image data size and features, specifically includes the following steps:

[0022] S31, build a convolutional neural network based on the U-net structure, which consists of 5 parts, including the initial module, encoding module, intermediate layer module, decoding module, and output module;

[0023] S32, build the initial module, which consists of a convolutional layer, mapping the number of feature channels from 1 to 16 channels. The encoder module consists of 5 residual blocks. The number of input feature channels is [16, 32, 64, 128, 256], and the number of output feature channels is [32, 64, 128, 256, 512]. The middle layer module consists of 2 residual blocks and an attention module, and the number of input and output feature channels is 512;

[0024] S33, build a decoder. Corresponding to the encoder, the decoder consists of 5 residual blocks, and receives the features output by the encoder through jump connections. The number of input feature channels is [1024, 512, 256, 128, 64], and the number of output feature channels is [512, 256, 128, 64, 32];

[0025] S34: The output module consists of 1 residual block and one convolution layer. The number of input feature channels is [32, 16], and the number of output feature channels is [16, 1].

[0026] Preferably, step S4, the diffusion learning process of structural information perception, specifically includes the following steps:

[0027] S41, setting the parameters required for the forward process of diffusion model learning;

[0028] S42, adding noise corresponding to a corresponding moment to the source domain data based on the set parameters;

[0029] S43, using the constructed model to perform denoising learning on the noise data;

[0030] S44, encodes the structural information as prompt information to guide the model denoising.

[0031] Preferably, step S41, setting of the parameters of the forward process of diffusion model learning, includes setting the maximum time step T, and a noise adding strategy in the form of a linear function or a cosine function.

[0032] Preferably, step S43, performing denoising learning on the noise data, specifically comprises the following steps:

[0033] S431, sampling current training batch data from noise data Where t∈{1,…,T} represents time t, |B| represents the number of batch data;

[0034] S432, the denoising model is learned through the network built by S32, and the loss function is Where f represents the denoising model, and ε represents the noise added at time t;

[0035] S433, optimizing the denoising model using a gradient descent algorithm;

[0036] S434, repeat the above steps until the model converges.

[0037] Preferably, step S44, structural information prompts diffusion model learning, specifically includes the following steps:

[0038] S441: Based on S432, introduce structural information. This includes a: directly concatenating the extracted structural information with the noise data as input; or b: based on ControlNet, taking the structural information as control input, introducing the zero convolution layer, and achieving the purpose of structural information prompting by updating the zero convolution layer parameters and fine-tuning the noise model learned in step S43;

[0039] S442: The loss function of the structural information hint diffusion model learning is Among them, C structure Represents the extracted structural information. Use the gradient descent algorithm to continue optimizing the model;

[0041] S443: Repeat the above steps until the model converges.

[0042] Preferably, step S5, using a diffusion generation model to achieve data distribution transfer with structure information preserved, specifically includes the following steps:

[0043] S51: For the target domain image data with different distribution from the training source domain image data, extract its structural information C using step S2 structure ;

[0044] S52: Based on the extracted structural information and the structural information-aware diffusion learning model learned in step S4, data that retains the target domain structural information but has the style of the source domain is generated.

[0045] Preferably, step S52, generating data that retains the target domain structure information but has the source domain style, specifically includes the following steps:

[0046] S521: Add t steps of noise to the given data to obtain data x noise , 10≤t≤T;

[0047] S522: Using the trained structural information-preserving diffusion generation model, x noise Denoising t steps;

[0048] S523: Output the final denoised image data x new =f(x noise ,t,C structure ).

[0049] The technical solution of the second aspect of the present invention proposes a computer device, which includes a processor, and the processor is used to implement the steps of the medical image domain generalization method based on the diffusion probability model as proposed in any one of the technical solutions of the first aspect of the present invention when executing a computer program stored in a memory.

[0050] The technical solution of the third aspect of the present invention proposes a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the medical image domain generalization method based on the diffusion probability model proposed in any one of the technical solutions of the first aspect of the present invention are implemented.

[0051] The medical image domain generalization method based on the diffusion probability model proposed in the present invention has the following beneficial technical effects:

[0052] (1) The present invention proposes a medical image domain generalization method based on a diffusion probability model, which extracts image structure information in the frequency domain space with the help of information such as phase and amplitude, obtains information-rich and discriminative image features, and can achieve higher control accuracy with the help of this information.

[0053] (2) The medical image domain generalization method based on the diffusion probability model proposed in the present invention uses structural information as a control condition to guide the learning process of the diffusion denoising model, so that the model can effectively retain the structural characteristics of the data while learning the distribution of the source domain data, thereby ensuring the controllability and accuracy of cross-domain data generation, thereby helping to improve the model's ability to process different sequence image data.

[0054] (3) The present invention proposes a medical image domain generalization method based on a diffusion probability model, which solves the domain shift problem from the perspective of data distribution. Compared with the method of directly improving the generalization performance of the model itself, it can fundamentally eliminate the domain shift problem and better achieve the generalization purpose.

[0055] (4) The medical image domain generalization method based on the diffusion probability model proposed in the present invention has the advantages of simple implementation, excellent generalization performance and few adjustable parameters.

[0056] (5) The present invention proposes a medical image domain generalization method based on a diffusion probability model, which uses structural information as a guide and uses a diffusion model to achieve data generation, and has high interpretability.

[0057] (6) The domain generalization method proposed in the present invention realizes domain migration of data for different image sequences, making full use of limited data and providing a solution to the generalized segmentation task of multi-sequence images.

[0058] Additional aspects and advantages of the present invention will be given in part in the following description, and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0060] Figure 1 A schematic flow chart of a medical image domain generalization method based on a diffusion probability model according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0061] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0062] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0063] Example 1

[0064] Combine the following Figure 1 A medical image domain generalization method based on a diffusion probability model according to an embodiment of the present invention is specifically described.

[0065] A medical image domain generalization method based on a diffusion probability model according to an embodiment of the present invention comprises the following steps:

[0066] S1, obtain the image data required for training;

[0067] S2, extracting image structure information;

[0068] S3, build a diffusion generation model network suitable for image data size and characteristics;

[0069] S4, uses the extracted structural information as prompt information to prompt and control the learning process of the diffusion generation model;

[0070] S5, using the diffusion generation model to achieve data distribution transfer with structure information preserved.

[0071] In this embodiment, under the prompt and guidance of structural information, the diffusion model is used to learn the distribution of source domain data and retain the structural information of the image to achieve data generation with structural information preserved, and then achieve style transfer with structural information preserved on the target domain data, thereby improving the generalization ability of the task model from the perspective of solving data offset.

[0072] In step S2, the structural information of the input image data is extracted, and the specific steps are as follows:

[0073] S21, transforming the input image data into a frequency domain space by Fourier transform;

[0074] S22, separate the amplitude and phase components in the frequency domain, remove the amplitude difference, and then fuse the updated amplitude and phase. The specific steps are as follows:

[0075] Image I img The corresponding frequency domain spatial spectrum I spec , first separate the amplitude F amp and phase F pha , that is, F amp =abs(I spec ), F pha =angle(I spec ); the phase remains unchanged, and the amplitude F amp Assign the same constant a and get a new constant amplitude F amp a ; Fusion constant amplitude F amp a and phase F pha , and get the spectrum Right now

[0076] S23, transform the fused frequency domain information back to the image data space through inverse Fourier transform, and output the image structure information C structure .

[0077] In step S3, a diffusion generation model network suitable for the image data size and features is constructed. The specific steps are as follows:

[0078] S31, build a convolutional neural network based on the U-net structure, which consists of 5 parts, including the initial module, encoding module, intermediate layer module, decoding module, and output module;

[0079] S32, build the initial module, which consists of a convolutional layer, mapping the number of feature channels from 1 to 16 channels. The encoder module consists of 5 residual blocks. The number of input feature channels is [16, 32, 64, 128, 256], and the number of output feature channels is [32, 64, 128, 256, 512]. The middle layer module consists of 2 residual blocks and an attention module, and the number of input and output feature channels is 512;

[0080] S33, build a decoder. Corresponding to the encoder, the decoder consists of 5 residual blocks, and receives the features output by the encoder through jump connections. The number of input feature channels is [1024, 512, 256, 128, 64], and the number of output feature channels is [512, 256, 128, 64, 32];

[0081] S34: The output module consists of 1 residual block and one convolution layer. The number of input feature channels is [32, 16], and the number of output feature channels is [16, 1].

[0082] In step S4, the diffusion learning process of structural information perception has the following specific steps:

[0083] S41 sets the parameters required for the forward process of diffusion model learning, including setting the maximum time step T and the noise addition strategy in the form of a linear function or a cosine function.

[0084] S42, adding noise corresponding to a corresponding moment to the source domain data based on the set parameters;

[0085] S43, use the constructed model to perform denoising learning on the noise data. The specific steps are as follows:

[0086] Sample the current training batch data from the noise data Where t∈{1,....,T} represents time t, |B| represents the number of batch data; the denoising model is learned through the network built by S32, and the loss function is Where f represents the denoising model, ε represents the noise added at time t; the denoising model is optimized using the gradient descent algorithm; the above steps are repeated until the model converges.

[0087] S44, encode the structural information and use it as prompt information to guide the model to denoise. The specific steps are as follows:

[0088] Based on the denoising model f, the structural information is introduced. There are two ways: a: directly concatenate the extracted structural information and the noise data as input; or b: based on ControlNet, the structural information is used as the control input, the zero convolution layer is introduced, and the purpose of structural information prompting is achieved by updating the zero convolution layer parameters and fine-tuning the noise model learned in step S43; the loss function of the structural information prompt diffusion model learning is Among them, C structure Represents the extracted structural information. Use the gradient descent algorithm to continue optimizing the model; repeat the above steps until the model converges.

[0089] In step S5, the diffusion generation model is used to realize the data distribution transfer with structure information preservation, which specifically includes the following steps:

[0090] S51: For the target domain image data with different distribution from the training source domain image data, extract its structural information C using step S2 structure ;

[0091] S52: Based on the extracted structural information and the structural information-aware diffusion learning model learned in step S4, data with the style of the source domain but with the structural information of the target domain is generated. The specific steps are as follows:

[0092] Add t steps of noise to the given data to get data x noise , 10≤t≤T; using the diffusion generation model that preserves the trained structural information, for x noise Denoising t steps; output the final denoised image data x new =f(x noise ,t,C structure ).

[0093] Example 2

[0094] like Figure 1 As shown, a medical image domain generalization method based on a diffusion probability model according to an embodiment of the present invention includes the following steps:

[0095] S101, source domain image data input.

[0096] S102: extracting image structure information.

[0097] Specifically, the input image data I is transformed by Fourier transform. img Transform to the frequency domain space and obtain the corresponding frequency domain space spectrum I spec Then, the amplitude F is separated in the frequency domain amp and phase F pha , that is, F amp =abs(O spec ), F pha =angle(Ispec ). Remove the amplitude difference, that is, the phase remains unchanged, and the amplitude F amp Assign the same constant a and get a new constant amplitude F amp a Then the updated amplitude and phase are fused to obtain the spectrum Right now Finally, the fused frequency domain information is transformed through inverse Fourier transform. Transform back to the image data space to obtain the image structure information C structure .

[0098] S103, build the diffusion generation model network architecture.

[0099] Specifically, a convolutional neural network based on the U-net structure is built. It consists of 5 parts, including the initial module, encoding module, intermediate layer module, decoding module, and output module. The initial module consists of a convolutional layer, which maps the number of feature channels from 1 to 16 channels. The encoder module consists of 5 residual blocks. The number of input feature channels is [16, 32, 64, 128, 256], and the number of output feature channels is [32, 64, 128, 256, 512]. The intermediate layer module consists of 2 residual blocks and an attention module, and the number of input and output feature channels is 512. Corresponding to the encoder, the decoder consists of 5 residual blocks, and receives the features output by the encoder through jump connections. The number of input feature channels is [1024, 512, 256, 128, 64], and the number of output feature channels is [512, 256, 128, 64, 32]. The output module consists of 1 residual block and one convolution layer, with the number of input feature channels being [32, 16] and the number of output feature channels being [16, 1].

[0100] S104, using structural information to prompt and control model learning.

[0101] Specifically, we first set the parameters required for the forward process of diffusion model learning, including setting the maximum time step T = 1000 and the linear function noise addition strategy β t Based on the set parameters, random noise corresponding to the corresponding time is added to the source domain data. in Where q(x0) represents the probability distribution of data x0, ∏ represents the product operator, N(x,μ,σ) represents that the data x satisfies the Gaussian distribution with mean μ and variance σ, and I is the diagonal covariance. Sampling the current training batch data from the noise data Where t∈{1,....,T} represents time t, |B| represents the number of batch data; the denoising model is learned through the constructed network, and the loss function is Where f represents the denoising model, ε represents the noise added at time t; the denoising model is optimized using the gradient descent algorithm; the above steps are repeated until the model converges. The denoising model f is regarded as a pre-trained model and the structural information is introduced. There are two ways: a: directly concatenate the extracted structural information with the noise data as input; or b: based on ControlNet, the structural information is used as the control input, the zero convolution layer is introduced, and the purpose of structural information prompting is achieved by updating the zero convolution layer parameters and fine-tuning the noise model; the loss function of the structural information prompt diffusion model learning is Continue to optimize the model using the gradient descent algorithm; repeat the above steps until the model converges.

[0102] S105, generating data with source domain data distribution while preserving structural information.

[0103] Specifically, for the given image data x0 with different homologous domain data distribution, the structural information C is extracted by step S102. structure . Add a certain step of noise to it Here 100≤T≤1000. Using the structural information-aware diffusion learning model learned in S104, the noise data x T Perform style transfer with structural information preservation and output the final denoised image data x new =f(x T ,T,C structure ).

[0104] S106, determining whether it is the reasoning stage.

[0105] If the input is source domain data, it is not reasoning, and S107 is executed in combination with the data in S101. If the input is target domain data, it is reasoning, and S109 is executed.

[0106] S107, using the generated data to optimize the segmentation model, and combining with S101 to jointly train the segmentation model.

[0107] S108, inputting target domain image data.

[0108] S109, outputting the segmentation structure of the target domain. Using the trained segmentation model to segment the generated data corresponding to the target domain, the original target domain data is segmented.

[0109] The medical imaging domain generalization method based on the diffusion probability model proposed in the present invention can realize image data generation and cross-domain distribution migration by learning the data distribution of single-source domain images, effectively increasing the amount of training data, and thus improving the performance of the model. The medical imaging domain generalization method based on the diffusion probability model proposed in the present invention effectively controls the structural information of the generated data by utilizing the structural information perception strategy, and will not affect the downstream image segmentation tasks. From the perspective of solving data distribution differences, it improves the generalization performance of the model in the inference stage.

[0110] The steps in the method of the present invention can be adjusted in order, combined or deleted according to actual needs.

[0111] Example 3

[0112] The units in the device of the present invention can be combined, divided and deleted according to actual needs.

[0113] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0114] In the description of this specification, the description of the terms "one embodiment", "some embodiments", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0115] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A generalization method for medical image domain based on diffusion probability model, characterized in that: The following steps are involved: S1, obtain the image data required for training; S2, extracting image structure information; S3, build a diffusion generation model network suitable for image data size and characteristics; S4, uses the extracted structural information as prompt information to prompt and control the learning process of the diffusion generation model; S5, using the diffusion generation model to achieve data distribution transfer with structure information preserved.

2. The medical image domain generalization method based on the diffusion probability model according to claim 1, characterized in that: Step S2, extracting structural information of the input image data, specifically includes the following steps: S21, transforming the input image data into a frequency domain space by Fourier transform; S22, separates the amplitude and phase components in the frequency domain, removes the amplitude difference, and then fuses the updated amplitude and phase; S23, transform the fused frequency domain information back to the image data space through inverse Fourier transform, and output the image structure information C structure。 3. The method for extracting structural information of input image data according to claim 2, characterized in that: Step S22, only retaining the frequency domain spatial phase information, specifically includes the following steps: S221, Image I img The corresponding frequency domain spatial spectrum I spec , first separate the amplitude F amp and phase F pha , that is, F amp =abs(I spec ), F pha =angle(I spec ), where abs represents the calculation of the absolute value, i.e., the modulus, and angle represents the calculation of the argument; S222, the phase remains unchanged, and the amplitude F amp Assign the same constant a and get a new constant amplitude F amp a ; S223, fusion constant amplitude F amp a and phase F pha , and get the spectrum Right now Satisfy i 2 =-1.

4. The medical image domain generalization method based on the diffusion probability model according to claim 1, characterized in that: Step S3, building a diffusion generation model network suitable for the image data size and features, specifically including the following steps: S31, build a convolutional neural network based on the U-net structure, which consists of 5 parts, including the initial module, encoding module, intermediate layer module, decoding module, and output module; S32, build the initial module, which consists of a convolutional layer, mapping the number of feature channels from 1 to 16 channels. The encoder module consists of 5 residual blocks, the number of input feature channels is [16, 32, 64, 128, 256], and the number of output feature channels is [32, 64, 128, 256, 512]. The middle layer module consists of 2 residual blocks and an attention module, and the number of input and output feature channels is 512; S33, build a decoder. Corresponding to the encoder, the decoder consists of 5 residual blocks, and receives the features output by the encoder through jump connections. The number of input feature channels is [1024, 512, 256, 128, 64], and the number of output feature channels is [512, 256, 128, 64, 32]; S34: The output module consists of 1 residual block and one convolution layer. The number of input feature channels is [32, 16], and the number of output feature channels is [16, 1].

5. The medical image domain generalization method based on the diffusion probability model according to claim 1, characterized in that: Step S4, the diffusion learning process of structural information perception, specifically includes the following steps: S41, setting the parameters required for the forward process of diffusion model learning; S42, adding noise corresponding to a corresponding moment to the source domain data based on the set parameters; S43, using the constructed model to perform denoising learning on the noise data; S44, encodes the structural information as prompt information to guide the model denoising. In step S41, the forward process parameters of the diffusion model learning are set, including setting the maximum time step T and the noise adding strategy in the form of a linear function or a cosine function. In step S43, denoising learning is performed on the noise data, which specifically includes the following steps: S431, sampling current training batch data from noise data Where t∈{1,....,T} represents time t, |B| represents the number of batch data; S432, the denoising model is learned through the network built by S32, and the loss function is Where f represents the denoising model, ε represents the noise added at time t; L mse represents the mean square error function, that is Indicates the bth data with t steps of noise added to the current batch of data. S433, optimizing the denoising model using a gradient descent algorithm; S434, repeat the above steps until the model converges.

6. The structural information-aware diffusion learning process according to claim 5, characterized in that: In step S44, the structure information prompts the diffusion model learning process, which specifically includes the following steps: S441: Based on S432, introduce structural information. This includes a: directly concatenating the extracted structural information with the noise data as input; or b: based on ControlNet, taking the structural information as control input, introducing the zero convolution layer, and achieving the purpose of structural information prompting by updating the zero convolution layer parameters and fine-tuning the noise model learned in step S43; S442: The loss function of the structural information hint diffusion model learning is Among them, C structure Represents the extracted structural information. Use the gradient descent algorithm to continue optimizing the model; S443: Repeat the above steps until the model converges.

7. The medical image domain generalization method based on the diffusion probability model according to claim 1, characterized in that: Step S5, using the diffusion generation model to achieve data distribution transfer with structure information preserved, specifically includes the following steps: S51: For the target domain image data with different distribution from the training source domain image data, extract its structural information C using step S2 structure ; S52: Based on the extracted structural information and the structural information-aware diffusion learning model learned in step S4, data that retains the target domain structural information but has the style of the source domain is generated.

8. The data distribution transfer of structure information retention according to claim 7, characterized in that: In step S52, data is generated that retains the target domain structure information but has the source domain style, specifically including the following steps: S521: Add t steps of noise to the given data to obtain data x nois e, 10≤t≤T; S522: Using the trained structural information-preserving diffusion generation model, x noise Denoising t steps; S523: Output the final denoised image data x new =f(x noise ,t,C structure ).

9. A computer device, comprising a processor, wherein the processor is configured to implement the steps of the medical image domain generalization method based on a diffusion probability model as described in any one of claims 1 to 10 when executing a computer program stored in a memory.

10. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the medical image domain generalization method based on a diffusion probability model according to any one of claims 1 to 8 are implemented.