Brain-computer interface implantation accuracy judgment method based on combination of images and electroencephalogram signals

By combining CT images and EEG signal analysis methods, using U-net and random forest algorithms to evaluate the accuracy of electrode implantation in brain-computer interface surgery in real time, solving the problem of difficult real-time evaluation of electrode implantation accuracy in the prior art. Problem, improving the accuracy and safety of the surgery.

CN119440256AActive Publication Date: 2025-02-14DALIAN UNIV OF TECH

Patent Information

Application Number
CN202411554906.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-14
Estimated Expiration
2044-11-04

AI Technical Summary

Technical Problem

In brain-computer interface surgery, it is difficult to evaluate the accuracy of electrode implantation in real time during surgery, resulting in increased errors and surgical risks during implantation.

Method used

Using a method based on the combination of image and EEG signals, the combined analysis of CT images and EEG signals is carried out using the U-net algorithm for image segmentation and random forest algorithm for signal feature analysis to judge the accuracy of electrode implantation in real time.

Benefits of technology

It significantly improves the accuracy and reliability of electrode positioning during surgery, shortens the surgical time, reduces the risk of surgery, and improves the success rate of the entire surgical process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440256A_ABST
    Figure CN119440256A_ABST
Patent Text Reader

Abstract

The invention discloses a brain-computer interface implantation accuracy judgment method based on combination of images and electroencephalogram signals, and belongs to the field of biological cross scientific research. By combining an image processing technology and fine electroencephalogram signal analysis, the accuracy of electrode implantation is evaluated from two independent and complementary angles. Compared with a traditional method depending on postoperative histological analysis, the method has the advantages that multiple real-time feedback mechanisms are provided, and the accuracy and reliability of electrode positioning in an operation are remarkably improved. The technical innovation not only shortens the operation time and reduces the operation risk, but also improves the success rate of the whole operation process. Through real-time image and signal analysis, an operation team can adjust an operation strategy in real time, an electrode implantation path is optimized, and it is ensured that an electrode accurately reaches a target brain area. Besides, the delay and uncertainty of relying on postoperative slice analysis are avoided, so that the correctness of the electrode position can be confirmed during the operation, and the overall safety and effect of the brain-computer interface operation are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of biological cross-scientific research, and relates to a method for judging the accuracy of brain-computer interface implantation based on a combination of images and electroencephalogram signals. The method can further utilize intraoperative CT images and electroencephalogram signals, combined with image processing and signal processing methods, to accurately judge whether electrodes are implanted during brain-computer interface surgery in small animals. Background Art

[0002] The precise implantation of electrodes is directly related to the quality of collecting signals from specific brain areas, and has always been a research focus of invasive brain-computer interface experimental systems. During the implantation process, it is difficult to determine the appropriate depth, target position, and implantation angle, and errors are prone to occur. At present, most problems can only be discovered through dissection and tissue reconstruction after surgery. Usually, electrode implantation relies on a brain stereotactic device, but this device often faces errors in actual operation.

[0003] In fact, the problem of precise implantation can be divided into two aspects: on the one hand, it is the exploration of unknown brain areas. This exploration requires finding a suitable implantation location and path in the absence of complete information to obtain neural signals from unknown brain areas; on the other hand, it is the verification of known brain areas to ensure that the implantation location of the electrode is consistent with the anatomical structure and functional positioning of the target brain area, so as to ensure that the collected signals have research value.

[0004] At present, some progress has been made in the precise implantation technology of brain-computer interfaces at home and abroad. Researchers have tried to use a variety of methods such as neuroimaging, electrophysiology, and postoperative histological verification to achieve precise positioning of electrodes. However, this field still faces many challenges. For example, the stability of the electrode position is difficult to guarantee, the accuracy of the implantation process needs to be improved, and how to reduce the risk of surgery is also an important research direction. In addition, the algorithm for precise implantation is not universal, and there are differences between different individuals and brain regions, which is also a problem that needs to be solved urgently. The most commonly used postoperative verification method is histological analysis. Through techniques such as slice staining, researchers can observe the degree of consistency between the actual implantation position of the electrode and the target brain area. Although this method can provide accurate positioning information, it is a postoperative verification and cannot evaluate the accuracy of electrode implantation in real time during surgery. In order to solve this problem, it is necessary to develop more real-time and accurate implantation positioning technology in the future to further promote the development of the field of brain-computer interfaces. Summary of the invention

