Transcranial magnetic stimulation electric field rapid imaging method and model based on codec structure

Through the deep neural network model based on the codec structure combined with the finite element algorithm, the problem of lack of direction information and coil differences in the electric field distribution prediction in the prior art is solved, and the rapid imaging and evaluation of electric field under transcranial magnetic stimulation is achieved. It is suitable for Assisted diagnosis and evaluation of treatment processes.

CN114463493BActive Publication Date: 2024-11-12WUHAN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210055122.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-18
Publication Date
2024-11-12
Estimated Expiration
2042-01-18

AI Technical Summary

Technical Problem

When existing deep learning techniques predict electric field distribution under transcranial magnetic stimulation, they lack direction information, can only predict the electric field map of a specific coil, and fail to effectively consider the electric field distribution of other areas of the brain.

Method used

Using a deep neural network model based on a codec structure that combines multi-scale features, combined with finite element numerical algorithms and MRI data, a three-dimensional human brain structure diagram is constructed, and the model is trained to predict and evaluate the three-dimensional electric field distribution after transcranial magnetic stimulation, and the It is converted into two-dimensional data for brain surface imaging.

Benefits of technology

The rapid prediction and imaging of electric fields in different areas of the brain under transcranial magnetic stimulation is achieved, which shortens imaging time and provides a detailed evaluation of electric field distribution, suitable for the evaluation of auxiliary diagnosis and treatment processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114463493B_ABST
    Figure CN114463493B_ABST
Patent Text Reader

Abstract

The present invention provides a method and model for rapid imaging of the electric field of transcranial magnetic stimulation based on a codec structure, which fuses the structural prior of the human brain with a deep convolutional neural network. By building a deep neural network model based on a codec structure that fuses multi-scale features, the imaging time of the distribution of the electric field in the brain after transcranial magnetic stimulation is shortened, and the distribution of the electric field in different regions of the brain under transcranial magnetic stimulation is rapidly predicted, imaged in real time, and evaluated. The present invention can rapidly predict and image the electric field at different locations of the entire brain where the transcranial magnetic stimulation coil is placed, and can be applied to auxiliary diagnosis applications of transcranial magnetic stimulation. The present invention effectively extracts features from the input magnetic resonance image to assist doctors in evaluating the stimulation site and intensity during the transcranial magnetic stimulation treatment of patients.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of deep learning technology, and specifically relates to a transcranial magnetic stimulation electric field rapid imaging method and model based on a codec structure. Background Art

[0002] As the pace of life in today's society continues to accelerate, mental illness has replaced infectious diseases as the disease that threatens human life and consumes the most medical resources. The main manifestation of mental illness is abnormal brain function. Experiments have confirmed that magnetic stimulation can achieve the purpose of treating mental illness by affecting brain function. Transcranial Magnetic Stimulation is a treatment technology that stimulates specific brain areas by stimulating the brain nerves through the brain skull without attenuation through the magnetic signal generated by the coil. As a non-invasive neurostimulation technology, transcranial magnetic stimulation technology is often used in the clinic to treat mental illnesses such as depression, autism, and sleep disorders. By moving the magnetic coil in different areas, an electric field is generated to stimulate the nerves inside the brain, thereby achieving the purpose of treating mental illnesses.

[0003] In clinical practice, real-time visualization of the distribution of electric fields in various regions of the brain under transcranial magnetic stimulation can not only help doctors adjust the position and angle of the coil to stimulate the brain in a timely manner, but also help researchers in related brain science research to better understand the mechanism of treatment response. However, due to the complex structure of the human brain and the differences in the conductivity of different substances in the brain, effective prediction of electric field distribution has become a challenge in transcranial magnetic stimulation therapy. Recently, deep learning technology has been applied to predict the electric field induced by transcranial magnetic stimulation. This method can shorten the simulation time to much less than 1 second, significantly shortening the prediction time. However, there are three problems with this technology: First, it estimates the magnitude of the electric field without any information about the potential direction, which is useful for studying the effects of transcranial magnetic stimulation on axonal fiber bundles. Second, because the coil is placed near a small area around the motor cortex without examining the training and test data of other brain regions, this method can only predict the electric field. Third, the neural network predicts the electric field with only the position of the MRI and transcranial magnetic stimulation coils as input, ignoring the differences between coils. Therefore, the trained network is only suitable for predicting the electric field map of a specific coil. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method and model for rapid imaging of the electric field of transcranial magnetic stimulation based on a coding and decoding structure, which is used to rapidly predict the three-dimensional electric field under transcranial magnetic stimulation and to rapidly image and evaluate the surface of the brain.

