Interictal Epileptiform Discharge Detection Method and Device Based on Dual-View Feature Fusion Framework
By designing an IED detection method based on a dual-view feature fusion framework, combining the waveform characteristics and spatial characteristics of the EEG signal, the problem of low detection accuracy in the prior art is solved, and high-precision detection of IED events is achieved.
Patent Information
- Application Number
- CN202310155208.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2043-02-21
AI Technical Summary
The existing IED detection methods cannot effectively combine signal waveform features with spatial correlation characteristics between multiple channels, resulting in low detection accuracy, and existing algorithms may destroy the adjacency relationship between channels and affect the detection effect.
A IED detection method based on a dual-view feature fusion framework is designed. The deep signal waveform features and multi-channel correlation features of the EEG signal are extracted through the morphological feature learning module and the spatial feature learning module, and fused in the feature fusion module, and the model is trained and detected using training data.
It realizes high-precision detection of IED events, can accurately distinguish IED from benign sharp transients, and improves the accuracy and reliability of detection.
Smart Images

Figure CN116172517B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to a method and device for detecting interictal epileptiform discharges based on a dual-view feature fusion framework. Background Art
[0002] Interictal epileptiform discharge (IED) is an abnormal neuronal discharge activity that often appears during the interictal period of epilepsy patients and can be recorded by electroencephalogram (EEG). IED is an important biomarker in the diagnosis of epilepsy diseases, and recent research further shows that IED is closely related to neurodevelopmental abnormalities, cognitive impairment, etc. Considering the disadvantages of traditional manual review of EEG reports, such as time-consuming, high time cost for training physicians, and inconsistent evaluation criteria among different physicians, accurate and automatic IED detection tools are of great significance in the diagnosis of brain diseases and other aspects.
[0003] As an electrophysiological activity, the appearance and spread of IED will leave traces in multiple EEG channels of the whole brain. According to the standards of the International Federation of Clinical Neurophysiology (IFCN), typical IED signals should have two aspects: signal waveform characteristics and spatial correlation characteristics between multiple channels. Therefore, combined analysis of morphological characteristics and spatial characteristics is also considered the key to distinguishing epileptiform discharges from benign transients and artifacts. However, most of the existing IED detection methods, whether based on traditional feature engineering or deep learning, are mostly oriented to the recognition of waveform characteristics on a single channel and cannot reflect the physiological characteristics of IED; a few methods recognize by converting multi-channel EEG into two-dimensional EEG. Although they take into account the characteristics of IED under multiple channels, this approach changes the adjacency relationship between channels and destroys the original inter-channel correlation characteristics, unable to meet the requirements of accurate IED recognition. Summary of the Invention
[0004] The purpose of the present invention is to provide a method and device for detecting interictal epileptiform discharges based on a dual-view feature fusion framework to solve the technical problem of low detection accuracy in the prior art.
[0005] To solve the above technical problems, the technical solution of the present invention is as follows:
[0006] In the first aspect, a method for detecting interictal epileptiform discharges based on a dual-view feature fusion framework is provided, including:
[0007] S1: Respectively collect the original EEG signals of epilepsy patients during the interictal period and the original EEG signals of healthy subjects;
[0008] S2: Preprocess the collected original EEG signals and perform annotation;
[0009] S3: Construct an IED detection framework, which includes a morphological feature learning module for extracting the waveform features of depth signals, a spatial feature learning module for extracting the correlation features of multi-channel EEG signals, and a feature fusion module for fusing waveform features and spatial features;
[0010] S4: Obtain training data from the preprocessed and labeled data, and use the training data to train the IED detection framework;
[0011] S5: Use the trained IED detection framework to detect the data to be recognized.
[0012] In one implementation, step S1 includes:
[0013] Collect the original EEG signals of epileptic patients during the interictal period and the original EEG signals of healthy subjects using a 10-20 system scalp EEG instrument.
[0014] In one implementation, step S2 includes:
[0015] S2.1: Resample the collected EEG data to 250 Hz, and perform band-pass filtering from 1 to 70 Hz and notch filtering at 50 Hz on the resampled signal;
[0016] S2.2: Label the signal obtained in step S2.1 as positive and negative samples and crop them. Among them, the positive samples are composed of interictal epileptiform discharge segments from epileptic patients, and the negative samples are composed of background segments and benign sharp transient segments from healthy subjects. The length of each labeled segment is 0.8 s;
[0017] S2.3: Reset the lead combinations of the signal segments obtained in step S2.2, and each segment of the signal is saved in three lead combination forms: average reference leads, longitudinal bipolar leads, and transverse bipolar leads.
[0018] In one implementation, in the IED detection framework constructed in step S3, the morphological feature learning module is sequentially composed of a one-dimensional convolutional layer, three residual connection layers, a one-dimensional convolutional layer, and an average pooling layer. Among them, the size of the convolutional kernel of the first one-dimensional convolutional layer is 1, the number of input channels is 19, and the number of output channels is 128; the structures of the three residual connection layers are the same, and they are sequentially composed of a batch normalization layer, two one-dimensional convolutional layers with a convolutional kernel of 3, and an activation layer for extracting the depth morphological features of the waveform; the subsequent one-dimensional convolutional layer has a convolutional kernel size of 1, the number of input channels is 128, and the number of output channels is 1, which is used to reduce the features in the channel dimension; the average pooling layer has a stride of 2, which is used to reduce the features in the time domain.
[0019] In one embodiment, in the IED detection framework constructed in step S3, the spatial feature learning module includes three parts: peak region localization, EEG signal channel rearrangement, and spatial feature extraction. Among them, peak region localization measures the characteristics of phase inversion by calculating the variance between channels under horizontal and vertical bipolar leads for each sampling frame, and takes the center of the time window with the largest variance change as the peak of the IED; EEG signal channel rearrangement rearranges the signals under the average reference lead into a three-dimensional tensor according to the channel physical topology structure, and uses the mean value of the surrounding channels to supplement the missing parts in the three-dimensional tensor; spatial feature extraction uses a three-dimensional convolutional layer to capture the spatial features of each sampling frame around each IED peak, and uses a long short-term memory network to capture the evolution of the spatial features. The output of the last frame of the long short-term memory network is used as the spatial feature vector.
[0020] In one embodiment, in the IED detection framework constructed in step S3, the feature fusion module concatenates the morphological feature vector and the spatial feature vector to form a fused feature vector, and uses three fully connected layer networks to classify the morphological feature vector, the spatial feature vector, and the fused feature vector respectively to obtain the classification results of three branches.
[0021] In one embodiment, during the training process of step S4, the IED segments from epilepsy patients and the benign sharp transients or background segments from healthy subjects are jointly input to construct the IED detection framework; the classification results of the three branches obtained are used to calculate the loss using cross-entropy, and the mean of the three cross-entropy losses is taken as the final classification loss and backpropagation is performed.
[0022] Based on the same inventive concept, the second aspect of the present invention provides an interictal epileptiform discharge detection device based on a dual-view feature fusion framework, including:
[0023] A data acquisition module for respectively acquiring the original EEG signals of epilepsy patients during the interictal period and the original EEG signals of healthy subjects;
[0024] A preprocessing module for preprocessing the acquired original EEG signals and performing annotation;
[0025] A detection framework construction module for constructing an IED detection framework, where the IED detection framework includes a morphological feature learning module for extracting deep signal waveform features, a spatial feature learning module for extracting multi-channel EEG signal correlation features, and a feature fusion module for fusing waveform features and spatial features;
[0026] A training module for obtaining training data from the preprocessed and annotated data and using the training data to train the IED detection framework;
[0027] A detection module for using the trained IED detection framework to detect the data to be recognized.
[0028] Based on the same inventive concept, a third aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed, the method described in the first aspect is implemented.
[0029] Based on the same inventive concept, a fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, and when the processor executes the program, the method described in the first aspect is implemented.
[0030] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows:
[0031] A high-precision interictal epileptiform discharge detection method based on a dual-view feature fusion framework provided by the present invention constructs an IED detection framework. Through the morphological feature learning module, deep signal waveform features can be extracted, through the spatial feature learning module, multi-channel electroencephalogram signal correlation features can be extracted, and through the fusion module, the above two types of features can be fused. After training the IED detection framework with training data; using the trained IED detection framework can realize the detection of the data to be recognized, so as to obtain an accurate evaluation result. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required to be used in the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0033] Figure 1 It is a schematic structural diagram of the IED detection framework constructed in the embodiment of the present invention;
[0034] Figure 2 It is a schematic structural diagram of the morphological feature learning module constructed in the embodiment of the present invention;
[0035] Figure 3 It is a schematic structural diagram of the signal channel rearrangement in the embodiment of the present invention
[0036] Figure 4 It is a schematic structural diagram of the spatial feature learning module constructed in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0037] Existing research work has pointed out that spatial features are the key to distinguishing IEDs from benign sharp transients. However, existing IED detection algorithms mainly rely on the waveform features of signals and do not pay attention to the spatial features presented by IED events among channels. Moreover, some IED detection algorithms map multi-channel signals into two-dimensional pictures to achieve the extraction of multi-channel information. This approach artificially defines the adjacency relationship between channels and destroys the true topological structure of the channels. These existing algorithms have poor performance in distinguishing IEDs from benign sharp transients with waveforms similar to IEDs, and are prone to misdiagnosis.
[0038] Based on this, the present invention proposes a detection algorithm that comprehensively considers waveform features and spatial features. By separately extracting the morphological features and spatial features of the segment to be recognized and fusing the features of the two for final classification, high-precision detection of IEDs can be achieved.
[0039] The main inventive concept of the present invention is as follows:
[0040] Select the 10-20 system multi-channel electroencephalogram signals as the data basis for IED detection, and design a detection framework that fuses the waveform features and spatial features of electroencephalogram signals. This framework includes three main parts, which separately extract the waveform features, spatial features of electroencephalogram signals and fuse these two. In the feature fusion module, prediction results are output respectively according to the waveform feature vector, spatial feature vector and fusion feature vector; during training, the cross-entropy losses of the three prediction results are calculated and averaged for backpropagation; when predicting unknown samples, the prediction result based on the fusion feature vector is used as the standard.
[0041] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0042] Embodiment 1
[0043] The present invention provides an interictal epileptiform discharge detection method based on a dual-view feature fusion framework, including:
[0044] S1: Respectively collect the original electroencephalogram signals of epileptic patients during the interictal period and the original electroencephalogram signals of healthy subjects;
[0045] S2: Preprocess the collected original electroencephalogram signals and perform annotation;
[0046] S3: Construct an IED detection framework, which includes a morphological feature learning module for extracting the waveform features of depth signals, a spatial feature learning module for extracting the correlation features of multi-channel EEG signals, and a feature fusion module for fusing waveform features and spatial features;
[0047] S4: Obtain training data from the preprocessed and labeled data, and use the training data to train the IED detection framework;
[0048] S5: Use the trained IED detection framework to detect the data to be recognized.
[0049] Interictal epileptiform discharges (IEDs) are specific discharges that appear in the EEG of epilepsy patients during the interictal period of epilepsy. They are important biological indicators for the diagnosis of epilepsy. Some studies have also shown that IEDs are significantly related to diseases such as neurodevelopmental disorders and cognitive impairments. The main goal of the IED detection task is to identify IED segments from the EEG signals of subjects. Considering that IED is an electrophysiological event with a diffusion feature across the whole brain region, comprehensive analysis of multi-channel EEG signals of the whole brain is more in line with physiological significance and has higher accuracy. Based on this, the present invention relates to a detection framework based on dual-view feature fusion to directly detect IED events.
[0050] Please refer to Figure 1 , which is a schematic structural diagram of the IED detection framework constructed in the implementation of the present invention.
[0051] In one implementation, step S1 includes:
[0052] Use a 10-20 system scalp EEG instrument to collect the original EEG signals of epilepsy patients during the interictal period and the original EEG signals of healthy subjects.
[0053] In one implementation, step S2 includes:
[0054] S2.1: Resample the collected EEG data to 250 Hz, and perform band-pass filtering from 1 to 70 Hz and notch filtering at 50 Hz on the resampled signals;
[0055] S2.2: Label and crop the signals obtained in step S2.1. Among them, the positive samples are composed of interictal epileptiform discharge segments from epilepsy patients, and the negative samples are composed of background segments and benign sharp transient segments from healthy subjects. The length of each labeled segment is 0.8 s;
[0056] S2.3: Reset the lead combinations of the signal segments obtained in step S2.2, and each segment of the signal is saved in three lead combination forms: average reference leads, longitudinal bipolar leads, and transverse bipolar leads.
[0057] In the specific implementation process, first, the collected EEG signals are downsampled (resampled) and filtered. Then, IED events are labeled in the resting-state EEG of epilepsy patients with a length of 0.8 s. To ensure the balance of training data, a certain amount of background segments or benign sharp transient segments are labeled in the EEG of healthy subjects so that the number of segments from healthy subjects is equal to the number of IED events. Among them, a polyphase filtering algorithm can be used to resample the collected EEG data to 250 Hz. When labeling, IED segments are labeled in the EEG of epilepsy patients, and background segments and benign sharp transient segments that are easily confused with IEDs are labeled in the EEG of healthy subjects. Each segment is saved in the format of an average reference lead with a length of 0.8 s.
[0058] To further augment data features to improve the robustness of the model, the present invention uses two EEG signal augmentation strategies: 1) Time-shift the labeled segments forward and backward to increase the data features in the time dimension; 2) Swap the channel signals of the segments according to the left and right brain regions to increase the data features in the space dimension.
[0059] The dimension of the final single sample is [_h, seg_length]. n_ch represents the number of channels of electrophysiological data. Here, the number of channels of the 10-20 system average reference lead is 19; seg_length represents the segment length. Here, the sample duration is 0.8 s and the sampling rate is 250 Hz, so seg_length is 200. Then the finally obtained sample data can be expressed as [_, n_h, seg_length], where n_samples represents the number of samples.
[0060] In one implementation, in the IED detection framework constructed in step S3, the morphological feature learning module is successively composed of a one-dimensional convolutional layer, three residual connection layers, a one-dimensional convolutional layer, and an average pooling layer. Among them, the convolutional kernel size of the first one-dimensional convolutional layer is 1, the number of input channels is 19, and the number of output channels is 128; the structures of the three residual connection layers are the same, and they are successively composed of a batch normalization layer, two one-dimensional convolutional layers with a convolutional kernel of 3, and an activation layer, which are used to extract the deep morphological features of the waveform; the subsequent one-dimensional convolutional layer has a convolutional kernel size of 1, the number of input channels is 128, and the number of output channels is 1, which is used to reduce the features in the channel dimension; the average pooling layer has a stride of 2, which is used to reduce the features in the time domain.
[0061] Specifically, the input of the morphological feature learning module is the segment to be classified under the average reference lead, and the output is a feature vector embedded with the signal morphological features. Through the first one-dimensional convolution, it is possible to automatically learn the weights between channels and enrich the feature space without destroying the time-domain correlation. The purpose of the residual connection layer is to extract the deep morphological features of the waveform.
[0062] In the specific implementation process, the input of the morphological feature extraction module is the sample signal [_, n_h, seg_length], and the output is the feature vector [_, m_] corresponding to each sample. The parameters of the input sample are the same as those of the sample obtained in step S2. The length m_embedding of the morphological feature vector is 100.
[0063] In one implementation, in the IED detection framework constructed in step S3, the spatial feature learning module includes three parts: peak region localization, EEG signal channel rearrangement, and spatial feature extraction. Among them, peak region localization measures the characteristics of phase inversion by calculating the variance between channels under horizontal and vertical bipolar leads for each sampling frame, and takes the center of the time window with the largest variance change as the peak of the IED; the EEG signal channel rearrangement rearranges the signals under the average reference lead into a three-dimensional tensor according to the channel physical topology structure, and uses the mean of the surrounding channels to supplement the missing parts in the three-dimensional tensor; spatial feature extraction uses a three-dimensional convolutional layer to capture the spatial features of each sampling frame around each IED peak, and uses a long short-term memory network to capture the evolution of the spatial features. The output of the last frame of the long short-term memory network is used as the spatial feature vector.
[0064] Specifically, the spatial feature learning module includes three parts: IED peak localization based on the phase inversion characteristics under bipolar leads, signal channel rearrangement based on spatial topology, and spatial feature extraction based on neural networks. Its input is three lead segments of the same signal to be classified under the average reference lead, horizontal and vertical bipolar leads. Among them, the segments under the horizontal and vertical bipolar leads are used to locate the peak of the signal, and the signal under the average reference lead is used for channel rearrangement and spatial feature extraction. Its output is a feature vector embedded with the spatial features of the signal.
[0065] Among them, the purpose of the peak region localization algorithm is to locate and retain the peak region of the IED, so as to avoid the spatial features of the relatively obvious peak region being covered by the relatively stable and long background segments. The peak region localization algorithm utilizes the phase inversion mutation characteristics of the IED under bipolar leads, and the peak of the IED is located at the center of the time window with the most rapid variance change (i.e., the largest variance of variance) above the time domain.
[0066] In the specific implementation process, in order to improve the resolution of bipolar leads, the present invention converts the original sample signal into two bipolar lead modes, horizontal and vertical, and stacks them together. The stacked single sample signal S = [__ch, seg_length], where n_bi_h is the number of channels after the bipolar lead is stacked, and the value is 36. Then the variance of the sample in the time domain is V = var(S, dim = 0), dim represents the dimension, and the above formula represents the calculation of the variance of the single sample signal S in the 0th dimension (time domain dimension). The sliding time window is used to measure the degree of variance change in the time domain, and the peak is located at Where l is the signal length seg_length, l r , l w are the length of the retained peak area and the length of the sliding time window, respectively. N is a natural number set. i is the coordinate (index) of the position, which refers to the i-th frame. p represents the coordinates of the peak, and p represents the peak. After positioning is completed, the original average reference lead signal is retained. The output of each sample is [_h,l r ], in this embodiment l r is 50.
[0067] Signal channel rearrangement refers to rearranging the signal under the average reference lead into a three-dimensional tensor according to the channel physical topology, and using the mean of the surrounding channels to fill in the missing parts of the three-dimensional tensor. The mapping relationship is as follows Figure 3 As shown, the size of the three-dimensional tensor corresponding to each sample after rearrangement is [5,5,l r ].
[0068] The purpose of the spatial feature extraction module is to capture the spatial features of IED and its evolution process. It consists of three parts, namely, a three-dimensional convolutional layer, a downsampling layer, and a long short-term memory network. First, three layers of three-dimensional convolutional layers are used to extract spatial features for each sampling frame. Here, the sampling frame refers to the voltage spatial distribution recorded by each EEG channel at a certain sampling moment. The step size of the three-dimensional convolutional layer in the time domain is 1, which ensures that the features of each sampling frame are extracted independently. After extraction, the spatial features of each sampling frame together constitute a spatial feature sequence, which can be recorded as [_, lr], where s_embedding is the feature dimension after extraction of each sampling frame, and l ris the number of sampling frames, i.e., the length of the aforementioned three-dimensional tensor in the time domain. Subsequently, to capture the microscopic physiological information and macroscopic state of the spatial feature changes, the extracted spatial feature sequence is downsampled by 50% and 25%. Then, the downsampled spatial feature sequence and the spatial feature sequence before downsampling together constitute three independent spatial feature sequences. Three independent long short-term memory networks are used to extract the evolution of the spatial features of these three spatial feature sequences, and the sum of the states of the last hidden layer of the three long short-term memory networks is used as the spatial feature vector, thus realizing the fusion of the change features of the space at different scales. The size of the final spatial feature vector is [_]. In this embodiment, s_embedding is 32.
[0069] In one implementation manner, in the IED detection framework constructed in step S3, the feature fusion module concatenates the morphological feature vector and the spatial feature vector to form a fused feature vector, and uses three fully connected layer networks to classify the morphological feature vector, the spatial feature vector, and the fused feature vector respectively, obtaining the classification results of three branches.
[0070] The feature fusion module is to fuse the morphological features and spatial features and achieve the final classification. However, directly concatenating and training the morphological feature vector and the spatial feature vector may cause the convergence speeds of the morphological feature extraction module and the spatial feature extraction module to be inconsistent and deviate from the optimal performance. To solve this problem, the present invention introduces the idea of gradient mixing, that is, using three independent fully connected layers to classify and predict the morphological feature vector, the spatial feature vector, and the one-dimensional fused feature vector formed by concatenating the two, where the activation function of all fully connected layers is Sigmoid. In the training stage, the losses of the classification results of the three fully connected layers are calculated respectively, and the mean of the three losses is taken for loss backpropagation; in the prediction stage, only the output result of the fully connected layer corresponding to the fused feature vector is used as the final prediction result.
[0071] In one implementation manner, during the training process of step S4, the IED segments from epileptic patients and the benign sharp transients or background segments from healthy subjects are jointly input to construct the IED detection framework; the cross-entropy is used to calculate the losses of the classification results of the three branches obtained, and the mean of the three cross-entropy losses is taken as the final classification loss and backpropagated.
[0072] During the detection process, the sample to be classified is input into the model to extract waveform and spatial features, and the confidence level output by the fully connected layer corresponding to the fused feature vector is used as the prediction result.
[0073] The method provided by the present invention will be described below through specific embodiments.
[0074] Step 1: Data acquisition, which refers to using a standard 10-20 system electroencephalograph to collect the electroencephalogram (EEG) of the subject in the resting state. The collected EEG data is downsampled to 250 Hz based on a polyphase filtering algorithm, and then a band-pass filter of 1-70 Hz and a notch filter of 50 Hz are applied to the downsampled EEG data.
[0075] Step 2: Data preprocessing, which refers to preprocessing the collected dataset and annotating IED segments, background, and benign sharp transient segments. Since the duration of IED events usually does not exceed 0.2 s, in this embodiment, 0.8 s is used as the length of the cropped segment to ensure that the complete IED event signal can be included; at the same time, since IED events are relatively rare, to increase the diversity of features, this embodiment uses two data augmentation schemes: by moving the extracted segments forward and backward in the time domain, the diversity of features in the time dimension is increased without destroying the complete IED event; by swapping the channel signals at symmetric positions in the left and right brain regions of the brain, the diversity of features in the spatial dimension is increased.
[0076] Step 3: Construct an IED event detection framework;
[0077] (3.1) To extract the morphological features contained in the signal, this embodiment designs a morphological feature extraction module composed of a one-dimensional convolutional network. As Figure 2 shown, the input of the morphological feature extraction module is a segment under the 0.8 s average reference lead. The one-dimensional convolutional neural network can adaptively learn the weights between channels, so as to extract the morphological features of the signal without artificially introducing the correlation information between channels. The output of the morphological feature extraction module is a feature vector with a length of 100.
[0078] (3.2) To extract the spatial features contained in the signal, this embodiment designs a morphological feature extraction module composed of a three-dimensional convolutional network and a long short-term memory network, which are used to extract the spatial features of each sampling frame in the time domain and the evolution of these spatial features in the time domain, respectively. The initial input of the spatial feature extraction module is first based on a segment under the 0.8 s bipolar reference lead. After the wave peaks are located by the wave peak localization algorithm, the parts on both sides of the wave peak under the average reference lead with a duration of 0.05 s each are retained; then as Figure 3 shown, the segment is arranged according to the spatial topological structure, and the missing parts corresponding to the physical channels in the tensor are filled with the mean values of the surrounding channels. The subsequent structure of the spatial feature extraction module is as Figure 4 shown, and the output of the spatial feature extraction module is a feature vector with a length of 32.
[0079] (3.3) To achieve the fusion of morphological features and spatial features, this embodiment adopts the idea of gradient mixing, that is, three fully connected layers are used to process the morphological and spatial feature vectors and the fused feature vector respectively. Therefore, the lengths of the input vectors of the three are 100, 32, and 132 respectively, and the outputs are all confidence levels between 0 and 1.
[0080] Step 4: Use the training data to train the IED event detection framework;
[0081] To achieve parameter sharing and co-training among modules, in this embodiment, the cross-entropy loss is calculated for the outputs of the three fully connected layers respectively during training, and the mean value of the three is used as the final loss for training, thus alleviating the performance loss caused by the inconsistent convergence speeds of different modules.
[0082] Step 5: Use the trained IED event detection framework above to detect the data to be recognized.
[0083] To confirm the effect of this embodiment, this embodiment uses the data in the same dataset that has not been used for training, performs the same data cropping and downsampling operations, and obtains a series of data to be recognized. Inputting these data to be recognized into the detection framework can obtain the final recognition result.
[0084] Compared with the prior art, the beneficial effects of the present invention are:
[0085] 1. The present invention takes the lead in attempting to extract and fuse the morphological and waveform features of IED events respectively, and shows good results in the IED event detection task, indicating that correctly capturing the evolution of spatial features helps the recognition of such physiological events.
[0086] 2. The present invention proposes an IED peak positioning algorithm using the discharge characteristics of IED events, and innovatively applies the IED peak positioning to IED event detection, improving the detection effect.
[0087] 3. During data preprocessing and annotation, this invention labels the interictal epileptiform discharge segments from epilepsy patients as positive samples, labels the background segments and benign sharp transient segments from healthy subjects as negative samples, and by fusing the morphological features and spatial features of electroencephalogram signals, the model not only has good performance in distinguishing IEDs and background electroencephalogram signals, but also has outstanding advantages in distinguishing IEDs and benign sharp transients (Benign Sharp Transient) with similar waveforms
[0088] when.
[0089] Embodiment 2
[0090] Based on the same inventive concept, the present invention discloses an interictal epileptiform discharge detection device based on a dual-view feature fusion framework, including:
[0091] A data acquisition module for respectively acquiring the original electroencephalogram (EEG) signals of epileptic patients during the interictal period and the original EEG signals of healthy subjects;
[0092] A preprocessing module for preprocessing the acquired original EEG signals and performing annotation;
[0093] A detection framework construction module for constructing an IED detection framework, where the IED detection framework includes a morphological feature learning module for extracting deep signal waveform features, a spatial feature learning module for extracting multi-channel EEG signal correlation features, and a feature fusion module for fusing waveform features and spatial features;
[0094] A training module for obtaining training data from the preprocessed and annotated data and using the training data to train the IED detection framework;
[0095] A detection module for using the trained IED detection framework to detect the data to be recognized. Since the device introduced in the second embodiment of the present invention is the device used for implementing the interictal epileptiform discharge detection method based on the dual-view feature fusion framework in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, those skilled in the art can understand the specific structure and variations of the device, so it will not be elaborated here. Any device used in the method of the first embodiment of the present invention belongs to the scope protected by the present invention.
[0096] Embodiment 3
[0097] Based on the same inventive concept, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed, it implements the method described in Embodiment 1.
[0098] Since the computer-readable storage medium introduced in the third embodiment of the present invention is the computer-readable storage medium used for implementing the interictal epileptiform discharge detection method based on the dual-view feature fusion framework in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, those skilled in the art can understand the specific structure and variations of the computer-readable storage medium, so it will not be elaborated here. Any computer-readable storage medium used in the method of the first embodiment of the present invention belongs to the scope protected by the present invention.
[0099] Embodiment 4
[0100] Based on the same inventive concept, the present application also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the above program, the method in Embodiment 1 is implemented.
[0101] Since the computer device introduced in Embodiment 4 of the present invention is the computer device used to implement the interictal epileptiform discharge detection method based on the dual-view feature fusion framework in Embodiment 1 of the present invention, based on the method introduced in Embodiment 1 of the present invention, those skilled in the art can understand the specific structure and variations of the computer device, so it will not be elaborated here. Any computer device used in the method of Embodiment 1 of the present invention belongs to the scope of protection of the present invention.
[0102] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
[0103] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0104] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications falling within the scope of the present invention. Obviously, those skilled in the art can make various changes and variations to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these changes and variations.
Claims
1. An interictal epileptiform discharge detection method based on a dual-view feature fusion framework, characterized in that Including: S1: Respectively collect the original EEG signals during the interictal period of epilepsy patients and the original EEG signals of healthy subjects; S2: Preprocess the collected original EEG signals and perform annotation; S3: Construct an IED detection framework, which includes a morphological feature learning module for extracting the waveform features of depth signals, a spatial feature learning module for extracting the correlation features of multi-channel EEG signals, and a feature fusion module for fusing waveform features and spatial features. The spatial feature learning module includes three parts: peak region localization, EEG signal channel rearrangement, and spatial feature extraction. Among them, peak region localization measures the feature of phase inversion by calculating the variance between channels under transverse and longitudinal bipolar leads for each sampling frame, and takes the center of the time window with the largest variance change as the peak of the IED; EEG signal channel rearrangement rearranges the signals under the average reference lead into a three-dimensional tensor according to the channel physical topology structure, and uses the mean of the surrounding channels to supplement the missing parts in the three-dimensional tensor; spatial feature extraction uses a three-dimensional convolutional layer to capture the spatial features of each sampling frame around each IED peak, and uses a long short-term memory network to capture the evolution of the spatial features. The output of the last frame of the long short-term memory network is used as the spatial feature vector; S4: Obtain training data from the preprocessed and annotated data, and use the training data to train the IED detection framework; S5: Use the trained IED detection framework to detect the data to be recognized.
2. The interictal epileptiform discharge detection method based on the dual-view feature fusion framework according to claim 1, wherein, Step S1 includes: Use a 10-20 system scalp EEG instrument to collect the original EEG signals during the interictal period of epilepsy patients and the original EEG signals of healthy subjects.
3. The interictal epileptiform discharge detection method based on the dual-view feature fusion framework according to claim 1, characterized in that, Step S2 includes: S2.1: Resample the collected EEG data to 250 Hz, and perform band-pass filtering from 1 to 70 Hz and notch filtering at 50 Hz on the resampled signal; S2.2: Label and crop the signals obtained in step S2.
1. Among them, the positive samples are composed of interictal epileptiform discharge segments from epilepsy patients, and the negative samples are composed of background segments and benign sharp transient segments from healthy subjects. The length of each labeled segment is 0.8 s; S2.3: Reset the lead combinations of the signal segments obtained in step S2.2, and each segment of the signal is saved in the form of segments under three lead combinations: average reference lead, longitudinal bipolar lead, and transverse bipolar lead.
4. The interictal epileptiform discharge detection method based on the dual-view feature fusion framework according to claim 1, characterized in that, In the IED detection framework constructed in step S3, the morphological feature learning module is successively composed of a one-dimensional convolutional layer, three residual connection layers, a one-dimensional convolutional layer, and an average pooling layer. Among them, the convolutional kernel size of the first one-dimensional convolutional layer is 1, the number of input channels is 19, and the number of output channels is 128; the structures of the three residual connection layers are the same, and they are successively composed of a batch normalization layer, two one-dimensional convolutional layers with a convolutional kernel of 3, and an activation layer, which are used to extract the depth morphological features of the waveform; the subsequent one-dimensional convolutional layer has a convolutional kernel size of 1, the number of input channels is 128, and the number of output channels is 1, which is used to reduce the features in the channel dimension; the average pooling layer has a step size of 2, which is used to reduce the features in the time domain.
5. The interictal epileptiform discharge detection method based on the dual-view feature fusion framework according to claim 1, characterized in that In the IED detection framework constructed in step S3, the feature fusion module concatenates the morphological feature vector and the spatial feature vector to form a fused feature vector, and uses three fully-connected layer networks to classify the morphological feature vector, the spatial feature vector, and the fused feature vector respectively, obtaining the classification results of three branches.
6. The interictal epileptiform discharge detection method based on the dual-view feature fusion framework according to claim 5, wherein During the training process of step S4, the IED segments from epileptic patients and the benign sharp transients or background segments from healthy subjects are jointly input into the constructed IED detection framework; the classification results of the three obtained branches are used to calculate the loss using cross-entropy, and the mean of the three cross-entropy losses is taken as the final classification loss and backpropagation is performed.
7. An interictal epileptiform discharge detection device based on a dual-view feature fusion framework, characterized in that Including: A data acquisition module for respectively acquiring the original EEG signals during the interictal period of epileptic patients and the original EEG signals of healthy subjects; A preprocessing module for preprocessing the acquired original EEG signals and performing annotation; A detection framework construction module for constructing an IED detection framework, which includes a morphological feature learning module for extracting deep signal waveform features, a spatial feature learning module for extracting multi-channel EEG signal correlation features, and a feature fusion module for fusing waveform features and spatial features. The spatial feature learning module includes three parts: peak region localization, EEG signal channel rearrangement, and spatial feature extraction. Among them, peak region localization measures the feature of phase inversion by calculating the variance between channels under horizontal and vertical bipolar leads for each sampling frame, and takes the center of the time window with the largest variance change as the peak of the IED; the EEG signal channel rearrangement rearranges the signals under the average reference lead into a three-dimensional tensor according to the channel physical topology structure, and uses the mean of the surrounding channels to supplement the missing parts in the three-dimensional tensor; spatial feature extraction uses a three-dimensional convolutional layer to capture the spatial features of each sampling frame around each IED peak, and uses a long short-term memory network to capture the evolution of the spatial features. The output of the last frame of the long short-term memory network is used as the spatial feature vector; A training module for obtaining training data from the preprocessed and annotated data and training the IED detection framework using the training data; A detection module for detecting the data to be recognized using the trained IED detection framework.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed, it implements the method described in any one of claims 1 to 6.
9. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Interference eliminating method of time-space domain dual subspace projection based on magnetoencephalogram
CN108478208A
Epileptic patient interictal epileptiform electrical activity detection device and method
CN112674782A