[0005] In recent years, scientific research on implantable brain-computer interface surgery, signal acquisition, signal analysis, etc. has developed rapidly. In particular, brain-computer interface surgery based on small animals has become a hot topic in this field. In order to improve the accuracy of intraoperative electrode insertion and the success rate of surgery, the present invention proposes a method for judging the accuracy of brain-computer interface implantation based on the combination of images and signals. During the electrode implantation process, the absolute position of the electrode can be determined by CT images, but due to the different skull structures and sizes of each animal, the absolute position alone can only determine the approximate position and cannot be absolutely accurate to the target brain area. It is necessary to combine the collected EEG signals to perform relative brain area position identification to determine whether it is a target brain area signal.

[0006] The technical solution of the present invention:

[0007] A method for judging the accuracy of brain-computer interface implantation based on the combination of images and EEG signals is as follows:

[0008] Step 1: Obtain a dataset of the target brain region.

[0009] During the operation, data of the target brain region is collected to obtain a data set, which includes a CT image of the brain region and the corresponding EEG signal of the brain region;

[0010] Step 2: Perform image segmentation and electrode labeling on the CT images in the data set obtained in step 1.

[0011] 2.1: Preprocess the CT images in the data set obtained in step 1, including contrast adjustment and denoising;

[0012] 2.2: Slice the CT image preprocessed in step 2.1 to isolate the region of interest;

[0013] 2.3: Based on the processing results of step 2.2, use image annotation tools (such as LabelMe) to select the skull and electrode areas of interest and perform image annotation;

[0014] 2.4: Use the annotated CT images to train the U-net algorithm model;

[0015] Furthermore, during the training of the U-net algorithm model, pixel-level classification is used to learn how to distinguish electrodes, skulls, and other tissues, and the training process is optimized using the following loss function L.

[0016]

[0017] In formula (1), L represents the total loss value, which is used to measure the gap between the prediction results of the U-net algorithm model and the actual label. 1 represents the number of samples, y irepresents the true label of the i-th pixel, Represents the predicted value of the i-th pixel.

[0018] Step 3: Perform feature extraction and model training on the EEG signals in the data set obtained in step 1.

[0019] 3.1: Preprocess the EEG signals in the data set obtained in step 1, including filtering to remove noise and normalization;

[0020] 3.2: Perform feature extraction on the EEG signal obtained after preprocessing in step 3.1. Feature extraction includes extraction of time domain features and frequency domain features.

[0021] Furthermore, the time domain features include the mean, peak, and standard deviation of the signal:

[0022]

[0023] In formula (2), Mean represents the mean value of the signal, N 2 represents the number of signal samples, x i Represents the value of the i-th signal sample.

[0024] In formula (3), StandardDeviation represents the standard deviation of the signal, N 2 represents the number of signal samples, Represents the average value of the signal samples.

[0025] Furthermore, frequency domain features involve the spectral distribution of the signal, mainly calculating the power spectral density, which can be obtained through fast Fourier transform.

[0026] PSD(f)=|FFT(signal)| 2 (4)

[0027] In formula (4), f represents frequency, FFT(·) represents Fourier transform, and signal is a time series signal.

[0028] 3.3: Use the current source density method to analyze the EEG signals preprocessed in 3.1 and study the current flow near the electrodes in more detail.

[0029] Furthermore, the CSD algorithm is used to quantify the source current and sink current generated by local neural activity. The CSD calculation process is as follows:

[0030]

[0031] In formula (5), the z axis refers to the direction in which the probe is inserted into the brain, σ is the conductivity of the tissue, and V refers to the potential measured along the z axis.

[0032] 3.4: The data features obtained in step 3.2 and step 3.3 are used as input for training the random forest algorithm model. The random forest algorithm model performs pattern recognition and classification by constructing multiple decision trees. During the training process, the most critical features for predicting the effect of electrode implantation will be evaluated. The output of the random forest algorithm model can directly give the result of brain region classification, that is, to determine which brain region the current signal belongs to based on the different features of the signal.

[0033] Step 4: CT image and EEG signal acquisition of the test set:

[0034] Step 5: Perform image processing, electrode positioning, and electrode depth calculation on the CT images of the test set in step 4:

[0035] 5.1: Preprocess the CT images of the test set in step 4. The specific preprocessing is the same as step 2.1.

[0036] 5.2: For the CT image preprocessed in 5.1, input it into the U-net algorithm model obtained in step 2.4 for segmentation.

