Brain template construction model training method and device and brain template construction method

By training the first generative model and the second generative model, combining the deformation field and the target loss function, the problem of insufficient specific evaluation in brain template construction is solved, and an efficient brain template construction process is achieved.

CN120259815AActive Publication Date: 2025-07-04BEIJING NORMAL UNIVERSITY
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510725682.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-07-04
Estimated Expiration
2045-06-03

AI Technical Summary

Technical Problem

The existing brain template construction methods have problems such as insufficient specific evaluation and low construction efficiency, which makes it difficult to accurately represent the variability of individual brains.

Method used

By training the first generative model and the second generative model based on the three-dimensional brain image data set based on the target group, the first brain template and the second brain template are generated, and registration and distortion processing are performed through the deformation field, and model parameters are adjusted in combination with the target loss function to achieve the simultaneous construction of multiple brain templates.

Benefits of technology

It improves the specific evaluation and efficiency of brain template construction, reduces computing resources and time consumption, and realizes an efficient brain template construction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259815A_ABST
    Figure CN120259815A_ABST
Patent Text Reader

Abstract

The invention discloses a brain template construction model training method and device and a brain template construction method. Comprising the steps that a first generation model and a second generation model in a brain template construction model are trained through a three-dimensional global feature image of a target group and multiple batches of training data, and the first generation model generates a first brain template based on the three-dimensional global feature image; the second generation model learns individual attributes to generate a second brain template and a first deformation field; performing registration processing on the second brain template and the three-dimensional individual brain image to obtain a second deformation field; and performing distortion processing on each brain template according to the obtained multiple deformation fields to obtain a floating image corresponding to each brain template, determining a target loss function based on the multiple brain templates and the multiple images, and performing parameter adjustment on the two generation models until training of each batch of training data is completed to obtain a trained brain template construction model. According to the scheme, the models of the two brain templates are determined at the same time, so that the efficiency of constructing the brain templates is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a method for training a brain template construction model, an apparatus, and a brain template construction method. Background Art

[0002] In neuroimaging research, normalizing individual brain images to a brain template is a fundamental step, which helps to reduce inter-individual anatomical variability and thus facilitate the comparison of brain structures and functions in a population. Conversely, the brain template can also transfer detailed atlas data (including structural, biochemical, functional, and vascular information) to individual brain images for personalized research. Current research has constructed a general template based on the entire dataset to establish corresponding relationships between individuals for aggregated brain analysis.

[0003] However, due to the significant variability of the human brain between individuals and phenotypic groups (such as age and gender), a single general template is difficult to accurately represent all individuals, and the obtained brain template specificity evaluation is not comprehensive enough. For the construction of different brain templates, independent construction programs and learning models are used, resulting in low efficiency in brain template construction. Summary of the Invention

[0004] The present invention provides a method for training a brain template construction model, an apparatus, and a brain template construction method to solve the problems of insufficient comprehensiveness of brain template specificity evaluation and low efficiency in brain template construction.

[0005] According to one aspect of the present invention, there is provided a method for training a brain template construction model, including:

[0006] Determining a three-dimensional global feature image and a plurality of batches of training data based on a set of three-dimensional brain image data of a target population, wherein each batch of training data includes at least two three-dimensional individual brain images and the individual attributes corresponding to each three-dimensional individual brain image;

[0007] Obtaining a first brain template construction model, the first brain template construction model including a first generation model and a second generation model;

[0008] Generating a first brain template based on the three-dimensional global feature image through the first generation model;

[0009] For the first batch of training data, inputting each individual attribute in the first batch of training data into the second generation model respectively to obtain a second brain template and a first deformation field corresponding to each individual attribute;

[0010] Performing registration processing on the second brain template and the three-dimensional individual brain images to obtain a second deformation field corresponding to each individual attribute;

[0011] For any individual attribute, the first brain template is distorted based on the first deformation field and the second deformation field corresponding to the individual attribute to obtain a first floating image, and the second brain template is distorted based on the second deformation field corresponding to the individual attribute to obtain a second floating image;

[0012] Based on the first floating image, the second floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image corresponding to each individual attribute, a target loss function is determined. Based on the target loss function, the parameters of the first generation model and the second generation model are adjusted, and the second batch of training data is used to continue training until the trained first generation model and the trained second generation model are obtained when the training end condition is reached.

[0013] Optionally, a three-dimensional global feature image and multiple batches of training data are determined based on the three-dimensional brain image data set of the target population, including: obtaining a set of three-dimensional individual brain images corresponding to the target population, calculating the average of the three-dimensional individual brain images in the set of three-dimensional individual brain images to obtain a three-dimensional average image, and determining the three-dimensional average image as the three-dimensional global feature image; sampling is performed in the three-dimensional brain image data set of the target population according to preset sampling conditions to obtain multiple batches of training data that meet the preset batch quantity, where the preset sampling conditions include batch size data and individual attribute limitation conditions in each batch of training data.

[0014] Optionally, the first generation model includes a residual data determination sub-model and a feature fusion sub-model; through the first generation model, a first brain template is generated based on the three-dimensional global feature image, including: through the residual data determination sub-model, global residual data is determined based on the three-dimensional global feature image; the global residual data and the three-dimensional global feature image are feature-fused based on the feature fusion sub-model to obtain the first brain template.

[0015] Optionally, the second generation model includes a feature extraction sub-model, a specific brain template determination sub-model, and a deformation field determination sub-model; each individual attribute in the first batch of training data is respectively input into the second generation model to obtain a second brain template and a first deformation field corresponding to each individual attribute respectively, including: for any individual attribute, the individual attribute is input into the feature extraction sub-model to obtain an individual attribute feature vector; the individual attribute feature vector is processed by the specific brain template determination sub-model to obtain a second brain template corresponding to each individual attribute respectively, and the individual attribute feature vector is processed by the deformation field determination sub-model to obtain a first deformation field corresponding to each individual attribute respectively.

[0016] Optionally, determining a target loss function based on the first floating image, the second floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image corresponding to each individual attribute includes: for any individual attribute, determining a first loss function based on the first floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image of the individual attribute, where the first loss function includes a first template similarity metric and a first template regularization term; determining a second loss function based on the second floating image, the second deformation field, and the three-dimensional individual brain image of the individual attribute, where the second loss function includes a second template similarity metric, a second template regularization term, and a contrastive learning loss term; determining the target loss function based on the first loss function and the second loss function.

[0017] Optionally, the method further includes: invoking a discriminator, inputting the first brain template, the second brain template, and the three-dimensional individual brain image into the discriminator to obtain a discrimination result; determining a third loss function based on the discrimination result and the three-dimensional individual brain image, and adding the third loss function to the target loss function to update the target loss function.

[0018] According to another aspect of the present invention, there is provided a method for constructing a brain template, including:

[0019] Obtaining the individual attributes of the target object;

[0020] Invoking a trained brain template construction model, the brain template construction model including a first generation model and a second generation model;

[0021] Obtaining a three-dimensional global feature image corresponding to the brain template construction model, and generating a global brain template corresponding to the target object based on the three-dimensional global feature image through the first generation model;

[0022] Generating a specific brain template corresponding to the target object based on the individual attributes of the target object and the three-dimensional global feature image through the second generation model.

[0023] According to another aspect of the present invention, there is provided a device for training a brain template construction model, including:

[0024] A training data determination module, configured to determine a three-dimensional global feature image and multiple batches of training data based on a three-dimensional brain image data set of a target population, where each batch of training data includes at least two three-dimensional individual brain images and the individual attributes corresponding to each three-dimensional individual brain image;

[0025] A brain template construction model acquisition module, configured to acquire a first brain template construction model, the first brain template construction model including a first generation model and a second generation model;

[0026] A first brain template determination module, configured to generate a first brain template based on the three-dimensional global feature image through the first generation model;