[0005] The technical solution adopted by the present invention to solve the above technical problems is: a transcranial magnetic stimulation electric field rapid imaging method based on a codec structure, comprising the following steps:

[0006] S1: Establish a three-dimensional human brain structure map of the subject based on the human brain magnetic resonance image MRI; select a coil of a specific shape, collect the data generated by the electric field of the transcranial magnetic coil online, and calculate the electric field distribution of different areas in the human brain under the action of the coil through the finite element numerical algorithm;

[0007] S2: Based on the fast-operating convolutional neural network combined with the structural prior of the brain, a deep neural network model based on the encoding and decoding structure is constructed to fuse multi-scale features; let MS represent the final fused multi-scale features, Conv represent the convolution operation on the multi-scale features, Concatenate represent the concatenation of multi-scale features, f represent the scale transformation of features of different scales, and the transformed features are MS 1 , then the calculation formula of the deep neural network model is as follows:

[0008] MS=Conv(Concatenate(∑ n MS 1 +f(MS 2 )+…+f(MS n )));

[0009] The data obtained in step S1 is used to train a deep neural network model based on the fusion multi-scale features of the codec structure; the training is performed by minimizing the mean square error loss between the predicted electric field and the electric field obtained by the finite element algorithm; the deep neural network model is regarded as a nonlinear regression model, and the electric field distribution calculated by the finite element method is fitted by training the deep neural network model;

[0010] S3: The three-dimensional electric field data predicted by the deep neural network model based on the fusion of multi-scale features of the codec structure is converted into two-dimensional data, and projected onto the corresponding brain surface for display, so as to realize the rapid imaging of the electric field in different brain areas after transcranial magnetic stimulation; based on the distribution characteristics of the electric field in the brain and the output electric field evaluation index, the performance of the deep neural network model based on the fusion of multi-scale features of the codec structure is evaluated in real time in terms of prediction time and performance.

[0011] According to the above scheme, in step S1, the specific steps are:

[0012] S11: using two types of weighted brain magnetic resonance images (MRI) of T1 and T2 to segment the human brain tissue image of the subject, reconstruct the three-dimensional human brain structure image including brain white matter, brain gray matter, and cerebrospinal fluid of the subject, and generate a finite element mesh;

[0013] S12: Diffusion magnetic resonance images are used to obtain diffusion tensors through registration, the conductivity of different tissues in the human brain is calculated, and the conductivity tensor is constructed;

[0014] S13: Select different positions defined on the electroencephalogram in the three-dimensional human brain structure diagram, select coils of specific shapes and types, and use a finite element algorithm to calculate the three-dimensional data of the electric field distribution in different areas of the human brain under the action of the coils and the corresponding MRI magnetic resonance image data.

[0015] According to the above scheme, in the step S2, the encoding and decoding structure includes an encoding end and a decoding end; the encoding end is used to learn the characteristics of the input data, and the encoding end includes multiple groups of three-dimensional convolution operators, pooling operations, and nonlinear feature activation operations; the decoding end is used to quickly predict the distribution of the electric field in the three-dimensional human brain structure based on the learned characteristics, and the decoding end includes multiple groups of three-dimensional convolutions, three-dimensional transposed convolutions, feature fusion modules, and nonlinear feature activation operations; the decoding end and the encoding end are short jump connections for transmitting feature mapping.

[0016] According to the above scheme, in step S2, the specific steps of training the deep neural network model based on the codec structure fusion multi-scale features are:

[0017] S21: Initialize the weights of the deep neural network model;

[0018] S22: Use RAdam optimizer to train the deep neural network model, and set the hyperparameters to β 1 =0.9,β 2 =0.999, the initial learning rate is 0.002; the step learning rate strategy is adopted, and the initial value learning rate decays to 0.5 every 5 training cycles; the total parameter iteration update uses a small batch value of 4 for back propagation; the parameter iteration update is 25 training cycles, and each training cycle has 2×10 5 Iterations; the deep neural network model has a total of 31 convolutional layers.