[0037] 5.3: The segmentation map output by the U-net algorithm model in 5.2 classifies each pixel as an electrode, skull, or background, and obtains the pixel set p of the electrode e and the pixel set of the skull h ;

[0038] 5.4: The electrode position and skull position obtained in step 5.3 are still pixel coordinates. Calculate the y coordinate of the intersection of the electrode and the skull. intersection The ordinate of the intersection point is the Y coordinate of the point where the electrode path first intersects with the skull position pixel. In actual calculation, it is necessary to first find the e Among all the Y coordinates of the coordinates in , the first one that matches the skull pixel set p h The points with equal or closest Y coordinates.

[0039] Right now

[0040] y intersection =min{y h ∈p h :y h ≥min(y e )} (7)

[0041] y in formula (7) e Refers to the y coordinate of each pixel in the electrode pixel, y h Refers to the y coordinate of each pixel in the skull pixel.

[0042] 5.5: According to the terminal Y coordinate y of the electrode EendAnd the ordinate y of the intersection of the electrode and the skull obtained in 5.4 intersection , the electrode insertion pixel depth D is calculated as:

[0043] D=y Eend -y intersection (8)

[0044] Then, according to the actual length pixelsize corresponding to each pixel, the actual insertion depth D is converted. actual :

[0045] D actual =D×pixelsize (9)

[0046] Complete depth conversion to obtain the actual depth of electrode insertion.

[0047] 5.6: According to the pre-set expected depth D target , calculate the error ΔD between the actual depth and the expected depth.

[0048] ΔD=|D actual -D target | (10)

[0049] According to the experimental requirements, a maximum allowable error ∈ is set, and the standard is judged based on the maximum allowable error. If the following formula is satisfied:

[0050] ΔD≤∈ (11)

[0051] It is considered that the implantation depth of the electrode is within the allowable range and the implantation is accurate; otherwise, it is considered that adjustment is required.

[0052] Step 6: Perform EEG signal analysis on the EEG signals of the test set in step 4 and determine the brain area where the electrodes are located.

[0053] 6.1 Preprocess the EEG signals of the test set in step 4. The preprocessing method is the same as that in step 3.1.

[0054] 6.2 For the EEG signal preprocessed in step 6.1, the features extracted are the same as those in step 3.2 and step 3.2. All the obtained features are formed into a feature vector X = [x 1 ,x 1 ,x 2 ,…,x n ],

[0055] 6.3 Input the feature vector X formed in step 6.2 into the random forest algorithm model trained in step 3.4. The random forest algorithm model consists of multiple decision trees, each of which performs independent classification based on the feature vector and votes to determine the brain region from which the signal comes. The random forest algorithm model will combine the voting results of all decision trees and output the probability distribution of the input signal belonging to each candidate brain region. Let the target brain region be C, and the output of the random forest algorithm model is:

[0056]

[0057] Among them, M t is the total number of decision trees in the random forest algorithm model, T j (X) represents the classification result of the jth tree, I is the indicator function, when T j (X) When the target brain area is determined to be C, I = 1, otherwise I = 0.

[0058] Finally, the probability of classification of each brain region is output. For the target brain region C, the random forest algorithm model gives The probability of τ represents the credibility of the signal belonging to the target brain area. As a quantitative standard, a probability threshold τ is set. Only when the random forest algorithm model output probability satisfies

[0059]

[0060] Only then can it be determined that the signal comes from the target brain area. This threshold ensures the accuracy of the judgment and avoids misclassification.

[0061] Step 7: Comprehensive evaluation and verification of implantation location. Combine the coordinate information obtained in step 5 with the brain region signal data obtained in step 6 to analyze the results and comprehensively evaluate the functionality and physical location of the electrodes.

[0062] Furthermore, the test set data in steps 4 to 7 can be replaced with data collected in real time during the operation. When comprehensively evaluating and verifying the implantation position in step 7, the coordinate information obtained in step 5 and the brain region signal data obtained in step 6 are combined to analyze the results, and the functionality and physical position of the electrode are comprehensively evaluated: when all analysis results indicate that the electrode is correctly located in the target brain region, and the EEG signal is consistent with the brain region signal of the pre-taken EEG signal, the surgical team can confirm that the electrode position is correct and continue the surgical process. When the analysis results show that the electrode position or function is incorrect, the surgical team will adjust the surgical strategy according to the specific situation, use measures such as moving the electrode, and continue to judge to ensure the ultimate success of the operation.