[0027] A second brain template and first deformation field determination module, configured to input each individual attribute in the first batch of training data into a second generation model for the first batch of training data, to obtain a second brain template and a first deformation field respectively corresponding to each individual attribute;

[0028] A second deformation field determination module, configured to obtain a second deformation field corresponding to each individual attribute by performing registration processing on the second brain template and the three-dimensional individual brain image;

[0029] A floating image determination module, configured to, for any individual attribute, perform a warping process on the first brain template based on the first deformation field and the second deformation field corresponding to the individual attribute to obtain a first floating image, and perform a warping process on the second brain template based on the second deformation field corresponding to the individual attribute to obtain a second floating image;

[0030] A model parameter adjustment module, configured to determine a target loss function based on the first floating image, the second floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image corresponding to each individual attribute, adjust the parameters of the first generation model and the second generation model based on the target loss function, and continue training using the second batch of training data until the training end condition is reached to obtain a trained first generation model and a trained second generation model.

[0031] According to another aspect of the present invention, there is provided an electronic device, the electronic device including:

[0032] At least one processor; and

[0033] A memory communicatively connected to the at least one processor; wherein,

[0034] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the brain template construction model training method or the brain template construction method of any embodiment of the present invention.

[0035] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the brain template construction model training method or the brain template construction method of any embodiment of the present invention when executed.

[0036] In the technical solution of the embodiment of the present invention, the first generation model and the second generation model in the brain template construction model are trained according to the three-dimensional global feature image and multiple three-dimensional individual brain images and corresponding individual attributes in multiple batches of training data. Through the first generation model, a first brain template is generated based on the three-dimensional global feature image, and by learning the global feature information corresponding to the group, it is used to generate the first brain template. Each individual attribute in each batch of training data is respectively input into the second generation model to obtain a second brain template and a first deformation field corresponding to each individual attribute. By learning the individual attributes, a second brain template corresponding to the individual attributes is obtained. Through the registration process of the second brain template and the three-dimensional individual brain images, a second deformation field corresponding to each individual attribute is obtained. By registering the second brain template corresponding to the individual attributes and the three-dimensional individual brain images, a deformation field corresponding to the individual attributes is obtained, which is used to achieve the alignment process between the first brain template and the three-dimensional individual brain images, helping to complete the simultaneous learning and construction of the first brain template and the second brain template in one learning process, reducing the consumption of computing resources and computing time for brain template construction. For any individual attribute, the first brain template is distorted based on the first deformation field and the second deformation field corresponding to the individual attribute to obtain a first floating image, and the second brain template is distorted based on the second deformation field corresponding to the individual attribute to obtain a second floating image. The obtained deformation fields are used to distort the second brain template and the second brain template to obtain the corresponding floating images, which can be used to determine the corresponding loss function for subsequent adjustment of the corresponding deformation field to improve the accuracy of the deformation field. Based on the first floating images, second floating images, first deformation fields, second deformation fields, and three-dimensional individual brain images corresponding to each individual attribute, a target loss function is determined. Based on the target loss function, the parameters of the first generation model and the second generation model are adjusted, and the second batch of training data is used to continue training until the training end condition is reached, obtaining the trained first generation model and the trained second generation model. It realizes the determination of the target loss function based on multiple brain templates and various images and is used to adjust the parameters of the two generation models to obtain a model that can simultaneously determine two types of brain templates, solving the problems of insufficient comprehensive evaluation of brain template specificity and low efficiency of brain template construction, and improving the efficiency of determining brain templates.

[0037] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Brief Description of the Drawings

[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0039] Figure 1 It is a flowchart of a brain template construction model training method provided in Embodiment 1 of the present invention;

[0040] Figure 2 It is a schematic structural diagram of a brain template construction model learning framework applicable to the embodiments of the present invention;

[0041] Figure 3 It is a flowchart of a brain template construction method provided in Embodiment 2 of the present invention;

[0042] Figure 4 It is a schematic structural diagram of a brain template construction model training device provided in Embodiment 3 of the present invention;

[0043] Figure 5 It is a schematic structural diagram of a brain template construction device provided in Embodiment 4 of the present invention;

[0044] Figure 6 It is a schematic structural diagram of an electronic device for implementing the brain template construction model training method of the embodiments of the present invention. Detailed implementation manners

[0045] In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, rather than all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0046] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0047] Embodiment 1

[0048] Figure 1 FIG. is a flowchart of a method for training a brain template construction model provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of training a brain template construction model. This method can be executed by a brain template construction model training device. The brain template construction model training device can be implemented in the form of hardware and / or software. The brain template construction model training device can be configured in electronic devices such as computers and servers. As Figure 1 shown, the method includes:

[0049] S110. Determine a three-dimensional global feature image and a plurality of batches of training data based on the three-dimensional brain image data set of the target population. Among them, each batch of training data includes at least two three-dimensional individual brain images and the individual attributes corresponding to each three-dimensional individual brain image.

[0050] Among them, the target group can be specifically understood as the specific research object that needs to construct a brain template. The determination of the target group needs to combine medical research goals and data science methods to achieve precise positioning through a multi-dimensional screening and dynamic verification process. The three-dimensional brain image data set specifically refers to a set formed by multiple brain image data screened according to the specific screening conditions of the target group. The specific screening conditions can be set according to different research needs, and the screening conditions include but are not limited to age, pathological status, and gender. The three-dimensional global feature image can be specifically understood as an image representing the global features of the target group, and can be obtained by performing linear averaging on the brain image data in the three-dimensional brain image data set of the target group to obtain the three-dimensional global feature image corresponding to the target group. Multiple batches of training data can be obtained by dividing the three-dimensional brain image data set according to the model training requirements. Each batch of training data includes at least two three-dimensional individual brain images and the individual attributes corresponding to each three-dimensional individual brain image. In order to be able to learn the features of multiple individual attributes during the training process of each batch of training data, the individual attributes corresponding to at least two three-dimensional individual brain images in each batch of training data are not completely the same. The individual attribute represents the characteristic information of an individual, which can be a continuous variable or a categorical variable, and can be represented by consecutive natural numbers. The individual characteristic information to be learned can be set according to the specific research requirements of the individual brain template. The individual characteristic information includes but is not limited to age and gender. Exemplarily, if the individual age is 20, then the corresponding individual attribute can be set to 20.

[0051] Specifically, the target group can be determined according to the brain template construction requirements, and then the specific screening conditions corresponding to the target group can be matched in the brain image database to obtain multiple three-dimensional brain image data that meet the specific screening conditions, forming a three-dimensional brain image data set of the target object. It is also possible to retrieve the corresponding three-dimensional brain image data set from a preset storage space or server according to the target group. Then, the three-dimensional brain image data set is divided to obtain multiple batches of training data. Each batch of training data includes at least two three-dimensional individual brain images and the individual attributes corresponding to each three-dimensional individual brain image. The individual attributes in each batch of training data are not completely the same, so that the features of multiple individual attributes can be learned during the training process of each batch of training data.

[0052] Optionally, determining a three-dimensional global feature image and multiple batches of training data based on a set of three-dimensional brain image data of a target group includes: obtaining a set of three-dimensional individual brain images corresponding to the target group, calculating the average of the three-dimensional individual brain images in the set of three-dimensional individual brain images to obtain a three-dimensional average image, and determining the three-dimensional average image as the three-dimensional global feature image; sampling in the set of three-dimensional brain image data of the target group according to a preset sampling condition to obtain multiple batches of training data that meet the preset batch quantity, where the preset sampling condition includes batch size data and individual attribute limitation conditions in each batch of training data.