[0019] According to the above scheme, in step S3, the trained model is used to extract features from the input magnetic resonance image and the magnetic field data generated by the coil, and the distribution of the electric field in the entire brain is output; let x represent the input image data, y represent the electric field distribution obtained based on the finite element algorithm, θ represent the training parameters in the deep neural network model, Net(x|θ) represents the electric field output predicted by the deep neural network model, then the training problem of the deep neural network model is converted into an optimization problem, and the calculation formula is as follows:

[0020]

[0021] Assume that EPD represents the maximum peak value in the predicted electric field, then the calculation formula for the electric field peak statistics is:

[0022] EPD=||Peak(E P )||;

[0023] Assume that Cos(θ) represents the cosine coefficient of the predicted electric field in the X and Y directions, then the calculation formula for the electric field direction statistics is:

[0024]

[0025] The calculation formula for predicting the electric field intensity distribution amplitude is:

[0026]

[0027] According to the above scheme, in step S3, the electric field evaluation indicators include peak signal-to-noise ratio, mean square error, peak maximum distance error, correlation coefficient, absolute error and electric field prediction time.

[0028] According to the above scheme, in step S3, the indicators used to evaluate the deep neural network model based on the codec structure integrating multi-scale features include target overlap coefficient TOC, electric field peak distance EPD, electric field similarity, mean absolute error MAE, mean relative error MRE, normalized root mean square error NRMSE and mean direction error MDE;

[0029] The target overlap coefficient TOC is the similarity coefficient DSC between the predicted electric field and the reference target area; the value of TOC is between 0 and 1, and the higher the TOC, the more similar the electric field distribution; let TP, FP and FN be the true positive, false positive and false negative between the predicted electric field and the reference electric field, respectively, then:

[0030]

[0031] The electric field peak distance EPD is the distance between the predicted peak and the reference electric field magnitude; the electric field peak distance EPD is calculated in volume and surface space respectively, and the formula is as follows:

[0032] EPD=||Peak(E P )-Peak(E R )||;

[0033] The electric field similarity is the correlation coefficient between the predicted magnitude and the reference electric field map; let ||E P || and ||E R || are the amplitudes of the predicted electric field and the reference electric field, respectively, then the electric field similarity is:

[0034]

[0035] The mean absolute error MAE is the absolute value of the difference between the predicted value and the reference value; the mean relative error MRE is the ratio of MAE to the reference electric field amplitude in the corresponding target area; MRE is only calculated in the target area to avoid singularity; let K be the number of vertices on the surface of the human brain, then:

[0036]

[0037]

[0038] The normalized root mean square error (NRMSE) is used to compare the vector electric field in volume space; let N be the number of voxels, and the NRMSE metric is calculated using the whole brain electric field and a target region containing 5% of the voxels near the peak of the reference electric field:

[0039]

[0040] The mean directional error (MDE) is the average directional error between the predicted electric field vector and the reference electric field vector in the reference target area. It is used to evaluate the angular accuracy of the predicted electric field map and calculates the average directional error of the whole brain electric field and the electric field around the target area:

[0041]

[0042] The deep neural network model of the transcranial magnetic stimulation electric field rapid imaging method based on the codec structure is a residual module and deep monitoring mechanism integrated into the standard codec deep network architecture in a multi-scale manner; it includes a human brain three-dimensional structure modeling module, a deep neural network electric field prediction module based on the codec structure, and an electric field three-dimensional brain surface imaging and electric field distribution index evaluation module.

[0043] A computer storage medium stores a computer program executable by a computer processor, wherein the computer program executes a transcranial magnetic stimulation electric field rapid imaging method based on a coding and decoding structure.

[0044] The beneficial effects of the present invention are:

[0045] 1. The method and model for rapid transcranial magnetic stimulation electric field imaging based on a codec structure of the present invention fuse the structural prior of the human brain with a deep convolutional neural network. By building a deep neural network model based on a codec structure that fuses multi-scale features, the imaging time of the electric field distribution in the brain after transcranial magnetic stimulation is shortened, and rapid prediction, real-time imaging and evaluation of the distribution of the electric field in different regions of the brain under transcranial magnetic stimulation are achieved.

[0046] 2. The present invention makes full use of the latest research results in computer vision, brain science and other related fields, and proposes a fast three-dimensional convolutional neural network architecture based on encoding and decoding, which can quickly predict and image the electric field at different locations of the entire brain where the transcranial magnetic stimulation coil is placed, and can be applied to auxiliary diagnosis applications of transcranial magnetic stimulation.