[0063] The method of the present invention: By combining image processing technology and sophisticated EEG signal analysis, the accuracy of electrode implantation is evaluated from two independent and complementary perspectives. Compared with the traditional method that relies on postoperative histological analysis, the present invention provides multiple real-time feedback mechanisms, which significantly improves the accuracy and reliability of electrode positioning during surgery. This technological innovation not only shortens the operation time and reduces surgical risks, but also improves the success rate of the entire surgical process. Through real-time image and signal analysis, the surgical team can adjust the operation strategy in real time, optimize the electrode implantation path, and ensure that the electrode reaches the target brain area accurately. In addition, the present invention avoids the delay and uncertainty of relying on postoperative slice analysis, so that the correctness of the electrode position can be confirmed during the operation, enhancing the overall safety and effectiveness of brain-computer interface surgery. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 It is the overall flow chart of the present invention.

[0065] Figure 2 is the preprocessed CT image.

[0066] Figure 3 is a labeled image.

[0067] Figure 4 This is a diagram of CSD data processing.

[0068] Figure 5 It is an image prediction effect diagram.

[0069] Figure 6 It is a signal prediction effect diagram. DETAILED DESCRIPTION

[0070] The specific implementation of the present invention is further described below in conjunction with the accompanying drawings and technical solutions.

[0071] A method for judging the accuracy of brain-computer interface implantation based on the combination of images and EEG signals. This method uses the U-net algorithm for image processing and the random forest combined with the CSD algorithm for signal analysis to judge the accuracy of electrode implantation. It is mainly aimed at the verification of known brain regions to ensure that the implantation position of the electrode is consistent with the anatomical structure and functional positioning of the target brain region. The specific steps are as follows:

[0072] Step 1: Obtain the dataset of the target brain region:

[0073] During the operation, data of the target brain region is collected to obtain a data set, which includes a CT image of the brain region and the corresponding EEG signal of the brain region;

[0074] Step 2: Perform image segmentation and electrode annotation on the CT images in the data set obtained in step 1: Use the U-net algorithm model to process and analyze the CT image data. The U-net algorithm is a convolutional neural network used for biomedical image segmentation, and its structure is particularly suitable for processing fine structures in images. The specific process is as follows:

[0075] 2.1 Select CT images from the data set obtained in step 1 and preprocess the CT images, including contrast adjustment and noise removal; Figure 2 shown.

[0076] 2.2 Slice the CT image preprocessed in 2.1 to isolate the region of interest;

[0077] 2.3 Based on the processing results of step 2.2, use the image annotation tool LabelMe to select the skull and electrode areas of interest and perform image annotation; the purpose is to calculate the specific depth of the electrode under the skull. This step is critical because it is directly related to the accuracy of subsequent depth calculations and the training effect of the model. Figure 3 Mark as shown. Figure 3 The red part is the location of the electrode probe, and the green part is the location of the skull.

[0078] 2.4 Use the annotated CT images to train the U-net algorithm model;

[0079] During U-net training, pixel-level classification is used to learn how to distinguish electrodes, skulls, and other tissues. The training process can be optimized using the following loss function L.

[0080]

[0081] In formula (1), L represents the total loss value, which is used to measure the gap between the prediction results of the U-net algorithm model and the actual label. 1 represents the number of samples, y i represents the true label of the i-th pixel, Represents the predicted value of the i-th pixel.

[0082] Step 3: Extract features and train models for the EEG signals in the data set obtained in step 1: Focus on extracting key features from the EEG signals in the data set and use these features to train the random forest algorithm. The specific steps are as follows:

[0083] 3.1 Preprocess the EEG signals in the data set obtained in step 1, including filtering to remove noise and normalization to ensure the quality and consistency of the data.

[0084] 3.2 Feature extraction is performed on the EEG signal obtained after preprocessing in 3.1. Feature extraction includes extraction of time domain features and frequency domain features.

[0085] Furthermore, the time domain features include the mean, peak, and standard deviation of the signal:

[0086]

[0087] In formula (2), Mean represents the mean value of the signal, N 2 represents the number of signal samples, x i Represents the value of the i-th signal sample.

[0088] In formula (3), Standard Deviation represents the standard deviation of the signal, N 2 represents the number of signal samples, x i Represents the value of the i-th signal sample. Represents the average value of the signal samples.

[0089] Furthermore, frequency domain features involve the spectral distribution of the signal, mainly calculating the power spectral density, which can be obtained through fast Fourier transform.

[0090] PSD(f)=|FFT(signal)| 2 (4)

