A method for judging implant precision of a brain-computer interface based on combination of image and electroencephalogram signals

By combining CT images and EEG signals, the accuracy of electrode implantation can be assessed in real time, solving the problems of electrode implantation error and risk in brain-computer interface surgery, achieving efficient and safe electrode positioning, and improving the success rate of surgery.

CN119440256BActive Publication Date: 2025-10-17DALIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies make it difficult to assess the accuracy of electrode implantation in real time during brain-computer interface surgery, leading to increased implantation errors and surgical risks. Furthermore, postoperative verification methods cannot provide real-time feedback during the surgery.

Method used

By combining intraoperative CT images and EEG signals, image segmentation was performed using the U-net algorithm and signal analysis was performed using the random forest algorithm to determine the position and functional implantation of electrodes in real time. Image processing technology and EEG signal analysis were used to evaluate the accuracy of electrode implantation from multiple perspectives.

Benefits of technology

It improves the accuracy and reliability of electrode positioning during surgery, shortens the operation time, reduces the surgical risk, ensures that the electrodes accurately reach the target brain region, and enhances the safety and success rate of brain-computer interface surgery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440256B_ABST
    Figure CN119440256B_ABST
Patent Text Reader

Abstract

A method for judging the precision of brain-computer interface implantation based on image and electroencephalogram signal combination belongs to the field of biological cross-research. By combining image processing technology and fine electroencephalogram signal analysis, the accuracy of electrode implantation is evaluated from two independent and complementary angles. Compared with the traditional method which relies on postoperative histological analysis, the present application provides multiple real-time feedback mechanisms, significantly improving the accuracy and reliability of electrode positioning during surgery. This technical innovation not only shortens the operation time and reduces the operation risk, but also improves the success rate of the entire operation process. Through real-time image and signal analysis, the surgical team can immediately adjust the operation strategy and optimize the electrode implantation path to ensure that the electrode accurately reaches the target brain area. In addition, the present application avoids the delay and uncertainty of relying on postoperative section 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.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of biological cross-research, and relates to a method for judging the implantation accuracy of a brain-computer interface based on the combination of images and electroencephalogram signals, which can further utilize intraoperative CT images and electroencephalogram signals, combine image processing and signal processing methods, and realize the judgment of whether electrodes are implanted accurately in the brain-computer interface surgery of small animals. BACKGROUND

[0002] The accurate implantation of electrodes is directly related to the quality of signal collection in specific brain regions, and has always been the 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, problems can only be found after surgery through dissection and tissue reconstruction. Generally, electrode implantation depends on brain stereotactic devices, but such devices also often face errors in actual operation.

[0003] In fact, the problem of accurate implantation can be divided into two aspects: on the one hand, it is the exploration of unknown brain regions. This exploration requires finding suitable implantation positions and paths to obtain neural signals of unknown brain regions under the premise of lacking complete information; on the other hand, it is the verification of known brain regions, which ensures that the implantation position of the electrode is consistent with the anatomical structure and functional positioning of the target brain region, so as to ensure that the collected signals have research value.

[0004] At present, some progress has been made in the field of accurate implantation technology of brain-computer interface at home and abroad. Researchers try to use neuroimaging, electrophysiology and postoperative histological verification and other methods to realize the accurate positioning of electrodes. However, this field still faces many challenges. For example, the stability of 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 accurate implantation is not universal, and there are differences between different individuals and brain regions, which is also a problem that needs to be solved at present. The most commonly used postoperative verification method is histological analysis. Through techniques such as section staining, researchers can observe the degree of coincidence between the actual implantation position of the electrode and the target brain region. Although this method can provide accurate positioning information, it belongs to postoperative verification and cannot evaluate the accuracy of electrode implantation in real time during the surgery. In order to solve this problem, more real-time and accurate implantation positioning technologies need to be developed in the future to further promote the development of the field of brain-computer interface. SUMMARY

[0005] In recent years, the scientific research of implantable brain-computer interface surgery, signal acquisition and signal analysis has developed rapidly, especially the brain-computer interface surgery based on small animals has become a hot spot in this field, in order to improve the accuracy of electrode insertion and the success rate of surgery, the application proposes a method for judging the accuracy of brain-computer interface implantation based on image and signal combination. In the process of electrode implantation, the absolute position of the electrode can be judged through the CT image, but due to the different skull structures and sizes of each animal, only the absolute position can only judge the approximate position and cannot be absolutely accurate to the target brain area, it is necessary to combine the collected electroencephalogram signals to identify the relative brain area position to judge whether it is the target brain area signal.

[0006] The technical scheme of the application:

[0007] A method for judging the accuracy of brain-computer interface implantation based on image and electroencephalogram signals, specifically as follows:

[0008] Step 1: Obtain the data set of the target brain area.

[0009] In the process of surgery, the data of the target brain area is collected to obtain the data set, and the data set includes the CT image of the brain area and the corresponding electroencephalogram signal of the brain area;

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

[0011] 2.1: The CT image in the data set obtained in step 1 is preprocessed, including contrast adjustment and denoising;

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

[0013] 2.3: Based on the processing result of step 2.2, the image labeling tool (such as LabelMe) is used to select the skull and electrode region of interest for image labeling;

[0014] 2.4: The U-net algorithm model is trained using the CT image after image labeling;

[0015] Further, in the training process 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 by 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 result 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, Pi represents the prediction value of the i-th pixel.

[0018] Step 3: Feature extraction and model training on the electroencephalogram signals in the dataset obtained in step 1.

[0019] 3.1: Preprocessing of the electroencephalogram signals in the dataset obtained in step 1, including filtering to remove noise and normalization;

[0020] 3.2: Feature extraction on the electroencephalogram signals obtained after preprocessing in step 3.1, including extraction of time domain features and frequency domain features.

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

[0022]

[0023] In formula (2), Mean represents the mean of the signal, N2 represents the number of signal samples, and x i Pi represents the prediction value of the i-th pixel.

[0024] In formula (3), StandardDeviation represents the standard deviation of the signal, N2 represents the number of signal samples, Pi represents the prediction value of the i-th pixel.

[0025] Further, the 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 the frequency, FFT(·) represents the Fourier transform, and signal is the time series signal.

[0028] 3.3: Analysis of the electroencephalogram signals after preprocessing in 3.1 using the current source density method to more finely study the current flow near the electrodes.

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

[0030]

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

[0032] 3.4: The data features obtained from step 3.2 and step 3.3 are used as inputs to train a random forest algorithm model, which performs pattern recognition and classification by building multiple decision trees. During the training process, the features that are most critical for predicting the effectiveness of electrode implantation are evaluated. The output of the random forest algorithm model can directly provide the results of brain region classification, i.e., determining which brain region the current signal belongs to based on different signal features.

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

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

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

[0036] 5.2: Input the preprocessed CT image in step 5.1 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 step 5.2 classifies each pixel as an electrode, skull, or background, obtaining the pixel set p e and the pixel set p h of the skull.

[0038] 5.4: The electrode position and skull position obtained in step 5.3 are still pixel coordinates, calculate the intersection longitudinal coordinate y intersection of the electrode and the skull, the intersection longitudinal coordinate is the Y coordinate of the first intersection point of the electrode path with the skull position pixel. In actual calculation, first find the first point in the Y coordinate of all coordinates in the electrode pixel set p e that is equal to or closest to all Y coordinates of the skull pixel set p h .

[0039] That is

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

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

[0042] 5.5: According to the termination Y coordinate y Eendand the intersection y-coordinate of the electrode with the skull obtained in 5.4 intersection The insertion pixel depth D of the electrode is calculated as:

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

[0044] The insertion actual depth D is obtained by converting the actual length of each pixel pixelsize. actual :

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

[0046] The depth conversion is completed, and the actual depth of the electrode insertion is obtained.

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

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

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

[0050] ΔD ≤ ∈ (11)

[0051] The depth of the electrode is considered to be within the allowable range, and the implantation is accurate, otherwise it is considered to be adjusted.

[0052] Step 6: Electroencephalogram analysis and electrode brain region determination for the electroencephalogram signal of the test set in step 4.

[0053] 6.1 According to the electroencephalogram signal of the test set in step 4, the pre-processing method is consistent with step 3.1.

[0054] 6.2 For the electroencephalogram signal pre-processed in step 6.1, the extracted features are consistent with steps 3.2 and 3.2. All the obtained features form a feature vector X = [x1, x1, x2, …, x n ],

[0055] 6.3 The feature vector X formed in step 6.2 is input into the random forest algorithm model trained in step 3.4. The random forest algorithm model is composed of multiple decision trees, each decision tree independently classifies according to the feature vector, and the source brain region of the signal is determined by voting. The random forest algorithm model will integrate 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 random forest algorithm model output is:

[0056]

[0057] where 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, and I is an indicator function, when T j (X) determines that the target brain area is C, I = 1, otherwise I = 0.

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

[0059]

[0060] the signal can be determined to come from the target brain area, and this threshold ensures the accuracy of the determination and avoids false classification.