[0053] Specifically, after obtaining the set of three-dimensional individual brain images corresponding to the target group, calculate the average pixel value of each pixel point of the three-dimensional individual brain images in the set of three-dimensional individual brain images to obtain the average pixel value of each pixel point, and construct a corresponding three-dimensional average image from the average pixel value of each pixel point, and determine the obtained three-dimensional average image as the three-dimensional global feature image. Read the preset sampling condition from the configuration information, and perform sampling processing on the set of three-dimensional brain image data of the target group according to the preset sampling condition to obtain multiple batches of training data that meet the preset batch quantity, where the preset sampling condition includes but is not limited to batch size data and individual attribute limitation conditions in each batch of training data. It should be noted that the batch size data specifically refers to the data volume of each batch of training data. Preferably, the batch size data is at least two samples, and each sample includes a three-dimensional individual image data and the corresponding individual attribute. The individual attribute limitation condition in each batch of training data specifically refers to that the individual attribute in each batch of training data includes at least two individual attributes, that is, the individual attributes in each batch of training data are not completely the same. The preset batch quantity is specifically determined according to the sample quantity in the set of three-dimensional brain image data. It can be understood that the batch size data can be preset according to the hardware resources and learning objectives, that is, the batch size data is known data, and the sample quantity in the set of three-dimensional brain image data is also known data. Therefore, the value of the preset batch quantity can be determined according to the sample quantity in the set of three-dimensional brain image data and the batch size data.

[0054] S120. Obtain a first brain template construction model, where the first brain template construction model includes a first generation model and a second generation model.

[0055] Among them, the first brain template construction model can be specifically understood as a brain template construction model to be trained. The first brain template construction model includes but is not limited to a first generation model and a second generation model. The first generation model is used to learn the three-dimensional global feature image to determine the first brain template, and the second generation model is used to learn the individual feature information to determine the second brain template. The first generation model and the second generation model can be respectively expressed as:

[0056] ;

[0057] ;

[0058] Among them, UT represents the first generation model, and ST represents the second generation model. represents the model parameters of the first generation model. represents the model parameters of the second generation model. in and in are used to distinguish the model parameters of the two generation models, and k represents the individual attributes input to the second generation model.

[0059] Specifically, select the first generation model UT and the second generation model ST according to the requirements of brain template construction to construct the corresponding first brain template construction model for subsequent model training.

[0060] S130. Generate the first brain template based on the three-dimensional global feature image through the first generation model.

[0061] Among them, the first brain template specifically represents a global brain template, which is obtained by performing global feature learning on the three-dimensional global feature image through a preset generation model.

[0062] Specifically, use the three-dimensional global feature image as the initial feature data of the first generation model, and perform global feature learning on the three-dimensional global feature image through the first generation model to generate the corresponding first brain template.

[0063] Optionally, generating the first brain template based on the three-dimensional global feature image through the first generation model includes: determining a sub-model through residual data, and determining global residual data based on the three-dimensional global feature image; performing feature fusion on the global residual data and the three-dimensional global feature image through a feature fusion sub-model to obtain the first brain template.

[0064] In this embodiment, the first generation model includes a residual data determination sub-model and a feature fusion sub-model. Using the three-dimensional global feature image as the initial feature data of the first generation model, the three-dimensional global feature image can be used as the input data of the residual data determination sub-model, and the pixel values of each pixel point of the three-dimensional global feature image are adjusted through the residual data determination sub-model to obtain the intensity residual data corresponding to the three-dimensional global feature image. Further, input the intensity residual data and the three-dimensional global feature image into the feature fusion sub-model, and the feature fusion sub-model performs feature fusion processing to obtain the first brain template.

[0065] In this embodiment, the first generation model is used to perform global feature learning on the three-dimensional global feature image, so as to obtain the corresponding first brain template for subsequent training of the second generation model, which helps to realize the joint learning of different brain templates and improve the efficiency and accuracy of the training of the brain template construction model.

[0066] S140. For the first batch of training data, each individual attribute in the first batch of training data is input into the second generation model to obtain the second brain template and the first deformation field corresponding to each individual attribute respectively.

[0067] Among them, the first batch of training data specifically refers to the batch of training data that is the first to be used for model training among multiple batches of training data, without other special meanings. Any batch of training data among the multiple batches of training data can be used as the first batch of training data. The second brain template specifically represents a specific brain template, which is obtained by learning individual attributes and has specificity. The deformation field is a mathematical model that describes the spatial transformation of an image in medical image analysis, and is a vector field that describes the deformation of an object in image registration or physical simulation, and is used to implement the mapping process between different brain templates. In this embodiment, the first deformation field specifically represents the mapping model between the first brain template and the second brain template, that is, the first brain template can be distorted through the trained first deformation field so that the similarity between the deformed brain template and the second brain template meets the similarity requirement, and the deformed brain template can be approximately equal to the second brain template.

[0068] Specifically, any batch of training data is selected from multiple batches of training data as the first batch of training data, and each individual attribute in the first batch of training data is input into the second generation model. The second generation model performs feature learning on each individual attribute to obtain the second brain template and the first deformation field corresponding to each individual attribute respectively.

[0069] Optionally, the second generation model includes a feature extraction sub-model, a specific brain template determination sub-model, and a deformation field determination sub-model. Inputting each individual attribute in the first batch of training data into the second generation model to obtain the second brain template and the first deformation field corresponding to each individual attribute respectively includes: for any individual attribute, inputting the individual attribute into the feature extraction sub-model to obtain an individual attribute feature vector; processing the individual attribute feature vector through the specific brain template determination sub-model to obtain the second brain template corresponding to each individual attribute respectively, and processing the individual attribute feature vector through the deformation field determination sub-model to obtain the first deformation field corresponding to each individual attribute respectively.

[0070] Among them, the feature extraction sub-model is specifically a network upper model for extracting features of individual attributes. The feature extraction sub-model can be constructed by an MLP (Multilayer Perceptron) layer, a FiLM (Feature-wise Linear Modulation) layer, a parameter input layer, multiple residual layers, and multiple convolutional blocks. The specific brain template determination sub-model is used to process the individual attribute features extracted by the feature extraction sub-model to obtain the corresponding specific brain template, that is, the second brain template. The specific brain template determination sub-model can be constructed by a residual determination model and a feature fusion model. The deformation field determination sub-model is specifically used to process the individual attribute features extracted by the feature extraction sub-model to obtain the corresponding deformation field, that is, the first deformation field. The deformation field determination sub-model can be constructed by a velocity field determination model and a diffeomorphic integration model.

[0071] Specifically, each individual attribute in the first batch of training data is simultaneously input into the feature extraction sub-model to extract features of each individual attribute, obtaining individual attribute feature vectors corresponding to each individual attribute; the individual attribute feature vectors are respectively transmitted to the specific brain template determination sub-model and the deformation field determination sub-model. The specific brain template determination sub-model processes the individual attribute feature vectors to obtain the second brain template corresponding to each individual attribute, and the deformation field determination sub-model processes the individual attribute feature vectors to obtain the first deformation field corresponding to each individual attribute.