[0047] 3. The present invention aims at rapid imaging of electric fields on the surface of the brain. Based on deep learning technology, a system for rapid imaging and evaluation of electric fields under transcranial magnetic stimulation is proposed. By effectively extracting features from the input magnetic resonance images, it can assist doctors in evaluating the stimulation site and intensity during transcranial magnetic stimulation treatment of patients. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a functional block diagram of an embodiment of the present invention.

[0049] Figure 2 4 is a flowchart of reconstructing three-dimensional brain structure and training data according to an embodiment of the present invention.

[0050] Figure 3 It is a schematic diagram of a three-dimensional encoding and decoding deep neural network model according to an embodiment of the present invention.

[0051] Figure 4 Schematic diagram of electric field prediction under transcranial magnetic stimulation according to an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0053] See also Figure 1 , an embodiment of the present invention is based on a deep neural network that fuses multi-scale features based on a codec structure, and is used to quickly predict and image the electric field of transcranial magnetic stimulation. A new deep learning framework is proposed, so that the trained model can be used to predict the electric field of different types of coils. The core network architecture of the present invention integrates the residual module and the deep monitoring mechanism into the standard codec deep network architecture in a multi-scale manner to obtain better performance. Using different test data sets and different types of coils, a variety of evaluation indicators are used to detect the performance of the trained network model.

[0054] The embodiment of the present invention includes a human brain three-dimensional structure modeling module, a deep neural network electric field prediction module based on a codec structure, and an electric field three-dimensional brain surface imaging and electric field distribution index evaluation module;

[0055] The specific steps of the method for rapid transcranial magnetic stimulation electric field imaging based on the codec structure of the embodiment of the present invention are:

[0056] S1: Reconstruct a three-dimensional human brain structure map and obtain electric field distribution data through a finite element numerical algorithm; establish a three-dimensional human brain structure map of the subject based on the human brain magnetic resonance image MRI, mainly including the three-dimensional structural distribution of white matter, gray matter, cerebrospinal fluid, etc. Then select a coil of a specific shape. Based on the shape and type of the selected coil, use a finite element algorithm to calculate the electric field distribution in different areas of the human brain under the action of the selected coil;

[0057] S11: See Figure 2 The left side of the dotted box indicates the three-dimensional brain structure reconstruction and conductivity calculation; based on the weighted magnetic resonance images of the human brain magnetic resonance image MRI, the three-dimensional human brain structure map including brain white matter, brain gray matter, and cerebrospinal fluid of the tested person is reconstructed; three-dimensional reconstruction is performed using two types of weighted magnetic resonance brain images, T1 and T2;

[0058] S12: Calculation of electrical conductivity of different brain tissues using diffusion magnetic resonance imaging;

[0059] S13: See Figure 2 The right side of the dotted box indicates that different positions defined on the electroencephalogram are selected in the three-dimensional human brain structure diagram. By selecting coils of specific shapes and types, the finite element algorithm is used to calculate the three-dimensional data of the electric field distribution in different areas of the human brain under the action of the coils and the corresponding MRI magnetic resonance image data.

[0060] S2: See Figure 3 , based on the fast-operating convolutional neural network combined with the structural prior of the brain, a deep neural network model based on the encoder-decoder structure that integrates multi-scale features is constructed and trained; the black arrows in the figure represent the short-jump connections of the residual module, and the gray arrows represent the short-jump connections that pass the feature map of the decoder to the encoder. All the rectangles represent the feature maps extracted from the network, and the gray rectangles represent the multi-scale feature maps from the decoder;

[0061] S21: Build a deep neural network model based on the codec structure, and improve the training efficiency, prediction performance and generalization performance of the model by fusing features of different scales. The calculation formula of the codec structure is as follows:

[0062] MS=Conv(Concatenat(∑ n MS 1 +f(MS 2 )+…+f(MS n )))

[0063] In the formula, MS represents the final fused multi-scale features, Conv represents the convolution operation on the multi-scale features, Concatenate represents the concatenation of multi-scale features, f represents the scale transformation of features of different scales, and the transformed features are recorded as MS 1 .

