A high-efficiency three-dimensional brain image generation method and device based on hemispherical symmetry and anatomical prior
Patent Information
- Application Number
- CN202611002293.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2046-07-07
AI Technical Summary
[0006]本申请提供一种基于半球对称与解剖先验的高效三维脑影像生成方法及装置,用以解决现有生成模型难以生成高质量的3D脑影像的问题
[0016] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior as described in any of the preceding claims.
Smart Images

Figure CN122510465B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method and apparatus for generating efficient three-dimensional brain images based on hemispherical symmetry and anatomical priors. Background Technology
[0002] In the field of medical image analysis, especially in the generation of 3D images such as brain MRI and CT scans, diffusion models have become one of the mainstream technologies. Their core principle is to progressively add noise to the data until it becomes pure noise, and then learn the inverse denoising process to generate high-quality images. In recent years, Video Diffusion Models (VDMs) and Diffusion Transformers (DiT) combined with the Transformer architecture have been introduced into 3D medical image generation. DiT directly calculates the correlation between any two points in space, achieving global 3D structure capture and thus better maintaining inter-slice spatial continuity.
[0003] Currently, existing technologies capable of rapidly generating 3D brain images mainly fall into two categories: The first category is lightweight generative models based on 3D U-Net, represented by MAISI-v2. These methods typically use 3D U-Net as the backbone network, combined with strategies such as corrected flow and region-specific contrast loss. However, because 3D U-Net uses 3D convolution to extract features, its receptive field is limited, and its ability to model long-range correlations is weak, resulting in insufficient recovery of fine anatomical details. Furthermore, this method is entirely data-driven and lacks explicit neuroanatomical prior constraints, making it prone to "anatomical drift."
[0004] The second category is generative models that combine 3D Unet and DiT, represented by 3D MedDiffusion. This type of method introduces DiT onto the 3D Unet, limiting attention computation to a pre-defined local receptive field and severing the computation of correlations between distant points to reduce computational overhead and enhance generation quality locally. However, the additional DiT computation on top of 3D Unet significantly increases inference latency and computational cost; furthermore, it remains essentially a data-driven model, failing to explicitly embed prior knowledge of the standardized anatomical structures of the brain, and the generation process lacks direct anatomical guidance.
[0005] Therefore, existing technologies still need improvement and development. Summary of the Invention
[0006] This application provides a method and apparatus for generating efficient three-dimensional brain images based on hemispherical symmetry and anatomical priors, in order to solve the problem that existing generation models are unable to generate high-quality 3D brain images.
[0007] This application provides a method for generating efficient three-dimensional brain images based on hemispherical symmetry and anatomical priors, including: Construct a training dataset that includes 3D brain images and corresponding text conditional prompts; Using stream matching technology, the 3D brain image generation model is trained in two stages based on the training dataset, including: sampling and generating hemispherical latent variables based on 3D brain images in the training dataset; performing either the first or second stage of training based on preset switching conditions; in the first stage, generating noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise, and performing symmetric hemispherical learning based on the noisy hemispherical latent variables; in the second stage, constructing noisy whole-brain latent variables based on normalized hemispherical latent variables and Gaussian noise through mirror stitching operations, and performing asymmetric whole-brain learning based on the noisy whole-brain latent variables. Initialized Gaussian noise is input into the trained 3D brain image generation model. In the first stage, the ordinary differential equation of the flow matching technique is solved to obtain the canonical hemispherical latent variables. The canonical hemispherical latent variables are then mirrored to obtain the corresponding canonical whole-brain latent variables. In the second stage, the ordinary differential equation of the flow matching technique is solved again, and the target 3D brain image is then decoded.
[0008] According to the efficient 3D brain image generation method based on hemispherical symmetry and anatomical prior provided in this application, the steps for constructing a training dataset containing 3D brain images and corresponding textual conditional prompts include: 3D brain images and corresponding metadata were obtained from multiple publicly available data sources; the metadata included one or more data from the following sources: imaging modality, age, gender, health status, resolution, magnetic field strength, and scanning device. For each of the 3D brain images, the metadata corresponding to the 3D brain image is mapped into text conditional prompts using a preset natural language template; The training dataset was constructed based on the 3D brain images and corresponding textual prompts.
[0009] According to the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior provided in this application, after the step of obtaining 3D brain images and corresponding metadata from multiple public data sources, the method further includes: Each of the 3D brain images undergoes standardized preprocessing; the standardized preprocessing includes one or more of the following methods: If the 3D brain image is an MRI image, then N4 field correction is performed; If the 3D brain image is a CT image, then a Henle unit truncation is performed; All the 3D brain images were automatically dissected and rigidly registered to a uniform anatomical reference template. 3D brain images with spatial resolution or number of slices below a preset threshold are excluded.
[0010] According to the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior provided in this application, the steps of sampling 3D brain images from the training dataset and generating hemispherical latent variables include: A 3D brain image is sampled from the training dataset, and the sampled 3D brain image is encoded by a pre-trained encoder to obtain a latent space representation; The hemispherical latent variables are calculated based on the latent space representation; the hemispherical latent variables are obtained by averaging the left and right hemispheres.
[0011] According to the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior provided in this application, the preset switching condition is: randomly sampling time steps; if the time step is less than the time switching threshold, the 3D brain image generation model performs the first stage operation; if the time step is greater than or equal to the time switching threshold, the 3D brain image generation model performs the second stage operation.
[0012] According to the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior provided in this application, in the first stage, a noisy hemispherical latent variable is generated based on the hemispherical latent variable and Gaussian noise. The step of learning symmetry hemisphere based on the noisy hemispherical latent variable includes: Extract Gaussian noise from a Gaussian distribution; Generate noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise; Calculate the symmetric hemisphere learning loss based on the hemispherical latent variables, the noisy hemispherical latent variables, and the Gaussian noise. The parameters of the 3D brain image generation model are updated based on the symmetrical hemispherical learning loss.
[0013] According to the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior provided in this application, in the second stage, through mirror stitching operation, noisy whole-brain latent variables are constructed based on normalized hemispherical latent variables and Gaussian noise. The steps of performing asymmetric whole-brain learning based on the noisy whole-brain latent variables include: Extract Gaussian noise from a Gaussian distribution; After performing mirroring and spatial splicing operations on the normalized hemispherical latent variables and combining them with Gaussian noise, noisy whole-brain latent variables are obtained. Reconstruct the noisy path and velocity field based on the noisy whole-brain latent variables, and calculate the asymmetric detail learning loss; The parameters of the 3D brain image generation model are updated based on the asymmetric detail learning loss.
[0014] According to the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior provided in this application, the method further includes: Obtain a standard brain map and encode the standard brain map into embedded features using a pre-trained encoder; In the input layer of the 3D brain image generation model, the embedded features are concatenated with the input data as an additional channel to inject standardized anatomical information in each denoising step.
[0015] This application also provides a highly efficient three-dimensional brain image generation device based on hemispherical symmetry and anatomical prior, comprising: The building module is used to construct a training dataset that includes 3D brain images and corresponding text conditional prompts; The training module is used to perform two-stage training on the 3D brain image generation model based on the training dataset using flow matching technology. This includes: sampling and generating hemispherical latent variables from 3D brain images in the training dataset; executing either the first or second stage of training based on preset switching conditions; in the first stage, generating noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise, and performing symmetric hemispherical learning based on the noisy hemispherical latent variables; in the second stage, constructing noisy whole-brain latent variables based on normalized hemispherical latent variables and Gaussian noise through mirror stitching operations, and performing asymmetric whole-brain learning based on the noisy whole-brain latent variables. The inference module is used to input initialized Gaussian noise into the trained 3D brain image generation model. In the first stage, the ordinary differential equation of the flow matching technique is solved to obtain the canonical hemispherical latent variables. The canonical hemispherical latent variables are then mirrored to obtain the corresponding canonical whole-brain latent variables. In the second stage, the ordinary differential equation of the flow matching technique is solved again and then the target 3D brain image is decoded.
[0016] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior as described in any of the preceding claims.
[0017] This application provides a highly efficient method and apparatus for generating 3D brain images based on hemispherical symmetry and anatomical priors, which efficiently integrates brain symmetry anatomical priors with a pure DiT architecture. First, through a staged generation strategy, only hemispheric latent variables representing common structures in both hemispheres are processed in the first stage, reducing computational cost by approximately half and improving generation speed. Second, by encoding standard brain atlases as embedded features and injecting the model as explicit anatomical guidance in each denoising step, anatomical drift is effectively avoided, improving the quality of generated fine structures. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior provided in this application.
[0020] Figure 2 This is a technical framework diagram of the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior provided in this application.
[0021] Figure 3 This is a schematic diagram of the structure of the efficient three-dimensional brain image generation device based on hemispherical symmetry and anatomical prior provided in this application.
[0022] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0025] It should also be understood that the terminology used in this application specification is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this application specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0026] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0027] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0028] The following is combined Figures 1-2 This application describes a highly efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical priors. For example... Figure 1 As shown, this efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior includes the following steps: S100. Construct a training dataset containing 3D brain images and corresponding text conditional prompts.
[0029] Furthermore, the steps for constructing a training dataset containing 3D brain images and corresponding textual cues include: 3D brain images and corresponding metadata were obtained from multiple publicly available data sources; the metadata included one or more data from the following sources: imaging modality, age, gender, health status, resolution, magnetic field strength, and scanning device. For each of the 3D brain images, the metadata corresponding to the 3D brain image is mapped into text conditional prompts using a preset natural language template; The training dataset was constructed based on the 3D brain images and corresponding textual prompts.
[0030] Specifically, model training is crucial for enabling a model to generate specific brain images based on textual instructions. This embodiment transforms massive, multi-source, heterogeneous medical image data into image-text pairing samples containing textual conditional prompts, thereby obtaining the model's training dataset. First, different publicly available neuroimaging datasets are integrated to obtain a large number of brain images covering multiple imaging modalities. These brain images are accompanied by rich metadata, including but not limited to: imaging modality, age, gender, health status, resolution, magnetic field strength, and one or more pieces of information from the scanning device. Subsequently, using a pre-designed natural language template, for each brain image, its corresponding metadata is automatically mapped to a descriptive textual conditional prompt. For example: a T1-weighted brain magnetic resonance imaging (MRI) image of a 55-year-old female Alzheimer's patient. This embodiment unifies the originally discrete attribute information into semantic instructions that the model can understand, thereby pairing multiple brain images with their respective textual conditional prompts one by one to obtain a training dataset, providing a data foundation for the subsequent generative model to learn the mapping from textual semantics to complex three-dimensional brain structures.
[0031] For example, to construct a 3D brain image generation model, as shown in Table 1, this embodiment integrates 15 publicly available neuroimaging datasets, covering 7 imaging modalities (T1, T2, FLAIR, PD, MRA, CTA, etc.), ultimately obtaining a total of over 20,000 3D brain volumes. Dataset sources include ADNI-2, AIBL, IXI, COSTA, RSNA, BraTS2021, HCP-Y, etc. Furthermore, to achieve controllable synthesis, this embodiment utilizes available metadata to construct comprehensive textual conditional prompts: for each sample, up to 7 metadata fields are procedurally mapped to a natural language template. These fields include: modality, age, gender, health status, resolution, magnetic field strength, and scanning device. An example is as follows: "A T2-weighted image, the subject is a healthy, normal young adult aged 22 to 35, acquired using a 3T scanning protocol, with a resolution of [256, 320, 320]."
[0032] Table 1. Training Dataset
[0033] In one possible implementation, after the step of acquiring 3D brain images and corresponding metadata from multiple public data sources, the following is also included: Each of the 3D brain images undergoes standardized preprocessing; the standardized preprocessing includes one or more of the following methods: If the 3D brain image is an MRI image, then N4 field correction is performed; If the 3D brain image is a CT image, then a Henle unit truncation is performed; All the 3D brain images were automatically dissected and rigidly registered to a uniform anatomical reference template. 3D brain images with spatial resolution or number of slices below a preset threshold are excluded.
[0034] Specifically, after acquiring multi-source data, specialized standardization processing is performed for different image types: for MRI images, N4 off-field correction is implemented to reduce intensity artifacts caused by magnetic field inhomogeneity and ensure the consistency of tissue grayscale; for CT or CTA images, Henle unit truncation is performed to enhance the contrast of cerebral blood vessels while preserving key tissue signal details.
[0035] Next, anatomical alignment was performed, and all samples underwent automated skull stripping (HD-BET) to remove interference from non-brain tissue. The brain after skull stripping was then rigidly registered to a standard anatomical reference template (e.g., the MNI152 template). Anatomical alignment can unify the spatial orientation and origin coordinates of all samples, establish a consistent anatomical reference frame, and effectively preserve the necessary structural variability between different individuals.
[0036] Finally, quality control is performed to systematically remove samples with low spatial resolution (e.g., matrix size less than 256×256) or fewer slices than a preset threshold (e.g., less than 80 slices) to ensure that only high-fidelity volumes are retained for training the generative model, thereby ultimately constructing a high-quality, standardized 3D brain imaging training dataset.
[0037] S200. Using stream matching technology, the 3D brain image generation model is trained in two stages based on the training dataset, including: sampling and generating hemispherical latent variables based on 3D brain images in the training dataset; performing the first or second stage of training based on preset switching conditions; in the first stage, generating noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise, and performing symmetric hemispherical learning based on the noisy hemispherical latent variables; in the second stage, constructing noisy whole-brain latent variables based on normalized hemispherical latent variables and Gaussian noise through mirror stitching operation, and performing asymmetric whole-brain learning based on the noisy whole-brain latent variables.
[0038] Further, the step of sampling 3D brain images from the training dataset and generating hemispherical latent variables includes: A 3D brain image is sampled from the training dataset, and the sampled 3D brain image is encoded by a pre-trained encoder to obtain a latent space representation; The hemispherical latent variables are calculated based on the latent space representation; the hemispherical latent variables are obtained by averaging the left and right hemispheres.
[0039] Furthermore, the preset switching condition is as follows: randomly sample time steps; if the time step is less than the time switching threshold, the 3D brain image generation model performs the first stage operation; if the time step is greater than or equal to the time switching threshold, the 3D brain image generation model performs the second stage operation.
[0040] Specifically, this embodiment directly adopts a pure DiT architecture, abandoning the 3D Unet structure, to perform global attention calculations on any two points in space. This solves the shortcomings of 3D Unet, such as limited receptive field and insufficient modeling of fine anatomical structures, fundamentally improving the theoretical upper limit of generated quality. However, while pure DiT is powerful, its computational cost is extremely high. To address this, this embodiment utilizes the biological prior of the brain's inherent bilateral symmetry, decomposing the training process into two training phases (symmetric hemispherical learning + asymmetric full-volume learning) through a phased generation strategy, fundamentally reducing computational complexity. The two training phases are controlled by a time-step-based random switching condition.
[0041] First, a 3D brain image is sampled from the training dataset. This image is then encoded using a pre-trained encoder to obtain a latent space representation. A hemispheric latent variable representing one hemisphere is then calculated using this latent space representation. This hemispheric latent variable extracts shared, symmetrical, common anatomical features between the left and right hemispheres.
[0042] Next, a time step is randomly sampled. If this time step is less than the time switching threshold, the first stage of symmetric hemisphere learning is performed. In this stage, Gaussian noise is added to the hemisphere latent variables to generate noisy hemisphere latent variables, and a flow matching denoising process is performed on the low-dimensional latent space of a single hemisphere. In short, the model first focuses on learning to construct a standard hemisphere with a correct anatomical structure within a search space with half the complexity.
[0043] When the sampled time step is greater than or equal to the time switching threshold, the second stage of asymmetric whole-brain learning is executed. At this point, the model no longer processes only the hemispheres, but instead uses a mirror stitching operation to spatially stitch together the hemispherical latent variables and their mirror images, combining this with Gaussian noise to construct a noisy whole-brain latent variable representing the whole brain. Subsequently, the model undergoes denoising training in the whole-brain space, focusing on subtle differences between the left and right hemispheres and learning individual-specific, asymmetric local details.
[0044] For example, this embodiment uses the flow matching framework for training. Flow matching learns an ordinary differential equation (ODE) that maps the source distribution... (Gaussian noise) Transmitted to the target data distribution (Actual brain volume). The training objective is to minimize the mean squared error between the predicted velocity and the actual velocity. ; in, The loss function used during training; the linear interpolation path is defined as follows: The true velocity field is ; The latent space representation is obtained based on encoding real brain images; It is Gaussian noise. Represents a diffusion model. This indicates the encoder.
[0045] Since performing full-process diffusion modeling directly on high-resolution 3D brain images is computationally extremely expensive, this embodiment employs a two-stage training strategy, namely, switching thresholds over time. The training is broken down into two training phases: The first stage is the learning of symmetrical hemispheres ( In the early stages of diffusion (high noise levels), details in the image have not yet formed, and the model's primary task is to establish the global anatomical structure. The healthy brain possesses inherent bilateral symmetry, thus modeling complete brain images is redundant. By performing symmetry learning in the hemispherical latent space, computational complexity can be significantly reduced without sacrificing the ability to learn the global structure.
[0046] The second stage is asymmetric whole-brain learning ( In the later stages of diffusion (at low noise levels), the model needs to capture real biological asymmetries (such as left-right differences in certain brain regions) and fine tissue textures. At this point, based on the symmetric results generated in the first stage as a starting point, the model only needs to be refined and fine-tuned on the basis of the noisy distribution, reducing the computational cost.
[0047] It should be noted that the two training phases in this embodiment do not have a fixed execution order. In practical applications, a 3D brain image is first sampled from the training dataset, and then a pre-trained encoder is used. Encoding as a latent space representation Then, randomize the sampling time steps. and time switching threshold .like Enter the first stage; if Then, the second stage begins.
[0048] In one possible implementation, in the first stage, generating noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise, and performing symmetric hemispherical learning based on the noisy hemispherical latent variables, includes the following steps: Extract Gaussian noise from a Gaussian distribution; Generate noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise; Calculate the symmetric hemisphere learning loss based on the hemispherical latent variables, the noisy hemispherical latent variables, and the Gaussian noise. The parameters of the 3D brain image generation model are updated based on the symmetrical hemispherical learning loss.
[0049] Specifically, in the first stage of symmetric hemisphere learning, the model's task is to learn and construct an anatomically correct hemisphere with commonalities between the left and right sides. First, pure noise is sampled from a Gaussian distribution, resulting in Gaussian noise. Then, following the noise-addition principle of flow matching, the Gaussian noise is mixed with the previously calculated hemispherical latent variables to generate a noisy hemispherical latent variable. Next, the model predicts the velocity field *v* based on a diffusion or flow matching framework, guided by contextual conditions (such as textual cues). At this point, the system compares the actual velocity field constructed using Gaussian noise and the hemispherical latent variable with the predicted velocity field output by the model based on the noisy latent variable, calculating the symmetric hemisphere learning loss. This loss measures whether the model can accurately recover a clear symmetric structure from a blurred hemisphere. Finally, the model performs backpropagation based on the calculated symmetric hemisphere learning loss and updates the parameters of the 3D brain image generation model. Because the first stage only operates in the latent variable space of a single hemisphere, rather than directly processing the whole brain, its search space and computational complexity are significantly reduced.
[0050] For example, when the sampling time At that time, the model input is a noisy hemispherical latent variable. The training objective for the first phase is: ; in, The learning loss is for symmetrical hemispheres; For hemispheric latent variables, obtained by averaging the left and right hemispheres; Input text; The process for obtaining hemispheric latent variables is as follows: First, the right hemisphere is mirrored onto the left hemisphere; then, the images of the left hemisphere and the mirrored right hemisphere are compressed using a variational autoencoder (VAE); finally, the images are averaged to obtain the hemispheric latent variables.
[0051] In one possible implementation, in the second stage, noisy whole-brain latent variables are constructed based on canonical hemispherical latent variables and Gaussian noise through a mirroring operation. The steps for performing asymmetric whole-brain learning based on the noisy whole-brain latent variables include: Extract Gaussian noise from a Gaussian distribution; After performing mirroring and spatial splicing operations on the normalized hemispherical latent variables and combining them with Gaussian noise, noisy whole-brain latent variables are obtained. Reconstruct the noisy path and velocity field based on the noisy whole-brain latent variables, and calculate the asymmetric detail learning loss; The parameters of the 3D brain image generation model are updated based on the asymmetric detail learning loss.
[0052] Specifically, the first stage of symmetrical hemispheric learning allows the model to learn a hemisphere containing common anatomical structures of the brain. The second stage, asymmetric whole-brain learning, builds upon this foundation to learn subtle but crucial individual differences between the left and right hemispheres. First, the model extracts Gaussian noise from a Gaussian distribution. Next, a mirror stitching operation is performed, where the model mirrors the previously obtained hemispheric latent variables, generating a mirror copy. Then, the original hemispheric variables and this mirror copy are stitched together in 3D space to form a complete full-volume latent variable, representing the initial whole brain. Then, the Gaussian noise is combined with this full-volume latent variable to obtain the noisy whole-brain latent variable. Within the flow matching framework, the model reconstructs the complete transformation path and velocity field from noise to data based on the noisy whole-brain latent variable. At this point, the model's learning objective is no longer to construct a macroscopic hemispheric structure, but rather the entire 3D whole-brain space, to capture and predict the asymmetric details between the left and right hemispheres. By comparing the model's predictions in whole-brain space with real whole-brain images, the system calculates the asymmetric detail learning loss. Finally, the model performs backpropagation and parameter updates based on this loss.
[0053] For example, when the sampling time At that time, the model input consisted of noisy whole-brain latent variables. The training objective for the second phase is: ; in, This is due to asymmetric detail learning loss; This is a time threshold; and based on Redefine. Defined as: Depend on A copy is made spatially and then stitched together horizontally. The noise reduction path is as follows: The actual velocity field is: .
[0054] For ease of understanding, such as Figure 2 As shown, the complete implementation process of the two-stage training strategy is as follows: First, a real 3D brain image is sampled from the training dataset and passed through a pre-trained encoder. Mapping this to the latent space yields the latent space representation of the whole brain. ; Next, random sampling time step and time switching threshold ; when t < At this point, the model enters the first stage. The model needs to learn the vector field of the canonical hemispherical latent variables from the noise evolution: first, the hemispherical latent variables are calculated. Then, noisy hemispherical latent variables are generated, and finally the loss is calculated. (i.e., symmetric hemispherical learning loss) and update the model parameters; when t ≥ At this point, the model enters the second stage. Here, the model needs to learn the evolutionary process after concatenating the canonical hemispherical latent variables into complete latent variables: constructing canonical whole-brain latent variables from the canonical hemispherical latent variables through mirror concatenation; and then reconstructing the noisy path using flow matching techniques. and velocity field : Through full-volume latent variables ( ) and normative whole-brain latent variables ( ), to obtain the target velocity field ( ) and the corresponding noise path ( Finally, calculate the loss. (i.e., asymmetric detail learning loss) and update the model parameters.
[0055] The entire training process repeats the above four steps until the model converges. Through this two-stage training strategy, the model utilizes symmetry priors to improve training efficiency while retaining the ability to generate complete brain structures.
[0056] In one possible implementation, the method further includes: Obtain a standard brain map and encode the standard brain map into embedded features using a pre-trained encoder; In the input layer of the 3D brain image generation model, the embedded features are concatenated with the input data as an additional channel to inject standardized anatomical information in each denoising step.
[0057] Specifically, in medical image generation, if the model learns implicitly from data alone, the generated results are highly likely to deviate from the actual geometric structure of the brain, producing unrealistic morphologies. To address the anatomical drift problem caused by the lack of anatomical priors in existing generative models, this embodiment injects a standard neuroanatomical atlas as an explicit structural prior into the model. First, the system acquires a standard brain atlas, which can be an average brain model—an unbiased standard spatial image recording the average anatomical structure of a healthy brain population, representing the correct location and morphology of various tissues in the brain under ideal conditions. Next, the standard brain atlas is compressed and encoded into embedded features using a pre-trained encoder. In each input layer of the generative model, this set of embedded features containing standardized anatomical information is treated as an additional feature channel, thereby guiding the model to generate structurally highly accurate 3D brain images.
[0058] For example, the standard MNI152 template is selected as the standard brain atlas corresponding to the standard brain. The atlas is encoded into embedded vector standard brain latent variables through a pre-trained encoder. In the input layer of the 3D brain image generation model (i.e., the diffusion model), the standard brain latent variables are concatenated with the noisy latent variables as an additional channel, so that the model can obtain standardized anatomical structure information in each denoising step.
[0059] S300. Initialized Gaussian noise is input into the trained 3D brain image generation model. In the first stage, the ordinary differential equation of the flow matching technique is solved to obtain the canonical hemispherical latent variables. The canonical hemispherical latent variables are mirrored to obtain the corresponding canonical whole-brain latent variables. In the second stage, the ordinary differential equation of the flow matching technique is solved again and then the target 3D brain image is decoded.
[0060] To address the high computational cost and slow speed of pure DiT architectures during the inference phase, this embodiment directly utilizes the symmetry prior of brain imaging to design a two-stage diffusion process. In the first stage, the diffusion process of similar parts of the left and right hemispheres is merged to reduce computational cost. The specific inference process is as follows: First, a random Gaussian noise representing the initialization of the whole brain space is obtained. Utilizing the similarity of the left and right hemisphere structures, the ordinary differential equation (ODE) of the flow matching technique is solved to gradually denoise and integrate the symmetric parts of the whole brain noise.
[0061] Once the first stage of the solution is complete, the model outputs a canonical hemispherical latent variable. Next, the system uses a mirror stitching operation to convert this canonical hemispherical latent variable into a canonical whole-brain latent variable, and continues to solve the ordinary differential equations of the flow matching technique. Finally, after completing the two-stage ODE solution, the system sends the generated full-volume latent variable to the decoder to obtain the final target 3D brain image.
[0062] For ease of understanding, such as Figure 2 As shown, the complete implementation process of the example model inference is as follows: First, initialize a Gaussian noise. As the starting point of the generation process; Next, a fixed switching threshold is set. In the time interval [0, Solve the ordinary differential equation within the given space: Generate canonical hemispherical latent variables ; Then, utilizing the near-left-right symmetry of the brain, Mirroring and stitching together to construct standardized whole-brain latent variables : ; Indicates splicing; This indicates a mirror image.
[0063] Subsequently, within the time interval The ODE is then solved further to generate the final fully embodied latent variables. .
[0064] Finally, the pre-trained decoder will be used to... Decode it into a 3D brain image to obtain the target 3D brain image.
[0065] The technical advantages of this invention include: 1. Improved Generation Quality: The advantages of this invention in terms of generation quality stem from two aspects. In terms of basic architecture, this invention directly uses pure DiT as the skeleton model, capable of calculating the correlation between any two points in space. Compared to schemes using 3DUnet as the skeleton, it has a fundamental advantage in long-range correlation modeling, which fundamentally solves the problem of insufficient recovery of fine anatomical details. In terms of prior guidance, this invention introduces standard brain anatomy atlases as explicit structural priors, encoding them as embedded features and injecting them into the model in each denoising step. This makes the generated results more closely resemble the distribution of real brain images in terms of overall geometric structure, effectively avoiding the "anatomical drift" phenomenon.
[0066] 2. Improved Generation Speed: Compared to the 3D Unet+DiT hybrid approach, this invention offers a significant advantage in generation speed. This speed improvement primarily stems from the deep utilization of brain symmetry priors: In the first stage, the model only performs denoising on latent variables representing common structures in both hemispheres. This strategy drastically reduces the computational cost of the first stage to approximately half that of the standard whole-brain denoising process. Furthermore, despite employing a pure DiT architecture, this invention fully leverages the optimization characteristics of modern attention-based computation mechanisms, effectively controlling training costs and inference latency while improving the upper limit of generation quality, achieving a better balance between quality and speed.
[0067] 3. Introduction of Symmetry and Standard Brain Anatomical Priors: This invention incorporates the left-right symmetry of the brain as an explicit prior into the reasoning and training process of the generative model. Previous solutions have not utilized this biological characteristic for accelerated generation, but this invention experimentally demonstrates that this symmetry constraint not only significantly reduces computational costs and accelerates generation, but its impact on the differences in left-right brain generation can also be flexibly adjusted through hyperparameters. Simultaneously, this invention introduces a standard brain prior to assist the generation process. The inclusion of this prior has been experimentally proven to effectively accelerate model convergence and further improve the anatomical fidelity of the generated results.
[0068] 4. Convenient model deployment and low engineering implementation cost: This invention features excellent deployability. The model can be fine-tuned on the pre-trained WAN-T2V-1.3B large model without needing to perform complete training from scratch. In practice, only the construction of the velocity field and initial distribution at different training stages needs to be adjusted, resulting in low deployment costs.
[0069] The following describes the efficient three-dimensional brain image generation device based on hemispherical symmetry and anatomical prior provided by this invention. The efficient three-dimensional brain image generation device based on hemispherical symmetry and anatomical prior described below can be referred to in correspondence with the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior described above. Figure 3 As shown, the efficient three-dimensional brain image generation device based on hemispherical symmetry and anatomical prior provided in this application includes: Module 310 is used to build a training dataset containing 3D brain images and corresponding text conditional prompts; Training module 320 is used to perform two-stage training on the 3D brain image generation model based on the training dataset using flow matching technology, including: sampling and generating hemispherical latent variables based on 3D brain images in the training dataset; executing the first stage or the second stage of training based on preset switching conditions; in the first stage, generating noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise, and performing symmetric hemispherical learning based on the noisy hemispherical latent variables; in the second stage, constructing noisy whole-brain latent variables based on the normal hemispherical latent variables and Gaussian noise through mirror stitching operation, and performing asymmetric whole-brain learning based on the noisy whole-brain latent variables. The inference module 330 is used to input initialized Gaussian noise into the trained 3D brain image generation model. In the first stage, the ordinary differential equation of the flow matching technique is solved to obtain the canonical hemispherical latent variables. The canonical hemispherical latent variables are then mirrored to obtain the corresponding canonical whole-brain latent variables. In the second stage, the ordinary differential equation of the flow matching technique is solved again and then the target 3D brain image is decoded.
[0070] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute an efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical priors. This method includes: Construct a training dataset that includes 3D brain images and corresponding text conditional prompts; Using stream matching technology, the 3D brain image generation model is trained in two stages based on the training dataset, including: sampling and generating hemispherical latent variables based on 3D brain images in the training dataset; performing either the first or second stage of training based on preset switching conditions; in the first stage, generating noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise, and performing symmetric hemispherical learning based on the noisy hemispherical latent variables; in the second stage, constructing noisy whole-brain latent variables based on normalized hemispherical latent variables and Gaussian noise through mirror stitching operations, and performing asymmetric whole-brain learning based on the noisy whole-brain latent variables. Initialized Gaussian noise is input into the trained 3D brain image generation model. In the first stage, the ordinary differential equation of the flow matching technique is solved to obtain the canonical hemispherical latent variables. The canonical hemispherical latent variables are then mirrored to obtain the corresponding canonical whole-brain latent variables. In the second stage, the ordinary differential equation of the flow matching technique is solved again, and the target 3D brain image is then decoded.
[0071] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0072] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior provided by the above methods. The method includes: Construct a training dataset that includes 3D brain images and corresponding text conditional prompts; Using stream matching technology, the 3D brain image generation model is trained in two stages based on the training dataset, including: sampling and generating hemispherical latent variables based on 3D brain images in the training dataset; performing either the first or second stage of training based on preset switching conditions; in the first stage, generating noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise, and performing symmetric hemispherical learning based on the noisy hemispherical latent variables; in the second stage, constructing noisy whole-brain latent variables based on normalized hemispherical latent variables and Gaussian noise through mirror stitching operations, and performing asymmetric whole-brain learning based on the noisy whole-brain latent variables. Initialized Gaussian noise is input into the trained 3D brain image generation model. In the first stage, the ordinary differential equation of the flow matching technique is solved to obtain the canonical hemispherical latent variables. The canonical hemispherical latent variables are then mirrored to obtain the corresponding canonical whole-brain latent variables. In the second stage, the ordinary differential equation of the flow matching technique is solved again, and the target 3D brain image is then decoded.
[0073] Furthermore, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior provided by the methods described above, the method comprising: Construct a training dataset that includes 3D brain images and corresponding text conditional prompts; Using stream matching technology, the 3D brain image generation model is trained in two stages based on the training dataset, including: sampling and generating hemispherical latent variables based on 3D brain images in the training dataset; performing either the first or second stage of training based on preset switching conditions; in the first stage, generating noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise, and performing symmetric hemispherical learning based on the noisy hemispherical latent variables; in the second stage, constructing full-volume latent variables based on the normalized hemispherical latent variables and Gaussian noise through mirror stitching operations, and performing asymmetric whole-brain learning based on the normalized whole-brain latent variables. Initialized Gaussian noise is input into the trained 3D brain image generation model. In the first stage, the ordinary differential equation of the flow matching technique is solved to obtain the canonical hemispherical latent variables. The canonical hemispherical latent variables are then mirrored to obtain the corresponding noisy whole-brain latent variables. In the second stage, the ordinary differential equation of the flow matching technique is solved again, and the target 3D brain image is then decoded.
[0074] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. 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 the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0075] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A highly efficient method for generating three-dimensional brain images based on hemispherical symmetry and anatomical priors, characterized in that, include: Construct a training dataset that includes 3D brain images and corresponding text conditional prompts; Using stream matching technology, the 3D brain image generation model is trained in two stages based on the training dataset, including: sampling and generating hemispherical latent variables based on 3D brain images in the training dataset; performing either the first or second stage of training based on preset switching conditions; in the first stage, generating noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise, and performing symmetric hemispherical learning based on the noisy hemispherical latent variables; in the second stage, constructing noisy whole-brain latent variables based on normalized hemispherical latent variables and Gaussian noise through mirror stitching operations, and performing asymmetric whole-brain learning based on the noisy whole-brain latent variables. Initialized Gaussian noise is input into the trained 3D brain image generation model. In the first stage, the ordinary differential equation of the flow matching technique is solved to obtain the canonical hemispherical latent variables. The canonical hemispherical latent variables are then mirrored to obtain the corresponding canonical whole-brain latent variables. In the second stage, the ordinary differential equation of the flow matching technique is solved again and then the target 3D brain image is decoded. The preset switching condition is as follows: randomly sample time steps; if the time step is less than the time switching threshold, the 3D brain image generation model performs the first stage operation; if the time step is greater than or equal to the time switching threshold, the 3D brain image generation model performs the second stage operation. In the first stage, noisy hemispherical latent variables are generated based on the hemispherical latent variables and Gaussian noise. The steps for symmetric hemispherical learning based on the noisy hemispherical latent variables include: Extract Gaussian noise from a Gaussian distribution; Generate noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise; Calculate the symmetric hemisphere learning loss based on the hemispherical latent variables, the noisy hemispherical latent variables, and the Gaussian noise. The parameters of the 3D brain image generation model are updated based on the symmetrical hemispherical learning loss. In the second stage, noisy whole-brain latent variables are constructed based on normalized hemispherical latent variables and Gaussian noise through mirror stitching operations. The steps for asymmetric whole-brain learning based on the noisy whole-brain latent variables include: Extract Gaussian noise from a Gaussian distribution; After performing mirroring and spatial splicing operations on the normalized hemispherical latent variables and combining them with Gaussian noise, noisy whole-brain latent variables are obtained. Reconstruct the noisy path and velocity field based on the noisy whole-brain latent variables, and calculate the asymmetric detail learning loss; The parameters of the 3D brain image generation model are updated based on the asymmetric detail learning loss. The method further includes: Obtain a standard brain map and encode the standard brain map into embedded features using a pre-trained encoder; In the input layer of the 3D brain image generation model, the embedded features are concatenated with the input data as an additional channel to inject standardized anatomical information in each denoising step.
2. The efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior as described in claim 1, characterized in that, The steps to construct a training dataset that includes 3D brain images and corresponding text conditional prompts include: 3D brain images and corresponding metadata were obtained from multiple publicly available data sources; the metadata included one or more data from the following sources: imaging modality, age, gender, health status, resolution, magnetic field strength, and scanning device. For each of the 3D brain images, the metadata corresponding to the 3D brain image is mapped into text conditional prompts using a preset natural language template; The training dataset was constructed based on the 3D brain images and corresponding textual prompts.
3. The efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior as described in claim 2, characterized in that, After obtaining 3D brain images and corresponding metadata from multiple public data sources, the process also includes: Each of the 3D brain images undergoes standardized preprocessing; the standardized preprocessing includes one or more of the following methods: If the 3D brain image is an MRI image, then N4 field correction is performed; If the 3D brain image is a CT image, then a Henle unit truncation is performed; All the 3D brain images were automatically dissected and rigidly registered to a uniform anatomical reference template. 3D brain images with spatial resolution or number of slices below a preset threshold are excluded.
4. The efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior as described in claim 1, characterized in that, The steps of sampling 3D brain images from the training dataset and generating hemispherical latent variables include: A 3D brain image is sampled from the training dataset, and the sampled 3D brain image is encoded by a pre-trained encoder to obtain a latent space representation; The hemispherical latent variables are calculated based on the latent space representation; the hemispherical latent variables are obtained by averaging the left and right hemispheres.
5. A highly efficient three-dimensional brain image generation device based on hemispherical symmetry and anatomical prior, characterized in that, include: The building module is used to construct a training dataset that includes 3D brain images and corresponding text conditional prompts; The training module is used to perform two-stage training on the 3D brain image generation model based on the training dataset using flow matching technology. This includes: sampling and generating hemispherical latent variables from 3D brain images in the training dataset; executing either the first or second stage of training based on preset switching conditions; in the first stage, generating noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise, and performing symmetric hemispherical learning based on the noisy hemispherical latent variables; in the second stage, constructing noisy whole-brain latent variables based on normalized hemispherical latent variables and Gaussian noise through mirror stitching operations, and performing asymmetric whole-brain learning based on the noisy whole-brain latent variables. The inference module is used to input initialized Gaussian noise into the trained 3D brain image generation model. In the first stage, the ordinary differential equation of the flow matching technique is solved to obtain the canonical hemispherical latent variables. The canonical hemispherical latent variables are then mirrored to obtain the corresponding canonical whole-brain latent variables. In the second stage, the ordinary differential equation of the flow matching technique is solved again, and the target 3D brain image is decoded. A standard brain atlas is acquired, and the standard brain atlas is encoded into embedded features by a pre-trained encoder. In the input layer of the 3D brain image generation model, the embedded features are used as an additional channel and concatenated with the input data to inject standardized anatomical structure information in each denoising step. The preset switching condition is as follows: randomly sample time steps; if the time step is less than the time switching threshold, the 3D brain image generation model performs the first stage operation; if the time step is greater than or equal to the time switching threshold, the 3D brain image generation model performs the second stage operation. In the first stage, noisy hemispherical latent variables are generated based on the hemispherical latent variables and Gaussian noise. The steps for symmetric hemispherical learning based on the noisy hemispherical latent variables include: Extract Gaussian noise from a Gaussian distribution; Generate noisy hemispherical latent variables based on the hemispherical latent variables and Gaussian noise; Calculate the symmetric hemisphere learning loss based on the hemispherical latent variables, the noisy hemispherical latent variables, and the Gaussian noise. The parameters of the 3D brain image generation model are updated based on the symmetrical hemispherical learning loss. In the second stage, noisy whole-brain latent variables are constructed based on normalized hemispherical latent variables and Gaussian noise through mirror stitching operations. The steps for asymmetric whole-brain learning based on the noisy whole-brain latent variables include: Extract Gaussian noise from a Gaussian distribution; After performing mirroring and spatial splicing operations on the normalized hemispherical latent variables and combining them with Gaussian noise, noisy whole-brain latent variables are obtained. Reconstruct the noisy path and velocity field based on the noisy whole-brain latent variables, and calculate the asymmetric detail learning loss; The parameters of the 3D brain image generation model are updated based on the asymmetric detail learning loss.
6. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the efficient three-dimensional brain image generation method based on hemispherical symmetry and anatomical prior as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method for generating fetal brain nuclear magnetic volume image based on diffusion model
CN121353517A
Brain image generation device, brain image generation method, and program
JP2014123285A