[0072] In a specific embodiment, the feature extraction sub-model is constructed by an MLP (Multilayer Perceptron) layer, a FiLM (Feature-wise Linear Modulation) layer, a parameter input layer, multiple residual layers, and multiple convolutional blocks; the specific brain template determination sub-model is constructed by a residual determination model and a feature fusion model; the deformation field determination sub-model is constructed by a velocity field determination model and a diffeomorphic integration model. The individual attributes in the first batch of training data are simultaneously input into the feature extraction sub-model and first enter the MLP layer, which is used to extract features from the individual attributes to determine the shared embedding from the individual attributes. Then, the shared embedding is scaled and offset through the FiLM layer. This process learns parameters from the individual attributes to achieve feature-level adaptive transformation, better utilize the individual attributes, and improve the performance of the model. The results output by the FiLM layer are respectively applied to the parameter input layer, multiple residual layers, and multiple convolutional blocks, enabling conditional adjustment at each layer, so that the generator can better process the varying data set and generate a more suitable template. Among them, the parameter input layer, multiple residual layers, and multiple convolutional blocks perform data transmission in sequence, and the features output by the convolutional block in the last layer are determined as the individual attribute feature vectors corresponding to the individual attributes. The individual attribute feature vectors are transmitted to the specific brain template determination sub-model. The residual determination model in the specific brain template determination sub-model processes the individual attribute features to obtain the corresponding residual data, and then the residual data is added to the three-dimensional global feature image, that is, the residual data and the three-dimensional global feature image are fused through the feature fusion model to obtain the second brain template. The individual attribute feature vectors are transmitted to the deformation field determination sub-model. The velocity field determination model in the deformation field determination sub-model processes the individual attribute features to obtain the corresponding velocity field, and then the velocity field is integrated through the diffeomorphic integration model to obtain a specific deformation field, that is, the first deformation field. Preferably, after obtaining the velocity fields corresponding to the individual attributes, the velocity fields are processed through the SoftSign activation function and scaled by a constant factor b = 100 to ensure that the velocity fields are restricted within [-b, b] and adapted to large deformations.

[0073] In this embodiment, by processing the individual attributes through the second generation model, the second brain template and the first deformation field corresponding to each individual attribute are obtained, realizing a generation model that can simultaneously generate the second brain template and the first deformation field, and improving the efficiency of model training.

[0074] S150. By performing registration processing on the second brain template and the three-dimensional individual brain images, the second deformation fields corresponding to the individual attributes are obtained.

[0075] Among them, the second deformation field can be specifically understood as the mapping relationship between the individual brain image and the second brain template. When the accuracy of the second deformation field is high, the second brain template can be distorted through the second deformation field, and the deviation value between the deformed second brain template and the corresponding three-dimensional individual brain image will be extremely small. Therefore, the second deformation field can be adjusted according to the deviation value between the deformed second brain template and the corresponding three-dimensional individual brain image to improve the accuracy and applicability of the second deformation field.

[0076] Specifically, the pre-constructed template registration model is called to perform registration processing on the second brain template corresponding to each individual attribute and the three-dimensional individual brain image, and the second deformation field corresponding to each individual attribute is obtained.

[0077] It should be noted that the problem to be considered in brain template construction is the assumption of diffeomorphism. The reversibility and differentiability of diffeomorphic deformation ensure the preservation of topological structure. The SVF (Static Velocity Field) parameterization can be used to establish the registration model. In this setting, the deformation field is defined by the following ordinary differential equation:

[0078] ;

[0079] where v represents the steady-state velocity field in the SVF parameterization, represents the deformation field, and the deformation field is obtained by calculating the ordinary differential equation from the steady-state velocity field v. The " " represents a spatial distortion operation. The initial condition , and the deformation field at the initial time of 0 is the unit displacement, ensuring that the deformation process starts from no deformation and gradually generates subsequent deformation fields by integrating the velocity field. t is the time. The final deformation field can be obtained by integrating the velocity field for t = [0, 1]. Then, (i.e., and ) and the spatial transformer are used to deform the brain template into the corresponding individual image space.

[0080] To measure the similarity in the individual brain image space, square local normalized cross-correlation (LNCC, Local Normalized Cross-Correlation) processing can be used to calculate the alignment degree between the individual brain image I and the deformed template J. The calculation formula is as follows:

[0081] ;

[0082] Among them, I and J represent two images for which the similarity needs to be calculated. In this embodiment, I represents the image obtained by deforming the first brain template or the second brain template onto the individual image, and J represents the individual image. Indicates that the coordinate x is in the three-dimensional image domain In Indicates the position in the local window centered at x. Here, x represents the position of each voxel in the three-dimensional image. is the window size. Preferably, ; Indicates the voxel value of image I at the coordinate, Indicates the voxel value of image J at the coordinate; Indicates the mean value of all voxel values of image I within this local window, Indicates the mean value of all voxel values of image J within this local window. It is known that the function for calculating the LNCC loss is , and the dots in the formula represent any two images or templates for which the alignment degree needs to be calculated. For example, calculating the loss between I and J can be expressed as: . During the model training stage, it is used to measure the deviation between the deformed first brain template UT and the deformed second brain template ST and the three-dimensional individual brain image . Among them, represents the i-th individual image in the population group with attribute k. For the regularization term R(·), the expression of the regularization term R(·) is as follows:

[0083] ;

[0084] Among them, p represents the voxel, is the deformation space, u represents the spatial displacement, and the deformation field , is the average displacement. , , respectively represent the coefficient terms of the regularization term R. The first term will encourage small deformations in the entire dataset, while the second term and the third term promote smooth and small individual deformations. For the first brain template UT, the composite deformation field has the same regularization objective. In addition, to reduce the potential risk that the learning of the first brain template UT may reduce the quality of the second brain template ST, the StopGrad mechanism can be used to truncate the backpropagation of the gradient related to the second deformation field.

[0085] In this embodiment, in order to make full use of the cross-queue information in the target population to enhance the specificity of a specific template, a contrast template learning mechanism is adopted. That is, the three-dimensional individual brain images of each individual attribute and the second brain template are subjected to contrast learning by the contrast template learning sub-model, so as to learn the features of other individual attributes except any one individual attribute. Adding the contrast template learning sub-model to the template registration model, the pre-constructed template registration model obtained includes the contrast template learning sub-model and the diffeomorphic integration sub-model. The three-dimensional individual brain images of each individual attribute and the second brain template are used as the input data of the contrast template learning sub-model. By performing contrast learning on the three-dimensional individual brain images of each individual attribute and the second brain template, the velocity field corresponding to each individual attribute is obtained. Furthermore, the velocity field corresponding to each individual attribute is integrated by the diffeomorphic integration sub-model, so as to obtain the second deformation field corresponding to each individual attribute. During the process of contrast template learning, according to different individual attributes, the three-dimensional individual brain images of each individual attribute and the second brain template input are divided into positive samples and negative samples. Exemplarily, if any one individual attribute is selected as a positive sample, then all samples with the same individual attribute as the positive sample are positive samples, and vice versa. The contrast template learning sub-model includes an encoder and a decoder. The encoder extracts features from each positive sample and each negative sample respectively, obtaining the feature vectors corresponding to each positive sample and each negative sample respectively. Furthermore, the contrast learning loss function of the positive / negative sample pair is determined according to the feature vectors corresponding to each positive sample and each negative sample respectively. Preferably, before determining the contrast learning loss function, the obtained feature vectors can be normalized to obtain the normalized feature vectors corresponding to each positive sample and each negative sample respectively, and the contrast learning loss function is determined according to the normalized feature vectors The expression of

[0086] ;

[0087] where the basic formula of sim in the formula is: is the cosine similarity calculation formula between the feature vectors z1 and z2, and the similarity between is calculated using the sim formula, as well as the similarity between ; respectively represent the normalized feature vectors corresponding to the brain template and the three-dimensional individual brain image in the positive sample, For the three-dimensional individual brain image in the negative sample, M is the index set of samples in each batch of training data, i and j represent index values, and τ is the temperature hyperparameter. The final CTL loss is calculated for each (i, j) pair in all batches. When the template is morphologically more similar to the individual images with the same attributes and less similar to other images, the function value is lower. Finally, through backpropagation, it is used to encourage the second generation model to generate a second brain template with higher specificity.

[0088] S160. For any individual attribute, the first brain template is distorted based on the first deformation field and the second deformation field corresponding to the individual attribute to obtain a first floating image, and the second brain template is distorted based on the second deformation field corresponding to the individual attribute to obtain a second floating image.