[0064] The encoding end of the codec structure is used to learn the features of the input data, and the decoding end is used to quickly predict the distribution of the electric field in the three-dimensional brain structure based on the learned features; the encoding end includes multiple groups of three-dimensional convolution operators, pooling operations, and nonlinear feature activation operations; the decoding end includes multiple groups of three-dimensional convolutions, three-dimensional transposed convolutions, feature fusion modules, and nonlinear feature activation operations.

[0065] S22: Use the data obtained in step S1 to train the deep neural network based on encoding and decoding of three-dimensional convolution; the training is performed by minimizing the mean square error loss between the predicted electric field and the electric field obtained by the finite element algorithm. The network is regarded as a nonlinear regression model, and the model is trained to fit the electric field distribution calculated by the finite element method. The learning strategy of the network is as follows: first, the network weights are initialized using the proposed method; then the network is trained using the RAdam optimizer, and the hyperparameters are β and β. 1 =0.9,β 2 =0.999, the initial learning rate is 0.002; the step learning rate strategy is adopted, and the initial value learning rate decays to 0.5 every 5 training cycles; the total parameter iteration update uses a small batch value of 4 for back propagation; the parameter iteration update is 25 training cycles, and each training cycle has 2×10 5 Iterations; Figure 3 There are a total of 31 convolutional layers in the shown network.

[0066] S3: The three-dimensional electric field data predicted by the neural network model based on the codec structure is converted into two-dimensional data and projected onto the corresponding brain surface for display, so as to realize rapid imaging of the electric field in different brain areas after transcranial magnetic stimulation; based on the distribution characteristics of the electric field in the brain, the performance of the neural network model based on the codec structure in terms of prediction time and performance is evaluated in real time according to the output electric field evaluation indicators including peak signal-to-noise ratio, mean square error, peak maximum distance error, correlation coefficient, absolute error, and electric field prediction time.

[0067] The trained model is used to extract features from the input magnetic resonance images and the magnetic field data generated by the coil, and finally outputs the distribution of the electric field in the entire brain; since the value of the electric field is a continuous real number, the training of the electric field prediction network is converted into an optimization problem, and the calculation formula is as follows:

[0068]

[0069] In the above formula, x and y represent the input image data and the electric field distribution obtained based on the finite element algorithm, respectively, θ represents the training parameters in the network, and Net(x|θ) represents the electric field output predicted by the network.

[0070] The calculation formulas for calculating the electric field peak statistics, electric field direction statistics, and electric field intensity distribution amplitude are as follows:

[0071] EPD=||Peak(E P )||

[0072]

[0073]

[0074] Where EPD represents the maximum peak value in the predicted electric field, Cos(θ) represents the cosine coefficients of the predicted electric field in the X and Y directions, and ||E|| represents the amplitude of the predicted electric field intensity distribution.

[0075] In the evaluation model part, the present invention uses the following indicators to evaluate the performance of the neural network.

[0076] Target Overlap Coefficient (TOC): A major application of electric field simulation is to determine the best coil position on the scalp to optimally stimulate a given cortical target with transcranial magnetic stimulation. In order to compare the predicted E-field and the reference target area, their similarity coefficient (DSC) is calculated and named as the target overlap coefficient (TOC). From the following formula, we can see that the value of TOC is between 0 and 1, and the higher the TOC, the more similar the electric field distribution is. Among them, TP, FP and FN are the true positive, false positive and false negative between the predicted E-field and the reference E-field.

[0077]

[0078] Electric field peak distance (EPD): To further evaluate the performance of the predicted electric field map, the distance between the predicted peak and the reference electric field magnitude is also calculated. Similar to TOC, the E-field peak distance (EPD) is calculated in volume and surface space respectively, and the formula is as follows:

[0079] EPD=||Peak(E P )-Peak(E R )||.

[0080] Electric field similarity: The correlation coefficient between the predicted magnitude and the reference electric field map was calculated to evaluate their similarity. The electric field similarity score of the whole brain electric field magnitude was calculated using the following definition, where ||E P || and ||E R || are the amplitudes of the predicted electric field and the reference electric field, respectively.

[0081]

[0082] Mean absolute error (MAE) and mean relative error (MRE): The mean absolute error (MAE) is defined as the absolute value of the difference between the predicted value and the reference value. The mean relative error (MRE) is defined as the ratio of the MAE to the reference electric field amplitude in the corresponding target area. Here, when calculating the ratio, the MRE is calculated only in the target area to avoid singularities. The formula is K is the number of vertices on the brain surface:

[0083]

[0084]

[0085] Normalized Root Mean Square Error (NRMSE): To compare the vector E-fields in volumetric space, the NRMSE metric was calculated using the following formula; where N is the number of voxels, the NRMSE metric was calculated using the whole-brain E-field and a target region containing 5% of the voxels around the peak of the reference E-field:

[0086]

[0087] Mean Directional Error (MDE): The direction of the electric field vector is important for understanding the stimulation of white matter in TMS. To this end, the angular accuracy of the predicted E-field map was evaluated by calculating the mean directional error (MDE) between the predicted E-field vector and the reference E-field vector within the reference target region according to the following formula. Similar to the NRMSE measurement, this formula calculates the MDE of the whole brain electric field as well as the electric field around the target region:

[0088]

[0089] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.

Claims

1. A transcranial magnetic stimulation electric field rapid imaging method based on a codec structure, characterized in that: The following steps are involved: S1: Establish a three-dimensional human brain structure map of the subject based on the human brain magnetic resonance image MRI; select a coil of a specific shape, collect the data generated by the electric field of the transcranial magnetic coil online, and calculate the electric field distribution of different areas in the human brain under the action of the coil through the finite element numerical algorithm; S2: Based on the fast-operating convolutional neural network combined with the structural prior of the brain, a deep neural network model based on the encoding and decoding structure that integrates multi-scale features is constructed; let MS represent the final integrated multi-scale features, Conv represent the convolution operation on the multi-scale features, Concatenate represent the concatenation of multi-scale features, f represent the scale transformation of features of different scales, and the transformed feature is MS1, then the calculation formula of the deep neural network model is as follows: MS=Conv(Concatenate(Σ n MS1+f(MS2)+…+f(MS n ))); The data obtained in step S1 is used to train a deep neural network model based on the fusion multi-scale features of the codec structure; the training is performed by minimizing the mean square error loss between the predicted electric field and the electric field obtained by the finite element algorithm; the deep neural network model is regarded as a nonlinear regression model, and the electric field distribution calculated by the finite element method is fitted by training the deep neural network model; S3: The three-dimensional electric field data predicted by the deep neural network model based on the fusion of multi-scale features of the codec structure is converted into two-dimensional data, and projected onto the corresponding brain surface for display, so as to realize the rapid imaging of the electric field in different brain areas after transcranial magnetic stimulation; based on the distribution characteristics of the electric field in the brain and the output electric field evaluation index, the performance of the deep neural network model based on the fusion of multi-scale features of the codec structure is evaluated in real time in terms of prediction time and performance.

2. The method for rapid transcranial magnetic stimulation electric field imaging based on a codec structure according to claim 1, characterized in that: In the step S1, the specific steps are: S11: using two types of weighted brain magnetic resonance images (MRI) of T1 and T2 to segment the human brain tissue image of the subject, reconstruct the three-dimensional human brain structure image including brain white matter, brain gray matter, and cerebrospinal fluid of the subject, and generate a finite element mesh; S12: Diffusion magnetic resonance images are used to obtain diffusion tensors through registration, the conductivity of different tissues in the human brain is calculated, and the conductivity tensor is constructed; S13: Select different positions defined on the electroencephalogram in the three-dimensional human brain structure diagram, select coils of specific shapes and types, and use a finite element algorithm to calculate the three-dimensional data of the electric field distribution in different areas of the human brain under the action of the coils and the corresponding MRI magnetic resonance image data.

3. The method for rapid transcranial magnetic stimulation electric field imaging based on a codec structure according to claim 1, characterized in that: In the step S2, the encoding and decoding structure includes an encoding end and a decoding end; the encoding end is used to learn the characteristics of the input data, and the encoding end includes multiple groups of three-dimensional convolution operators, pooling operations, and nonlinear feature activation operations; The decoding end is used to quickly predict the distribution of the electric field in the three-dimensional human brain structure based on the learned features. The decoding end includes multiple groups of three-dimensional convolutions, three-dimensional transposed convolutions, feature fusion modules, and nonlinear feature activation operations. The decoding end and the encoding end are connected by short jumps to transfer feature mapping.