[0061] Step 7: Comprehensive evaluation and verification of implant position. Combine the coordinate information obtained from step 5 and the brain area signal data obtained in step 6 to analyze the results and comprehensively evaluate the functionality and physical position of the electrode.

[0062] Further, the data of the test set in steps 4 to 7 can be replaced by data collected in real time during the operation. In step 7, for comprehensive evaluation and verification of the implant position, combine the coordinate information obtained from step 5 and the brain area signal data obtained in step 6 to analyze the results and comprehensively evaluate the functionality and physical position of the electrode: when all analysis results indicate that the electrode is correctly located in the target brain area and the electroencephalogram signal conforms to the brain area signal of the pre-taken electroencephalogram signal, the surgical team can confirm that the electrode position is correct and continue the surgical procedure. 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 circumstances, use measures such as moving the electrode, and continue to judge to ensure the final success of the operation.

[0063] The method of the present application: by combining image processing technology and fine electroencephalogram signal analysis, the accuracy of electrode implantation is evaluated from two independent and complementary angles. Compared with the traditional method relying on postoperative histological analysis, the present application provides multiple real-time feedback mechanisms, significantly improving the accuracy and reliability of electrode positioning during surgery. This technical innovation not only shortens the operation time and reduces the risk of surgery, but also improves the success rate of the entire surgical process. Through real-time image and signal analysis, the surgical team can immediately adjust the operation strategy and optimize the electrode implantation path to ensure that the electrode accurately reaches the target brain region. In addition, the present application avoids the delay and uncertainty of relying on postoperative section analysis, so that the correctness of the electrode position can be confirmed during the operation, enhancing the overall safety and effectiveness of the brain-computer interface surgery. BRIEF DESCRIPTION OF DRAWINGS

[0064] Figure 1 is the overall flowchart of the present application.

[0065] Figure 2 is the CT image after preprocessing.

[0066] Figure 3 is the marked image.

[0067] Figure 4 is the CSD data processing diagram.

[0068] Figure 5 is the image prediction effect diagram.

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

[0070] The specific embodiments of the present application are further described below in combination with the drawings and technical solutions.

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

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

[0073] During the operation, collect the data of the target brain region to obtain the data set, which includes the CT image of the brain region and the corresponding electroencephalogram signal of the brain region;

[0074] Step 2: Image segmentation and electrode labeling for CT images in the dataset obtained in Step 1: U-net algorithm model is used to process and analyze CT image data. U-net algorithm is a convolutional neural network for biomedical image segmentation, which is particularly suitable for processing fine structures in images. The specific process is as follows:

[0075] 2.1 Select CT images from the dataset obtained in Step 1, and pre-process the CT images, including contrast adjustment and denoising; as shown in Figure 2 .

[0076] 2.2 Slice the pre-processed CT images in 2.1 to isolate the region of interest;

[0077] 2.3 Based on the processing results of Step 2.2, use the image labeling tool LabelMe to select the skull and electrode regions of interest for image labeling; the purpose is to calculate the specific depth of the electrode under the skull, and this step is crucial because it directly affects the accuracy of subsequent depth calculation and the training effect of the model. As shown in Figure 3 for labeling, Figure 3 the red part is the electrode probe position, and the green part is the skull position.

[0078] 2.4 Train the U-net algorithm model using the image-labeled CT images;

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

[0080]

[0081] In formula (1), L represents the total loss value, which measures the gap between the prediction results of the U-net algorithm model and the true labels. N1 represents the number of samples, y i represents the true label of the i-th pixel, represents the prediction value of the i-th pixel.

[0082] Step 3: Feature extraction and model training for EEG signals in the dataset obtained in Step 1: Focus on extracting key features from EEG signals in the dataset, and apply these features to train a random forest algorithm. The specific steps are as follows:

[0083] 3.1 Pre-process the EEG signals in the dataset obtained in Step 1, including filtering to remove noise and normalization, to ensure data quality and consistency.

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

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

[0086]