[0089] Among them, the floating image can be specifically understood as being aligned with the brain template through the non-linear transformation of the deformation field to form spatially consistent brain image data. The first floating image is specifically used to represent the floating image corresponding to the first brain template, and the second floating image specifically represents the floating image of the second brain template.

[0090] In this embodiment, for any individual attribute, the first brain template is subjected to composite deformation processing through the first deformation field and the second deformation field corresponding to each individual attribute, that is, the first brain template is distorted through the first deformation field and the second deformation field to obtain the first floating image corresponding to the first brain template, and the second brain template is deformed through the second deformation field corresponding to each individual attribute to obtain the second floating image corresponding to the second brain template. It realizes the use of the first deformation field to use the second brain template as a bridge for registration with the three-dimensional individual brain image. Once the second brain template and the three-dimensional individual brain image are unbiasedly registered through the second deformation field, the first brain template can be easily aligned with the three-dimensional individual brain image after the composite deformation processing of the first deformation field and the second deformation field.

[0091] In this embodiment, the combination of the obtained first deformation field and the second deformation field forms a conversion path from the first brain template to the three-dimensional individual image, which helps to realize the joint learning and construction of the first brain template and the second brain template, and improves the efficiency of training the brain template construction model.

[0092] S170. Determine the target loss function based on the first floating image, the second floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image corresponding to each individual attribute, adjust the parameters of the first generation model and the second generation model based on the target loss function, and continue to train using the second batch of training data until the training end condition is reached to obtain the trained first generation model and the trained second generation model.

[0093] Specifically, call the preset loss function algorithm, and introduce the first floating image, the second floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image corresponding to each individual attribute into the preset loss function algorithm to obtain the target loss function. Determine the gradient data corresponding to the model adjustment parameters in the first generation model and the second generation model according to the target loss function, adjust the model parameters in the first generation model and the second generation model according to the obtained gradient data, and then continue to train the brain template construction model with adjusted parameters according to the first batch of training data until after all batches of training data are trained, determine the trained first generation model and the trained second generation model.

[0094] In this embodiment, determining the target loss function through the obtained multi-dimensional data, and then adjusting the model parameters of the first generation model and the second generation model according to the target loss function helps to improve the efficiency and comprehensiveness of model parameter adjustment, and thus helps to improve the efficiency and accuracy of training the brain template construction model.

[0095] Optionally, determining the target loss function based on the first floating image, the second floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image corresponding to each individual attribute includes: for any individual attribute, determining a first loss function based on the first floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image of the individual attribute, where the first loss function includes a first template similarity metric and a first template regularization term; determining a second loss function based on the second floating image, the second deformation field, and the three-dimensional individual brain image of the individual attribute, where the second loss function includes a second template similarity metric, a second template regularization term, and a contrastive learning loss term; determining the target loss function based on the first loss function and the second loss function.

[0096] Among them, the target loss function consists of two main parts: one for the first brain template learning and the other for the second brain template learning. Each part includes a similarity metric and a regularization term; the similarity metric is used to encourage the unbiasedness of the template, and the regularization term constrains the size and smoothness of the deformation field. In addition, the learning part of the second brain template also includes a contrastive learning loss function , which is used to enhance the specificity of the second brain template. That is, the first loss function includes a first template similarity metric and a first template regularization term, and the second loss function includes a second template similarity metric, a second template regularization term, and a contrastive learning loss term.

[0097] Determine the first template similarity metric according to the first floating image and the three-dimensional individual brain image corresponding to each individual attribute, which is used to detect the alignment degree between the first floating image and the three-dimensional individual image. Determine the first template regularization term according to the first deformation field and the second deformation field. The first loss function The formula is as follows:

[0098] ;

[0099] Wherein, , respectively represent the coefficient terms of the first loss function; represents the first template similarity metric, UT represents the first brain template, represents the first deformation field, represents the second deformation field, represents the first floating image corresponding to the first brain template, " " represents a spatial distortion operation, represents the i-th three-dimensional individual brain image corresponding to k individual attributes, and R is a regularization term used to penalize non-smoothness and large deformations.

[0100] Determine the second template similarity metric according to the second floating image and the three-dimensional individual brain image corresponding to each individual attribute, which is used to detect the alignment degree between the second floating image and the three-dimensional individual image. Determine the second template regularization term according to the second deformation field. Based on the second template similarity metric, the second template regularization term, and the contrast learning loss term, determine the second loss function. The formula of the second loss function is as follows:

[0101] ;

[0102] Wherein, , and respectively represent the coefficient terms of the second loss function, represents the second template similarity metric, represents the second brain template corresponding to k individual attributes, represents the second floating image, represents the second template regularization term, represents the contrast learning loss term.

[0103] Sum the first loss function and the second loss function to obtain the target loss function. The formula of the target loss function is as follows:

[0104] .

[0105] Optionally, the method further includes: calling a discriminator, inputting the first brain template, the second brain template, and the three-dimensional individual brain image into the discriminator to obtain a discrimination result; determining a third loss function based on the discrimination result and the three-dimensional individual brain image, and adding the third loss function to the target loss function to update the target loss function.

[0106] Based on the above embodiments, it can be understood that this solution adopts the combination of "using a specific template as a learning bridge" (SpecificTemplate As Bridges Learning, STABLE) and the contrastive template learning mechanism CTL (ContrastiveTemplate Learning) to perform optimal template learning. On this basis, a discriminator can be added for authenticity constraints to discriminate and process the first brain template, the second brain template, and the three-dimensional individual brain image. By invoking the discriminator, the first brain template, the second brain template, and the three-dimensional individual brain image are input into the discriminator. Specifically, the first brain template and the three-dimensional individual brain image are used as a set of input data, and the second brain template and the three-dimensional individual brain image are used as another set of input data, so as to obtain the discrimination results corresponding to the first brain template and the second brain template respectively. The loss function is determined according to the discrimination results and the corresponding real samples, that is, the third loss function is determined according to the discrimination results and the three-dimensional individual brain image. Exemplarily, the third loss function is expressed as follows:

[0107] ;

[0108] The obtained third loss function is added to the target loss function to update the target loss function. The updated target loss function is:

[0109] ;

[0110] In this embodiment, during the learning process of the first generated template and the second generated template, a discriminator can be flexibly added as an authenticity constraint, and at the same time, a corresponding loss function is constructed to adjust the model parameters of each generation model, so as to further improve the efficiency and accuracy of the brain template construction model learning.

[0111] Exemplarily, such as Figure 2Schematic diagram of the structure of a brain template construction model learning framework, including a brain template construction model, a registration module, and a deformation module. Among them, the brain template construction model includes a first generation model and a second generation model. The first generation model includes a residual data determination sub-model and a feature fusion sub-model. The residual data determination sub-model transmits the determined residual data to the feature fusion sub-model, which is used to perform feature fusion on the residual data and the corresponding full three-dimensional global feature image to obtain a first brain template and transmit it to the deformation module. The second generation model includes a feature extraction sub-model, a specific brain template determination sub-model, and a first deformation field determination sub-model. The feature extraction sub-model extracts features of individual attributes to obtain feature data corresponding to the individual attributes, and transmits the feature data corresponding to the individual attributes to the specific brain template determination sub-model and the first deformation field determination sub-model respectively. The specific brain template determination sub-model outputs a second brain template, and the first deformation field determination sub-model outputs a first deformation field. Then, the output second brain templates corresponding to each individual attribute are transmitted to the registration model, and the first deformation field is also transmitted to the deformation module for deformation processing through the first brain template distortion processing sub-module in the deformation module. For the registration module, the output values of the three-dimensional individual brain images corresponding to each individual attribute are also transmitted to the registration module. The CTL module in the registration module compares and learns the received individual attributes and the corresponding three-dimensional individual brain images corresponding to each individual attribute to obtain a velocity field corresponding to each individual attribute. Then, the second deformation field determination sub-model processes the velocity field to obtain a second deformation field corresponding to each individual attribute, and transmits the second deformation field to the deformation module for deforming the first brain template and the second brain template to obtain a first floating image and a second floating image corresponding to each individual attribute. After obtaining the first floating image and the second floating image corresponding to each individual attribute, the loss data for the current training is determined according to the pre-constructed target loss function, and the loss data is backpropagated. The learning machines in each model / module determine the corresponding gradient information according to the corresponding loss function, and then adjust the model parameters of each sub-model in the model according to the gradient information corresponding to each model / module. After training multiple batches of training data, the trained first generation model and second generation model are obtained. In the actual application process, the corresponding input data can be processed according to the first generation model and the second generation model, and the first brain template and the second brain template can be generated simultaneously. The obtained second brain template also has strong specificity, improving the efficiency of brain template construction.