[0091] In formula (4), f represents frequency, FFT(·) represents Fourier transform, and signal is a time series signal.

[0092] 3.3: Using the current source density method to analyze the EEG signal after preprocessing in 3.1, the current flow near the electrode can be studied more finely. CSD is a second-order derivative concept that can quantify the source current and sink current generated by local neural activity. The CSD calculation process is as follows:

[0093]

[0094] In formula (5), the z-axis refers to the direction in which the probe is inserted into the brain, σ is the conductivity of the tissue, and V refers to the potential measured along the z-axis. This calculation can reveal subtle changes in brain electrical activity. Figure 4 As shown, in this example, the place with a larger CSD value can be considered to be the location where the brain area releases the signal. Therefore, it is feasible to use CSD to determine the location of the brain area, and CSD can be used as one of the characteristics of analyzing EEG signals.

[0095] 3.4: The data features obtained in step 3.2 and step 3.3 are used as inputs to the random forest algorithm model for training, aiming to accurately simulate and predict the implantation effect of the electrode. The key to this training process is to improve the accuracy and reliability of the model in distinguishing signals from different brain regions through diversified signal features. The random forest algorithm model performs pattern recognition and classification by constructing multiple decision trees. During its training process, it will evaluate which features are most critical for predicting the effect of electrode implantation. The output of the random forest algorithm model can directly give the results of brain region classification, that is, to determine which brain region the current signal belongs to based on the different characteristics of the signal, to assist in the research of precise implantation.

[0096] Step 4: Test set verification of CT images and EEG signal acquisition:

[0097] After obtaining the trained U-net algorithm model and random forest algorithm model through steps 2 and 3, the CT images and EEG signals of the test set are collected to determine the accuracy of electrode implantation using the U-net algorithm model and random forest algorithm model trained in steps 2 and 3.

[0098] Step 5: Perform image processing, electrode positioning, and electrode absolute depth conversion calculation on the CT images collected in the test set of step 4.

[0099] For the CT image extracted in step 4, it is input into the U-net algorithm model trained in step 2 for analysis. The model uses high-precision image segmentation technology to identify the position of the electrode and skull in the image. After processing, the model will output the position of the electrode and skull on the image, providing the necessary basic information for the next step of depth calculation. Based on the electrode and skull positions output by the model in step 2, their intersection in the image is determined. This intersection represents the entry position where the electrode passes through the skull and enters the brain tissue. Subsequently, by calculating the pixel distance from this intersection to the electrode at the bottom of the image, the absolute depth position of the electrode under the skull can be converted. This depth calculation is key to ensure that the electrode is accurately implanted in the target brain area.

[0100] 5.1: Preprocess the CT images collected in step 4. The specific preprocessing is the same as step 2.1.

[0101] 5.2: For the CT image preprocessed in step 5.1, input it into the U-net algorithm model obtained in step 2 for segmentation. Figure 5 shown.

[0102] 5.3: The segmentation map output by the U-net algorithm model in 5.2 classifies each pixel as an electrode, skull, or background, and the pixel set p of the electrode can be obtained. e and the pixel set of the skull hThen, the centroid positions of the electrodes and the skull can be calculated by image processing technology as their representative positions. E (electrode position) and P H (Skull location).

[0103]

[0104] Where (a i ,b i )and are the coordinates of each pixel in the electrode and skull area, respectively, N 4 and M 4 are the total number of pixels within the electrode and skull regions, respectively.

[0105] 5.4: The electrode position and skull position obtained in step 5.3 are still pixel coordinates. Calculate the y coordinate of the intersection of the electrode and the skull. intersection The ordinate of the intersection point is the Y coordinate of the point where the electrode path first intersects with the skull position pixel. In actual calculation, it is necessary to first find e Among all the pixel sets in the Y coordinates, the first one that matches the skull pixel set p h The points with equal or closest Y coordinates.

[0106] Right now

[0107] y intersection =min{y h ∈p h :y h ≥min(y e )} (7)

[0108] y in formula (7) e Refers to the y coordinate of each pixel in the electrode pixel, y h Refers to the y coordinate of each pixel in the skull pixel.

[0109] 5.5: According to the terminal Y coordinate y of the electrode Een And the ordinate y of the intersection of the electrode and the skull obtained in 5.4 intersection , the electrode insertion pixel depth D is calculated as:

[0110] D=y Eend -y intersection (8)

[0111] Then, according to the actual length pixelsize corresponding to each pixel, the actual insertion depth D is converted. actual :