[0087] In equation (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.

[0088] In equation (3), Standard Deviation represents the standard deviation of the signal, N2 represents the number of signal samples, and x i represents the value of the i-th signal sample. represents the mean of the signal samples.

[0089] Further, the frequency domain features relate to the spectral distribution of the signal, mainly the calculation of the power spectral density, which can be obtained through fast Fourier transform.

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

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

[0092] 3.3: Analysis of the preprocessed electroencephalogram signal in 3.1 using the current source density method can more finely study the current flow near the electrode. 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 equation (5), the z-axis refers to the direction of the probe inserted into the brain, σ is the electrical conductivity of the tissue, and V is the potential measured along the z-axis. Through this calculation, subtle changes in brain electrical activity can be revealed. As Figure 4 shown, in this example, the places with larger CSD values can be considered as the positions of brain regions releasing signals, so it is feasible to use CSD to determine the location of brain regions, and CSD can be used as one of the features for analyzing electroencephalogram signals.

[0095] 3.4: The data features obtained from step 3.2 and step 3.3 are used as inputs for training a random forest algorithm model, aiming to accurately simulate and predict the implantation effect of the electrode. The key of this training process lies in improving the accuracy and reliability of the model in distinguishing different brain region signals through diverse signal features. The random forest algorithm model performs pattern recognition and classification by constructing multiple decision trees, and during the training process, it evaluates which features are most critical for predicting the electrode implantation effect. The output of the random forest algorithm model can directly provide the results of brain region classification, that is, judging the current signal belongs to which brain region according to the different features of the signal, to assist the research of precise implantation.

[0096] Step 4: Test set validation of CT image and EEG signal collection:

[0097] After obtaining the trained U-net algorithm model and random forest algorithm model in steps 2 and 3, the CT image and EEG signal of the test set are collected to use the trained U-net algorithm model and random forest algorithm model in steps 2 and 3 to judge the accuracy of electrode implantation.

[0098] Step 5: Image processing, electrode positioning, and electrode absolute depth conversion calculation for the CT image collected in 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. This model identifies the electrode and skull positions in the image through high-precision image segmentation technology. After processing, the model outputs the positions of the electrode and skull in the image, providing the necessary basic information for the next depth calculation. Based on the electrode and skull positions output by the model in step 2, the intersection of the two is determined. This intersection represents the entry position of the electrode into the brain tissue after passing through the skull. Then, by calculating the pixel distance from this intersection to the bottom of the image, the absolute depth position of the electrode under the skull can be converted. This depth calculation is crucial as it ensures that the electrode is precisely implanted into the target brain region.

[0100] 5.1: Preprocess the CT image collected in step 4, specifically following step 2.1.

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

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

[0103]

[0104] where (a i ,b i ) and (a ,b ) are the coordinates of each pixel in the electrode and skull regions, respectively, and N4 and M4 are the total number of pixels in the electrode and skull regions, respectively.

[0105] 5.4: The electrode position and skull position obtained in step 5.3 are still pixel coordinates. The intersection y intersection coordinate of the electrode and skull is calculated, which is the Y coordinate of the first point on the electrode path that intersects with the skull position pixel. In the actual calculation, the first point that is equal to or closest to all the Y coordinates of the skull pixel set p h in the Y coordinate set of all pixels in the electrode position set p e needs to be found.

[0106] That is

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

[0108] In formula (7), y e refers to the y coordinate of each of the electrode pixels, and y h refers to the y coordinate of each of the skull pixels.

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

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

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

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

[0113] The actual depth of electrode insertion is obtained by completing the depth conversion. 5.6: Calculate the error ΔD between the actual depth and the expected depth D target

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

[0115] Set a maximum allowable error ∈ according to the experimental requirements, and make a standard judgment according to the maximum allowable error. If the following formula is satisfied:

[0116] ΔD≤∈ (11)

[0117] The depth of electrode insertion is considered to be within the allowable range, and the implantation is accurate, otherwise it is considered to be adjusted. In this embodiment, the actual depth is 3.45mm, and the depth predicted by the method is 3.39mm, and the depth error predicted by the method is 0.06mm.

[0118] Step 6: EEG signal analysis and electrode brain region determination for the EEG signal of the test set in step 4. For the EEG signal of the test set in step 4, the features are extracted, including frequency domain and time domain features. Use the trained random forest model in step 3 to analyze these features to determine whether the current signal is from the target brain region. This step is crucial because it is directly related to the judgment of whether the electrode is correctly implanted in the functional brain region.

[0119] 6.1 According to the EEG signal of the test set in step 4, the pre-processing method is consistent with step 3.1, including filtering to remove noise and normalization to optimize signal quality.

[0120] 6.2 For the EEG signal pre-processed in step 6.1, the extracted features are consistent with steps 3.2 and 3.3. Time domain features include mean, peak, and standard deviation of the signal, frequency domain features involve signal spectral distribution, mainly calculating power spectral density, and CSD features. These features then form a feature vector X = [x1, x2, x3, …, 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 is composed of multiple decision trees, each of which independently classifies according to the feature vector, and votes to determine the source brain region of the signal. The random forest algorithm model will integrate 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 random forest algorithm model outputs:

[0122]

[0123] where 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 an indicator function, when T j (X) determines that the target brain region is C, I = 1, otherwise I = 0.

[0124] The final output is the probability of classification of each brain region, for example, for the target brain region C, the random forest algorithm gives the probability that the signal belongs to the target brain region.

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

[0126]

[0127] the signal is determined to come from the target brain region, this threshold ensures the accuracy of the determination, avoiding false classification. The analysis results in this example are shown in Figure 6 , it can be seen that the prediction results in the electroencephalogram signal are basically accurate, with a correct rate of 94%.

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

[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 allowed deviation is set to ±0.1 millimeter to meet the high-precision surgical requirements. At the same time, the classification accuracy of the electroencephalogram signal is evaluated by the random forest model, and the classification accuracy is required to be above 90% to ensure that the signal indeed comes from the target brain region. Only when the actual deviation of the electrode position is within the strict error range and the signal classification accuracy meets the high standard, the implantation position of the electrode is confirmed to be accurate. If all analysis results indicate that the electrode is correctly located in the target brain region and the electroencephalogram signal meets the brain region signal of the pre-taken electroencephalogram 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, can use measures such as moving the electrode, continue to judge to ensure the final success of the operation. In this example, the CT image analysis error is 0.06 mm, and the brain region accuracy of the signal analysis is 94%, combined with image analysis and electroencephalogram signal analysis, it can be considered that the current implantation point is 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 area is collected to obtain a data set, which includes CT images of the brain area and the corresponding EEG signals of the brain area; Step 2: Perform image segmentation and electrode labeling on the CT images in the dataset obtained in step 1; 2.1: Preprocess the CT images in the dataset 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 dataset obtained in step 1; 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; 3.3: Use the current source density method to analyze the EEG signals after preprocessing in 3.1 to more closely study the current flow near the electrodes; 3.4: The data features obtained in steps 3.2 and 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 effectiveness of electrode implantation are evaluated. The output of the random forest algorithm model can directly provide the brain region classification result, that is, the brain region to which the current signal belongs is determined based on the different characteristics 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 of the electrode Pixel collection of skulls ; 5.4: The electrode position and skull position obtained in step 5.3 are still pixel coordinates. Calculate the vertical coordinate of the intersection of the electrode and the skull. The vertical coordinate 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 Among all the Y coordinates of the coordinates in the skull pixel set, the first one The points with equal or closest Y coordinates. Right now (7) ; In formula (7) Refers to the y coordinate of each pixel in the electrode pixel, The y coordinate of each pixel in the skull pixel; 5.5: According to the terminal Y coordinate of the electrode And the vertical coordinate of the intersection of the electrode and the skull obtained in 5.4 , the electrode insertion pixel depth D is calculated as: (8) ; Then according to the actual length corresponding to each pixel Convert to get the actual insertion depth : (9) ; Complete depth conversion to obtain the actual depth of electrode insertion; 5.6: According to the pre-set expected depth , calculate the error between the actual depth and the expected depth ; (10) ; Set a maximum allowable error according to the experimental requirements , the standard is judged according to the maximum allowable error; if the following formula is met: (11) ; 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 needed; Step 6: Perform EEG signal analysis on the test set in step 4 and determine the brain region 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 , 6.3 Input the feature vector X generated 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 independently classifies the feature vector and votes to determine the brain region of origin of the signal. The random forest algorithm model combines the voting results of all decision trees and outputs the probability distribution of the input signal belonging to each candidate brain region. Let C be the target brain region. The output of the random forest algorithm model is: (12) ; in, is the total number of decision trees in the random forest algorithm model, Represents the classification result of the jth tree, I is the indicator function, when When the target brain area is determined to be C, I = 1, otherwise I = 0; Finally, the probability of each brain region classification 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, set a probability threshold ; Only when the random forest algorithm model output probability satisfies (13) ; Only when the signal is determined to come from the target brain area can it be determined. This threshold ensures the accuracy of the judgment and avoids misclassification. Step 7: Comprehensive evaluation and verification of the implant 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.

2. 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.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 between electrodes, skull, and other tissues. The training process is optimized using the following loss function L: (1) ; 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; represents the number of samples, 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: (2) ; (3) In formula (2), Mean represents the mean value of the signal, represents the number of signal samples, represents the value of the i-th signal sample; In formula (3), represents the standard deviation of the signal, 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 step 3.2, the frequency domain features involve the spectral distribution of the signal, mainly calculating the power spectral density, which can be obtained by fast Fourier transform; (4) ; In formula (4), f represents the frequency. represents Fourier transform, 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: (5) ; In formula (5), the z-axis refers to the direction in which the probe is inserted into the brain. is the electrical conductivity of the tissue, and V is the potential measured along the z-axis.

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