Motor imagery recognition method, device and equipment based on retraining
By obtaining the CSP filter and classifier benchmark parameters, initializing and optimizing the neural network, it solves the problem of poor adaptability of the common spatial pattern in motor imagination recognition, improves the recognition accuracy, and combines the expert knowledge and additional classification knowledge of the traditional CSP model. , achieving efficient recognition of motor imagery.
Patent Information
- Application Number
- CN202410826177.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-10
AI Technical Summary
The common spatial pattern cannot be well adapted during the motor imagination recognition process, affecting the recognition accuracy.
By obtaining the CSP filter benchmark parameters and the target classifier benchmark parameters, the preset neural network is initialized, and optimized using the gradient descent algorithm, combined with the expert knowledge and additional classification knowledge of the traditional CSP model to improve the recognition accuracy.
The recognition accuracy of motor imagery has been improved, and the classification accuracy of EEG data has been improved by optimizing the neural network model.
Smart Images

Figure CN118626944A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device and equipment for motor imagery recognition based on retraining. Background Art
[0002] Brain-computer interface establishes a direct communication path between the human brain and external devices or environments. Due to its low cost, non-invasiveness and convenience, electroencephalogram (EEG) is the most commonly used input signal in brain-computer interface, which records the electrical activity of the cerebral cortex. A closed-loop brain-computer interface system mainly includes three modules: signal acquisition, signal analysis and output control. Among them, the signal analysis module processes the collected EEG signals and recognizes their patterns to generate control outputs. It usually includes signal processing, feature extraction and classification / regression. There are many paradigms for brain-computer interface, such as steady-state visually evoked potential (SSVEP), event-related potential (ERP) and motor imagery (MI). Motor imagery refers to the user imagining the movement of a body part in the mind without actually performing it. During motor imagery, specific areas of the cerebral cortex show changes in sensory-motor rhythms, mainly manifested by event-related desynchronization and event-related synchronization, with obvious energy decreases and increases in specific frequency bands, respectively. Typically, event-related desynchronization occurs in the contralateral area of the brain, while event-related synchronization occurs in the ipsilateral area. For example, during a left-hand motor imagery task, event-related desynchronization was observed in the motor cortex of the right brain, and event-related synchronization was observed in the motor cortex of the left brain. Therefore, detecting sensory-motor rhythms in specific areas of the cerebral cortex from EEG can be used to decode the motor intention of the motor imagery user and then control the external device to perform the corresponding action.
[0003] Common spatial patterns (CSP) are a widely used and effective signal processing algorithm that can convert raw EEG data into output data with optimal variance for subsequent feature extraction and classification. However, the common spatial pattern is not well adapted in the recognition process of motor imagery, which can easily affect the recognition accuracy. Summary of the invention
[0004] The purpose of the present invention is to solve the problem that the common space pattern cannot be well adapted in the process of motor imagery recognition, which affects the recognition accuracy. The present invention provides a motor imagery recognition method, device and equipment based on retraining.
[0005] The technical solution of the embodiment of the present application is implemented as follows: A first aspect of an embodiment of the present application provides a motor imagery recognition method based on retraining, comprising: Acquire CSP filter benchmark parameters and target classifier benchmark parameters; the CSP filter benchmark parameters are related to the performance parameters of the CSP filter; the target classifier benchmark parameters are parameters corresponding to the target classifier that meets the accuracy requirements and is obtained through training based on sample data, and the type of the sample data is the same as the type of EEG motor imagery data to be identified; the target classifier includes an LR classifier, a SVM classifier, or an LDA classifier; Initializing a feature extractor and a feature classifier of a preset neural network based on the CSP filter benchmark parameters and the target classifier benchmark parameters to obtain a first neural network; the feature extractor mainly includes a convolution layer, and the feature classifier mainly includes a multi-layer perceptron; Optimizing the first neural network using a gradient descent algorithm to obtain a target neural network; The motor imagery EEG data to be identified is input into the target neural network to obtain the motor imagery category.
[0006] Optionally, obtaining a CSP filter benchmark parameter and a target classifier benchmark parameter includes: Using the sample data to train the CSP filter to determine performance parameters of the CSP filter; Solving the performance parameters of the CSP filter to obtain a set of eigenvectors corresponding to the maximum eigenvalue and the eigenvectors corresponding to the minimum eigenvalue; A CSP filter reference parameter is determined based on the feature vector.
[0007] Optionally, obtaining a CSP filter benchmark parameter and a target classifier benchmark parameter includes: The target classifier is iteratively trained using a classification algorithm to obtain the target classifier benchmark parameters.
[0008] Optionally, optimizing the first neural network by using a gradient descent algorithm to obtain a target neural network includes: Inputting the sample data into the first neural network, and determining a gradient value corresponding to a loss function according to the output data and the control data; Based on the reverse direction of the gradient value, the parameters of the first neural network are updated and iterative training is performed until the loss function corresponding to the output data of the first neural network reaches a preset value; The first neural network corresponding to when the loss function reaches a preset value is determined as the target neural network.
[0009] The second aspect of the embodiment of the present application provides a motor imagery recognition device based on retraining, comprising: a first acquisition module, an initialization module, an optimization module, and a second acquisition module, wherein: The first acquisition module is configured to acquire CSP filter benchmark parameters and target classifier benchmark parameters; the CSP filter benchmark parameters are obtained by solving the performance parameters of the CSP filter; the target classifier benchmark parameters are parameters corresponding to the target classifier that meets the accuracy requirements and is obtained based on sample data training, and the type of the sample data is the same as the type of EEG motor imagery data to be identified; the target classifier includes an LR classifier, a SVM classifier, or an LDA classifier; The initialization module is configured to respectively initialize a feature extractor and a feature classifier of a preset neural network based on the CSP filter benchmark parameters and the target classifier benchmark parameters to obtain a first neural network; the feature extractor mainly includes a convolutional layer, and the feature classifier mainly includes a multilayer perceptron; The optimization module is configured to optimize the first neural network using a gradient descent algorithm to obtain a target neural network; The second acquisition module is configured to input the motor imagery EEG data to be identified into the target neural network to obtain the motor imagery category.
[0010] Optionally, the first acquisition module is specifically configured as follows: Using the sample data to train the CSP filter to determine performance parameters of the CSP filter; Solving the performance parameters of the CSP filter to obtain a set of eigenvectors corresponding to the maximum eigenvalue and the eigenvectors corresponding to the minimum eigenvalue; A CSP filter reference parameter is determined based on the feature vector.
[0011] Optionally, the first acquisition module is specifically configured to: iteratively train the target classifier using a classification algorithm to obtain benchmark parameters of the target classifier.
[0012] Optionally, the optimization module is specifically configured as follows: Inputting the sample data into the first neural network, and determining a gradient value corresponding to a loss function according to the output data and the control data; Based on the reverse direction of the gradient value, the parameters of the first neural network are updated and iterative training is performed until the loss function corresponding to the output data of the first neural network reaches a preset value; The first neural network corresponding to when the loss function reaches a preset value is determined as the target neural network.
[0013] A third aspect of an embodiment of the present application provides an electronic device, comprising a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the retraining-based motor imagery recognition method described in the first aspect.
[0014] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0015] Compared with the prior art, the technical solution provided by this application has the following beneficial effects: The present invention provides a method, device and equipment for motor imagery recognition based on retraining, which obtains CSP filter benchmark parameters and target classifier benchmark parameters, initializes a feature extractor and a feature classifier of a preset neural network based on the CSP filter benchmark parameters and the target classifier benchmark parameters, obtains a first neural network, and then optimizes the first neural network using a gradient descent algorithm to obtain a target neural network, inputs motor imagery EEG data to be recognized into the target neural network, obtains motor imagery categories, realizes the combination of expert knowledge and additional classification knowledge of a traditional CSP model, and improves the recognition accuracy of motor imagery. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A flowchart of a motor imagery recognition method based on retraining provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a motor imagery recognition device based on retraining provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] Below, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present application. The terms used herein are only for describing specific embodiments and are not intended to limit the present application. The terms "include", "comprising", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components. All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0018] Some block diagrams and / or flow charts are shown in the accompanying drawings. It should be understood that some blocks or combinations thereof in the block diagrams and / or flow charts may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that these instructions, when executed by the processor, may create a device for implementing the functions / operations described in these block diagrams and / or flow charts.
[0019] In some embodiments, see Figure 1 , Figure 1 A flowchart of a motor imagery recognition method based on retraining provided in an embodiment of the present application; the motor imagery recognition method based on retraining provided in an embodiment of the present application includes: S110, obtaining CSP filter benchmark parameters and target classifier benchmark parameters; the CSP filter benchmark parameters are related to the performance parameters of the CSP filter; the target classifier benchmark parameters are parameters corresponding to the target classifier that meets the accuracy requirements and is obtained based on sample data training, and the type of the sample data is the same as the type of EEG motor imagery data to be identified; the target classifier includes an LR classifier, a SVM classifier or an LDA classifier.
[0020] In this embodiment, the CSP filter benchmark parameters can be obtained by solving the performance parameters of the CSP filter. Exemplarily, the sample data is divided into two categories of time periods, such as EEG data when the attention is focused and when the attention is relaxed. Each time period is a plurality of time signals within a time period. For each category of time period, the covariance matrix of the category is calculated. The covariance matrix is subjected to eigendecomposition to obtain the eigenvectors and eigenvalues used. According to the size of the eigenvalues, a set of optimal spatial filters can be obtained. The spatial filter can be implemented by feature projection of the covariance matrix. Regarding the target classifier benchmark parameters, the target classifier is trained in advance using the sample data, and the parameters of the target classifier are continuously adjusted through back propagation and loss function calculation until the classification accuracy of the sample data processed by the target classifier meets the requirements. Before training, the sample data can be subjected to necessary preprocessing, such as filtering, denoising, segmentation, etc., to improve the training accuracy. It should be noted that the CSP filter in this embodiment is not limited to the traditional CSP filter, but can also be a filter improved based on the CSP filter, such as FBCSP filter, Regularized CSP filter, etc., which is not limited to this.
[0021] In some embodiments, S110, obtaining CSP filter benchmark parameters and target classifier benchmark parameters includes: Using sample data to train the CSP filter and determine the performance parameters of the CSP filter; The performance parameters of the CSP filter are solved to obtain a set of eigenvectors corresponding to the maximum eigenvalue and the eigenvectors corresponding to the minimum eigenvalue; The CSP filter reference parameters are determined based on the feature vector.
[0022] In this embodiment, the sample data can be divided into two categories of time periods, such as EEG data when the attention is focused and when the attention is relaxed. Each time period is a plurality of time signals within a time period. For each category of time period, the covariance matrix of the category is calculated. The covariance matrix is subjected to eigendecomposition to obtain the corresponding eigenvectors and eigenvalues. According to the size of the eigenvalue, a set of eigenvectors corresponding to the maximum eigenvalue and the eigenvectors corresponding to the minimum eigenvalue can be determined, and then a set of optimal spatial filters can be obtained according to the eigenvector.
[0023] In an optional embodiment, an optimization target is pre-set, and the CSP filter is optimized based on the optimization target. The optimization objective can be expressed as: ; in Characterization category is The average value of the EEG signal, Characterization category is The spatial covariance matrix of all EEG signals.
[0024] The solution is the matrix The largest eigenvalue and the smallest eigenvalue in The eigenvalues corresponding to The signal after the CSP filter filters the sample data: ; Calculate the logarithmic variance feature vector for each sample signal after CSP spatial filtering : .
[0025] In some embodiments, S110, obtaining CSP filter benchmark parameters and target classifier benchmark parameters includes: The target classifier is trained using a classification algorithm to obtain the target classifier benchmark parameters.
[0026] In this embodiment, taking the target classifier as an LR classifier as an example, the LR classifier uses a logical function (also called a Sigmoid function) to map the predicted value of linear regression to between 0 and 1, thereby obtaining the probability of classification. The function form is usually f(x) = 1 / (1 + e^(-z)), where z is a linear combination of input features. The LR classifier constructs a prediction function by solving a set of weights and intercepts. Here, the parameters of the classifier can be updated according to the update rules of the L-BFGS algorithm or Newton's method until the convergence condition is met or the preset number of iterations is reached, and the classifier parameters at this time are used as the target classifier benchmark parameters. The classification result of the LR classifier can be expressed as: ,in, and It should be noted that the type of the target classifier is not limited to the LR classifier, but can also be an SVM classifier or an LDA classifier. Accordingly, using a classification algorithm that is compatible with the classifier type to update the classifier parameters can improve the classification efficiency and classification accuracy, and there is no restriction on its specific type.
[0027] S120, based on the CSP filter benchmark parameters and the target classifier benchmark parameters, the feature extractor and the feature classifier of the preset neural network are respectively initialized to obtain a first neural network; the feature extractor includes a convolutional layer, and the feature classifier includes a multi-layer perceptron.
[0028] In this embodiment, a preset neural network is constructed. The preset neural network may include a feature extractor and feature classifier . Feature Extractor By a parameter The convolution layer consists of a convolution layer and a logarithmic variance activation layer. The convolution layer contains indivual This module simulates the calculation process of the CSP filter and can convert the EEG signal Mapping to feature vector ,Right now Here, the CSP filter benchmark parameters are used The feature extractor parameters in the preset neural network Perform initialization. Feature classifier The feature vector Mapping to labels , which consists of a parameter The fully connected layer and a softmax activation layer can classify the features. Similarly, using the target classifier benchmark parameters and Classification parameters of the feature classifier of the preset neural network An initialization process is performed to obtain a first neural network.
[0029] S130, optimizing the first neural network using a gradient descent algorithm to obtain a target neural network.
[0030] The gradient descent method calculates the gradient of the loss function with respect to the parameter weights, and then updates the parameter weights in the opposite direction of the gradient in the hope of gradually reducing the value of the loss function. During the optimization process, the parameter weights will be updated through multiple iterations until a certain stop condition is met, such as the loss function value is less than a certain threshold or the number of iterations reaches a maximum value, at which point the correction is stopped and the second neural network is obtained. Here, the loss function represents the difference between the output data of the first neural network and the real data, and the gradient value represents the rate of change of the loss function.
[0031] In some embodiments, S130, optimizing the first neural network using a gradient descent algorithm to obtain a target neural network includes: Inputting sample data into the first neural network, and determining a gradient value corresponding to a loss function according to output data and control data; Based on the reverse direction of the gradient value, the parameters of the first neural network are updated and iterative training is performed until the loss function corresponding to the output data of the first neural network reaches a preset value; The first neural network corresponding to when the loss function reaches a preset value is determined as the target neural network.
[0032] The opposite direction of the gradient value, that is, the direction in which the gradient value decreases. It can be understood that after each acquisition of the loss function, the parameters of the first neural network are adjusted and updated based on the loss function so that the loss function decreases. As the number of iterations increases, the gradient function gradually decreases until it approaches 0, at which point the loss function tends to stabilize. When the loss function reaches the preset value, it means that the first neural network has met the image processing requirements and the iteration can be stopped. Here, the specific size of the preset value can be determined according to the image accuracy requirements, and there is no restriction on this.
[0033] S140, inputting the motor imagery EEG data to be identified into the target neural network to obtain the motor imagery category.
[0034] Here, the motor imagery EEG data to be identified is input into the optimized target neural network, which can output the probability distribution of one or more categories. According to the probability distribution, the category with the highest probability can be selected as the final motor imagery category. By obtaining the motor imagery category, patients can be helped to control objects through external devices and achieve self-care, thereby assisting the rehabilitation process, and restoring lost or damaged limb functions by controlling prostheses or exoskeletons, providing patients with new ways of movement.
[0035] In this embodiment, the sample data is input into the first neural network, and the prediction result of each sample is obtained by forward propagation calculation. The loss value between the prediction result and the real data is calculated using the defined loss function. According to the loss value, the gradient of each parameter in the first neural network can be calculated by the back propagation algorithm. The parameters of the first neural network are updated using the gradient descent algorithm. The basic idea of the gradient descent algorithm is to update the parameters in the opposite direction of the gradient to minimize the loss function. Repeat the steps of forward propagation, loss calculation, back propagation and parameter update until the stopping condition is met (such as reaching the maximum number of iterations, loss value convergence, etc.), thereby obtaining the target neural network.
[0036] In some embodiments, see Figure 2 , Figure 2 A schematic diagram of the structure of a motor imagery recognition device based on retraining provided in an embodiment of the present application. A motor imagery recognition device 200 based on retraining provided in an embodiment of the present application comprises: a first acquisition module 210, an initialization module 220, an optimization module 230 and a second acquisition module 240, wherein: A first acquisition module 210 is configured to acquire CSP filter benchmark parameters and target classifier benchmark parameters; the CSP filter benchmark parameters are related to the performance parameters of the CSP filter; the target classifier benchmark parameters are parameters corresponding to the target classifier that meets the accuracy requirements obtained by training based on sample data, and the type of the sample data is the same as the type of EEG motor imagery data to be identified; the target classifier includes an LR classifier, a SVM classifier, or an LDA classifier; An initialization module 220 is configured to respectively initialize a feature extractor and a feature classifier of a preset neural network based on a CSP filter benchmark parameter and a target classifier benchmark parameter to obtain a first neural network; the feature extractor mainly includes a convolutional layer, and the feature classifier mainly includes a multi-layer perceptron; An optimization module 230 is configured to optimize the first neural network using a gradient descent algorithm to obtain a target neural network; The second acquisition module 240 is configured to input the motor imagery EEG data to be identified into the target neural network to obtain the motor imagery category.
[0037] In some embodiments, the first acquisition module 210 is specifically configured as follows: Using the sample data to train the CSP filter to determine the performance parameters of the CSP filter; The performance parameters of the CSP filter are solved to obtain a set of eigenvectors corresponding to the maximum eigenvalue and the eigenvectors corresponding to the minimum eigenvalue; The CSP filter reference parameters are determined based on the feature vector.
[0038] In some embodiments, the first acquisition module 210 is specifically configured to: perform iterative training on the target classifier using a classification algorithm to obtain benchmark parameters of the target classifier.
[0039] In some embodiments, the optimization module 230 is specifically configured as follows: Input the sample data into the first neural network, and determine the gradient value corresponding to the loss function according to the output data and the control data; Based on the reverse direction of the gradient value, the parameters of the first neural network are updated and iterative training is performed until the loss function corresponding to the output data of the first neural network reaches a preset value; The first neural network corresponding to when the loss function reaches a preset value is determined as the target neural network.
[0040] The retraining-based motion imagery recognition device provided in the embodiment of the present application is capable of implementing each process in the embodiment corresponding to the above-mentioned retraining-based motion imagery recognition method. To avoid repetition, they will not be described again here.
[0041] It should be noted that the retraining-based motion imagery recognition device provided in the embodiment of the present application and the retraining-based motion imagery recognition method provided in the embodiment of the present application are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned motion imagery recognition method, and the repeated parts will not be repeated.
[0042] In some embodiments, see Figure 3 , Figure 3 The electronic device 300 provided in the embodiment of the present application includes a processor 310 and a memory 320; the memory 320 stores a computer program, wherein the computer program implements the above-mentioned retraining-based motor imagery recognition method when executed by the processor. Specifically, the processor 310 may include, for example, a general-purpose microprocessor, an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 310 may also include an onboard memory for cache purposes. The processor 310 may be a single processing unit or multiple processing units for executing different actions of the method flow according to the embodiment of the present application. The memory 320 may be any medium capable of containing, storing, conveying, propagating or transmitting instructions. For example, the memory 320 may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device, component or propagation medium. Specific examples of the memory 320 include: a magnetic storage device, such as a magnetic tape or a hard disk (HDD); an optical storage device, such as a compact disk (CD-ROM); a random access memory (RAM) or a flash memory; and / or a wired / wireless communication link. The present application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned method for motor imagery recognition based on retraining. The computer-readable medium may be included in the device / apparatus / system described in the above-mentioned embodiments; or it may exist independently without being assembled into the device / apparatus / system. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed, the method according to the embodiment of the present application is implemented. According to an embodiment of the present application, a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, optical cable, radio frequency signal, etc., or any suitable combination of the above. Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of the present application may be combined in a variety of ways and / or combinations, even if such combinations or combinations are not explicitly described in the present application. In particular, without departing from the spirit and teachings of the present application, the features described in the various embodiments and / or claims of the present application may be combined in a variety of ways and / or combinations. All of these combinations and / or combinations fall within the scope of the present application. Therefore, the scope of the present application should not be limited to the above-described embodiments, but should be determined not only by the appended claims, but also by the equivalents of the appended claims.
Claims
1. A motor imagery recognition method based on retraining, characterized in that: include: Get the CSP filter benchmark parameters and target classifier benchmark parameters; The CSP filter benchmark parameters are related to the performance parameters of the CSP filter; The target classifier benchmark parameters are parameters corresponding to the target classifier that meets the accuracy requirements and is obtained through training based on sample data, wherein the type of the sample data is the same as the type of EEG motor imagery data to be identified; the target classifier includes an LR classifier, a SVM classifier or an LDA classifier; Initializing a feature extractor and a feature classifier of a preset neural network based on the CSP filter benchmark parameters and the target classifier benchmark parameters to obtain a first neural network; the feature extractor mainly includes a convolution layer, and the feature classifier mainly includes a multi-layer perceptron; Optimizing the first neural network using a gradient descent algorithm to obtain a target neural network; The motor imagery EEG data to be identified is input into the target neural network to obtain the motor imagery category.
2. The method for motor imagery recognition based on retraining according to claim 1, characterized in that: The obtaining of the CSP filter benchmark parameters and the target classifier benchmark parameters includes: Using the sample data to train the CSP filter to determine performance parameters of the CSP filter; Solving the performance parameters of the CSP filter to obtain a set of eigenvectors corresponding to the maximum eigenvalue and the eigenvectors corresponding to the minimum eigenvalue; A CSP filter reference parameter is determined based on the feature vector.
3. The method for motor imagery recognition based on retraining according to claim 1, characterized in that: The obtaining of the CSP filter benchmark parameters and the target classifier benchmark parameters includes: The target classifier is trained using a classification algorithm to obtain the target classifier benchmark parameters.
4. The method for motor imagery recognition based on retraining according to claim 1, characterized in that: The step of optimizing the first neural network by using a gradient descent algorithm to obtain a target neural network includes: Inputting the sample data into the first neural network, and determining a gradient value corresponding to a loss function according to the output data and the control data; Based on the reverse direction of the gradient value, the parameters of the first neural network are updated and iterative training is performed until the loss function corresponding to the output data of the first neural network reaches a preset value; The first neural network corresponding to when the loss function reaches a preset value is determined as the target neural network.
5. A motor imagery recognition device based on retraining, characterized in that: include: A first acquisition module, an initialization module, an optimization module, and a second acquisition module, wherein: The first acquisition module is configured to acquire CSP filter benchmark parameters and target classifier benchmark parameters; the CSP filter benchmark parameters are related to the performance parameters of the CSP filter; the target classifier benchmark parameters are parameters corresponding to the target classifier that meets the accuracy requirements and is obtained through training based on sample data, and the type of the sample data is the same as the type of EEG motor imagery data to be identified; the target classifier includes an LR classifier, a SVM classifier, or an LDA classifier; The initialization module is configured to respectively initialize a feature extractor and a feature classifier of a preset neural network based on the CSP filter benchmark parameters and the target classifier benchmark parameters to obtain a first neural network; the feature extractor mainly includes a convolutional layer, and the feature classifier mainly includes a multilayer perceptron; The optimization module is configured to optimize the first neural network using a gradient descent algorithm to obtain a target neural network; The second acquisition module is configured to input the motor imagery EEG data to be identified into the target neural network to obtain the motor imagery category.
6. The motor imagery recognition device based on retraining according to claim 5, characterized in that: The first acquisition module is specifically configured as follows: Using the sample data to train the CSP filter to determine performance parameters of the CSP filter; Solving the performance parameters of the CSP filter to obtain a set of eigenvectors corresponding to the maximum eigenvalue and the eigenvectors corresponding to the minimum eigenvalue; A CSP filter reference parameter is determined based on the feature vector.
7. The motor imagery recognition device based on retraining according to claim 5, characterized in that: The first acquisition module is specifically configured as follows: The target classifier is trained using a classification algorithm to obtain the target classifier benchmark parameters.
8. The motor imagery recognition device based on retraining according to claim 5, characterized in that: The optimization module is specifically configured as follows: Inputting the sample data into the first neural network, and determining a gradient value corresponding to a loss function according to the output data and the control data; Based on the reverse direction of the gradient value, the parameters of the first neural network are updated and iterative training is performed until the loss function corresponding to the output data of the first neural network reaches a preset value; The first neural network corresponding to when the loss function reaches a preset value is determined as the target neural network.
9. An electronic device comprising a processor and a memory; the memory stores a computer program, wherein: When the computer program is executed by the processor, the computer program implements the motor imagery recognition method based on retraining according to any one of claims 1 to 4.
10. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Cited By
Decoding model construction method and decoding method for motor imagery brain-computer interface signals
CN120045995A