[0112] D actual =D×pixelsize (9)

[0113] Complete the depth conversion and obtain the actual depth of electrode insertion. 5.6: According to the expected depth D target , calculate the error ΔD between the actual depth and the expected depth.

[0114] ΔD=|D actual -D target |(10)

[0115] According to the experimental requirements, a maximum allowable error ∈ is set, and the standard is judged based on the maximum allowable error. If the following formula is satisfied:

[0116] ΔD≤∈ (11)

[0117] It is considered that the implantation depth of the electrode is within the allowable range and the implantation is accurate, otherwise it is considered that adjustment is required. In this embodiment, the actual depth is 3.45 mm, the depth predicted by this method is 3.39 mm, and the depth error predicted by this method is 0.06 mm.

[0118] Step 6: Perform EEG signal analysis and determine the brain region where the electrodes are located for the EEG signals of the test set in step 4. For the EEG signals of the test set in step 4, extract features from these signals, including frequency domain and time domain features. Use the random forest model trained in step 3 to analyze these features to determine whether the current signal comes from the target brain region. This step is critical because it is directly related to determining whether the electrodes are correctly implanted in the functional brain region.

[0119] 6.1 Preprocess the EEG signals of the test set in step 4. The preprocessing method is the same as that in step 3.1, including filtering to remove noise and normalization to optimize signal quality.

[0120] 6.2 For the EEG signal preprocessed in step 6.1, the features extracted are the same as those in step 3.2 and step 3.3. The time domain features include the mean, peak, and standard deviation of the signal, while the frequency domain features involve the spectral distribution of the signal, mainly calculating the power spectral density and CSD features. These features then form the feature vector X = [x 1 ,x 2 ,x 3 ,…,x n ],

[0121] 6.3 Input the feature vector X formed in step 6.2 into the random forest algorithm model trained in step 3.4. The random forest algorithm model consists of multiple decision trees, each of which performs independent classification based on the feature vector and votes to determine the brain region from which the signal comes. The random forest algorithm model will combine the voting results of all decision trees and output the probability distribution of the input signal belonging to each candidate brain region. Assuming that the target brain region is C, the output of the random forest algorithm model is:

[0122]

[0123] Among them, M t is the total number of decision trees in the model, T j (X) represents the classification result of the jth tree, I is the indicator function, when T j (X) When the target brain area is determined to be C, I = 1, otherwise I = 0.

[0124] Finally, the probability of each brain region classification is output. For example, for the target brain region C, the random forest algorithm gives The probability indicates the credibility of the signal belonging to the target brain area.

[0125] A quantitative standard can be used to judge and a probability threshold τ can be set. For example, when τ = 0.98, only when the random forest algorithm model output probability meets

[0126]

[0127] Only when the signal is judged to come from the target brain area can this threshold ensure the accuracy of the judgment and avoid misclassification. Figure 6 As shown, it can be seen that the prediction results in the EEG signal are basically accurate, with an accuracy rate of 94%.

[0128] Step 7: Comprehensive evaluation and verification of implantation location. Combine the coordinate information obtained in step 5 with the brain region signal data obtained in step 6 to analyze the results and comprehensively evaluate the functionality and physical location of the electrodes.

[0129] In actual operation, first, the deviation between the actual position of the electrode and the predetermined target position is quantitatively evaluated, and the maximum allowable deviation is set to ±0.1 mm to meet the needs of high-precision surgery. At the same time, the classification accuracy of the EEG signal is evaluated by the random forest model, and the classification accuracy is required to reach more than 90% to ensure that the signal is indeed derived from the target brain area. Only when the actual deviation of the electrode position is within a strict error range and the accuracy of the signal classification meets high standards, the electrode implantation position is confirmed to be accurate. If all analysis results indicate that the electrode is correctly located in the target brain area and the EEG signal is consistent with the brain area signal of the pre-taken EEG signal, the surgical team can confirm that the electrode position is correct and continue the surgical process. If the analysis results show that the electrode position or function is incorrect, the team will adjust the surgical strategy according to the specific situation, and measures such as moving the electrode can be used to continue to judge to ensure the ultimate success of the operation. In this example, the CT image analysis error is 0.06mm, and the signal analysis brain area accuracy is 94%. Combined with image analysis and EEG signal analysis, the current implantation point can be considered as the target point.

Claims