[0112] The technical solution of this embodiment trains the first generation model and the second generation model in the brain template construction model according to the three-dimensional global feature image and multiple three-dimensional individual brain images and corresponding individual attributes in multiple batches of training data. Through the first generation model, a first brain template is generated based on the three-dimensional global feature image, and by learning the global feature information corresponding to the group, it is used to generate the first brain template; each individual attribute in each batch of training data is respectively input into the second generation model to obtain a second brain template and a first deformation field corresponding to each individual attribute, and by learning the individual attributes, a second brain template corresponding to the individual attributes is obtained; through the registration process of the second brain template and the three-dimensional individual brain image, a second deformation field corresponding to each individual attribute is obtained. By registering the second brain template corresponding to the individual attribute and the brain image, a deformation field corresponding to the individual attribute can be obtained, which can be used to connect the first brain template and the second brain template, so that the first brain template and the second brain template can be constructed simultaneously in one learning process, reducing the consumption of computing resources and computing time for brain template construction; for any individual attribute, the first brain template is distorted based on the first deformation field and the second deformation field corresponding to the individual attribute to obtain a first floating image, and the second brain template is distorted based on the second deformation field corresponding to the individual attribute to obtain a second floating image. By distorting the second brain template and the second brain template through the obtained deformation field to obtain the corresponding floating image, it can be used to determine the corresponding loss function in the subsequent process, which is used to adjust the corresponding deformation field and improve the accuracy of the deformation field; based on the first floating image, the second floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image corresponding to each individual attribute, a target loss function is determined, and based on the target loss function, the parameters of the first generation model and the second generation model are adjusted, and the second batch of training data is used to continue training until the training end condition is reached, and the trained first generation model and the trained second generation model are obtained. It realizes determining the target loss function based on multiple brain templates and multiple images and using it to adjust the parameters of the two generation models to obtain a model that can simultaneously determine two brain templates, solves the problems of insufficient comprehensive evaluation of brain template specificity and low efficiency of brain template construction, and improves the efficiency of determining brain templates.

[0113] Embodiment 2

[0114] Figure 3 FIG. is a flowchart of a brain template construction method provided by the second embodiment of the present invention. This embodiment is applicable to the situation of constructing a brain template. This method can be executed by a brain template construction device, which can be implemented in the form of hardware and / or software, and the brain template construction device can be configured in electronic devices such as computers and servers. As Figure 3 shown, the method includes:

[0115] S310. Obtain the individual attributes of the target object.

[0116] Among them, the target object specifically refers to the object for which a brain template needs to be constructed, which can be any person who needs to construct a brain template. The individual attributes specifically represent the characteristic information of the individual. Exemplarily, they can be the age, gender, or pathological state of the target object.

[0117] Specifically, the attribute information to be concerned can be determined according to the brain template construction requirements, and the individual attributes of the target object can be obtained by matching the concerned attribute information in the personal information corresponding to the target object. Alternatively, the individual attributes corresponding to the target object can be input through an external device.

[0118] S320. Invoke the trained brain template construction model, which includes a first generation model and a second generation model.

[0119] Specifically, the corresponding trained brain template construction model can be matched and invoked according to the brain template construction requirements and the individual attribute information of the target object, that is, invoke the trained first generation model and the trained second generation model.

[0120] S330. Obtain the three-dimensional global feature image corresponding to the brain template construction model, and generate the global brain template corresponding to the target object through the first generation model based on the three-dimensional global feature image.

[0121] Specifically, after obtaining the individual attributes of the target object, when invoking the trained brain template construction model, it should be noted that during the application of the trained brain template construction model, the three-dimensional global feature image required is still the three-dimensional global feature image used during the training of the brain template construction model, that is, the three-dimensional global feature image used during the training can be extracted simultaneously when invoking the trained brain template construction model. The obtained three-dimensional global feature image is used as the initial feature information of the first generation model, and the three-dimensional global feature image is processed through the first generation model to generate the global brain template corresponding to the target object.

[0122] In this embodiment, by processing the three-dimensional global feature image through the first generation model in the trained brain template construction model, the global brain template corresponding to the target object can be quickly obtained. Without inputting too much information, the global brain template corresponding to the target object can be obtained, making the process of determining the global brain template simple and improving the efficiency and applicability of determining the global brain template.

[0123] S340. Generate the specific brain template corresponding to the target object through the second generation model based on the individual attributes of the target object and the three-dimensional global feature image.

[0124] Specifically, the individual attributes of the target object are used as the input data of the second generation model, and the three-dimensional global feature image is used as the initial feature information of the second generation model. The second generation model learns the individual attribute information and combines the three-dimensional global feature image at the same time to generate a specific brain template corresponding to the target object.

[0125] In this embodiment, the trained second generation model processes the individual attributes of the target object and the three-dimensional global feature image. On the basis of the three-dimensional global feature image, the feature information of the individual attributes is also learned, thereby improving the specificity of the specific brain template.

[0126] The technical solution of this embodiment includes obtaining the individual attributes of the target object; calling the trained brain template construction model, which includes a first generation model and a second generation model; obtaining the three-dimensional global feature image corresponding to the brain template construction model, and generating a global brain template corresponding to the target object through the first generation model based on the three-dimensional global feature image; generating a specific brain template corresponding to the target object through the second generation model based on the individual attributes of the target object and the three-dimensional global feature image. This solution realizes that through the first generation model and the second generation model of the trained brain template construction model, based on the individual attributes of the target object and the three-dimensional global feature image, the global brain template and the specific brain template with strong specificity can be determined simultaneously, solves the problems of insufficient comprehensive evaluation of brain template specificity and low brain template construction efficiency, improves the efficiency of determining the brain template, and improves the specificity of the specific brain template.

[0127] Embodiment III

[0128] Figure 4 It is a schematic structural diagram of a brain template construction model training device provided in Embodiment III of the present invention. As Figure 4 shown, the device includes:

[0129] A training data determination module 410, configured to determine a three-dimensional global feature image and multiple batches of training data based on a three-dimensional brain image data set of a target population, where each batch of training data includes at least two three-dimensional individual brain images and the individual attributes corresponding to each three-dimensional individual brain image;

[0130] A brain template construction model acquisition module 420, configured to acquire a first brain template construction model, where the first brain template construction model includes a first generation model and a second generation model;

[0131] A first brain template determination module 430, configured to generate a first brain template through the first generation model based on the three-dimensional global feature image;

[0132] The second brain template and first deformation field determination module 440 is configured to, for the first batch of training data, input each individual attribute in the first batch of training data into the second generation model respectively, and obtain a second brain template and a first deformation field corresponding to each individual attribute respectively;

[0133] The second deformation field determination module 450 is configured to obtain a second deformation field corresponding to each individual attribute by performing registration processing on the second brain template and the three-dimensional individual brain image;