4. The method for rapid transcranial magnetic stimulation electric field imaging based on a codec structure according to claim 1, characterized in that: In step S2, the specific steps of training the deep neural network model based on the codec structure integrating multi-scale features are as follows: S21: Initialize the weights of the deep neural network model; S22: Use RAdam optimizer to train the deep neural network model, set the hyperparameters to β1=0.9, β2=0.999, and the initial learning rate to 0.002; adopt the step learning rate strategy, and the initial learning rate decays to 0.5 every 5 training cycles; The total parameter iteration update uses a back-propagation mini-batch value of 4; the parameter iteration update is 25 training cycles, each training cycle has 2×10 5 Iterations; the deep neural network model has a total of 31 convolutional layers.

5. The method for rapid transcranial magnetic stimulation electric field imaging based on a codec structure according to claim 1, characterized in that: In the step S3, The trained model is used to extract features from the input magnetic resonance images and the magnetic field data generated by the coil, and the distribution of the electric field in the entire brain is output; let x represent the input image data, y represent the electric field distribution obtained based on the finite element algorithm, θ represent the training parameters in the deep neural network model, Net(x|θ) represent the electric field output predicted by the deep neural network model, then the training problem of the deep neural network model is converted into an optimization problem, and the calculation formula is as follows: Assume that EPD represents the maximum peak value in the predicted electric field, then the calculation formula for the electric field peak statistics is: EPD=||Peak(E p )||; Assume that Cos(θ) represents the cosine coefficient of the predicted electric field in the X and Y directions, then the calculation formula for the electric field direction statistics is: The calculation formula for predicting the electric field intensity distribution amplitude is:

6. The method for rapid transcranial magnetic stimulation electric field imaging based on a codec structure according to claim 1, characterized in that: In step S3, the electric field evaluation indicators include peak signal-to-noise ratio, mean square error, peak maximum distance error, correlation coefficient, absolute error and electric field prediction time.

7. The method for rapid transcranial magnetic stimulation electric field imaging based on a codec structure according to claim 1, characterized in that: In the step S3, the indicators used to evaluate the deep neural network model based on the codec structure integrating multi-scale features include target overlap coefficient TOC, electric field peak distance EPD, electric field similarity, mean absolute error MAE, mean relative error MRE, normalized root mean square error NRMSE and mean direction error MDE; The target overlap coefficient TOC is the similarity coefficient DSC between the predicted electric field and the reference target area; the value of TOC is between 0 and 1, and the higher the TOC, the more similar the electric field distribution; Assume that TP, FP and FN are the true positive, false positive and false negative between the predicted electric field and the reference electric field, respectively, then: The electric field peak distance EPD is the distance between the predicted peak and the reference electric field magnitude; the electric field peak distance EPD is calculated in volume and surface space respectively, and the formula is as follows: EPD=||Peak(E p )-Peak(E R )||; The electric field similarity is the correlation coefficient between the predicted magnitude and the reference electric field map; let ||E P || and ||E R || are the amplitudes of the predicted electric field and the reference electric field, respectively, then the electric field similarity is: The mean absolute error MAE is the absolute value of the difference between the predicted value and the reference value; the mean relative error MRE is the ratio of MAE to the reference electric field amplitude in the corresponding target area; MRE is only calculated in the target area to avoid singularity; let K be the number of vertices on the surface of the human brain, then: The normalized root mean square error (NRMSE) is used to compare the vector electric field in volume space; let N be the number of voxels, and the NRMSE metric is calculated using the whole brain electric field and a target region containing 5% of the voxels near the peak of the reference electric field: The mean directional error (MDE) is the average directional error between the predicted electric field vector and the reference electric field vector in the reference target area. It is used to evaluate the angular accuracy of the predicted electric field map and calculates the average directional error of the whole brain electric field and the electric field around the target area:

8. A deep neural network model for the transcranial magnetic stimulation electric field rapid imaging method based on a codec structure as claimed in any one of claims 1 to 7, characterized in that: It is a residual module and deep monitoring mechanism integrated into the standard codec deep network architecture in a multi-scale manner; it includes a human brain three-dimensional structure modeling module, a deep neural network electric field prediction module based on the codec structure, and an electric field three-dimensional brain surface imaging and electric field distribution index evaluation module.

9. A computer storage medium, characterized in that: A computer program executable by a computer processor is stored therein, and the computer program executes the transcranial magnetic stimulation electric field rapid imaging method based on a codec structure as described in any one of claims 1 to 7.