1. A method for determining the accuracy of brain-computer interface implantation based on a combination of images and EEG signals, characterized in that: The details are as follows: Step 1: Obtain the dataset of the target brain region; During the operation, data of the target brain region is collected to obtain a data set, which includes a CT image of the brain region and the corresponding EEG signal of the brain region; Step 2: Perform image segmentation and electrode labeling on the CT images in the data set obtained in step 1; 2.1: Preprocess the CT images in the data set obtained in step 1; 2.2: Slice the CT image preprocessed in step 2.1 to isolate the region of interest; 2.3: Based on the processing results of step 2.2, use the image annotation tool to select the skull and electrode areas of interest and perform image annotation; 2.4: Use the annotated CT images to train the U-net algorithm model; Step 3: Perform feature extraction and model training on the EEG signals in the data set obtained in step 1; 3.1: Preprocess the EEG signals in the data set obtained in step 1; 3.2: Extract features from the EEG signal obtained after preprocessing in step 3.

1. Feature extraction includes extraction of time domain features and frequency domain features. 3.3: Use the current source density method to analyze the EEG signals preprocessed in 3.1 and study the current flow near the electrodes in more detail; 3.4: The data features obtained in step 3.2 and step 3.3 are used as inputs for training the random forest algorithm model. The random forest algorithm model performs pattern recognition and classification by constructing multiple decision trees. During the training process, the most critical features for predicting the effect of electrode implantation will be evaluated. The output of the random forest algorithm model can directly give the result of brain region classification, that is, to determine which brain region the current signal belongs to based on the different features of the signal; Step 4: CT image and EEG signal acquisition of the test set: Step 5: Perform image processing, electrode positioning, and electrode depth calculation on the CT images of the test set in step 4: 5.1: Preprocess the CT images of the test set in step 4. The specific preprocessing is the same as step 2.1; 5.2: For the CT image preprocessed in 5.1, input it into the U-net algorithm model obtained in step 2.4 for segmentation; 5.3: The segmentation map output by the U-net algorithm model in 5.2 classifies each pixel as an electrode, skull, or background, and obtains the pixel set p of the electrode e and the pixel set of the skull h ; 5.4: The electrode position and skull position obtained in step 5.3 are still pixel coordinates. Calculate the y coordinate of the intersection of the electrode and the skull. intersection The ordinate of the intersection point is the Y coordinate of the point where the electrode path first intersects with the skull position pixel; in actual calculation, it is necessary to first find e Among all the Y coordinates of the coordinates in , the first one that matches the skull pixel set p h The points with equal or closest Y coordinates; Right now and intersection =min{and h ∈p h :and h ≥min(and e )} (7) y in formula (7) e Refers to the y coordinate of each pixel in the electrode pixel, y h The y coordinate of each pixel in the skull pixel; 5.5: According to the terminal Y coordinate y of the electrode Eend And the ordinate y of the intersection of the electrode and the skull obtained in 5.4 intersection , the electrode insertion pixel depth D is calculated as: D=y Eend -y intersection (8) Then, according to the actual length pixelsize corresponding to each pixel, the actual insertion depth D is converted. actual : D actual =D×pixelsize (9) Complete depth conversion to obtain the actual depth of electrode insertion; 5.6: According to the pre-set expected depth D target , calculate the error ΔD between the actual depth and the expected depth; ΔD=|D actual -D target | (10) According to the experimental requirements, a maximum allowable error ∈ is set, and the standard is judged according to the maximum allowable error; if the following formula is satisfied: ΔD≤ ∈ (11) The implantation depth of the electrode is considered to be within the allowable range and the implantation is accurate; otherwise, it is considered to need adjustment; Step 6: Perform EEG signal analysis on the EEG signals of the test set in step 4 and determine the brain area where the electrodes are located; 6.1 Preprocess the EEG signals of the test set in step 4. The preprocessing method is the same as that in step 3.

1. 6.2 For the EEG signal preprocessed in step 6.1, the features extracted are the same as those in step 3.2 and step 3.2; all the obtained features are formed into a feature vector X = [x1, x2, x3, ..., x n ], 6.3 Input the feature vector X formed in step 6.2 into the random forest algorithm model trained in step 3.4; the random forest algorithm model consists of multiple decision trees, each of which performs independent classification based on the feature vector and votes to determine the brain region from which the signal comes; the random forest algorithm model will combine the voting results of all decision trees and output the probability distribution of the input signal belonging to each candidate brain region; let the target brain region be C, and the output of the random forest algorithm model is: Among them, Mt is the total number of decision trees in the random forest algorithm model, T j (X) represents the classification result of the jth tree, I is the indicator function, when T j (X) When the target brain area is determined to be C, I = 1, otherwise I = 0; Finally, the probability of classification of each brain region is output. For the target brain region C, the random forest algorithm model gives The probability indicates the credibility of the signal belonging to the target brain area; as a quantitative standard to judge, a probability threshold τ is set; only when the random forest algorithm model output probability satisfies Only then can the signal be determined to come from the target brain area. This threshold ensures the accuracy of the judgment and avoids misclassification. Step 7: Comprehensive evaluation and verification of implantation location; combine the coordinate information obtained in step 5 and the brain region signal data obtained in step 6 to analyze the results and comprehensively evaluate the functionality and physical location of the electrode.