[0134] The floating image determination module 460 is configured to, for any individual attribute, perform warping processing on the first brain template based on the first deformation field and the second deformation field corresponding to the individual attribute to obtain a first floating image, and perform warping processing on the second brain template based on the second deformation field corresponding to the individual attribute to obtain a second floating image;

[0135] The model parameter adjustment module 470 is configured to determine a target loss function based on the first floating image, the second floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image corresponding to each individual attribute, adjust the parameters of the first generation model and the second generation model based on the target loss function, and continue training using the second batch of training data until the training end condition is reached to obtain a trained first generation model and a trained second generation model.

[0136] In the technical solution of this embodiment, a three-dimensional global feature image and multiple batches of training data are determined by a training data determination module based on a three-dimensional brain image data set of a target population. Each batch of training data includes at least two three-dimensional individual brain images and individual attributes corresponding to each three-dimensional individual brain image; a brain template construction model acquisition module acquires a first brain template construction model, and the first brain template construction model includes a first generation model and a second generation model; a first brain template determination module generates a first brain template based on the three-dimensional global feature image through the first generation model; for the first batch of training data, a second brain template and a first deformation field determination module inputs each individual attribute in the first batch of training data into the second generation model respectively to obtain a second brain template and a first deformation field corresponding to each individual attribute respectively; a second deformation field determination module obtains a second deformation field corresponding to each individual attribute through registration processing of the second brain template and the three-dimensional individual brain image; for any individual attribute, a floating image determination module performs a distortion process on the first brain template based on the first deformation field and the second deformation field corresponding to the individual attribute to obtain a first floating image, and performs a distortion process on the second brain template based on the second deformation field corresponding to the individual attribute to obtain a second floating image; a model parameter adjustment module determines a target loss function based on the first floating image, the second floating image, the first deformation field, the second deformation field and the three-dimensional individual brain image corresponding to each individual attribute, adjusts the parameters of the first generation model and the second generation model based on the target loss function, and continues training using the second batch of training data until the training end condition is reached to obtain a trained first generation model and a trained second generation model. This solution realizes the joint training of the first generation model and the second generation model through multiple batches of training data, learns the three-dimensional global feature image, multiple three-dimensional individual brain images and corresponding individual attributes to obtain corresponding first and second brain templates, and performs registration processing on the second brain template corresponding to the individual attribute and the three-dimensional individual brain image to obtain a deformation field corresponding to the individual attribute for realizing the alignment process between the first brain template and the three-dimensional individual brain image, which helps to complete the simultaneous learning and construction of the first brain template and the second brain template in one learning process, reduces the consumption of computing resources and computing time for brain template construction, and can be used to determine the corresponding loss function for subsequent adjustment of the corresponding deformation field to improve the accuracy of the deformation field by obtaining the corresponding floating images after performing distortion processing on the second brain template and the second brain template through the obtained deformation field, realizes determining the target loss function based on multiple brain templates and multiple images and using it to adjust the parameters of the two generation models to obtain a model that can simultaneously determine two types of brain templates, solves the problems of insufficient comprehensive evaluation of brain template specificity and low efficiency of brain template construction, and improves the efficiency of determining brain templates.

[0137] Based on the above embodiments, optionally, the training data determination module 410 is specifically configured to obtain a set of three-dimensional individual brain images corresponding to a target population, perform an average calculation on the three-dimensional individual brain images in the set of three-dimensional individual brain images to obtain a three-dimensional average image, and determine the three-dimensional average image as a three-dimensional global feature image; sample in the three-dimensional brain image data set of the target population according to a preset sampling condition to obtain multiple batches of training data that meet the preset batch quantity, where the preset sampling condition includes batch size data and individual attribute limitation conditions in each batch of training data.

[0138] Optionally, the first generation model includes a residual data determination sub-model and a feature fusion sub-model; the first brain template determination module 430 is specifically configured to, including: determining global residual data based on the three-dimensional global feature image through the residual data determination sub-model; performing feature fusion on the global residual data and the three-dimensional global feature image through the feature fusion sub-model to obtain a first brain template.

[0139] Optionally, the second generation model includes a feature extraction sub-model, a specific brain template determination sub-model, and a deformation field determination sub-model; the second brain template and the first deformation field determination module; the second brain template and the first deformation field determination module 440 is specifically configured to, for any individual attribute, input the individual attribute into the feature extraction sub-model to obtain an individual attribute feature vector; process the individual attribute feature vector through the specific brain template determination sub-model to obtain a second brain template corresponding to each individual attribute, and process the individual attribute feature vector through the deformation field determination sub-model to obtain a first deformation field corresponding to each individual attribute.

[0140] Optionally, the model parameter adjustment module 470 is specifically configured to, for any individual attribute, determine a first loss function based on the first floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image of the individual attribute, where the first loss function includes a first template similarity metric and a first template regularization term; determine a second loss function based on the second floating image, the second deformation field, and the three-dimensional individual brain image of the individual attribute, where the second loss function includes a second template similarity metric, a second template regularization term, and a contrastive learning loss term; determine a target loss function based on the first loss function and the second loss function.

[0141] Optionally, the device is further specifically configured to call a discriminator, input the first brain template, the second brain template, and the three-dimensional individual brain image into the discriminator to obtain a discrimination result;

[0142] Determine a third loss function based on the discrimination result and the three-dimensional individual brain image, and add the third loss function to the target loss function to update the target loss function.

[0143] The brain template construction model training device provided by the embodiments of the present invention can execute the brain template construction model training method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.

[0144] Embodiment 4

[0145] Figure 5 is a schematic structural diagram of a brain template construction device provided by Embodiment 4 of the present invention. As Figure 5 shown, the device includes:

[0146] An individual attribute acquisition module 510, configured to acquire the individual attributes of a target object;

[0147] A brain template construction model invocation module 520, configured to invoke a trained brain template construction model, where the brain template construction model includes a first generation model and a second generation model;

[0148] A global brain template determination module 530, configured to obtain a three-dimensional global feature image corresponding to the brain template construction model, and generate a global brain template corresponding to the target object based on the three-dimensional global feature image through the first generation model;

[0149] A specific brain template determination module 540, configured to generate a specific brain template corresponding to the target object based on the individual attributes of the target object and the three-dimensional global feature image through the second generation model.

[0150] The technical solution of this embodiment obtains the individual attributes of the target object through the individual attribute acquisition module; the brain template construction model invocation module invokes the trained brain template construction model, where the brain template construction model includes a first generation model and a second generation model; the global brain template determination module obtains the three-dimensional global feature image corresponding to the brain template construction model, and generates a global brain template corresponding to the target object based on the three-dimensional global feature image through the first generation model; the specific brain template determination module generates a specific brain template corresponding to the target object based on the individual attributes of the target object and the three-dimensional global feature image through the second generation model. This solution realizes that through the first generation model and the second generation model of the trained brain template construction model, based on the individual attributes of the target object and the three-dimensional global feature image, the global brain template and the specific brain template with strong specificity can be determined simultaneously, solves the problems of insufficient comprehensive evaluation of the specificity of the brain template and low efficiency of brain template construction, improves the efficiency of determining the brain template, and improves the specificity of the specific brain template.

[0151] Embodiment 5

[0152] Figure 6It is a schematic structural diagram of an electronic device provided in Embodiment 5 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0153] As Figure 6 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0154] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0155] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the brain template construction model training method.

[0156] In some embodiments, the method for training a brain template construction model can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for training a brain template construction model described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for training a brain template construction model by any other suitable means (e.g., by means of firmware).

[0157] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0158] The computer program for implementing the method for training a brain template construction model of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0159] Embodiment Six

[0160] Embodiment Six of the present invention further provides a computer-readable storage medium storing computer instructions for causing a processor to execute a method for training a brain template construction model, the method including:

[0161] Determine a three-dimensional global feature image and multiple batches of training data based on a three-dimensional brain image data set of a target group, where each batch of training data includes at least two three-dimensional individual brain images and the individual attributes corresponding to each three-dimensional individual brain image;

[0162] Obtain a first brain template construction model, which includes a first generation model and a second generation model;

[0163] Generate a first brain template based on the three-dimensional global feature image through the first generation model;

[0164] For the first batch of training data, input each individual attribute in the first batch of training data into the second generation model respectively to obtain a second brain template and a first deformation field corresponding to each individual attribute;

[0165] Through the registration process of the second brain template and the three-dimensional individual brain image, obtain the second deformation field corresponding to each individual attribute;

[0166] For any individual attribute, perform a warping process on the first brain template based on the first deformation field and the second deformation field corresponding to the individual attribute to obtain a first floating image, and perform a warping process on the second brain template based on the second deformation field corresponding to the individual attribute to obtain a second floating image;

[0167] Determine a target loss function based on the first floating image, the second floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image corresponding to each individual attribute, adjust the parameters of the first generation model and the second generation model based on the target loss function, and continue the training using the second batch of training data until the training end condition is reached to obtain a trained first generation model and a trained second generation model.

[0168] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0169] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0170] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0171] A computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0172] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.

[0173] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for training a brain template construction model, characterized in that, Including: Determining a three-dimensional global feature image and multiple batches of training data based on a set of three-dimensional brain image data of a target group, wherein each batch of the training data includes at least two three-dimensional individual brain images and individual attributes corresponding to each of the three-dimensional individual brain images; Obtaining a first brain template construction model, where the first brain template construction model includes a first generation model and a second generation model; Generating a first brain template based on the three-dimensional global feature image through the first generation model; For the first batch of training data, inputting each of the individual attributes in the first batch of training data into the second generation model respectively to obtain a second brain template and a first deformation field corresponding to each of the individual attributes; Through performing registration processing on the second brain template and the three-dimensional individual brain image, obtaining a second deformation field corresponding to each of the individual attributes; For any individual attribute, performing a distortion process on the first brain template based on the first deformation field and the second deformation field corresponding to the individual attribute to obtain a first floating image, and performing a distortion process on the second brain template based on the second deformation field corresponding to the individual attribute to obtain a second floating image; Determining a target loss function based on the first floating images, second floating images, first deformation fields, second deformation fields and three-dimensional individual brain images corresponding to each of the individual attributes, adjusting the parameters of the first generation model and the second generation model based on the target loss function, and continuing to train using the second batch of training data until the training end condition is reached to obtain a trained first generation model and a trained second generation model.

2. The method according to claim 1, wherein The determining the three-dimensional global feature image and multiple batches of training data based on the set of three-dimensional brain image data of the target group includes: Obtaining a set of three-dimensional individual brain images corresponding to the target group, performing an average calculation on the three-dimensional individual brain images in the set of three-dimensional individual brain images to obtain a three-dimensional average image, and determining the three-dimensional average image as the three-dimensional global feature image; Sampling in the set of three-dimensional brain image data of the target group according to a preset sampling condition to obtain multiple batches of training data that meet a preset batch quantity, wherein the preset sampling condition includes batch size data and individual attribute limitation conditions in each batch of training data.

3. The method according to claim 1, wherein The first generation model includes a residual data determination sub-model and a feature fusion sub-model; The generating the first brain template based on the three-dimensional global feature image through the first generation model includes: Determining global residual data based on the three-dimensional global feature image through the residual data determination sub-model; Performing feature fusion on the global residual data and the three-dimensional global feature image based on the feature fusion sub-model to obtain the first brain template.

4. The method according to claim 1, wherein The second generation model includes a feature extraction sub-model, a specific brain template determination sub-model and a deformation field determination sub-model; The inputting each of the individual attributes in the first batch of training data into the second generation model respectively to obtain a second brain template and a first deformation field corresponding to each of the individual attributes includes: For any individual attribute, input the individual attribute into the feature extraction sub-model to obtain an individual attribute feature vector; Process the individual attribute feature vector through the specific brain template determination sub-model to obtain a second brain template corresponding to each individual attribute, and process the individual attribute feature vector through the deformation field determination sub-model to obtain a first deformation field corresponding to each individual attribute.

5. The method according to claim 1, wherein The determination of the target loss function based on the first floating image, second floating image, first deformation field, second deformation field, and three-dimensional individual brain image corresponding to each individual attribute includes: For any individual attribute, determine a first loss function based on the first floating image, first deformation field, second deformation field, and three-dimensional individual brain image of the individual attribute, where the first loss function includes a first template similarity metric and a first template regularization term; Determine a second loss function based on the second floating image, second deformation field, and three-dimensional individual brain image of the individual attribute, where the second loss function includes a second template similarity metric, a second template regularization term, and a contrastive learning loss term; Determine the target loss function based on the first loss function and the second loss function.

6. The method according to claim 5, wherein The method further includes: Invoke a discriminator, input the first brain template, the second brain template, and the three-dimensional individual brain image into the discriminator to obtain a discrimination result; Determine a third loss function based on the discrimination result and the three-dimensional individual brain image, and add the third loss function to the target loss function to update the target loss function.

7. A method for constructing a brain template, characterized in that, Includes: Obtain the individual attributes of the target object; Invoke a trained brain template construction model, where the brain template construction model includes a first generation model and a second generation model; Obtain the three-dimensional global feature image corresponding to the brain template construction model, and generate the global brain template corresponding to the target object based on the three-dimensional global feature image through the first generation model; Generate the specific brain template corresponding to the target object based on the individual attributes of the target object and the three-dimensional global feature image through the second generation model.

8. A training device for a brain template construction model, characterized in that, Includes: A training data determination module, configured to determine a three-dimensional global feature image and multiple batches of training data based on a three-dimensional brain image data set of a target population, where each batch of training data includes at least two three-dimensional individual brain images and the individual attributes corresponding to each three-dimensional individual brain image; A brain template construction model acquisition module, configured to acquire a first brain template construction model, where the first brain template construction model includes a first generation model and a second generation model; A first brain template determination module, configured to generate a first brain template based on the three-dimensional global feature image through the first generation model; A second brain template and first deformation field determination module, configured to, for the first batch of training data, input each individual attribute in the first batch of training data into the second generation model to obtain a second brain template and a first deformation field corresponding to each individual attribute; A second deformation field determination module, configured to obtain a second deformation field corresponding to each of the individual attributes by performing registration processing on the second brain template and the three-dimensional individual brain image; A floating image determination module, configured to, for any individual attribute, perform a warping process on the first brain template based on the first deformation field and the second deformation field corresponding to the individual attribute to obtain a first floating image, and perform a warping process on the second brain template based on the second deformation field corresponding to the individual attribute to obtain a second floating image; A model parameter adjustment module, configured to determine a target loss function based on the first floating image, the second floating image, the first deformation field, the second deformation field, and the three-dimensional individual brain image corresponding to each of the individual attributes, adjust the parameters of the first generation model and the second generation model based on the target loss function, and continue training using the second batch of training data until the training end condition is reached to obtain a trained first generation model and a trained second generation model.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the brain template construction model training method according to any one of claims 1-6 or the brain template construction method according to claim 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the processor to implement the brain template construction model training method according to any one of claims 1-6 or the brain template construction method according to claim 7 when executed.

Citation Information

Patent Citations

  • Brain template generating method

    CN105212936A

  • Model training method, device and equipment and medium

    CN109447183A

  • Cross-modal medical image registration method and device based on cyclic regular training

    CN111862175A

  • Machine learning model training method and device, machine learning model data processing method and device and medium

    CN116542341A

  • MRI (Magnetic Resonance Imaging) cranial nerve image deformation registration system based on double-flow cross network

    CN117218166A