Brain MRI image synthesis method and device, electronic equipment and storage medium
Through structural decoupling mixing and diffusion model training, the problems of synchronous change assumption, insufficient structural control and high computational complexity in brain MRI image synthesis in existing technologies are solved, and high-quality, diversified and personalized image generation is achieved to meet clinical needs.
Patent Information
- Application Number
- CN202510008378.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-01-03
AI Technical Summary
Existing brain MRI image synthesis methods have limitations in the synchronous change assumption, lack of precise structural control, high computational complexity, insufficient personalization requirements, and insufficient image registration accuracy, resulting in a lack of diversity, flexibility, and efficiency in the synthesized images.
By obtaining sample conditions, target brain MRI images and text descriptions, structural decoupling and mixing are performed, and the diffusion model is used for model training to generate high-quality brain MRI images, achieve asynchronous lesion simulation, precise structural control, reduce computational complexity and meet personalized medical needs.
The accuracy and flexibility of brain MRI image synthesis are improved, and it can generate diversified images that conform to clinical reality, meet personalized medical needs, reduce computing resource requirements, and improve the robustness of image generation.
Smart Images

Figure CN119963428B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a brain MRI image synthesis method and device, electronic equipment, and storage medium. Background Art
[0002] Brain MRI images are images of the brain acquired using magnetic resonance imaging technology. These images can reveal brain structure and function and are commonly used to diagnose neurological diseases and study brain structure. Due to the complex structure of the brain, the high correlation of medical imaging features, and the scarcity of high-quality public datasets, diverse brain structure analysis and the development of visual teaching programs for disease diagnosis have always faced significant challenges. Currently, deep learning models can be used to advance disease diagnosis based on brain MRI images. However, training deep learning models typically requires a large amount of real image data, which is difficult to collect, especially high-quality real image data. Summary of the Invention
[0003] The main purpose of the embodiments of the present application is to provide a brain MRI image synthesis method and device, electronic equipment, and storage medium that can provide high-quality brain MRI synthesized images.
[0004] To achieve the above objectives, a first aspect of an embodiment of the present application provides a brain MRI image synthesis method, the method comprising:
[0005] Acquire a sample conditional brain MRI image and a sample target brain MRI image; wherein the sample target brain MRI image is an image after the brain structure in the sample conditional brain MRI image has changed;
[0006] Obtain sample text descriptions of brain structural changes;
[0007] performing structural mixing on the sample conditional brain MRI image and the sample target brain MRI image according to the brain structure in the sample text description to obtain a structurally decoupled brain MRI image; wherein the structurally decoupled brain MRI image includes: an area other than an area corresponding to the brain structure in the sample conditional brain MRI image, and an area corresponding to the brain structure in the sample target brain MRI image;
[0008] Performing model training on an initial diffusion model according to the sample conditional brain MRI image, the structurally decoupled brain MRI image, and the sample text description to obtain a target diffusion model;
[0009] The target diffusion model is used to generate a target noise synthetic image feature vector for the target conditional brain MRI image, and the target noise synthetic image feature vector is image decoded to obtain a target synthetic brain MRI image.
[0010] Optionally, the performing model training on the initial diffusion model according to the sample conditional brain MRI image, the structurally decoupled brain MRI image, and the sample text description to obtain a target diffusion model includes:
[0011] Performing text encoding on the sample text description to obtain a sample text feature vector;
[0012] Performing image coding on the sample conditional brain MRI image to obtain a sample conditional image feature vector;
[0013] performing image coding on the structurally decoupled brain MRI image to obtain a decoupled image feature vector;
[0014] adding noise to the decoupled image feature vector to obtain a noise decoupled image feature vector;
[0015] Concatenate the sample conditional image feature vector and the sample text feature vector to obtain a sample image and text fusion vector;
[0016] Performing diffusion processing on the sample image text fusion vector and the noise decoupling image feature vector through an initial diffusion model to obtain a sample noise synthetic image feature vector;
[0017] The parameters of the initial diffusion model are adjusted according to the noise decoupled image feature vector and the sample noise synthesis image feature vector to obtain the target diffusion model.
[0018] Optionally, performing structural mixing on the sample conditional brain MRI image and the sample target brain MRI image according to the brain structure in the sample text description to obtain a structurally decoupled brain MRI image includes:
[0019] determining a replacement region based on the brain structure described in the sample text;
[0020] Separating a brain unchanged structural region from the sample conditional brain MRI image according to the replacement region;
[0021] Separating a brain change structure region from the sample target brain MRI image according to the replacement region;
[0022] Regional fusion is performed based on the unchanged brain structure region and the changed brain structure region to obtain the structurally decoupled brain MRI image.
[0023] Optionally, determining the replacement region according to the brain structure in the sample text description includes:
[0024] If the number of brain structures in the sample text description is 1, determining a region corresponding to the brain structure in the sample target brain MRI image to obtain the replacement region;
[0025] If the number of brain structures in the sample text description is greater than 1 and less than or equal to a preset threshold, then the area corresponding to each of the brain structures is determined in the sample target brain MRI image to obtain a first basic area, and the first basic areas are merged to obtain the replacement area; wherein the preset threshold is greater than or equal to 2.
[0026] Optionally, determining the replacement region based on the brain structure in the sample text description further includes:
[0027] If the number of brain structures in the sample text description is greater than the preset threshold, determining a region corresponding to each of the brain structures in the sample target brain MRI image to obtain a second basic region;
[0028] Each of the second basic regions is selected as the replacement region, and the second basic regions are combined to obtain at least two replacement regions; wherein each replacement region corresponds to one of the structurally decoupled brain MRI images.
[0029] Optionally, after performing regional fusion based on the unchanged brain structural region and the changed brain structural region to obtain the structurally decoupled brain MRI image, the method further includes:
[0030] The structurally decoupled brain MRI image is updated, specifically including:
[0031] Determining texture features of the replacement region in the structurally decoupled brain MRI image to obtain decoupled region texture features, and determining texture features of the replacement region in the sample target brain MRI image to obtain target region texture features;
[0032] Determining a boundary of the replacement region in the structurally decoupled brain MRI image to obtain a first boundary, and determining a boundary of the replacement region in the sample conditional brain MRI image to obtain a second boundary;
[0033] The structurally decoupled brain MRI image is adjusted until the texture features of the decoupled region are the same as the texture features of the target region, and the first boundary is the same as the second boundary, to obtain an updated structurally decoupled brain MRI image.
[0034] Optionally, generating a target noise synthetic image feature vector for the target conditional brain MRI image using the target diffusion model includes:
[0035] Obtain target-condition brain MRI images and target text descriptions of brain structural changes;
[0036] Performing image coding on the target condition brain MRI image to obtain a target condition image feature vector;
[0037] Performing text encoding on the target text description to obtain a target text feature vector;
[0038] Concatenate the target condition image feature vector and the target text feature vector to obtain a target image-text fusion vector;
[0039] The target image text fusion vector and preset noise are diffused by the target diffusion model to obtain the target noise synthetic image feature vector.
[0040] To achieve the above-mentioned objectives, a second aspect of an embodiment of the present application provides a brain MRI image synthesis device, the device comprising:
[0041] An image acquisition module, configured to acquire a sample conditional brain MRI image and a sample target brain MRI image; wherein the sample target brain MRI image is an image obtained after the brain structure in the sample conditional brain MRI image has changed;
[0042] A text acquisition module is used to obtain sample text descriptions of brain structural changes;
[0043] a structural mixing module, configured to structurally mix the sample conditional brain MRI image and the sample target brain MRI image according to the brain structure in the sample text description to obtain a structurally decoupled brain MRI image; wherein the structurally decoupled brain MRI image includes: an area other than an area corresponding to the brain structure in the sample conditional brain MRI image, and an area corresponding to the brain structure in the sample target brain MRI image;
[0044] a model training module, configured to perform model training on an initial diffusion model based on the sample conditional brain MRI image, the structurally decoupled brain MRI image, and the sample text description to obtain a target diffusion model;
[0045] The image synthesis module is used to generate a target noise synthesis image feature vector for the target conditional brain MRI image using the target diffusion model, and perform image decoding on the target noise synthesis image feature vector to obtain a target synthesis brain MRI image.
[0046] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.
[0047] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the method described in the first aspect is implemented.
[0048] This application proposes a brain MRI image synthesis method and apparatus, electronic device, and computer-readable storage medium. These methods, on the one hand, acquire a sample conditional brain MRI image and a sample target brain MRI image, thereby obtaining two images before and after a brain structure change. On the other hand, they acquire a sample text description of the brain structure change, thereby obtaining text indicating the structure change and the extent of the structural change in the two images. Furthermore, the sample conditional brain MRI image and the sample target brain MRI image are structurally blended based on the brain structure in the sample text description to obtain a structurally decoupled brain MRI image. This allows the structurally decoupled brain MRI image to include regions outside of those corresponding to brain structure in the sample conditional brain MRI image, as well as regions corresponding to brain structure in the sample target brain structure image. This reduces the adverse effects of regions not corresponding to brain structure in the sample target brain structure image, achieving brain structure decoupling and resulting in higher image quality. Furthermore, an initial diffusion model is trained based on the sample conditional brain MRI image and the structurally decoupled brain MRI image to obtain a target diffusion model. Due to the higher quality of the structurally decoupled brain MRI image, the performance of the trained model can be effectively improved. Finally, the target diffusion model is used to generate a target noise synthesis image feature vector from the target conditional brain MRI image, and the target noise synthesis image feature vector is decoded to obtain the target synthesis brain MRI image. This improves the accuracy of brain MRI image synthesis.
[0049] Other features and advantages of the present application will be set forth in the following description, and in part will be apparent from the description, or may be learned by practicing the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 This is an optional flow chart of the brain MRI image synthesis method provided in an embodiment of the present application;
[0051] Figure 2 It is a diagram of the structure of the brain;
[0052] Figure 3 yes Figure 1 Example diagram of step 103;
[0053] Figure 4 yes Figure 1 Flowchart of step 103;
[0054] Figure 5 is a schematic diagram of the model training process provided in an embodiment of the present application;
[0055] Figure 6 It is a schematic diagram of the process of using the model provided in the embodiment of the present application;
[0056] Figure 7 1 is a comparative schematic diagram of brain MRI images synthesized by different methods provided in the embodiments of the present application;
[0057] Figure 8 This is a block diagram of the module structure of the brain MRI image synthesis device provided in an embodiment of the present application;
[0058] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0060] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0062] First, let’s analyze some of the terms used in this application:
[0063] Artificial intelligence (AI) is a new technical discipline that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. A branch of computer science, AI seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thinking. It also encompasses the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.
[0064] Latent Diffusion Model: Also known as the latent diffusion model, it is a deep learning model used to generate data, particularly in the field of image generation and processing. Diffusion models use a latent space representation to capture the characteristics of the data, thereby achieving efficient performance in tasks such as image synthesis and transformation.
[0065] Back propagation: The general principle of back propagation is: input the training set data into the input layer of the neural network, pass through the hidden layer of the neural network, and finally reach the output layer of the neural network and output the result; since there is an error between the output result of the neural network and the actual result, the error between the estimated value and the actual value is calculated, and the error is backpropagated from the output layer to the hidden layer until it propagates to the input layer; in the process of back propagation, the values of various parameters are adjusted according to the error; the above process is continuously iterated until convergence.
[0066] Brain MRI images (also known as brain MRI images) are an indispensable tool in clinical diagnosis and disease monitoring. Brain imaging analysis combines modern medical imaging technology and data processing methods to evaluate and study brain structure and function. However, due to the complexity of brain structure, the high correlation of medical imaging features, and the scarcity of high-quality public datasets, the development of diversified brain structure analysis and visualization teaching programs for disease symptoms has always faced huge challenges. Deep learning models have played an important role in promoting disease diagnosis based on brain MRI, but they usually require a large amount of real data for training, and manual data collection is too expensive and time-consuming.
[0067] This application focuses on brain structure generation, aiming to provide high-quality synthetic medical images for medical research. These synthetic images can not only enrich disease progression models, but also provide technical support for scarce disease research and visual teaching of editable brain composition. For example, in Alzheimer's disease research, simulating the pathological characteristics of different patients through synthetic images can help researchers more comprehensively understand the evolution mechanism of the disease. In addition, this application can generate continuous large-scale human brain image samples, laying the foundation for the training of downstream brain image analysis models.
[0068] In recent years, numerous studies have attempted to simulate disease-related brain structural changes by synthesizing brain MRI images to meet the medical and scientific communities' needs for in-depth research on the human brain. Related technologies have proposed medical image synthesis methods based on generative models such as generative adversarial networks (GANs) and variational autoencoders (VAEs). For example, 4D-DANI-Net is a GAN-based model that generates brain MRI images with age-related changes, simulating how brain structure changes with age. DiDiGAN learns from brain MRI image variations between healthy individuals and Alzheimer's patients to generate images that smoothly transition from healthy to Alzheimer's disease. CycleGAN and Pix2Pix are commonly used image translation methods for medical image synthesis. The former uses unsupervised learning to translate images between different domains, while the latter uses conditional generative adversarial networks (cGANs) for image-to-image mapping. Furthermore, the ADESyn model can generate images depicting brain changes at different stages of Alzheimer's disease, simulating the progression of the disease.
[0069] The related technologies have at least one of the following disadvantages: (1) Limitation of the synchronous change assumption: Existing medical image synthesis methods, such as 4D-DANI-Net and DiDiGAN, usually assume that the various anatomical structures of the brain change synchronously during pathological changes. For example, when synthesizing images of patients with Alzheimer's disease (AD), ventricular dilatation and cortical atrophy usually occur simultaneously. However, in actual clinical practice, the changes in brain structure of different patients show significant individual differences. Some patients may only show mild dilatation of the ventricles, while other patients may have significant cortical atrophy. The synchronous assumption of existing methods makes it impossible for them to accurately simulate such asynchronous changes, resulting in a lack of diversity and realism in the synthesis results. (2) Lack of precise structural control: Many existing methods, especially those based on generative adversarial networks (GANs), usually treat the changes of multiple anatomical structures as a whole for synthesis, which limits the precise control of a single structure. For example, when simulating the progression of brain diseases (such as AD), users cannot individually control the changes of structures such as ventricular dilatation and cortical atrophy. This limitation of lack of structural control leads to insufficient flexibility in the generated images and makes it difficult for these methods to simulate complex pathological changes. (3) High computational complexity and low efficiency: Existing deep learning methods, especially for the generation of high-resolution medical images, usually require a lot of computing resources and time, which limits the practical application of these methods. In particular, in large-scale data processing and clinical environments, existing methods often find it difficult to meet the needs of real-time or efficient processing. (4) Insufficient data diversity and inability to adapt to personalized needs: Existing technologies often ignore personalized pathological manifestations. Although existing methods can generate brain images, the images they generate usually rely on fixed pathological patterns and lack personalized control. The brain structure and lesion progression of different patients are significantly different. Existing methods are difficult to generate customized images based on the specific pathological characteristics of individuals, which limits their widespread application in clinical practice. (5) The impact of image registration accuracy on results: Many traditional methods rely on precise image registration technology to generate synthetic images. However, due to the complexity of brain images and differences between patients, the registration process may be affected by factors such as noise and motion artifacts, resulting in reduced registration accuracy, thereby affecting the quality of the synthetic image. This makes existing technologies ineffective when processing low-quality images or complex lesions.
[0070] The present application provides a brain MRI image synthesis method, a brain MRI image synthesis device, an electronic device, and a computer-readable storage medium, which can achieve at least one of the following purposes: (1) Resolving the limitations of the synchronous change assumption and supporting asynchronous lesion simulation: The structural decoupling method proposed in the present application (corresponding to the embodiment of structurally mixing the sample conditional brain MRI image and the sample target brain MRI image according to the brain structure in the sample text description below) can control the changes of different brain structures separately, so that the simulation of lesions is no longer limited to the synchronous change assumption. For example, when simulating Alzheimer's disease, the present application can adjust the degree of ventricular dilatation and cortical atrophy separately, thereby generating more diverse and clinically realistic brain images. (2) Achieving precise structural control: The present application allows users to independently adjust the changes of each anatomical structure (such as ventricles, cortex, white matter, etc.). This refined structural control makes the generated images more flexible and can accurately simulate different stages of brain disease progression. For example, users can simulate mild ventricular dilatation or severe cortical atrophy according to specific needs, thereby improving the accuracy of the synthesized image. (3) Reduce computational complexity and improve generation efficiency: This application significantly reduces the demand for computing resources by optimizing the generation algorithm and model architecture, making the image synthesis process more efficient. This makes the method have higher application value in clinical environments and can support large-scale data processing and real-time image generation. (4) Meet the needs of personalized medicine: This application can generate customized brain images based on the patient's specific pathological characteristics (such as age, gender, disease type, etc.) to meet the needs of personalized medicine. By combining text prompt control, users can generate brain images with different pathological characteristics according to specific clinical needs, thereby better assisting diagnosis and treatment. (5) Reduce dependence on image registration and improve image generation quality: This application reduces dependence on precise image registration through innovative image editing methods (corresponding to the embodiment of structural mixing that appears below), thereby avoiding the limitations of traditional methods in processing low-quality or complex images. Even in the case of poor image quality or the presence of noise, the present invention can still generate high-quality synthetic images, improving the robustness of image generation.
[0071] The brain MRI image synthesis method of the embodiment of the present application can be executed by the server alone, or by the terminal alone, or by the terminal and the server together. In addition, the brain MRI image synthesis method provided by the embodiment of the present application can also be software running on the server. The server can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the brain MRI image synthesis method, etc., but is not limited to the above forms.
[0072] The embodiments of the present application provide a brain MRI image synthesis method, a brain MRI image synthesis device, an electronic device, and a computer-readable storage medium, which are specifically illustrated by the following embodiments. First, the brain MRI image synthesis method in the embodiments of the present application is described.
[0073] See Figure 1 According to one embodiment of the present application, a brain MRI image synthesis method includes steps 101 to 105.
[0074] Step 101: Acquire a sample conditional brain MRI image and a sample target brain MRI image.
[0075] In step 101, the sample conditional brain MRI image is a conditional image, specifically an image provided as input to the model, based on which the model performs a specific task or generates output. Such conditional images can be part of the training data, designed to train the model to learn how to perform tasks such as classification, detection, and generation given a given image. The sample target brain MRI image is an image of the brain structure in the sample conditional brain MRI image after changes have occurred. The sample conditional brain MRI image and the sample target brain MRI image can be referred to as paired real image data.
[0076] In one example, in order to obtain high-quality paired real image data, a long-term patient human brain image dataset was selected. This dataset includes brain images taken from the same patient at different time points. These images show obvious morphological differences due to changes in brain structure (such as cerebral cortical atrophy, hippocampal atrophy, etc.). Two brain images taken at different time points can be used as sample conditional brain MRI images and sample target brain MRI images to obtain a large amount of paired real image data. The paired real image data obtained from this dataset can provide effective training samples for subsequent image synthesis and model training.
[0077] In one embodiment, step 101 may include the following steps:
[0078] (1) Image pairing: In each image pair, the first image captured is defined as the sample conditional brain MRI image, and the second image captured is defined as the sample target brain MRI image. The differences between the sample target brain MRI image and the sample conditional brain MRI image generally reflect changes in brain structure, especially those associated with disease progression. By comparing these images, morphological changes in each structure (e.g., ventricular dilatation, cortical atrophy, etc.) can be extracted.
[0079] (2) Image cleaning and standardization: In order to ensure the quality of image data, the sample conditional brain MRI images and sample target brain MRI images need to be cleaned and standardized before the training data is generated. The specific steps include: (2.1) Skull removal: Remove areas in the image that are not related to the brain, such as the skull and other non-brain tissues. These areas are irrelevant to subsequent analysis and image synthesis. (2.2) Denoising: Use a denoising algorithm (such as a deep learning denoising network) to reduce noise in the image for subsequent image segmentation. (2.3) Standardization: Since MRI images taken by different devices may be different, the images need to be standardized to ensure uniformity between different images and reduce the impact of device differences.
[0080] (3) Image segmentation: FreeSurfer (whole brain segmentation tool) was used to segment the sample conditional brain MRI image and the sample target brain MRI image to extract the brain anatomical regions (such as ventricles, cortex, white matter, etc.). This process ensures that the boundaries of each structure are clear, which facilitates subsequent structural change analysis and image synthesis.
[0081] (4) Text labeling: The automated labeling system compares the sample conditional brain MRI image and the sample target brain MRI image, extracts the structural changes between them, and generates corresponding text labels based on the type of change (e.g., ventricular enlargement, cortical atrophy, etc.). The text labels can include descriptive words such as "enlargement" and "atrophy" to identify the changes of different structures over time.
[0082] Step 102: Obtain sample text descriptions of brain structural changes.
[0083] In step 102, the sample text description refers to a text that describes or illustrates or indicates a situation where brain structure changes. Figure 2 The brain can include the cortex, ventricles, hippocampus, and other brain structures. Changes in brain structure can include expansion, atrophy, or no change. For example, a sample text description might be "mild expansion of the ventricles." Another example might be "cortical atrophy."
[0084] The sample text description can be obtained through user input or other means. For example, the sample text description can be obtained by receiving user input text. Another example is obtaining the user's voice and performing text recognition on the voice to obtain the sample text description.
[0085] In one example, sample text descriptions (eg, "mild ventriculomegaly") are used to precisely control for structural changes in images.
[0086] A mapping relationship is established between text description and image changes through quantified volume change rate (such as "brain ventricles enlarged by 5%") to ensure that the generated image meets user needs.
[0087] Step 103 : structurally mixing the sample conditional brain MRI image and the sample target brain MRI image according to the brain structure in the sample text description to obtain a structurally decoupled brain MRI image.
[0088] In step 103, the structurally decoupled brain MRI image is a complete brain MRI image, which includes regions other than the regions corresponding to the brain structures in the sample conditional brain MRI image and regions corresponding to the brain structures in the sample target brain MRI image.
[0089] It should be noted that the number of brain structures in the sample text description is more than one. Figure 3 If the number of brain structures described in the sample text is 1, for example, the brain structure is a ventricle, then the structurally decoupled brain MRI image includes: areas other than the areas corresponding to the ventricles in the sample conditional brain MRI image (i.e., areas corresponding to the cortex in the sample conditional brain MRI image, and may also include areas corresponding to the hippocampus, etc.), and areas corresponding to the ventricles in the sample target brain MRI image. For another example, if the number of brain structures described in the sample text is 2, for example, the brain structure includes the cortex and ventricles, then the structurally decoupled brain MRI image includes: areas other than the areas corresponding to the cortex and ventricles in the sample conditional brain MRI image (i.e., areas corresponding to the hippocampus in the sample conditional brain MRI image), and areas corresponding to the cortex and ventricles in the sample target brain MRI image.
[0090] In one embodiment, referring to Figure 4 , step 103 may include:
[0091] Step 401, determining a replacement region based on the brain structure in the sample text description;
[0092] Step 402 , separating the unchanged brain structure region from the sample conditional brain MRI image according to the replacement region;
[0093] Step 403 , separating the brain change structure region from the sample target brain MRI image according to the replacement region;
[0094] Step 404 : performing regional fusion based on the unchanged brain structural region and the changed brain structural region to obtain a structurally decoupled brain MRI image.
[0095] In step 401, if the sample text is described as "cortical atrophy," the brain structure can be determined to be the cortex, and the replacement region can be determined to be the region corresponding to the cortex. If the sample text is described as "ventricular dilatation, cortical atrophy," the brain structure can be determined to include the ventricles and the cortex, and the replacement region can be determined to include the region corresponding to the ventricles and the region corresponding to the cortex.
[0096] In one embodiment, step 401 may include at least one of the following steps:
[0097] If the number of brain structures in the sample text description is 1, then the region corresponding to the brain structure is determined in the sample target brain MRI image to obtain a replacement region;
[0098] If the number of brain structures in the sample text description is greater than 1 and less than or equal to a preset threshold, the area corresponding to each brain structure is determined in the sample target brain MRI image to obtain a first basic area, and the various first basic areas are merged to obtain a replacement area; wherein the preset threshold is greater than or equal to 2.
[0099] If the number of brain structures in the sample text description is greater than a preset threshold, the region corresponding to each brain structure is determined in the sample target brain MRI image to obtain a second base region, each of the second base regions is selected as a replacement region, and the second base regions are combined to obtain at least two replacement regions; wherein each replacement region corresponds to a structure-decoupled brain MRI image.
[0100] This embodiment mainly takes into account that when performing structural mixing, different numbers of brain structures will affect the quality of the image after structural mixing (i.e., the structurally decoupled brain MRI image). Therefore, personalized replacement area determination logic is provided for different numbers, which can improve the accuracy of the structurally decoupled brain MRI image and can generate at least one structurally decoupled brain MRI image, thereby improving the accuracy of image synthesis.
[0101] In one example, assuming a preset threshold of 2 and the number of brain structures is 3, which is a case where the number of brain structures is greater than the preset threshold, the steps of selecting each of the second basic regions as a replacement region and combining each of the second basic regions pairwise to obtain at least two replacement regions specifically include: selecting each of the regions corresponding to the ventricles, the cortex, and the hippocampus as a replacement region, thereby obtaining three replacement regions; and combining each of the regions corresponding to the ventricles, the cortex, and the hippocampus pairwise to obtain three combinations, thereby obtaining three replacement regions. In this example, six replacement regions can be obtained, and thus, six structurally decoupled brain MRI images can be obtained after structural mixing.
[0102] In step 402 , the unchanged brain structure region refers to a region outside the region corresponding to the brain structure in the sample condition brain MRI image.
[0103] In step 403 , the brain structure change region refers to a region corresponding to the brain structure in the sample target brain MRI image.
[0104] In step 404 , regional fusion may be performed by merging the unchanged brain structure region and the changed brain structure region to obtain a structurally decoupled brain MRI image.
[0105] In one embodiment, after step 404, step 103 may further include: updating the structurally decoupled brain MRI image, specifically including:
[0106] Determine the texture features of the replacement region in the structurally decoupled brain MRI image to obtain the texture features of the decoupled region, and determine the texture features of the replacement region in the sample target brain MRI image to obtain the texture features of the target region;
[0107] Determine a boundary of the replacement region in the structurally decoupled brain MRI image to obtain a first boundary, and determine a boundary of the replacement region in the sample conditional brain MRI image to obtain a second boundary;
[0108] The structurally decoupled brain MRI image is adjusted until the texture features of the decoupled region are the same as the texture features of the target region, and the first boundary is the same as the second boundary, thereby obtaining an updated structurally decoupled brain MRI image.
[0109] When determining the texture features of an image, a feature encoder may be used to extract the texture features. This embodiment can eliminate artifacts at the structural boundaries of the structurally decoupled brain MRI image, ensure smooth transitions, maintain gradient information, and improve image quality.
[0110] Step 104 : training the initial diffusion model based on the sample conditional brain MRI image, the structure-decoupled brain MRI image, and the sample text description to obtain a target diffusion model.
[0111] It should be noted that in order to accelerate the training and improve the performance of the initial model, the pre-training weight initialization model from Stable Diffusion v1.5 is used. This pre-trained latent diffusion model has shown strong generation ability in processing natural images. However, when applied to medical images, especially brain MRI images, there is a clear deficiency in the matching of CLIP model pre-training semantics with medical terminology. For example: the CLIP model may not be able to correctly correspond the "ventricle" in the sample text description to the central region of the brain in the brain MRI image. In order to alleviate the above problems, the embodiment introduces decoupling training data (such as a pair of ventricle decoupling images, i.e. sample conditional brain MRI images, structure decoupling brain MRI images), which can establish a one-to-one mapping from the term "ventricle" to the corresponding image feature changes. This method significantly improves the model's understanding of medical terminology, enabling it to correctly associate the term with the corresponding anatomical structure.
[0112] In an embodiment, step 104 can include:
[0113] textually encoding the sample text description to obtain a sample text feature vector;
[0114] image-encoding the sample conditional brain MRI image to obtain a sample conditional image feature vector;
[0115] image-encoding the structure decoupling brain MRI image to obtain a decoupling image feature vector;
[0116] adding noise to the decoupling image feature vector to obtain a noisy decoupling image feature vector;
[0117] concatenating the sample conditional image feature vector and the sample text feature vector to obtain a sample image-text fusion vector;
[0118] diffusing the sample image-text fusion vector and the noisy decoupling image feature vector through the initial diffusion model to obtain a sample noisy synthetic image feature vector;
[0119] adjusting parameters of the initial diffusion model according to the noisy decoupling image feature vector and the sample noisy synthetic image feature vector to obtain a target diffusion model.
[0120] Figure 5 is a schematic diagram of the model training process provided by the embodiment of the present application. Referring to Figure 5During the model training process, the sample text description can be input into the text encoder for text encoding to obtain a sample text feature vector. The text encoder can use the Contrastive Language-Image Pretraining (CLIP) model. The sample conditional brain MRI image can be input into the first image encoder for image encoding to obtain a sample conditional image feature vector. The first image encoder is used to convert the input image into a feature vector of a fixed size. A convolutional network model can be used as the first image encoder, such as CNN. The structurally decoupled brain MRI image can be input into the second image encoder for image encoding to obtain a decoupled image feature vector. The second image encoder is used to convert the input image into a feature vector of a fixed size. A convolutional network model can be used as the second image encoder, such as CNN. Add Gaussian noise to the decoupled image feature vector Obtain the noise decoupled image feature vector. Through the splicing layer (such as Figure 5 (As shown in C) in the figure, the sample conditional image feature vector and the sample text feature vector are concatenated to obtain a sample image-text fusion vector. The sample image-text fusion vector and the noise-decoupled image feature vector are diffused using the initial diffusion model to obtain a sample-noise-synthesized image feature vector. The parameters of the initial diffusion model are adjusted based on the noise-decoupled image feature vector and the sample-noise-synthesized image feature vector to obtain the target diffusion model.
[0121] It should be noted that the initial diffusion model significantly improves computational efficiency by operating in the latent space projected by a pre-trained variational autoencoder (VAE). The variational autoencoder consists of two key components: the encoder (including the image encoder and the text encoder), which maps the input image x to a vector z = ε(x) in the latent space. The decoder (including the image decoder), which converts the latent vector z into an image in the image space.
[0122] Furthermore, this application addresses the shortcomings of the CLIP model in medical term alignment by generating structurally decoupled training data (i.e., structurally decoupled brain MRI images). The introduction of this structurally decoupled data not only improves the model's understanding of medical images but also enables it to generalize more effectively when processing diverse text descriptions.
[0123] During the diffusion process, the diffusion model gradually adds noise to the latent vector z, generating a series of noise vectors zt, whose noise level increases with the time step t. The diffusion process simulates the gradual transformation from a clear image to pure noise, and the training task of the model is to reversely deduce and gradually restore a clear image from pure noise. In order to train the model, this application designs an objective function, the core of which is to optimize the model parameters ∈ of the initial diffusion model by minimizing the noise prediction error. θSpecifically: The model is conditioned by inputting sample brain MRI images c I and sample text description c T As a condition, learn to predict the latent vector z t The noise in ∈. The objective function is as follows:
[0124]
[0125] The objective function measures the difference between the predicted noise and the real noise, and optimizes the model parameters ∈ θ Minimize this difference.
[0126] In the objective function, ε(·) refers to the encoder of the variational autoencoder (VAE). x refers to the sample target brain MRI image, and ε(x) refers to the sample target image feature vector. I refers to the sample conditional brain MRI image, ε(c I ) refers to the sample conditional image feature vector. c T Refers to the sample text description, providing another constraint for model generation. t refers to the time step. ∈ refers to the noise. z t It refers to the noise decoupled image feature vector corresponding to the time step t, which comes from the diffusion process of gradually adding noise to z=ε(x). ∈ θ (·) is a neural network that needs to be trained, and its input includes: z t ,t,ε(c I ) and c T , the task of the network is to predict the noise ε added to the latent vector z at time step t. The objective function is to predict the noise ∈ θ The training goal is to minimize the mean squared error (MSE) between ε and the true noise ε, so that the model can accurately denoise the latent representation.
[0127] It should be noted that the expected symbol E in the above formula indicates that the objective function is the comprehensive average of the following items: the combination of different training samples (ε(x), ε(c I ) and c T ); random noise sampled from a standard normal distribution All time steps t∈T. In this way, the training process of the model can be robust to different inputs and noise levels. This objective function guides the neural network ∈ θ , learning how to reverse the diffusion process in the latent space while incorporating the conditions of prior image and textual cues, with the ultimate goal of generating images or content that match the input conditions.
[0128] In one example, model training was divided into two phases, optimizing reconstruction quality and generation capabilities, respectively. In the first phase, the variational autoencoder was fine-tuned. By improving the performance of the encoder and decoder, the model's reconstruction quality of the input MRI images was significantly improved, ensuring a more accurate image representation in the latent space. During the second phase of fine-tuning the diffusion model, the weights of the variational autoencoder and CLIP model remained frozen, with the focus on optimizing the weights of the diffusion model. This approach aims to further improve the model's image generation capabilities by using decoupled training data and sample text descriptions as input, ensuring that the generated brain MRI images accurately reflect the anatomical changes described in the sample text descriptions.
[0129] The key advantages of the target diffusion model trained in this application include: Efficiency improvement: By performing diffusion operations in the latent space, the computational complexity is significantly reduced and the generation speed is increased. Text conditional control: Combined with the CLIP branch, users can accurately control the structural changes in the image through simple text descriptions (such as "mild ventriculomegaly"). Medical semantic alignment: By introducing decoupled training data, the shortcomings of the CLIP model in understanding medical terminology are solved, and the model's ability to understand the specific structures and changes of MRI images is enhanced. Multi-stage optimization: The staged training strategy enables the model to achieve a high level of reconstruction quality and generation capability, providing reliable technical support for personalized medical image synthesis.
[0130] Step 105 : generating a target noise synthetic image feature vector for the target conditional brain MRI image using the target diffusion model, and performing image decoding on the target noise synthetic image feature vector to obtain a target synthetic brain MRI image.
[0131] In one embodiment, the step of generating a target noise synthetic image feature vector for the target condition brain MRI image using the target diffusion model may include:
[0132] Obtain target-condition brain MRI images and target text descriptions of brain structural changes;
[0133] Perform image encoding on the target condition brain MRI image to obtain the target condition image feature vector;
[0134] Perform text encoding on the target text description to obtain the target text feature vector;
[0135] The target condition image feature vector and the target text feature vector are concatenated to obtain the target image text fusion vector;
[0136] The target image text fusion vector and the preset noise are diffused through the target diffusion model to obtain the target noise synthetic image feature vector.
[0137] Figure 6 This is a schematic diagram of the model usage process provided in the embodiment of this application. Figure 6 During the use of the model, the target text description can be input into the text encoder for text encoding to obtain the target text feature vector. The target conditional brain MRI image can be input into the first image encoder for image encoding to obtain the target conditional image feature vector. The target conditional image feature vector and the target text feature vector are spliced together through the splicing layer to obtain the target image text fusion vector. The sample image text fusion vector and the preset noise are fused by the target diffusion model (the target diffusion model is obtained by training the initial diffusion model). Diffusion processing is performed to obtain a target noise synthetic image feature vector. The target noise synthetic image feature vector is decoded by an image decoder to obtain a target synthetic brain MRI image.
[0138] The above embodiment can improve the synthesis accuracy of brain MRI images by utilizing the high performance of the target diffusion model.
[0139] Detailed experiments have demonstrated the superiority of the brain MRI image synthesis proposed in this application. Table 1 shows that the quality and accuracy of the synthesized images proposed in this application surpass the current SOTA technical solution.
[0140]
[0141]
[0142] Table 1
[0143] In Table 1, the synthetic image metrics include PSNR, SSIM, ACC, and MAE. PSNR and SSIM indicate image quality, while ACC and MAE indicate synthesis accuracy. This application significantly outperforms existing methods in both synthetic image quality and accuracy.
[0144] Reference Figure 7 , shows the difference plots between the brain MRI images synthesized by this solution (i.e., this application), Pix2Pix, StarGAN, CycleGAN, and DiDiGAN, and the true target image for the same input image (sample conditional brain MRI image). The difference plots show that the structural changes in the synthesized image are most consistent with the true structural changes. By comparison, it can be found that the brain MRI image synthesized by this application is most similar to the true target image.
[0145] In summary, the BrainEditor method (brain MRI image synthesis method) proposed in this application has significant advantages. First, through structural decoupling technology, it can accurately control the independent changes of different anatomical structures of the brain (such as ventricles, cortex, etc.), overcome the limitations of synchronous structural changes in existing methods, and can generate personalized brain images that are more in line with clinical needs. Secondly, combined with text prompt control, users can accurately describe the required image changes through natural language input, making the image synthesis process more flexible and easy to operate. At the same time, by updating the structural decoupling brain MRI image, the synthesis quality can be optimized, ensuring the natural transition of the structural boundaries and avoiding the generation of artifacts. In addition, the efficient image generation method based on the potential diffusion model makes the image synthesis process more computationally efficient, can process high-resolution images, and meet the real-time requirements of clinical applications. Overall, this application performs well in improving generation quality, personalized control and computational efficiency, and has broad application prospects.
[0146] See also Figure 8 , an embodiment of the present application also provides a brain MRI image synthesis device, which can implement the above-mentioned brain MRI image synthesis method. Figure 8 This is a block diagram of the module structure of the brain MRI image synthesis device provided in an embodiment of the present application, which includes:
[0147] The image acquisition module 801 is configured to acquire a sample conditional brain MRI image and a sample target brain MRI image; wherein the sample target brain MRI image is an image obtained after the brain structure in the sample conditional brain MRI image has changed;
[0148] A text acquisition module 802 is used to acquire sample text descriptions of brain structural changes;
[0149] a structural blending module 803 for structurally blending the sample conditional brain MRI image and the sample target brain MRI image according to the brain structure in the sample text description to obtain a structurally decoupled brain MRI image; wherein the structurally decoupled brain MRI image includes: an area other than an area corresponding to the brain structure in the sample conditional brain MRI image, and an area corresponding to the brain structure in the sample target brain MRI image;
[0150] A model training module 804 is configured to perform model training on the initial diffusion model based on the sample conditional brain MRI image, the structure-decoupled brain MRI image, and the sample text description to obtain a target diffusion model;
[0151] The image synthesis module 805 is used to generate a target noise synthesis image feature vector for the target conditional brain MRI image using a target diffusion model, and perform image decoding on the target noise synthesis image feature vector to obtain a target synthesis brain MRI image.
[0152] It should be noted that the specific implementation of the brain MRI image synthesis device is basically the same as the specific embodiment of the above-mentioned brain MRI image synthesis method, and will not be repeated here.
[0153] The present application also provides an electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, the above-described brain MRI image synthesis method is implemented. The electronic device can be any intelligent terminal, including a tablet computer and an in-vehicle computer.
[0154] See also Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0155] The processor 901 can be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0156] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called by the processor 901 to execute the brain MRI image synthesis method of the embodiments of this application.
[0157] Input / output interface 903, used to implement information input and output;
[0158] Communication interface 904, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0159] Bus 905 , which transmits information between various components of the device (e.g., processor 901 , memory 902 , input / output interface 903 , and communication interface 904 );
[0160] The processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are communicatively connected with each other through the bus 905.
[0161] The embodiment of the present application further provides a storage medium, which is a computer readable storage medium, used for computer readable storage, and stores one or more programs, which can be executed by one or more processors to implement the brain MRI image synthesis method.
[0162] The memory is a non-transitory computer readable storage medium, and can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can further include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0163] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0164] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than those shown in the figures, or combine certain steps, or different steps.
[0165] Those skilled in the art can understand that all or some steps in the method disclosed above, the functions of the modules / units in the system and the device can be implemented as software, firmware, hardware, and appropriate combinations thereof.
[0166] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0167] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0168] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0169] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0170] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0171] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A brain MRI image synthesis method, characterized in that: The method comprises: Acquire a sample conditional brain MRI image and a sample target brain MRI image; wherein the sample target brain MRI image is an image after the brain structure in the sample conditional brain MRI image has changed; Obtain sample text descriptions of brain structural changes; performing structural mixing on the sample conditional brain MRI image and the sample target brain MRI image according to the brain structure in the sample text description to obtain a structurally decoupled brain MRI image; wherein the structurally decoupled brain MRI image includes: an area other than an area corresponding to the brain structure in the sample conditional brain MRI image, and an area corresponding to the brain structure in the sample target brain MRI image; Performing model training on an initial diffusion model according to the sample conditional brain MRI image, the structurally decoupled brain MRI image, and the sample text description to obtain a target diffusion model; The target diffusion model is used to generate a target noise synthetic image feature vector for the target conditional brain MRI image, and the target noise synthetic image feature vector is image decoded to obtain a target synthetic brain MRI image.
2. The method according to claim 1, characterized in that The performing model training on the initial diffusion model according to the sample conditional brain MRI image, the structurally decoupled brain MRI image, and the sample text description to obtain a target diffusion model includes: Performing text encoding on the sample text description to obtain a sample text feature vector; Performing image coding on the sample conditional brain MRI image to obtain a sample conditional image feature vector; performing image coding on the structurally decoupled brain MRI image to obtain a decoupled image feature vector; adding noise to the decoupled image feature vector to obtain a noise decoupled image feature vector; Concatenate the sample conditional image feature vector and the sample text feature vector to obtain a sample image and text fusion vector; Performing diffusion processing on the sample image text fusion vector and the noise decoupling image feature vector through an initial diffusion model to obtain a sample noise synthetic image feature vector; The parameters of the initial diffusion model are adjusted according to the noise decoupled image feature vector and the sample noise synthesis image feature vector to obtain the target diffusion model.
3. The method according to claim 1, characterized in that The step of structurally mixing the sample conditional brain MRI image and the sample target brain MRI image according to the brain structure in the sample text description to obtain a structurally decoupled brain MRI image includes: determining a replacement region based on the brain structure described in the sample text; Separating a brain unchanged structural region from the sample conditional brain MRI image according to the replacement region; Separating a brain change structure region from the sample target brain MRI image according to the replacement region; Regional fusion is performed based on the unchanged brain structure region and the changed brain structure region to obtain the structurally decoupled brain MRI image.
4. The method according to claim 3, characterized in that The determining of the replacement region according to the brain structure in the sample text description includes: If the number of brain structures in the sample text description is 1, determining a region corresponding to the brain structure in the sample target brain MRI image to obtain the replacement region; If the number of brain structures in the sample text description is greater than 1 and less than or equal to a preset threshold, then the area corresponding to each of the brain structures is determined in the sample target brain MRI image to obtain a first basic area, and the first basic areas are merged to obtain the replacement area; wherein the preset threshold is greater than or equal to 2.
5. The method according to claim 4, characterized in that Determining the replacement region according to the brain structure in the sample text description further includes: If the number of brain structures in the sample text description is greater than the preset threshold, determining a region corresponding to each of the brain structures in the sample target brain MRI image to obtain a second basic region; Each of the second basic regions is selected as the replacement region, and the second basic regions are combined to obtain at least two replacement regions; wherein each replacement region corresponds to one of the structurally decoupled brain MRI images.
6. The method according to claim 3, characterized in that After performing regional fusion based on the unchanged brain structural region and the changed brain structural region to obtain the structurally decoupled brain MRI image, the method further includes: The structurally decoupled brain MRI image is updated, specifically including: Determining texture features of the replacement region in the structurally decoupled brain MRI image to obtain decoupled region texture features, and determining texture features of the replacement region in the sample target brain MRI image to obtain target region texture features; Determining a boundary of the replacement region in the structurally decoupled brain MRI image to obtain a first boundary, and determining a boundary of the replacement region in the sample conditional brain MRI image to obtain a second boundary; The structurally decoupled brain MRI image is adjusted until the texture features of the decoupled region are the same as the texture features of the target region, and the first boundary is the same as the second boundary, to obtain an updated structurally decoupled brain MRI image.
7. The method according to any one of claims 1 to 6, characterized in that The method of generating a target noise synthetic image feature vector for a target conditional brain MRI image using the target diffusion model includes: Obtain target-condition brain MRI images and target text descriptions of brain structural changes; Performing image coding on the target condition brain MRI image to obtain a target condition image feature vector; Performing text encoding on the target text description to obtain a target text feature vector; Concatenate the target condition image feature vector and the target text feature vector to obtain a target image-text fusion vector; The target image text fusion vector and preset noise are diffused by the target diffusion model to obtain the target noise synthetic image feature vector.
8. A brain MRI image synthesis device, characterized in that: The device comprises: An image acquisition module, configured to acquire a sample conditional brain MRI image and a sample target brain MRI image; wherein the sample target brain MRI image is an image obtained after the brain structure in the sample conditional brain MRI image has changed; A text acquisition module is used to obtain sample text descriptions of brain structural changes; a structural mixing module, configured to structurally mix the sample conditional brain MRI image and the sample target brain MRI image according to the brain structure in the sample text description to obtain a structurally decoupled brain MRI image; wherein the structurally decoupled brain MRI image includes: an area other than an area corresponding to the brain structure in the sample conditional brain MRI image, and an area corresponding to the brain structure in the sample target brain MRI image; a model training module, configured to perform model training on an initial diffusion model based on the sample conditional brain MRI image, the structurally decoupled brain MRI image, and the sample text description to obtain a target diffusion model; The image synthesis module is used to generate a target noise synthesis image feature vector for the target conditional brain MRI image using the target diffusion model, and perform image decoding on the target noise synthesis image feature vector to obtain a target synthesis brain MRI image.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.