A method and system for locating an electroencephalogram epileptiform discharge waveform target
By constructing input data with rules and processing it with neural networks, the problems of accuracy and consistency in the localization of epileptiform discharge waveforms in traditional electroencephalography (EEG) have been solved, achieving efficient and reliable EEG signal analysis.
Patent Information
- Application Number
- CN202211645986.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-12-20
AI Technical Summary
Traditional EEG epileptiform discharge waveform localization algorithms are not accurate enough, requiring doctors to spend a lot of time and effort, and existing deep learning algorithms suffer from poor data consistency due to sensitivity adjustments.
A deep learning object detection algorithm is used. By constructing input data with rules, the neural network structure is used to process EEG signals, including convolutional layers, max pooling layers, batch normalization layers, etc., and the model is optimized by combining loss function.
It improves the accuracy and data consistency of EEG epileptiform discharge waveform localization, reduces doctors' operation time, and enhances the reliability of the algorithm.
Smart Images

Figure CN116250851B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method and system for locating epileptiform discharge waveforms on electroencephalography (EEG). Background Technology
[0002] With the rapid development of deep learning image recognition technology in artificial intelligence, the time is ripe to apply deep learning technology to electroencephalogram (EEG) recognition. EEG doctors diagnose suspected epilepsy patients by reading their EEGs and locating the epileptiform discharge waveforms within them to formulate a diagnostic report. However, interpreting EEGs requires doctors to stare at the screen for several hours, which is extremely time-consuming and labor-intensive. Traditional EEG information processing algorithms for locating epileptiform waves lack accuracy. While many manufacturers' EEGs already possess these algorithmic models, doctors rarely use them due to low accuracy and frequent false alarms. Some papers have implemented algorithms based on the YOLO algorithm to locate epileptiform waves using EEG information processing. While this method is novel, EEG signals are not image information. Each doctor adjusts the sensitivity according to their personal habits, and changes in sensitivity alter the EEG curve, making it impossible to achieve uniformity and thus affecting the algorithm's judgment. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides a method and system for target localization of epileptiform discharge waveforms in electroencephalography (EEG). By using a deep learning target detection algorithm, data uniformity can be achieved even when the target of epileptiform discharge waveform in EEG is located.
[0004] To address the aforementioned problems, this invention proposes a method for locating epileptiform discharge waveforms on electroencephalography (EEG), the method comprising:
[0005] Background activity EEG signals are used to form first-dimensional background signal data based on a first dimension and replicated a first preset number of times.
[0006] The original data is used to form first-dimensional original data based on the first dimension and according to the second preset number of copies, wherein the first preset number of copies is greater than the second preset number of copies.
[0007] The original data of the first dimension is replaced by an equal amount of data in the background signal data of the first dimension, and the input data of the neural network structure is formed.
[0008] The input data is processed based on the predefined neural network structure to obtain the output result;
[0009] The loss function is calculated on the output to determine the difference between the predicted and actual results.
[0010] The first dimension is an electroencephalogram signal with a sampling rate of 125 for 125 sampling points of original data, and the corresponding labeled data of the first dimension contains the starting sampling point position and the ending sampling point position of the epileptic wave appearing in the segment of electroencephalogram signal.
[0011] The first dimension background signal data formed by copying the background activity electroencephalogram signal based on the first dimension and according to the first preset number of copies includes:
[0012] Randomly take a segment of 125 sampling points of the background activity electroencephalogram signal with a sampling rate of 125;
[0013] Copy the background activity electroencephalogram signal according to the first dimension, and copy 125 times to form data with a dimension of 125x125.
[0014] The first dimension original data formed by copying the original data based on the first dimension and according to the second preset number of copies includes:
[0015] Copy the original data according to the first dimension, and copy 40 times to form data with a dimension of 40x125.
[0016] The first dimension original data is replaced by an equal amount of data in the first dimension background signal data, including:
[0017] The data with a dimension of 40x125 is replaced by the values between 60x125 and 100x125 in the data with a dimension of 125x125.
[0018] The neural network includes an input layer, a convolution layer, a maximum pooling layer, a batch normalization layer, an activation layer, a random inactivation layer, and an output layer.
[0019] The loss function calculation on the output result includes:
[0020] The total loss function loss = 10*loc_loss + obj_loss + 0.1*noobj_loss + 0.5*class_loss;
[0021] loc_loss is responsible for detecting the position error of the frame of the object;
[0022] obj_loss is responsible for detecting the confidence error of the frame of the object;
[0023] noobj_loss is not responsible for detecting the confidence error of the frame of the object;
[0024] class_loss is a classification error.
[0025] Correspondingly, the application also provides a system for locating an electroencephalogram epileptiform discharge waveform target.
[0026] The first processing module is configured to form first-dimension background signal data based on the background active electroencephalogram signal according to a first preset replication number.
[0027] The second processing module is configured to form first-dimension original data based on the original data according to a second preset replication number, wherein the first preset replication number is greater than the second preset replication number.
[0028] The third processing module is configured to replace data in the first-dimension background signal data with the first-dimension original data in equal amounts, and form input data of the neural network structure.
[0029] The neural network module is configured to process the input data based on the set neural network structure to obtain an output result.
[0030] The calculation processing module is configured to calculate a loss function of the output result, and calculate a difference between a predicted result and an actual result.
[0031] The first dimension is a 125-sampling-point electroencephalogram signal with a sampling rate of 125, and the first-dimension labeled data contains the starting sampling point position and the ending sampling point position of the epileptic wave in the segment of the electroencephalogram signal.
[0032] The first processing module is configured to randomly take a segment of 125-sampling-point background active electroencephalogram signal with a sampling rate of 125; and replicate the background active electroencephalogram signal according to the first dimension, and replicate 125 times to form data with a dimension of 125x125.
[0033] The second processing module is configured to replicate the original data according to the first dimension, and replicate 40 times to form data with a dimension of 40x125.
[0034] The third processing module is configured to replace the data with a dimension of 40x125 with values between 60x125 and 100x125 in the data with a dimension of 125x125.
[0035] The method and system of the present application use big data and modern artificial intelligence deep learning technology to locate epileptic brain waves, and the accuracy is higher than that of traditional electroencephalogram signal analysis algorithm; the input data is constructed according to rules, so that the original true value of the electroencephalogram signal is retained, the data is not distorted due to sensitivity adjustment when using the image neural network, and the reliability of the algorithm is ensured. BRIEF DESCRIPTION OF DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0037] Figure 1 is a method flow chart of electroencephalogram epileptiform discharge waveform target positioning in the embodiment of the present application;
[0038] Figure 2 is a hierarchical structure diagram of a neural network model in the embodiment of the present application;
[0039] Figure 3 is a system structure diagram in the embodiment of the present application;
[0040] Figure 4 is an input data construction rule diagram in the embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments only constitute some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0042] Specifically, Figure 1 The method flow chart of electroencephalogram epileptiform discharge waveform target positioning in the embodiment of the present application is shown, and the method comprises:
[0043] S101, forming a first dimension background signal data based on a first dimension and according to a first preset replication number for a background activity electroencephalogram signal;
[0044] The first dimension is an electroencephalogram signal with a sampling rate of 125 for 125 sampling points, and the corresponding labeled data of the first dimension contains the starting sampling point position and the ending sampling point position of the epileptic wave appearing in the segment of electroencephalogram signal.
[0045] Here, a segment of background activity electroencephalogram signal with a sampling rate of 125 for 125 sampling points can be randomly taken, and the background activity electroencephalogram signal can be prepared in advance without limitation on the source or generation method.
[0046] Specifically, the first dimension background signal data is formed based on the first dimension and according to a first preset replication number, and the forming includes: randomly taking a background active electroencephalogram signal with a sampling rate of 125 and 125 sampling points; and replicating the background active electroencephalogram signal according to the first dimension, and replicating 125 times to form data with a dimension of 125x125.
[0047] S102, forming first dimension original data based on the first dimension and according to a second preset replication number.
[0048] It should be noted that the first preset replication number is greater than the second preset replication number.
[0049] It should be noted that the original data is an electroencephalogram signal with a sampling rate of 125 and 125 sampling points, that is, the dimension is 1x125, and the corresponding labeled data contains the starting sampling point position and the ending sampling point position of the epileptic wave appearing in the electroencephalogram signal, and the fine classification of the epileptic wave.
[0050] Specifically, the first dimension original data is formed based on the first dimension and according to a second preset replication number, and the forming includes: replicating the original data according to the first dimension, and replicating 40 times to form data with a dimension of 40x125.
[0051] S103, replacing the data in the first dimension background signal data with the first dimension original data in equal amounts, and forming input data of a neural network structure.
[0052] Specifically, the first dimension original data is replaced with the data in the first dimension background signal data in equal amounts, and the replacing includes: replacing the data with a dimension of 40x125 with values between 60x125 and 100x125 in the data with a dimension of 125x125.
[0053] S104, processing the input data based on the set neural network structure to obtain an output result.
[0054] Specifically, Figure 2 The hierarchical structure schematic diagram of the neural network model in the embodiment of the application is shown, and the neural network includes: an input layer Input, a maximum pooling layer Maxpooling2D, an output layer Output, a ConvBlock convolution block or a convolution layer, a Conv2D two-dimensional convolution layer, a Dropout random inactivation layer, a BatchNormalization batch normalization layer, a LeakyReLU activation layer, an output layer, and the like. The neural network structure related parameter settings are as follows:
[0055] Model: "EEG_Yolo"
[0056]
[0057]
[0058]
[0059] Total params: 8,771,563
[0060] Trainable params: 8,765,899
[0061] Non-trainable params: 5,664
[0062] S105. Calculate the loss function on the output results to determine the difference between the predicted results and the actual results.
[0063] The loss function calculation for the output results includes:
[0064] The total loss function is: loss = 10 * loc_loss + obj_loss + 0.1 * noobj_loss + 0.5 * class_loss;
[0065] The loss function loc_loss is responsible for detecting the positional error of the bounding box of an object.
[0066] The confidence error of the bounding box responsible for detecting objects, obj_loss;
[0067] The confidence error of the bounding box that is not responsible for detecting objects, noobj_loss;
[0068] Classification error, class_loss.
[0069] A loss function is a metric that measures the error between a model's prediction and the actual result. The smaller the value of the loss function, the closer the model's prediction is to the actual result. Therefore, the loss function is used to optimize model performance. In deep learning, the backpropagation algorithm is used to gradually adjust the parameters of each layer in the model in order to minimize the loss function.
[0070] Specifically, Figure 3 A schematic diagram of a system structure for target localization of epileptiform discharge waveforms on electroencephalograms according to an embodiment of the present invention is shown. The system includes:
[0071] The first processing module is used to generate first-dimensional background signal data from background activity EEG signals based on a first dimension and according to a first preset number of copies.
[0072] The second processing module is used to process the original data based on the first dimension and according to the second preset number of copies, forming first-dimensional original data, wherein the first preset number of copies is greater than the second preset number of copies.
[0073] The third processing module is used to replace the data in the first-dimensional background signal data with the original data of the first dimension in an equal amount, and form the input data of the neural network structure.
[0074] The neural network module is used to process input data based on a predefined neural network structure to obtain output results;
[0075] The calculation and processing module is used to calculate the loss function on the output results and calculate the difference between the predicted results and the actual results.
[0076] The first dimension is based on the EEG signal with a sampling rate of 125 based on 125 sampling points in the original data. The labeled data corresponding to the first dimension includes the start and end sampling points of the epileptic waves that appear in the EEG signal segment.
[0077] The first processing module is used to randomly select a background activity EEG signal with 125 sampling points and a sampling rate of 125; and to copy the background activity EEG signal according to the first dimension, copying it 125 times to form data with a dimension of 125x125.
[0078] The second processing module is used to copy the original data according to the first dimension, and copy it 40 times to form data with a dimension of 40x125;
[0079] The third processing module is used to replace the values between 60x125 and 100x125 in the data with a dimension of 125x125 with the data with a dimension of 40x125.
[0080] Figure 4 A schematic diagram of the input data construction rules in an embodiment of the present invention is shown. The input data construction rules are as follows:
[0081] (1) The original data is an EEG signal with a sampling rate of 125 at 125 sampling points, i.e., a dimension of 1x125. The corresponding labeled data includes the starting and ending sampling points of the epileptic wave that appears in the EEG signal, as well as the sub-category of the epileptic wave.
[0082] (2) Randomly select a background activity EEG signal with 125 sampling points and a sampling rate of 125. The background activity EEG signal can be prepared in advance and there are no restrictions on the source or generation method.
[0083] (3) The above background activity EEG signals are copied according to the first dimension, and copied 125 times to form data with a dimension of 125x125.
[0084] (4) Copy the original data according to the first dimension 40 times to form 40x125 dimension data, and replace the 40x125 values between 60x125 and 100x125 of the above 125x125 dimension data with this data, so as to finally form the input data of the algorithm model.
[0085] In summary, the method and system of this invention utilize big data and modern artificial intelligence deep learning technology for epileptic EEG localization, achieving higher accuracy than traditional EEG signal analysis algorithms. By constructing rules using input data, the input data retains the original true values of the EEG signals, and the use of image neural networks does not cause data distortion due to sensitivity adjustments, thus ensuring the reliability of the algorithm.
[0086] The aforementioned computer-readable storage medium can be an internal storage unit of the device described in the foregoing embodiments, such as a hard disk or memory. The aforementioned computer-readable storage medium can also be an external storage device of the device, such as an external hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Furthermore, the aforementioned computer-readable storage medium may include both internal storage units and external storage devices of the device. The aforementioned computer-readable storage medium is used to store the aforementioned computer program and other programs and data required by the device. The aforementioned computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0087] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed, the program can include the processes of the embodiments of the methods described above. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0088] The embodiments of the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for locating a target based on an epileptiform discharge waveform observed on an electroencephalogram (EEG), characterized in that, The method includes: The one-dimensional background activity EEG signal is used to form two-dimensional first-dimensional background signal data based on the first dimension and copied a first preset number of times. One-dimensional raw data is used to form two-dimensional first-dimensional raw data based on a first dimension and according to a second preset number of copies, wherein the first preset number of copies is greater than the second preset number of copies; The original data of the first dimension is replaced by an equal amount of data in the background signal data of the first dimension, and the input data of the neural network structure is formed. The input data is processed based on the predefined neural network structure to obtain the output result; The loss function is calculated on the output to determine the difference between the predicted and actual results. The raw data consists of an EEG signal with 125 sampling points and a sampling rate of 125. The corresponding labeled data includes the start and end sampling points of the epileptic waves that appear in this segment of the EEG signal. The loss function calculation for the output results includes: The total loss function is calculated as: loss = 10 * loc_loss + obj_loss + 0.1 * noobj_loss + 0.5 * class_loss; The loss function loc_loss is responsible for detecting the positional error of the bounding box of an object. The confidence error of the bounding box responsible for detecting objects, obj_loss; The confidence error of the bounding box that is not responsible for detecting objects, noobj_loss; Classification error, class_loss.
2. The method for target localization of epileptiform discharge waveforms on electroencephalography as described in claim 1, characterized in that, The process of forming first-dimensional background signal data based on the background activity EEG signals according to a first dimension and a first preset number of copies includes: A random sample of background activity EEG signal with 125 sampling points and a sampling rate of 125 was selected. The background activity EEG signal was copied along the first dimension, and copied 125 times to form data with a dimension of 125x125.
3. The method for target localization of epileptiform discharge waveforms on electroencephalography as described in claim 2, characterized in that, The process of forming the first-dimensional original data based on the first dimension and according to a second preset number of copies includes: The original data is copied along the first dimension 40 times to form data with a dimension of 40x125.
4. The method for target localization of epileptiform discharge waveforms on electroencephalography as described in claim 3, characterized in that, The step of replacing the data in the first-dimensional background signal data with the original data of the first dimension by an equal amount includes: Replace the values between 60x125 and 100x125 in the data with dimension 40x125.
5. The method for target localization of epileptiform discharge waveforms on electroencephalography as described in any one of claims 1 to 4, characterized in that, The neural network includes: an input layer, a convolutional layer, a max pooling layer, a batch normalization layer, an activation layer, a random deactivation layer, and an output layer.
6. A system for locating epileptiform discharge waveforms on electroencephalography (EEG), characterized in that, The system includes: The first processing module is used to form two-dimensional background signal data based on the first dimension and according to the first preset number of replications of the one-dimensional background activity EEG signal. The original data is an EEG signal with a sampling rate of 125 sampling points. The corresponding annotation data includes the starting sampling point position and the ending sampling point position of the epileptic wave that appears in the EEG signal segment. The second processing module is used to form two-dimensional first-dimensional original data from one-dimensional raw data based on a first dimension and according to a second preset number of copies, wherein the first preset number of copies is greater than the second preset number of copies. The third processing module is used to replace the data in the first-dimensional background signal data with the original data of the first dimension in an equal amount, and form the input data of the neural network structure. The neural network module is used to process input data based on a predefined neural network structure to obtain output results; The calculation and processing module is used to calculate the loss function of the output results and calculate the difference between the predicted results and the actual results. The loss function calculation for the output results includes: The total loss function is calculated as: loss = 10 * loc_loss + obj_loss + 0.1 * noobj_loss + 0.5 * class_loss; The loss function loc_loss is responsible for detecting the positional error of the bounding box of an object. The confidence error of the bounding box responsible for detecting objects, obj_loss; The confidence error of the bounding box that is not responsible for detecting objects, noobj_loss; Classification error, class_loss.
7. The system for target localization of EEG epileptiform discharge waveforms as described in claim 6, characterized in that, The first processing module is used to randomly select a background activity EEG signal with 125 sampling points and a sampling rate of 125; and to copy the background activity EEG signal according to the first dimension, copying it 125 times to form data with a dimension of 125x125. The second processing module is used to copy the original data according to the first dimension, and copy it 40 times to form data with a dimension of 40x125; The third processing module is used to replace the values between 60x125 and 100x125 in the data with a dimension of 125x125 with the data with a dimension of 40x125.
Citation Information
Patent Citations
License plate recognition and positioning method based on deep neural network
CN111310861A
Epileptic intracranial electroencephalography signal warning method based on deep convolutional attention network
CN113786204A
Method and apparatus for detecting abnormal discharge of electroencephalogram, and medium and device
WO2022236749A1