A brain template construction model training method, device and brain template construction method
By training the first generative model and the second generative model, combined with deformation field distortion processing and target loss function, the problems of incomplete and inefficient specificity evaluation in brain template construction are solved, and efficient brain template construction is achieved.
Patent Information
- Application Number
- CN202510725682.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-03
AI Technical Summary
Existing brain template construction methods have problems such as incomplete specificity evaluation and low construction efficiency, making it difficult to accurately represent the variability of individual brains.
By training the first generative model and the second generative model based on the three-dimensional brain image data set of the target group, the first brain template and the second brain template are generated, and the deformation field is used to perform distortion processing, and the parameters are adjusted in combination with the target loss function to achieve the joint learning and construction of multiple brain templates.
The specificity evaluation and construction efficiency of brain templates are improved, computing resources and time consumption are reduced, and efficient brain template construction is achieved.
Smart Images

Figure CN120259815B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a brain template construction model training method, device and brain template construction method. Background Art
[0002] In neuroimaging research, normalizing individual brain images to a brain template is a fundamental step that helps reduce anatomical variability between individuals, thereby facilitating comparisons of brain structure and function across populations. Conversely, brain templates can also transfer detailed atlas data (including structural, biochemical, functional, and vascular information) to individual brain images for personalized research. The current study constructed a universal template based on the entire dataset, enabling correspondence 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 universal template is difficult to accurately represent all individuals. The resulting evaluation of brain template specificity is not comprehensive enough. The construction of different brain templates is also achieved through independent construction programs and learning models, resulting in low efficiency in brain template construction. Summary of the Invention
[0004] The present invention provides a brain template construction model training method, device and brain template construction method to solve the problems of insufficiently comprehensive brain template specificity evaluation and low brain template construction efficiency.
[0005] According to one aspect of the present invention, a method for training a brain template construction model is provided, comprising:
[0006] Determining 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, wherein 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;
[0007] Acquire a first brain template construction model, where the first brain template construction model includes a first generation model and a second generation model;
[0008] generating a first brain template based on the three-dimensional global feature image through a first generative model;
[0009] For the first batch of training data, each body 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 body attribute;
[0010] By registering the second brain template and the three-dimensional individual brain image, a second deformation field corresponding to each individual attribute is obtained;
[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] A target loss function is determined 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. Parameters of the first generative model and the second generative model are adjusted based on the target loss function. Training is continued using the second batch of training data until the training end condition is met to obtain the trained first generative model and the trained second generative model.
[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 group, including: obtaining a three-dimensional individual brain image set corresponding to the target group, averaging the three-dimensional individual brain images in the three-dimensional individual brain image set to obtain a three-dimensional average image, and determining the three-dimensional average image as the three-dimensional global feature image; sampling the three-dimensional brain image data set of the target group according to preset sampling conditions to obtain multiple batches of training data that meet a preset batch quantity, wherein the preset sampling conditions include batch size data and individual attribute restriction conditions in each batch of training data.
[0014] Optionally, the first generation model includes a residual data determination submodel and a feature fusion submodel; generating a first brain template based on the three-dimensional global feature image through the first generation model, including: determining global residual data based on the three-dimensional global feature image through the residual data determination submodel; performing feature fusion on the global residual data and the three-dimensional global feature image based on the feature fusion submodel 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 body attribute in the first batch of training data is input into the second generation model respectively to obtain a second brain template and a first deformation field corresponding to each body attribute, 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 body attribute, and the individual attribute feature vector is processed by the deformation field determination sub-model to obtain a first deformation field corresponding to each body attribute.
[0016] Optionally, a target loss function is determined 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, including: for any individual attribute, a first loss function is determined 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, wherein the first loss function includes a first template similarity measure and a first template regularization term; a second loss function is determined based on the second floating image, the second deformation field and the three-dimensional individual brain image of the individual attribute, wherein the second loss function includes a second template similarity measure, a second template regularization term and a contrastive learning loss term; and a target loss function is determined based on the first loss function and the second loss function.
[0017] Optionally, the method also 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.
[0018] According to another aspect of the present invention, a method for constructing a brain template is provided, comprising:
[0019] Get individual attributes of the target object;
[0020] Calling a trained brain template construction model, where the brain template construction model includes a first generation model and a second generation model;
[0021] Acquire 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 using a first generation model;
[0022] Through the second generative model, a specific brain template corresponding to the target object is generated based on the individual attributes of the target object and the three-dimensional global feature image.
[0023] According to another aspect of the present invention, a brain template construction model training device is provided, comprising:
[0024] a training data determination module for determining 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, wherein 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;
[0025] A brain template construction model acquisition module is used 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;
[0026] A first brain template determination module is configured to generate a first brain template based on the three-dimensional global feature image using a first generation model;
[0027] A second brain template and first deformation field determination module is configured to input each body attribute in the first batch of training data into a second generation model to obtain a second brain template and a first deformation field corresponding to each body attribute;
[0028] A second deformation field determination module is used 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, distort a first brain template based on a first deformation field and a second deformation field corresponding to the individual attribute to obtain a first floating image, and distort a second brain template based on a second deformation field corresponding to the individual attribute to obtain a second floating image;
[0030] The model parameter adjustment module is used to 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 generative model and the second generative model based on the target loss function, and continue training using the second batch of training data until the training end condition is met to obtain the trained first generative model and the trained second generative model.
[0031] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0032] at least one processor; and
[0033] a memory communicatively connected to at least one processor; wherein,
[0034] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by 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, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement the brain template construction model training method or brain template construction method of any embodiment of the present invention when executed.
[0036] The technical solution of the embodiment of the present invention is to train the first generative model and the second generative 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, generate the first brain template based on the three-dimensional global feature image through the first generative model, and learn the global feature information corresponding to the group to generate the first brain template; input each individual attribute in each batch of training data into the second generative model respectively, obtain the second brain template and the first deformation field corresponding to each individual attribute respectively, and obtain the second brain template corresponding to the individual attribute by learning the individual attributes; obtain the second deformation field corresponding to each individual attribute by aligning the second brain template and the three-dimensional individual brain image, and obtain the deformation field corresponding to the individual attribute by aligning the second brain template corresponding to the individual attribute with the three-dimensional individual brain image, so as to realize the alignment between the first brain template and the three-dimensional individual brain image, which helps to complete the learning and construction of the first brain template and the second brain template at the same time in one learning process, thereby reducing the consumption of computing resources and computing time for brain template construction; for any individual Attributes, the first brain template is distorted based on the first deformation field and the second deformation field corresponding to the individual attributes to obtain a first floating image, and the second brain template is distorted based on the second deformation field corresponding to the individual attributes to obtain a second floating image. The second brain template is distorted by the obtained deformation field to obtain a corresponding floating image, which can be used to subsequently determine the corresponding loss function and adjust the corresponding deformation field to improve the accuracy of the deformation field; the target loss function is determined 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, and the parameters of the first generative model and the second generative model are adjusted based on the target loss function. The training is continued using the second batch of training data until the training end condition is met to obtain the trained first generative model and the trained second generative model. The target loss function is determined based on multiple brain templates and multiple images and is used to adjust the parameters of the two generative models to obtain a model that can simultaneously determine the two brain templates, thereby solving the problems of insufficiently 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 section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 This is a flowchart of a brain template construction model training method provided in Example 1 of the present invention;
[0040] Figure 2 Schematic diagram of a brain template construction model learning framework applicable to an embodiment of the present invention;
[0041] Figure 3 This is a flow chart of a method for constructing a brain template provided in Example 2 of the present invention;
[0042] Figure 4 This is a structural diagram of a brain template construction model training device provided by the third embodiment of the present invention;
[0043] Figure 5 This is a schematic structural diagram of a brain template construction device provided by the fourth embodiment of the present invention;
[0044] Figure 6 It is a structural diagram of an electronic device for implementing the brain template construction model training method of an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0046] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0047] Example 1
[0048] Figure 1 This is a flowchart of a brain template construction model training method provided by the first embodiment of the present invention. This embodiment is applicable to the case where a brain template construction model is trained. The 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. Figure 1 As shown, the method includes:
[0049] S110 , determining a three-dimensional global feature image and multiple batches of training data based on the three-dimensional brain image data set of the target group, wherein 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.
[0050] Specifically, the target group can be understood as the specific research subjects for whom a brain template needs to be constructed. The determination of the target group requires combining medical research objectives with data science methods, achieving precise positioning through a multi-dimensional screening and dynamic verification process. A three-dimensional brain image data set specifically refers to a collection of multiple brain image data selected based on specific screening criteria for the target group. These criteria can be set based on different research needs and include, but are not limited to, age, pathological status, and gender. A three-dimensional global feature image can be understood as an image representing the global characteristics of the target group. The three-dimensional global feature image corresponding to the target group can be obtained by linearly averaging the brain image data in the three-dimensional brain image data set for the target group. Multiple batches of training data can be obtained by partitioning the three-dimensional brain image data set based on model training requirements. 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. To enable learning of multiple individual attribute characteristics during the training 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 identical. Individual attributes represent characteristic information about an individual. They can be continuous or categorical variables, and can be represented by continuous natural numbers. The individual characteristics to be studied can be set based on the specific research needs of the individual brain template. Individual characteristics include, but are not limited to, age and gender. For example, if the individual's age is 20, the corresponding individual attribute can be set to 20.
[0051] Specifically, a target group can be determined based on the requirements for constructing a brain template. Specific screening criteria corresponding to the target group can then be obtained and matched against a brain image database to obtain multiple sets of 3D brain image data that meet the specific screening criteria, forming a 3D brain image data set for the target object. Alternatively, a corresponding 3D brain image data set can be retrieved from a preset storage space or server based on the target group. The 3D brain image data set can then be divided to obtain multiple batches of training data. Each batch of training data includes at least two 3D individual brain images and the individual attributes corresponding to each 3D individual brain image. The individual attributes in each batch of training data are not identical, enabling the learning of characteristics from multiple individual attributes during the training process of each batch of training data.
[0052] 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 group, including: obtaining a three-dimensional individual brain image set corresponding to the target group, averaging the three-dimensional individual brain images in the three-dimensional individual brain image set to obtain a three-dimensional average image, and determining the three-dimensional average image as the three-dimensional global feature image; sampling the three-dimensional brain image data set of the target group according to preset sampling conditions to obtain multiple batches of training data that meet a preset batch quantity, wherein the preset sampling conditions include batch size data and individual attribute restriction conditions in each batch of training data.
[0053] Specifically, after obtaining a set of three-dimensional individual brain images corresponding to the target population, the pixel values of each pixel in the three-dimensional individual brain images in the set are averaged to obtain an average pixel value for each pixel. A corresponding three-dimensional average image is constructed from the average pixel values of each pixel, and the obtained three-dimensional average image is determined as the three-dimensional global feature image. Preset sampling conditions are read from the configuration information, and sampling processing is performed on the three-dimensional brain image data set of the target population according to the preset sampling conditions to obtain multiple batches of training data that meet a preset batch size. The preset sampling conditions include, but are not limited to, batch size data and individual attribute constraints within each batch of training data. It should be noted that the batch size data specifically refers to the amount of data in each batch of training data. Preferably, the batch size data is at least two samples, each sample including one three-dimensional individual image data and corresponding individual attributes. The individual attribute constraints within each batch of training data specifically refer to the individual attributes within each batch of training data including at least two individual attributes, i.e., the individual attributes within each batch of training data are not completely identical. The preset batch size is specifically determined based on the sample size in the three-dimensional brain image data set. It can be understood that the batch size data can be pre-set based on hardware resources and learning objectives, that is, the batch size data is known data, and the sample size in the three-dimensional brain image data set is also known data. Therefore, the value of the preset batch size can be determined based on the sample size and batch size data in the three-dimensional brain image data set.
[0054] S120: Acquire a first brain template construction model, where the first brain template construction model includes a first generation model and a second generation model.
[0055] 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 generative model and a second generative model. The first generative model is used to learn the three-dimensional global feature image to determine the first brain template, and the second generative model is used to learn the individual feature information to determine the second brain template. The first generative model and the second generative model can be expressed as:
[0056] ;
[0057] ;
[0058] Among them, UT represents the first generation model, ST represents the second generation model, represents the model parameters of the first generative model, represents the model parameters of the second generative model, in and in The model parameters used to distinguish the two generative models, k represents the individual attributes input to the second generative model.
[0059] Specifically, the first generation model UT and the second generation model ST are selected according to the brain template construction requirements to construct the corresponding first brain template construction model for subsequent model training.
[0060] S130 , generating a first brain template based on the three-dimensional global feature image using a 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 and obtaining the corresponding brain template.
[0062] Specifically, the three-dimensional global feature image is used as initial feature data of the first generation model, and global feature learning is performed on the three-dimensional global feature image through the first generation model to generate a corresponding first brain template.
[0063] Optionally, a first brain template is generated based on the three-dimensional global feature image through a first generation model, including: determining a sub-model through residual data, and determining global residual data based on the three-dimensional global feature image; and performing feature fusion on the global residual data and the three-dimensional global feature image based on a feature fusion sub-model to obtain the first brain template.
[0064] In this embodiment, the first generative model includes a residual data determination submodel and a feature fusion submodel. The 3D global feature image serves as the initial feature data for the first generative model. This 3D global feature image can be used as input data for the residual data determination submodel. The residual data determination submodel adjusts the pixel values of each pixel in the 3D global feature image to obtain intensity residual data corresponding to the 3D global feature image. Furthermore, the intensity residual data and the 3D global feature image are input into the feature fusion submodel, which performs feature fusion processing to obtain the first brain template.
[0065] In this embodiment, global feature learning is performed on the three-dimensional global feature image through the first generation model to obtain the corresponding first brain template, which is used for subsequent training of the second generation model, thereby helping to achieve joint learning of different brain templates to improve the efficiency and accuracy of brain template construction model training.
[0066] S140 . For the first batch of training data, input each body 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 body attribute.
[0067] Among them, the first batch of training data specifically refers to the first batch of training data used for model training from multiple batches of training data, and has no other special meaning. Any batch of training data from 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 obtaining a corresponding brain template with specificity. The deformation field is a mathematical model that describes the spatial transformation of an image in medical image analysis. It is a vector field that describes the deformation of an object in image registration or physical simulation, and is used to achieve mapping processing 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 by the trained first deformation field, so that the similarity between the deformed brain template and the second brain template meets the similarity requirements, 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 body attribute in the first batch of training data is input into the second generation model. The second generation model is used to perform feature learning on each body attribute, thereby obtaining the second brain template and the first deformation field corresponding to each body attribute.
[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; each body attribute in the first batch of training data is input into the second generation model respectively to obtain a second brain template and a first deformation field corresponding to each body attribute, 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 body attribute, and the individual attribute feature vector is processed by the deformation field determination sub-model to obtain a first deformation field corresponding to each body attribute.
[0070] The feature extraction submodel is a network-based model for extracting features from individual attributes. It can be constructed from 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 submodel processes the individual attribute features extracted by the feature extraction submodel to obtain a corresponding specific brain template, i.e., the second brain template. The specific brain template determination submodel can be constructed from a residual determination model and a feature fusion model. The deformation field determination submodel processes the individual attribute features extracted by the feature extraction submodel to obtain a corresponding deformation field, i.e., the first deformation field. The deformation field determination submodel can be constructed from a velocity field determination model and a diffeomorphic integral model.
[0071] Specifically, each individual attribute in the first batch of training data is simultaneously input into the feature extraction sub-model, and feature extraction is performed on each individual attribute to obtain the individual attribute feature vector corresponding to each individual attribute; the individual attribute feature vector is respectively transmitted to the specific brain template determination sub-model and the deformation field determination sub-model, and the individual attribute feature vector is processed by the specific brain template determination sub-model to obtain the second brain template corresponding to each individual attribute, and the individual attribute feature vector is processed by the deformation field determination sub-model to obtain the first deformation field corresponding to each individual attribute.
[0072] In a specific embodiment, the feature extraction submodel is constructed from 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 submodel is constructed from a residual determination model and a feature fusion model. The deformation field determination submodel is constructed from a velocity field determination model and a diffeomorphic integral model. Individual attributes from the first batch of training data are simultaneously input into the feature extraction submodel. The MLP layer extracts features from each individual attribute, determines a shared embedding from the individual attributes, and then scales and offsets the shared embedding through the FiLM layer. This process learns parameters from the individual attributes, enabling feature-level adaptive transformation and better utilizing them to improve model performance. The output of the FiLM layer is then applied to the parameter input layer, multiple residual layers, and multiple convolutional blocks, enabling adjustments at each layer. This allows the generator to better handle changing datasets and generate more appropriate templates. The parameter input layer, multiple residual layers, and multiple convolutional blocks sequentially transmit data. The features output by the convolutional blocks in the final layer are determined as individual attribute feature vectors corresponding to each individual attribute. The individual attribute feature vectors are transmitted to a specific brain template determination sub-model. The individual attribute features are processed by a residual determination model within the specific brain template determination sub-model to obtain corresponding residual data. The residual data is then added to a three-dimensional global feature image. The residual data and the three-dimensional global feature image are fused using a feature fusion model to obtain a second brain template. The individual attribute feature vectors are transmitted to a deformation field determination sub-model. The individual attribute features are processed by a velocity field determination model within the deformation field determination sub-model to obtain a corresponding velocity field. The velocity field is then integrated using a diffeomorphic integral model to obtain a specific deformation field, i.e., the first deformation field. Preferably, after obtaining the velocity field corresponding to each individual attribute, the velocity field is processed using a SoftSign activation function and scaled by a constant factor b = 100 to ensure that the velocity field is confined to the range [-b, b] and accommodates large deformations.
[0073] In this embodiment, the individual attributes are processed by the second generative model to obtain the second brain template and the first deformation field corresponding to each individual attribute, thereby realizing a generative model that can simultaneously generate the second brain template and the first deformation field, thereby improving the efficiency of model training.
[0074] S150 , obtaining 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.
[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. If the accuracy of the second deformation field is high, the second brain template can be distorted by 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, a pre-built 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 to obtain the second deformation field corresponding to each individual attribute.
[0077] It is important to note that a consideration in constructing the brain template is the assumption of diffeomorphism. The reversibility and differentiability of diffeomorphic deformations ensure that the topological structure is preserved. The registration model can be parameterized using an SVF (Static Velocity Field). 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, which is obtained by calculating the steady-state velocity field v through differential equations. " represents a space distortion operation. The initial condition , the deformation field at the initial moment of 0 is the unit displacement, ensuring that the deformation process starts from no deformation, and the subsequent deformation field is gradually generated by integrating the velocity field, t is time. Integrate to obtain the final deformation field Then, use (Right now and ) and the spatial transformer to deform the brain template into the corresponding individual image space.
[0080] In order to measure the similarity in the space of individual brain images, the squared local normalized cross-correlation (LNCC) processing can be used to calculate the degree of alignment between the individual brain image I and the deformed template J. The calculation formula is as follows:
[0081] ;
[0082] Wherein, I and J represent two images whose similarity needs to be calculated. In this embodiment, I represents the image of the first brain template or the second brain template deformed onto the individual image, and J represents the individual image. Indicates that the coordinate x is in the three-dimensional image domain middle, Represents x as the center The position in the local window, where x represents the position of each voxel in the three-dimensional image, is the window size, preferably, ; Indicates that image I is The voxel value of the coordinate, Indicates that image J is The voxel value of the coordinate; represents the mean value of all voxel values of image I in the local window, Represents the mean of all voxel values in the local window of image J. It is known that the function for calculating LNCC loss is , the points in the formula represent any two images or templates that need to calculate the degree of alignment. For example, the loss of calculating I and J can be expressed as: In the model training phase, the first brain template UT and the second brain template ST after deformation are used to measure the three-dimensional individual brain image. The deviation between represents the i-th individual image in the population group with attribute k. For the regularization term R(·), the regularization term R(·) is expressed as follows:
[0083] ;
[0084] Where p represents a voxel, is the deformation space, u represents the spatial displacement, and the deformation field , is the mean displacement. , , Respectively represent the coefficient terms of the regularization term R, the first term will encourage small deformations throughout the dataset, while the second and the third It promotes smooth and small individual deformation. Regularize the first brain template UT, and the composite deformation field In addition, to reduce the potential risk that the UT learning of the first brain template may degrade the quality of the second brain template ST, a StopGrad mechanism can be used to truncate the back propagation of the gradient associated with the second deformation field.
[0085] In this embodiment, to fully leverage cross-cohort information within the target population and enhance the specificity of a specific template, a contrastive template learning mechanism is employed. Specifically, a contrastive template learning sub-model performs contrastive learning on the 3D brain images of individuals with each individual attribute and a second brain template, thereby learning features of individual attributes other than any single individual attribute. The contrastive template learning sub-model is added to the template registration model. The resulting pre-constructed template registration model includes a contrastive template learning sub-model and a diffeomorphic integral sub-model. The contrastive template learning sub-model uses the 3D brain images of individuals with each individual attribute and the second brain template as input data. By contrastive learning of the 3D brain images of individuals with each individual attribute and the second brain template, a velocity field corresponding to each individual attribute is obtained. The diffeomorphic integral sub-model then integrates the velocity field corresponding to each individual attribute to obtain a second deformation field corresponding to each individual attribute. During the contrastive template learning process, the input 3D brain images of individuals with each individual attribute and the second brain template are divided into positive and negative samples based on the different individual attributes. For example, if any individual attribute is selected as a positive sample, samples with the same individual attribute as the positive sample are all positive samples; otherwise, they are negative samples. The contrastive template learning sub-model includes an encoder and a decoder. The encoder extracts features from each positive sample and each negative sample respectively to obtain feature vectors corresponding to each positive sample and each negative sample respectively. Then, the contrastive 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 contrastive learning loss function, the obtained feature vectors can be normalized to obtain normalized feature vectors corresponding to each positive sample and each negative sample respectively. The contrastive learning loss function is determined according to the normalized feature vectors. The expression is as follows:
[0086] ;
[0087] Among them, the basic formula of sim in the formula is: It is the cosine similarity calculation formula between feature vectors z1 and z2, calculated using the sim formula The similarity between 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, is a 3D individual brain image from the negative sample, M is the index set of samples in each batch of training data, i and j represent the index value, and τ is a temperature hyperparameter. The final CTL loss is calculated for each (i, j) pair across all batches. The function has a lower value when the template is morphologically more similar to individual images with the same attributes and less similar to other images. Finally, through backpropagation, it is used to encourage the second generative model to generate a second brain template with higher specificity.
[0088] S160. For any individual attribute, distort 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; distort the second brain template 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 nonlinear transformation of the deformation field to form spatially consistent brain imaging 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, a composite deformation process is performed on the first brain template using the first and second deformation fields corresponding to each individual attribute. Specifically, the first brain template is distorted using the first and second deformation fields to obtain a first floating image corresponding to the first brain template, and the second brain template is deformed using the second deformation field corresponding to each individual attribute to obtain a second floating image corresponding to the second brain template. This utilizes the first deformation field to bridge the gap between the second brain template and the 3D individual brain image. Once the second brain template and the 3D individual brain image have achieved unbiased registration using the second deformation field, the first brain template can be easily aligned with the 3D individual brain image through the composite deformation process using the first and second deformation fields.
[0091] In this embodiment, a conversion path from the first brain template to the three-dimensional individual image is formed by combining the obtained first deformation field and the second deformation field, which helps to achieve the joint learning and construction of the first brain template and the second brain template, and improves the efficiency of brain template construction model training.
[0092] S170. 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 parameters of the first generative model and the second generative model based on the target loss function, and continue training using the second batch of training data until the training end condition is met to obtain the trained first generative model and the trained second generative model.
[0093] Specifically, a preset loss function algorithm is invoked to 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, thereby obtaining a target loss function. Based on the target loss function, gradient data corresponding to each model adjustment parameter in the first and second generative models is determined. Based on the obtained gradient data, each model parameter in the first and second generative models is adjusted. The brain template construction model with adjusted parameters is then continuously trained using the first batch of training data until all batches of training data have been trained, and the trained first and second generative models are determined.
[0094] In this embodiment, the target loss function is determined by the obtained multi-dimensional data, and then the model parameters of the first generation model and the second generation model are adjusted according to the target loss function, which helps to improve the efficiency and comprehensiveness of the model parameter adjustment, thereby helping to improve the efficiency and accuracy of brain template construction model training.
[0095] Optionally, a target loss function is determined 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, including: for any individual attribute, a first loss function is determined 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, wherein the first loss function includes a first template similarity measure and a first template regularization term; a second loss function is determined based on the second floating image, the second deformation field and the three-dimensional individual brain image of the individual attribute, wherein the second loss function includes a second template similarity measure, a second template regularization term and a contrastive learning loss term; and a target loss function is determined based on the first loss function and the second loss function.
[0096] The objective loss function consists of two main parts: one for learning the first brain template and the other for learning the second brain template. 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 , used to enhance the specificity of the second brain template. That is, the first loss function includes a first template similarity measure and a first template regularization term, and the second loss function includes a second template similarity measure, a second template regularization term, and a contrastive learning loss term.
[0097] A first template similarity metric is determined based on the first floating image and the three-dimensional individual brain image corresponding to each individual attribute, and is used to detect the degree of alignment between the first floating image and the three-dimensional individual image. A first template regularization term is determined based on the first deformation field and the second deformation field. A first loss function is used to determine the first template similarity metric. The formula is as follows:
[0098] ;
[0099] in, , Respectively represent the coefficient terms of the first loss function; Characterize the first template similarity measure, UT characterizes the first brain template, represents the first deformation field, represents the second deformation field, Characterizing the first floating image corresponding to the first brain template, " represents a space distortion operation, represents the i-th 3D brain image of the individual corresponding to k individual attributes, and R is a regularization term used to penalize non-smoothness and large deformation.
[0100] A second template similarity metric is determined based on the second floating image and the three-dimensional individual brain image corresponding to each individual attribute, and is used to detect the degree of alignment between the second floating image and the three-dimensional individual image. A second template regularization term is determined based on the second deformation field. A second loss function is determined based on the second template similarity metric, the second template regularization term, and the contrastive learning loss term. The second loss function The formula is as follows:
[0101] ;
[0102] in, 、 and Respectively represent the coefficient terms of the second loss function, Characterize the second template similarity metric, Characterize the second brain template corresponding to the attributes of k individuals, characterizes the second floating image, Characterizes the second template regularization term, Represents the contrastive learning loss term.
[0103] The target loss function is obtained by summing the first loss function and the second loss function. The formula is as follows:
[0104] .
[0105] Optionally, the method also 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 "Specific Template As Bridges Learning" (STABLE) and contrastive template learning mechanism CTL (Contrastive Template Learning) to perform optimal template learning. On this basis, a discriminator can be added for authenticity constraint to discriminate the first brain template, the second brain template and the three-dimensional individual brain image. By calling 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 result and the corresponding real sample, that is, the third loss function is determined according to the discrimination result and the three-dimensional individual brain image. For example, the third loss function The expression is 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 for:
[0109] ;
[0110] In this embodiment, in the process of learning the first generation template and the second generation template, a discriminator can be flexibly added as a authenticity constraint, and a corresponding loss function can be constructed to adjust the model parameters of each generation model, thereby further improving the efficiency and accuracy of brain template construction model learning.
[0111] For example, Figure 2The structural diagram of a brain template construction model learning framework shown in the figure includes 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 the 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 the second brain template, and the first deformation field determination sub-model outputs the second brain template. A first deformation field is output, and then the second brain template corresponding to each body attribute output is transmitted to the registration model, and the first deformation field is also transmitted to the deformation module, and deformation processing is performed through the first brain template distortion processing submodule in the deformation module; for the registration module, the three-dimensional individual brain image output value corresponding to each body attribute is also registered, and the CTL module in the registration module compares and learns the received body attributes and the corresponding three-dimensional individual brain image to obtain the velocity field corresponding to each body attribute, and then processes the velocity field through the second deformation field determination submodel to obtain the second deformation field corresponding to each body attribute, and transmits the second deformation field to the deformation module for deformation processing of the first brain template and the second brain template to obtain the first floating image and the second floating image corresponding to each body attribute. After obtaining the first and second floating images corresponding to each individual attribute, the loss data for the current training is determined based on a pre-constructed target loss function. The loss data is then back-propagated, and the corresponding gradient information is determined by the learner in each model / module based on the corresponding loss function. The model parameters of each sub-model in the model are then adjusted based on the gradient information corresponding to each model / module. After training multiple batches of training data, a trained first generative model and a trained second generative model are obtained. In actual application, the corresponding input data can be processed according to the first and second generative models to simultaneously generate the first and second brain templates. The resulting second brain template also has strong specificity, improving the efficiency of brain template construction.
[0112] The technical solution of this embodiment is to train the first generative model and the second generative 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; generate the first brain template based on the three-dimensional global feature image through the first generative model, and learn the global feature information corresponding to the group to generate the first brain template; input each individual attribute in each batch of training data into the second generative model respectively, and obtain the second brain template and the first deformation field corresponding to each individual attribute; obtain the second brain template corresponding to the individual attribute by learning the individual attributes; obtain the second deformation field corresponding to each individual attribute by aligning the second brain template and the three-dimensional individual brain image; obtain the deformation field corresponding to the individual attribute by aligning the second brain template and the brain image corresponding to the individual attribute, 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, based on the individual attribute The first brain template is distorted by the corresponding first deformation field and the second deformation field to obtain a first floating image. The second brain template is distorted based on the second deformation field corresponding to the individual attribute to obtain a second floating image. The second brain template is distorted by the obtained deformation field and the corresponding floating image is obtained after the second brain template is distorted. The floating image can be used to subsequently determine the corresponding loss function and to adjust the corresponding deformation field to improve the accuracy of the deformation field. The target loss function is determined 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. The parameters of the first generative model and the second generative model are adjusted based on the target loss function. The training is continued using the second batch of training data until the training end condition is met to obtain the trained first generative model and the trained second generative model. The target loss function is determined based on multiple brain templates and multiple images and is used to adjust the parameters of the two generative models to obtain a model that can simultaneously determine the two brain templates. This solves the problems of insufficiently comprehensive evaluation of brain template specificity and low efficiency in brain template construction, and improves the efficiency of determining the brain template.
[0113] Example 2
[0114] Figure 3 This is a flowchart of a brain template construction method provided by the second embodiment of the present invention. This embodiment is applicable to the case of constructing a brain template. The method can be executed by a brain template construction device. The brain template construction device can be implemented in the form of hardware and / or software. The brain template construction device can be configured in electronic devices such as computers and servers. Figure 3 As shown, the method includes:
[0115] S310: Obtain individual attributes of the target object.
[0116] The target object specifically refers to the object for which a brain template needs to be constructed, and can be any person for whom a brain template needs to be constructed. The individual attribute specifically represents the characteristic information of the individual, and for example, can be the age, gender or pathological state of the target object.
[0117] Specifically, the attribute information that needs to be paid attention to can be determined according to the requirements of brain template construction, and the personal information corresponding to the target object can be matched according to the attribute information of interest to obtain the individual attributes of the target object. The individual attributes corresponding to the target object can also be input through an external device.
[0118] S320: Calling a trained brain template construction model, where the brain template construction model includes a first generation model and a second generation model.
[0119] Specifically, the corresponding trained brain template construction model can be matched and called according to the brain template construction requirements and the individual attribute information of the target object, that is, the trained first generation model and the trained second generation model can be called.
[0120] S330: Acquire 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 using a first generation model.
[0121] Specifically, after obtaining the individual attributes of the target object, the trained brain template construction model is called. It should be noted that during the application of the trained brain template construction model, the required 3D global feature image still uses the 3D global feature image used during the training of the brain template construction model. That is, the 3D global feature image used during the training process can be extracted at the same time as the trained brain template construction model is called. The obtained 3D global feature image is used as the initial feature information of the first generation model, and the 3D global feature image is processed by the first generation model to generate a global brain template corresponding to the target object.
[0122] In this embodiment, by processing the three-dimensional global feature image through the first generative model in the trained brain template construction model, the global brain template corresponding to the target object can be quickly obtained. The global brain template corresponding to the target object can be obtained without inputting too much information, which makes the processing process of determining the global brain template simple and improves the efficiency and applicability of determining the global brain template.
[0123] S340 , 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 a second generation model.
[0124] Specifically, the individual attributes of the target object are used as the input data of the second generative model, and the three-dimensional global feature image is used as the initial feature information of the second generative model. The individual attribute information is learned through the second generative model and combined with the three-dimensional global feature image to generate a specific brain template corresponding to the target object.
[0125] In this embodiment, the individual attributes and three-dimensional global feature image of the target object are processed by the trained second generative model. On the basis of the three-dimensional global feature image, the characteristic information of the individual attributes is also learned, thereby improving the specificity of the specific brain template.
[0126] The technical solution of this embodiment obtains the individual attributes of the target object; calls a trained brain template construction model, which includes a first generation model and a second generation model; obtains a 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 using the first generation model; and 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 using the second generation model. This solution uses the first generation model and the second generation model of the trained brain template construction model to simultaneously determine a global brain template and a specific brain template with strong specificity based on the individual attributes of the target object and the three-dimensional global feature image. This solves the problems of incomplete brain template specificity evaluation and low brain template construction efficiency, improves the efficiency of determining brain templates, and increases the specificity of specific brain templates.
[0127] Example 3
[0128] Figure 4 This is a schematic diagram of the structure of a brain template construction model training device provided by the third embodiment of the present invention. Figure 4 As shown, the device includes:
[0129] A training data determination module 410 is 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 group, wherein 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;
[0130] A brain template construction model acquisition module 420 is used 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 is configured to generate a first brain template based on the three-dimensional global feature image using a first generation model;
[0132] A second brain template and first deformation field determination module 440 is configured to input each body attribute in the first batch of training data into a second generation model to obtain a second brain template and a first deformation field corresponding to each body attribute;
[0133] A second deformation field determination module 450 is configured to obtain a second deformation field corresponding to each individual attribute by registering the second brain template with the three-dimensional individual brain image;
[0134] a floating image determination module 460 for, 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;
[0135] The model parameter adjustment module 470 is used to 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 generative model and the second generative model based on the target loss function, and continue training using the second batch of training data until the training end conditions are met to obtain the trained first generative model and the trained second generative model.
[0136] The technical solution of this embodiment is 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 group through a training data determination module, wherein 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; the 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; the first brain template determination module generates a first brain template based on the three-dimensional global feature image through the first generation model; the second brain template and first deformation field determination module inputs each body attribute in the first batch of training data into the second generation model for the first batch of training data, and obtains a second brain template and a first deformation field corresponding to each body attribute; the second deformation field determination module obtains a first brain template and a first deformation field corresponding to each body attribute through the first generation model; The second brain template and the three-dimensional individual brain image are aligned to obtain the second deformation field corresponding to each individual attribute; the floating image determination module distorts the first brain template based on the first deformation field and the second deformation field corresponding to the individual attribute for any individual attribute to obtain a first floating image, and distorts the second brain template based on the second deformation field corresponding to the individual attribute to obtain a second floating image; the model parameter adjustment module determines 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, adjusts the parameters of the first generative model and the second generative model based on the target loss function, and continues training using the second batch of training data until the training end condition is met to obtain the trained first generative model and the trained second generative model. This solution realizes the joint training of the first generative model and the second generative 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 the corresponding first brain template and second brain template, and aligns the second brain template corresponding to the individual attribute with the three-dimensional individual brain image to obtain the deformation field corresponding to the individual attribute, which is used to realize the alignment processing between the first brain template and the three-dimensional individual brain image, and helps to complete the simultaneous learning and construction of the first brain template and the second brain template in one learning process, thereby reducing the consumption of computing resources and computing time for brain template construction. The second brain template is distorted by the obtained deformation field to obtain the corresponding floating image, which can be used for subsequent determination of the corresponding loss function and for adjusting the corresponding deformation field to improve the accuracy of the deformation field. It realizes the determination of the target loss function based on multiple brain templates and multiple images and is used to adjust the parameters of the two generative models to obtain a model that can simultaneously determine the two brain templates, solves the problems of insufficiently 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 embodiment, optionally, the training data determination module 410 is specifically used to obtain a set of three-dimensional individual brain images corresponding to the target group, average the three-dimensional individual brain images in the three-dimensional individual brain image set to obtain a three-dimensional average image, and determine the three-dimensional average image as a three-dimensional global feature image; sample the three-dimensional brain image data set of the target group according to preset sampling conditions to obtain multiple batches of training data that meet a preset batch number, wherein the preset sampling conditions include batch size data and individual attribute restriction conditions in each batch of training data.
[0138] Optionally, the first generation model includes a residual data determination submodel and a feature fusion submodel; the first brain template determination module 430 is specifically used to: determine the global residual data based on the three-dimensional global feature image through the residual data determination submodel; and perform feature fusion on the global residual data and the three-dimensional global feature image based on the feature fusion submodel to obtain the 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; a second brain template and first deformation field determination module; a second brain template and first deformation field determination module 440, which is specifically used to input the individual attribute into the feature extraction sub-model for any individual attribute 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 used to determine, for any individual attribute, 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, wherein the first loss function includes a first template similarity measure 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, wherein the second loss function includes a second template similarity measure, a second template regularization term and a contrastive learning loss term; and 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, and obtain a discrimination result;
[0142] A third loss function is determined based on the discrimination result and the three-dimensional individual brain image, and the third loss function is added to the target loss function to update the target loss function.
[0143] The brain template construction model training device provided in the embodiment of the present invention can execute the brain template construction model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0144] Example 4
[0145] Figure 5 This is a schematic diagram of the structure of a brain template construction device provided by the fourth embodiment of the present invention. Figure 5 As shown, the device includes:
[0146] Individual attribute acquisition module 510, used to acquire individual attributes of the target object;
[0147] A brain template construction model calling module 520 is used to call 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 is 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 using a first generation model;
[0149] The specific brain template determination module 540 is 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 using a second generation model.
[0150] The technical solution of this embodiment is to obtain the individual attributes of the target object through the individual attribute acquisition module; the brain template construction model calling module calls the trained brain template construction model, and 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; and 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 the global brain template and the specific brain template with strong specificity can be simultaneously determined based on the individual attributes of the target object and the three-dimensional global feature image through the first generation model and the second generation model of the trained brain template construction model. This solves the problems of insufficiently comprehensive evaluation of brain template specificity and low efficiency of brain template construction, improves the efficiency of determining brain templates, and improves the specificity of specific brain templates.
[0151] Example 5
[0152] Figure 61 is a schematic diagram of the structure 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 may also represent various forms of mobile devices, such as personal digital assistants, 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] like Figure 6 As shown, electronic device 10 includes at least one processor 11 and memory, such as read-only memory (ROM) 12 and random access memory (RAM) 13, communicatively connected to at least one processor 11. The memory stores computer programs executable by the at least one processor. Processor 11 can perform various appropriate actions and processes based on the computer programs stored in ROM 12 or loaded from storage unit 18 into RAM 13. RAM 13 can also store various programs and data required for the operation of electronic device 10. Processor 11, ROM 12, and RAM 13 are interconnected via bus 14. An input / output (I / O) interface 15 is also connected to 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 disk, 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 via a computer network such as the Internet and / or various telecommunication networks.
[0155] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any other suitable processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as the brain template construction model training method.
[0156] In some embodiments, the brain template construction model training method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on 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 brain template construction model training method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the brain template construction model training method in any other appropriate manner (for example, by means of firmware).
[0157] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes 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 data and instructions to the storage system, the at least one input device, and the at least one output device.
[0158] The computer programs for implementing the brain template construction model training methods 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, so that when the computer programs are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs 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] Example 6
[0160] Embodiment 6 of the present invention further provides a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute a brain template construction model training method, the method comprising:
[0161] Determining 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, wherein 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;
[0162] Acquire a first brain template construction model, where the first brain template construction model includes a first generation model and a second generation model;
[0163] generating a first brain template based on the three-dimensional global feature image through a first generative model;
[0164] For the first batch of training data, each body 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 body attribute;
[0165] By registering the second brain template and the three-dimensional individual brain image, a second deformation field corresponding to each individual attribute is obtained;
[0166] 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;
[0167] A target loss function is determined 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. Parameters of the first generative model and the second generative model are adjusted based on the target loss function. Training is continued using the second batch of training data until the training end condition is met to obtain the trained first generative model and the trained second generative model.
[0168] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or apparatus. A computer-readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, 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 disk 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 that has: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types 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 that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0171] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0172] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed 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. This is not limited herein.
[0173] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A brain template construction model training method, characterized in that: include: Determining 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, wherein each batch of training data includes at least two three-dimensional individual brain images and individual attributes corresponding to the three-dimensional individual brain images; Acquire 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 using the first generation model; For the first batch of training data, each of the individual attributes in the first batch of training data is input into the second generation model to obtain a second brain template and a first deformation field corresponding to each of the individual attributes; Obtaining 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; For any individual attribute, the first brain template is distorted based on a first deformation field and a second deformation field corresponding to the individual attribute to obtain a first floating image, and the second brain template is distorted based on a second deformation field corresponding to the individual attribute to obtain a second floating image; 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 of the individual attributes, adjusting parameters of the first generative model and the second generative model based on the target loss function, and continuing training using the second batch of training data until a training end condition is met to obtain a trained first generative model and a trained second generative model; The first generation model includes a residual data determination sub-model and a feature fusion sub-model; and generating a first brain template based on the three-dimensional global feature image through the first generation model includes: Determine a sub-model using the residual data, and determine 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 based on the feature fusion sub-model to obtain the first brain template; The second generative model includes a feature extraction sub-model, a specific brain template determination sub-model, and a deformation field determination sub-model; each of the individual attributes in the first batch of training data is input into the second generative model to obtain a second brain template and a first deformation field corresponding to each individual attribute, including: For any individual attribute, input the individual attribute 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, 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.
2. The method according to claim 1, characterized in that The step of determining a three-dimensional global feature image and a plurality of batches of training data based on a three-dimensional brain image data set of a target group includes: obtaining a set of three-dimensional individual brain images corresponding to a 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 is performed in the three-dimensional brain image data set of the target group according to preset sampling conditions to obtain multiple batches of training data that meet a preset batch number, wherein the preset sampling conditions include batch size data and individual attribute restriction conditions in each batch of training data.
3. The method according to claim 1, characterized in that The determining of 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 of the individual attributes 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, wherein the first loss function includes a first template similarity measure and a first template regularization term; determining a second loss function based on the second floating image of the individual attribute, the second deformation field, and the three-dimensional individual brain image, wherein the second loss function includes a second template similarity measure, a second template regularization term, and a contrastive learning loss term; The target loss function is determined based on the first loss function and the second loss function.
4. The method according to claim 3, characterized in that The method further comprises: 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; A third loss function is determined based on the discrimination result and the three-dimensional individual brain image, and the third loss function is added to the target loss function to update the target loss function.
5. A method for constructing a brain template, characterized in that: include: Get individual attributes of the target object; Calling a trained brain template construction model, the brain template construction model comprising a first generation model and a second generation model, wherein the trained brain template construction model is trained based on the brain template construction model training method according to any one of claims 1 to 4; Acquire 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 using the first generation model; A specific brain template corresponding to the target object is generated based on the individual attributes of the target object and the three-dimensional global feature image through the second generation model.
6. A brain template construction model training device, characterized in that: include: a training data determination module, configured to determine a three-dimensional global feature image and a plurality of batches of training data based on a three-dimensional brain image data set of a target group, wherein each batch of training data includes at least two three-dimensional individual brain images and individual attributes corresponding to the three-dimensional individual brain images; a brain template construction model acquisition module, configured to acquire a first brain template construction model, wherein 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 using the first generation model; A second brain template and first deformation field determination module is configured to input each of the individual attributes 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 of the individual attributes; 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, distort the first brain template based on a first deformation field and a second deformation field corresponding to the individual attribute to obtain a first floating image, and distort the second brain template based on a 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 parameters of the first generative model and the second generative model based on the target loss function, and continue training using the second batch of training data until a training termination condition is met to obtain the trained first generative model and the trained second generative model; The first generation model includes a residual data determination submodel and a feature fusion submodel; the first brain template determination module is specifically configured to determine global residual data based on the three-dimensional global feature image using the residual data determination submodel; and perform feature fusion on the global residual data and the three-dimensional global feature image based on the feature fusion submodel to obtain the first brain template; 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 first deformation field determination module is specifically used to input the individual attribute into the feature extraction sub-model for any individual attribute 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, 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.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed 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 described in any one of claims 1-4 or the brain template construction method described in claim 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the brain template construction model training method described in any one of claims 1 to 4 or the brain template construction method described in claim 5 when executed.
Citation Information
Patent Citations
Model training method, device and equipment and medium
CN109447183A
MRI (Magnetic Resonance Imaging) cranial nerve image deformation registration system based on double-flow cross network
CN117218166A