2. According to claim 1, a method for determining the accuracy of brain-computer interface implantation based on a combination of images and EEG signals, characterized in that: In step 2.1, the preprocessing includes contrast adjustment and denoising.

3. The method for determining the accuracy of brain-computer interface implantation based on the combination of images and EEG signals according to claim 1, characterized in that: In step 2.4, during the training of the U-net algorithm model, pixel-level classification is used to learn how to distinguish electrodes, skulls, and other tissues. The training process is optimized using the following loss function L; In formula (1), L represents the total loss value, which is used to measure the gap between the prediction results of the U-net algorithm model and the true label; N1 represents the number of samples, y i represents the true label of the i-th pixel, Represents the predicted value of the i-th pixel.

4. The method for determining the accuracy of brain-computer interface implantation based on the combination of images and EEG signals according to claim 1, characterized in that: The step 3.1 includes filtering to remove noise and normalization.

5. The method for determining the accuracy of brain-computer interface implantation based on the combination of images and EEG signals according to claim 1, characterized in that: In step 3.2, the time domain features include the mean, peak, and standard deviation of the signal: In formula (2), Mean represents the mean of the signal, N2 represents the number of signal samples, and x i represents the value of the i-th signal sample; In formula (3), Standard Deviation represents the standard deviation of the signal, N2 represents the number of signal samples, Represents the average value of the signal samples.

6. The method for determining the accuracy of brain-computer interface implantation based on the combination of images and EEG signals according to claim 1, characterized in that: In the step 3.2, the frequency domain feature involves the spectrum distribution of the signal, mainly calculating the power spectrum density, which can be obtained by fast Fourier transform; PSD(f)=|FFT(signal)| 2 (4) In formula (4), f represents frequency, FFT(·) represents Fourier transform, and signal is a time series signal.

7. The method for determining the accuracy of brain-computer interface implantation based on the combination of images and EEG signals according to claim 1, characterized in that: In step 3.3, the CSD algorithm is used to quantify the source current and sink current generated by local neural activity. The CSD calculation process is as follows: In formula (5), the z axis refers to the direction in which the probe is inserted into the brain, σ is the conductivity of the tissue, and V refers to the potential measured along the z axis.

8. A method for determining the accuracy of brain-computer interface implantation based on a combination of images and EEG signals according to any one of claims 1 to 7, characterized in that: The test set data in steps 4 to 7 can be replaced with data collected in real time during the operation. When comprehensively evaluating and verifying the implantation position in step 7, the coordinate information obtained in step 5 and the brain region signal data obtained in step 6 are combined to analyze the results, and the functionality and physical position of the electrode are comprehensively evaluated: when all analysis results indicate that the electrode is correctly located in the target brain region, and the EEG signal is consistent with the brain region signal of the pre-acquired EEG signal, the surgical team can confirm that the electrode position is correct and continue the surgical process; when the analysis results show that the electrode position or function is incorrect, the surgical team will adjust the surgical strategy according to the specific situation, use measures such as moving the electrode, and continue to judge to ensure the ultimate success of the operation.

Citation Information

Patent Citations

  • Method and equipment for identifying orientation of intracerebral fragmentation electrode in craniocerebral medical image

    CN112669938A

  • Electroencephalogram electrode position correction method and system

    CN114788686A

  • Automatic implantation system for deep brain electrode

    CN115445082A

  • Image-based intracranial electrode positioning method and system, computer equipment and medium

    CN116473565A

  • Intracardiac unipolar far field cancelation using multiple electrode catheters and methods for creating an ECG depth and radial lens

    US20240350070A1

Cited By

  • Visual information decoding method based on brain power positioning

    CN120765767A

  • Instrument implantation safety analysis method under regulation and control of brain-computer interface and spinal nerve

    CN121054182A