An adaptive scalp electroencephalogram motor imagery signal recognition method and related device
By using an adaptive classifier recognition model and transfer learning strategy, the problem of individual differences in EEG motor imagery classification was solved, achieving efficient and accurate EEG signal recognition while reducing training costs and time.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2026-03-03
AI Technical Summary
Existing deep learning methods require a large amount of labeled data for training in EEG motor imagery classification and are difficult to adapt to the differences in EEG signal patterns among different individuals, resulting in a long calibration process and high computational costs.
An adaptive classifier recognition model is adopted. Through transfer learning and model transfer fine-tuning strategies, the feature extractor module of the pre-trained model is used to fine-tune the model for each individual, thereby generating an adaptive classifier recognition model.
It significantly improves the accuracy and efficiency of EEG signal processing, reduces sample data collection time and cost, enhances the adaptability and robustness of the model, and adapts to the EEG signal characteristics of different individuals.
Smart Images

Figure CN119202848B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of brain-computer interface technology, and relates to electroencephalogram (EEG) signal processing technology, and in particular to an adaptive scalp EEG motor imagery signal recognition method and related device. Background Technology
[0002] With the development and advancement of science and technology, BCI (Brain Computer Interface) is being applied more and more widely in various fields, especially the brain-computer interface paradigm based on motor imagery, which can be used in fields such as medicine and education. EEG (Electroencephalogram) motor imagery classification is an important research direction in the field of BCI. It analyzes and identifies motor imagery patterns in electroencephalogram signals, allowing users to control external devices by imagining a certain movement (for example, the movement of the left or right hand).
[0003] In recent years, deep learning methods, especially CNN (Convolutional Neural Network) and RNN (Recurrent Neural Network), have been widely used in EEG motor imagery classification. These methods can automatically extract high-level features of EEG signals and achieve high classification accuracy.
[0004] Deep learning methods have achieved good results in EEG motion image classification, but they still have some shortcomings in practical applications, mainly including:
[0005] (1) In order to obtain a high classification accuracy, existing deep learning methods usually require a large amount of labeled data for training, which leads to a long calibration process;
[0006] (2) The EEG signal patterns of different individuals may differ. Existing deep learning methods often require training the model separately for each individual, which increases the complexity of the model and the computational cost. Summary of the Invention
[0007] The purpose of this invention is to provide an adaptive scalp EEG motor imagery signal recognition method and related device to solve one or more of the aforementioned technical problems. The technical solution provided by this invention utilizes an adaptive classifier recognition model to better address individual differences in EEG signal processing, enabling more accurate identification of motor imagery signals from different individuals.
[0008] To achieve the above objectives, the present invention adopts the following technical solution:
[0009] In a first aspect, the present invention provides an adaptive scalp EEG motor imagery signal recognition method, comprising the following steps:
[0010] Acquire the scalp EEG motor imagery signals to be identified from the target subjects;
[0011] Based on the scalp EEG motor imagery signal to be identified, the trained adaptive classifier recognition model is used to identify the signal and obtain the scalp EEG motor imagery signal recognition result.
[0012] The training and acquisition steps of the trained adaptive classifier recognition model include:
[0013] Based on the acquired scalp EEG motor imagery signal samples, multiple basic general recognition models are trained by loading a dataset with the same paradigm as the recognition target.
[0014] Among multiple basic general recognition models, the basic general recognition model with the lowest verification loss of the target subject's scalp EEG motor imagery signal samples was used as the pre-training model.
[0015] The feature extractor module and pre-training parameters of the pre-trained model are read, and a model transfer fine-tuning strategy is adopted. The untrained classifier is trained using the scalp EEG motor imagery signal samples of the target subject to obtain a trained adaptive classifier recognition model.
[0016] A further improvement of the present invention is that the step of training multiple basic general recognition models based on the acquired scalp EEG motor imagery signal samples by loading a dataset of the same paradigm as the recognition target includes:
[0017] The EEG signals of multiple sample subjects were sampled to obtain the raw EEG signal sample data of each sample subject.
[0018] The raw EEG signal sample data of each sample subject were preprocessed to obtain training set, validation set and test set for each sample subject. The preprocessing process is as follows: based on the raw EEG signal sample data, EEG channel data related to motor imagery areas are selected; the selected EEG channel data is filtered and downsampled to obtain two-dimensional data of channel × time; the two-dimensional data of channel × time is converted into three-dimensional data of two-dimensional topology map × time, and then divided into training set, validation set and test set.
[0019] Based on the training set, validation set, and test set of each sample subject, the selected recognition model is trained and updated to obtain multiple basic general recognition models. During the training and update process, the weights and biases of the recognition model are adjusted by continuously evaluating the loss value of the validation data in each epoch, thereby completing the parameter optimization and update of the recognition model.
[0020] A further improvement of the present invention is that, in the step of training and updating the selected recognition model based on the training set, validation set, and test set of each sample subject to obtain multiple basic general recognition models,
[0021] If the loss of the validation data does not decrease within a preset number of epochs during the training and update process, an early stopping mechanism is triggered, and the model is identified and training is stopped.
[0022] A further improvement of the present invention is that the step of reading the feature extractor module and pre-training parameters of the pre-trained model and adopting a model transfer fine-tuning strategy, and using the scalp EEG motor imagery signal samples of the target subject to train the untrained classifier to obtain a trained adaptive classifier recognition model specifically includes:
[0023] The feature extractor module and pre-training parameters of the pre-trained model are read and a model transfer fine-tuning strategy is adopted. The untrained classifier is trained using the scalp EEG motor imagery signal samples of the target subject to obtain the trained adaptive classifier recognition model.
[0024] The performance of the trained adaptive classifier recognition model is evaluated using four metrics: accuracy, specificity, sensitivity, and F1-score. Once the preset performance requirements are met, the trained adaptive classifier recognition model is obtained.
[0025] In a second aspect, the present invention provides an adaptive scalp EEG motor imagery signal recognition system, comprising:
[0026] The signal acquisition module is used to acquire the scalp electroencephalogram (EEG) motor imagery signals to be identified from the target subject.
[0027] The signal recognition module is used to perform signal recognition based on the scalp EEG motor imagery signal to be identified, using a trained adaptive classifier recognition model, to obtain the scalp EEG motor imagery signal recognition result.
[0028] The training and acquisition steps of the trained adaptive classifier recognition model include:
[0029] Based on the acquired scalp EEG motor imagery signal samples, multiple basic general recognition models are trained by loading a dataset with the same paradigm as the recognition target.
[0030] Among multiple basic general recognition models, the basic general recognition model with the lowest verification loss of the target subject's scalp EEG motor imagery signal samples was used as the pre-training model.
[0031] The feature extractor module and pre-training parameters of the pre-trained model are read, and a model transfer fine-tuning strategy is adopted. The untrained classifier is trained using the scalp EEG motor imagery signal samples of the target subject to obtain a trained adaptive classifier recognition model.
[0032] A further improvement of the present invention is that the step of training multiple basic general recognition models based on the acquired scalp EEG motor imagery signal samples by loading a dataset of the same paradigm as the recognition target includes:
[0033] The EEG signals of multiple sample subjects were sampled to obtain the raw EEG signal sample data of each sample subject.
[0034] The raw EEG signal sample data of each sample subject were preprocessed to obtain training set, validation set and test set for each sample subject. The preprocessing process is as follows: based on the raw EEG signal sample data, EEG channel data related to motor imagery areas are selected; the selected EEG channel data is filtered and downsampled to obtain two-dimensional data of channel × time; the two-dimensional data of channel × time is converted into three-dimensional data of two-dimensional topology map × time, and then divided into training set, validation set and test set.
[0035] Based on the training set, validation set, and test set of each sample subject, the selected recognition model is trained and updated to obtain multiple basic general recognition models. During the training and update process, the weights and biases of the recognition model are adjusted by continuously evaluating the loss value of the validation data in each epoch, thereby completing the parameter optimization and update of the recognition model.
[0036] A further improvement of the present invention is that, in the step of training and updating the selected recognition model based on the training set, validation set, and test set of each sample subject to obtain multiple basic general recognition models,
[0037] If the loss of the validation data does not decrease within a preset number of epochs during the training and update process, an early stopping mechanism is triggered, and the model is identified and training is stopped.
[0038] A further improvement of the present invention is that the step of reading the feature extractor module and pre-training parameters of the pre-trained model and adopting a model transfer fine-tuning strategy, and using the scalp EEG motor imagery signal samples of the target subject to train the untrained classifier to obtain a trained adaptive classifier recognition model specifically includes:
[0039] The feature extractor module and pre-training parameters of the pre-trained model are read and a model transfer fine-tuning strategy is adopted. The untrained classifier is trained using the scalp EEG motor imagery signal samples of the target subject to obtain the trained adaptive classifier recognition model.
[0040] The performance of the trained adaptive classifier recognition model is evaluated using four metrics: accuracy, specificity, sensitivity, and F1-score. Once the preset performance requirements are met, the trained adaptive classifier recognition model is obtained.
[0041] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the adaptive scalp EEG motor imagery signal recognition method as described in any one of the first aspects of the present invention.
[0042] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the adaptive scalp EEG motor imagery signal recognition method as described in any one of the first aspects of the present invention.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] To address the technical problems existing in current deep learning methods, this invention discloses an adaptive scalp EEG motor imagery signal recognition method. Based on an adaptive classifier recognition model, it identifies scalp EEG motor imagery signals, enabling more accurate identification of motor imagery signals from different individuals. This solves the problem of individual differences in EEG signal processing while controlling costs. Explained, this invention is based on transfer learning. First, a pre-trained model is obtained through basic general model selection. Then, the model is fine-tuned for transfer learning to adapt to new tasks. Furthermore, the fine-tuning strategy can quickly adapt to new tasks by freezing some layers of the pre-trained model and updating only the weights of a few layers, meeting the needs of cross-object scalp EEG motor imagery signal recognition. In summary, the technical solution of this invention obtains an adaptive classifier recognition model through a model transfer learning strategy. Employing this strategy significantly improves the decoding efficiency of EEG signals. Using the adaptive classifier recognition model for signal recognition effectively addresses the differences in EEG signal characteristics between individuals, thereby improving recognition accuracy. Furthermore, this invention pre-trains a basic general recognition model, which significantly reduces the number of samples required for new target subjects. Fine-tuning training requires only a minimal amount of sample data, and the fine-tuned model can adapt to the EEG signal patterns of new target subjects, greatly reducing the time and cost of sample data collection. Moreover, utilizing the feature extractor module already learned in the pre-trained model allows for high-quality model fine-tuning in a short time, improving not only the model's adaptability and robustness but also ensuring its stability and accuracy. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0046] Figure 1 This is a flowchart illustrating an adaptive scalp EEG motor imagery signal recognition method in an embodiment of the present invention.
[0047] Figure 2 This is a schematic diagram illustrating the principle of an adaptive scalp EEG motor imagery signal recognition method in a specific embodiment of the present invention.
[0048] Figure 3 This is a schematic diagram of three-dimensional data representation in an embodiment of the present invention.
[0049] Figure 4 This is a schematic diagram of the pre-training and fine-tuning transfer model framework in an embodiment of the present invention; wherein, Figure 4(a) is a schematic diagram of the pre-trained model. Figure 4 (b) is a schematic diagram of the transfer learning model.
[0050] Figure 5 This is a schematic diagram of an adaptive scalp EEG motor imagery signal recognition system in an embodiment of the present invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0052] Please see Figure 1 In this embodiment of the invention, an adaptive scalp EEG motor imagery signal recognition method is provided, comprising the following steps:
[0053] Step 1: Obtain the scalp EEG motor imagery signal to be identified from the target subject;
[0054] Step 2: Based on the scalp EEG motor imagery signal to be identified, the trained adaptive classifier recognition model is used to identify the signal and obtain the scalp EEG motor imagery signal recognition result.
[0055] The training and acquisition steps of the trained adaptive classifier recognition model include:
[0056] Based on the acquired scalp EEG motor imagery signal samples, multiple basic general recognition models are trained by loading a dataset with the same paradigm as the recognition target. For example, the OpenBMI dataset is loaded, and 64-channel EEG left and right hand motor imagery data are collected according to the 10-20 system configuration. After signal denoising and filtering, the EEG data is input into the selected recognition network for training and updating to obtain a basic general recognition model.
[0057] Among multiple basic general recognition models, the basic general recognition model with the lowest verification loss of the target subject's scalp EEG motor imagery signal samples was used as the pre-training model.
[0058] The feature extractor module and pre-training parameters of the pre-trained model are read, and a model transfer fine-tuning strategy is adopted. The untrained classifier is trained using the scalp EEG motor imagery signal samples of the target subject to obtain a trained adaptive classifier recognition model.
[0059] The significant advancements in the technical solutions disclosed in the embodiments of this invention include:
[0060] (1) It solves the problem of individual differences and improves decoding efficiency; Explainedly, the technical solution of the present invention obtains an adaptive classifier recognition model through a model transfer fine-tuning strategy. The subsequent use of it for signal recognition can effectively cope with the differences in EEG signal characteristics between individuals and improve the accuracy of recognition; The present invention adopts an adaptive model transfer fine-tuning strategy, which significantly improves the decoding efficiency of EEG signals.
[0061] (2) The present invention pre-trains a basic general recognition model, which can significantly reduce the number of samples required for new target subjects. Only a small amount of sample data is needed for fine-tuning, so that the fine-tuned model can adapt to the EEG signal pattern of new target subjects, greatly reducing the time and cost of sample data collection.
[0062] (3) The model transfer fine-tuning strategy enables the model to dynamically adjust parameters to adapt to the individual's EEG signal characteristics, thereby improving the model's adaptability and robustness. Each subject's EEG signal is unique, and the fine-tuning process can capture these characteristics and make effective adjustments. In addition, through transfer learning, by utilizing the feature extractor module already learned in the pre-trained model, high-quality model fine-tuning can be completed in a short time. This not only improves the model's performance but also ensures the model's stability and accuracy.
[0063] Please see Figure 2 and Figure 3 In this embodiment of the invention, an adaptive scalp EEG motor imagery signal recognition method is provided, the main process of which is as follows:
[0064] Sample data collection included: sampling the subjects' EEG signals using an EEG acquisition device based on the international 10-20 standard, with a sampling frequency of 1000Hz; a total of 64 channels of EEG data were collected.
[0065] Sample data preprocessing includes: after obtaining the raw EEG signal sample data of the subjects through sample data collection, preprocessing the raw EEG signal sample data; in a specific exemplary scheme, the preprocessing steps specifically include: selecting EEG channels related to the motor imagery area (FC5, FC3, FC1, FC2, FC4, FC6, T7, T8, C5, C3, C1, C2, C4, C6, Cz, TP7, TP8, CP5, CP3, CP1, CPz, CP2, CP4, CP6, P... The above EEG channels (P3, P1, P2, P4, P8) are named according to the international 10-20 standard. The selected 31 channel data are filtered using a bandpass filter of 8-30Hz. The original EEG signal sampling rate is downsampled from 1000Hz to 400Hz using a downsampling method. Finally, the processed two-dimensional data (channel × time) is converted into three-dimensional data (two-dimensional topology × time), and the data is divided into training set, validation set and test set according to leave-one-out and five-fold cross-validation.
[0066] Training a basic general recognition model includes: inputting training data and validation data into the model in a certain ratio (e.g., using five-fold cross-validation, 80% for training and 20% for validation); wherein, during the training process, the weights and biases of the training model are adjusted by continuously evaluating the loss value of the validation data in each epoch (i.e., one cycle in the training process) to optimize the parameters of the training model; in a preferred embodiment of the present invention, in order to reduce the model training time, an early stopping mechanism is added during the training process. The early stopping mechanism determines whether the model needs to stop by monitoring the loss change of the validation data; specifically, for example, the tolerance number of the early stopping mechanism is set to 30 times, that is, if the loss of the validation data does not decrease in 30 epochs, the early stopping mechanism is triggered and the model stops training.
[0067] Model transfer training includes: using the basic general recognition model with the lowest validation data loss in the five-fold cross-validation for each subject as a pre-trained model; effectively handling motion imagery actions of the same paradigm by reading the feature extractor module and its related pre-training parameters; however, considering the differences among target subjects, directly using the pre-trained model may not be accurate enough. Therefore, using the trained pre-trained feature extractor parameters as the initial state, and without any specific prior knowledge, the model's hyperparameters are fine-tuned, and transfer learning training is performed using the target subject's data to flexibly adapt to the feature distribution of the target domain. Through the above operations, the advantages of the basic general recognition model can be effectively utilized while handling the personalized data feature distribution of the target subjects, ultimately generating an adaptive classifier recognition model. It is particularly emphasized that this is the core improvement of the technical solution of this embodiment of the invention. The classifier, which starts with random initialization and has no prior knowledge, is more likely to adapt to the data distribution of the target domain, solving the problem of individual differences among different subjects; subsequently, a portion of the target subject's data is used to fine-tune the feature extractor and classifier modules, enabling them to better learn the target subject's data distribution.
[0068] Model evaluation includes using four metrics: accuracy, specificity, sensitivity, and F1-score to assess the performance of the adaptive classifier recognition model.
[0069] Model applications include: applying an adaptive classifier recognition model to a real-time EEG acquisition system, where the system provides corresponding feedback based on the predictions made by the adaptive classifier recognition model when the user performs a corresponding motor imagery action.
[0070] The advantages of the technical solution provided in this invention are that, when fine-tuning the pre-trained model using target domain data, a new classifier layer is added. This design allows the new classifier layer to be specifically optimized for the target subject, thereby enabling more accurate learning and capture of features in EEG signals. Traditional transfer learning methods face challenges in addressing individual differences across subjects because the classification layer of the pre-trained model is designed based on data from multiple subjects and may not be suitable for specific subjects. This invention, by adding a new classifier layer for each target subject, ensures that the recognition model can better adapt to the unique characteristics of each target subject, significantly improving classification accuracy. Since the new classifier layer is trained based on the target subject's data, it can better capture and understand the subject's EEG signal patterns. This not only enhances the recognition model's ability to identify the target subject but also improves the model's generalization ability when facing new, unseen data. In a further preferred embodiment, the combination of the pre-trained model and the early stopping mechanism significantly reduces the model training and fine-tuning time. Compared to training the model from scratch, the fine-tuning strategy enables the model to reach ideal performance faster, accelerating the entire development and application process. Fine-tuning strategies are particularly suitable for handling situations with large individual differences. The EEG signals of each subject may vary significantly. Through fine-tuning, the model can be optimized for a specific individual, solving the problem that general models cannot cope with individual differences. Pre-trained models can reuse a large amount of subject data. This sharing mechanism effectively utilizes existing data resources, improving data utilization efficiency and the generality of the model.
[0071] In the specific comparative embodiments of the present invention, the comparison of different experimental methods is shown, and the specific comparison results are shown in Table 1.
[0072] Table 1. Experimental Comparison Table
[0073]
[0074] Please see Figure 4 Table 1 and its sub-tables represent the results of pre-trained models. Scheme-1 represents the result of fine-tuning the original classifier, and Schemes-2 to-6 represent adaptive classifier schemes with different numbers of layers, such as... Figure 4 As shown in (b) of the table, Table 1 shows that the model performance of the strategy of adding an adaptive classifier is better than that of simply fine-tuning the original classifier, which proves the effectiveness of the technical solution of the present invention.
[0075] The following are embodiments of the apparatus of the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the apparatus embodiments, please refer to the embodiments of the method of the present invention.
[0076] Please see Figure 5In this embodiment of the invention, an adaptive scalp EEG motor imagery signal recognition system is provided, comprising:
[0077] The signal acquisition module is used to acquire the scalp electroencephalogram (EEG) motor imagery signals to be identified from the target subject.
[0078] The signal recognition module is used to perform signal recognition based on the scalp EEG motor imagery signal to be identified, using a trained adaptive classifier recognition model, to obtain the scalp EEG motor imagery signal recognition result.
[0079] The training and acquisition steps of the trained adaptive classifier recognition model include:
[0080] Based on the acquired scalp EEG motor imagery signal samples, multiple basic general recognition models are trained by loading a dataset with the same paradigm as the recognition target.
[0081] Among multiple basic general recognition models, the basic general recognition model with the lowest verification loss of the target subject's scalp EEG motor imagery signal samples was used as the pre-training model.
[0082] The feature extractor module and pre-training parameters of the pre-trained model are read, and a model transfer fine-tuning strategy is adopted. The untrained classifier is trained using the scalp EEG motor imagery signal samples of the target subject to obtain a trained adaptive classifier recognition model.
[0083] In one embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used to perform the operation of an adaptive scalp EEG motor imagery signal recognition method.
[0084] In one embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the operating system of the terminal. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor, which can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the adaptive scalp EEG motor imagery signal recognition method in the above embodiments.
[0085] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0086] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0087] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0088] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A self-adaptive scalp electroencephalogram motor imagery signal recognition method, characterized in that, The method comprises the following steps: obtaining a to-be-identified scalp EEG motor imagery signal of a target subject; based on the to-be-identified scalp EEG motor imagery signal, using a trained adaptive classifier recognition model to perform signal recognition, and obtaining a scalp EEG motor imagery signal recognition result; wherein the training and obtaining step of the trained adaptive classifier recognition model comprises: based on the obtained scalp EEG motor imagery signal samples, a plurality of basic general recognition models are trained and obtained by loading a data set of the same paradigm as the recognition target; the basic general recognition model with the lowest verification loss of the scalp EEG motor imagery signal samples of the target subject is selected as a pre-training model; reading the feature extractor module and pre-training parameters of the pre-training model, and using a model migration fine-tuning strategy to train the untrained classifier using the scalp EEG motor imagery signal samples of the target subject, and obtaining a trained adaptive classifier recognition model; wherein, the step of training and obtaining a plurality of basic general recognition models based on the obtained scalp EEG motor imagery signal samples by loading a data set of the same paradigm as the recognition target comprises: sampling the EEG signals of a plurality of sample subjects to obtain raw EEG signal sample data of each sample subject; preprocessing the raw EEG signal sample data of each sample subject to obtain a training set, a verification set and a test set for each sample subject; wherein the preprocessing process is based on the raw EEG signal sample data, selecting EEG channel data related to the motor imagery region; filtering and down-sampling the selected EEG channel data to obtain two-dimensional channel-time data; converting the two-dimensional channel-time data into three-dimensional data of two-dimensional topology-time, and dividing to obtain the training set, the verification set and the test set; based on the training set, the verification set and the test set of each sample subject, the selected recognition model is trained and updated respectively to obtain a plurality of basic general recognition models; wherein in the training and updating process, the loss value of the validation data in each Epoch is continuously evaluated to adjust the weights and biases of the recognition model, and the parameter optimization and updating of the recognition model are completed; the step of reading the feature extractor module and pre-training parameters of the pre-training model, and using a model migration fine-tuning strategy to train the untrained classifier using the scalp EEG motor imagery signal samples of the target subject, and obtaining a trained adaptive classifier recognition model comprises: reading the feature extractor module and pre-training parameters of the pre-training model, and using a model migration fine-tuning strategy to train the untrained classifier using the scalp EEG motor imagery signal samples of the target subject, and obtaining a trained adaptive classifier recognition model; using accuracy, specificity, sensitivity and f1-score as four indicators to evaluate the performance of the trained adaptive classifier recognition model, and obtaining a trained adaptive classifier recognition model when the performance meets the preset performance requirements.
2. The adaptive scalp EEG motor imagery signal recognition method according to claim 1, characterized in that, The step of training and updating the selected recognition model based on the training set, the validation set and the test set of each sample subject, and obtaining a plurality of basic general recognition models, In the training and updating process, if the loss of the validation data does not decrease in a preset number of epochs, an early stopping mechanism is triggered, and the recognition model stops training.
3. An adaptive scalp EEG motor imagery signal recognition system, characterized in that, Comprise: The signal acquisition module is used for acquiring the to-be-identified scalp EEG motor imagery signal of the target subject; The signal recognition module is used for performing signal recognition based on the to-be-identified scalp EEG motor imagery signal by using the trained adaptive classifier recognition model, and obtaining a scalp EEG motor imagery signal recognition result; Wherein, the training and obtaining step of the trained adaptive classifier recognition model comprises: Based on the obtained scalp EEG motor imagery signal sample, a plurality of basic general recognition models are trained and obtained by loading a data set of the same paradigm as the recognition target; The basic general recognition model with the lowest validation loss of the scalp EEG motor imagery signal sample of the target subject in the plurality of basic general recognition models is taken as a pre-training model; Read the feature extractor module and pre-training parameters of the pre-training model and adopt a model migration fine-tuning strategy, train the untrained classifier using the scalp EEG motor imagery signal sample of the target subject, and obtain a trained adaptive classifier recognition model; Wherein, The step of training and obtaining a plurality of basic general recognition models based on the obtained scalp EEG motor imagery signal sample by loading a data set of the same paradigm as the recognition target comprises: The EEG signals of a plurality of sample subjects are sampled to obtain raw EEG signal sample data of each sample subject; The raw EEG signal sample data of each sample subject is preprocessed respectively to obtain a training set, a validation set and a test set of each sample subject; wherein, the pre-processing process is, based on the raw EEG signal sample data, selecting the EEG channel data related to the motor imagery area; the selected EEG channel data is filtered and down-sampled to obtain two-dimensional data of channel x time; the two-dimensional data of channel x time is converted into three-dimensional data of two-dimensional topology graph x time, and the training set, the validation set and the test set are obtained by division; The training set, the validation set and the test set of each sample subject are used to train and update the selected recognition model respectively, and a plurality of basic general recognition models are obtained; wherein, in the training and updating process, the loss value of the validation data in each Epoch is continuously evaluated, the weights and biases of the recognition model are adjusted, and the parameter optimization and updating of the recognition model are completed; The step of reading the feature extractor module and pre-training parameters of the pre-training model and adopting a model migration fine-tuning strategy, training the untrained classifier using the scalp EEG motor imagery signal sample of the target subject, and obtaining a trained adaptive classifier recognition model comprises: read the feature extractor module and pre-training parameters of the pre-trained model and use a model migration fine-tuning strategy to train the untrained classifier using the scalp EEG motor imagery signal samples of the target subject, and obtain a trained adaptive classifier recognition model; The trained adaptive classifier recognition model is evaluated in terms of accuracy, specificity, sensitivity and f1-score, and when the preset performance requirement is met, the trained adaptive classifier recognition model is obtained.
4. The adaptive scalp EEG motor imagery signal recognition system according to claim 3, wherein, In the step of training and updating the selected recognition model based on the training set, the validation set and the test set of each sample subject, In the training and updating process, if the loss of the validation data does not decrease in a preset number of epochs, an early stopping mechanism is triggered, and the recognition model stops training.
5. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to realize the adaptive scalp EEG motor imagery signal recognition method of any one of claims 1 or 2.
6. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the adaptive scalp EEG motor imagery signal recognition method of any one of claims 1 or 2.
Citation Information
Patent Citations
Cerebral apoplexy patient motor imagery task recognition method and system based on transfer learning
CN111695500A