One dimensional convolutional neural networks for seizure onset detection using long-term scalp and intracranial EEG

model was trained with event-based K -fold ( K is the number of seizures per patient) cross validation for detecting all seizures of each patient. Finally, we evaluated the performances of the proposed approach in the two levels: the segment-based level and the event-based level. The proposed method was tested on two long-term EEG datasets: the CHB-MIT sEEG dataset and the SWEC-ETHZ iEEG dataset. For the CHB-MIT sEEG dataset, we achieved 88.14% sensitivity, 99.62% speciﬁcity and 99.54% accuracy in the segment-based level. From the perspective of the event-based level, 99.31% sensitivity, 0.2/h false detection rate (FDR) and mean 8.1-s latency were achieved. For the SWEC-ETHZ iEEG dataset, in the segment-based level, 90.09% sensitivity, 99.81% speciﬁcity and 99.73% accuracy were obtained. In the event-based level, 97.52% sensitivity, 0.07/h FDR and mean 13.2-s latency were attained. From these results, we can see that our method can effectively use both sEEG and iEEG data to detect epileptic seizures, and this may provide a reference for the clinical application of seizure onset detection.


Introduction
Epilepsy is a chronic neurological disease, which results from sudden abnormal and synchronous electrical activities of brain neurons.It has affected nearly 1% of the world's population, and about 30% of people with epilepsy are resistant to antiepileptic drugs [1].Electroencephalogram (EEG) has become an effective screening technique in diagnosing epilepsy.Since the manual detection of seizures by reviewing long-term and continuous EEG is a time-consuming and laborious task, the automated and timely detection of seizures can greatly improve diagnostic efficiency and reduce workload.
EEG-based analysis for the automated detection of seizures has been widely explored in the last two decades.In the previous researches about EEG-based seizure detection, the short-term Bonn EEG dataset [2] and the long-term CHB-MIT scalp EEG (sEEG) dataset [3] were the two most commonly used datasets [4].For the short-term Bonn EEG dataset, many conventional machine learning and deep learning methods, including Support Vector Machine (SVM) [5][6][7], Random Forest (RF) [8], K-Nearest Neighbor (KNN) [9,10], Artificial Neural Network (ANN) [11], Convolutional Neural Networks (CNN) [12][13][14] and Long-Short Term Memory (LSTM) [15], have been applied to analyze this dataset for seizure detection and obtained the accuracy ranging from 88.87% to 100%.Although these methods achieved high performances on the short-term Bonn EEG dataset, this benchmark clinical dataset was a small and special-selected dataset.As stated in [2], the short-term Bonn EEG dataset consisted of 500 single-channel EEG segments of 23.6s duration (200 sEEG segments and 300 intracranial EEG (iEEG) segments), and each segment was cut out from continuous EEG recordings after visual inspection.However, in the real world, the EEG recordings of people with epilepsy usually last from several hours to several weeks.Therefore, the analysis of long-term and continuous EEG data for seizure detection may have more practical significance.
For the long-term CHB-MIT sEEG dataset (24 patients, about 916 h and 198 seizures), an overview of works is briefly introduced.In conventional machine learning methods, the studies [7,16] used SVM classifiers for seizure detection and achieved the sensitivity ranging from 96.81% to 97.34% and the specificity ranging from 97.26% to 97.50%.In [17], seven classifiers, including SVM, Ensemble, KNN, Linear Discriminant Analysis (LDA), Logistic Regression (LR), Decision Tree (DT) and Naive Bayes (NBs), combined with the strategy of channel selection were used for calssification, and the KNN finally achieved the highest accuracy of 84.8%.In [18], Alickovic et al. applied four classifiers (SVM, RF, Multilayer perceptron (MLP) and KNN) simultaneously to classify the feature samples that were extracted by Discrete Wavelet Transform (DWT), empirical mode decomposition (EMD) and wavelet packet decomposition (WPD), and an overall accuracy of 100% was finally achieved in ictal vs. interictal sEEG.However, only 1000 interictal, 1000 ictal and 1000 preictal 8-s segments were specially selected from the CHB-MIT sEEG dataset for the analysis of seizure detection, which greatly damaged the integrity of the data.Recently, several leading deep learning techniques, including CNN, LSTM and recurrent neural network (RNN), were also applied to the CHB-MIT sEEG dataset.In [19], 1D-CNN was used to classify the 4-s raw sEEG segments, and it achieved 66.76% sensitivity, 99.63% specificity and 99.07%accuracy.Hossain et al. applied a 7-layer two-dimensional convolutional neural network (2D-CNN) to classify the time-channel sEEG matrixes, and this approach obtained an overall sensitivity, specificity and accuracy of 90.00%, 91.65% and 98.05%, respectively [20].Different from the 2D-CNN used in [20], Liang et al. achieved an accuracy of 99.00% by using a 2D-CNN-LSTM model for seizure detection.In this model, 2D-CNN was used as the feature extraction model for learning the high-level representations of inputs.The outputs of 2D-CNN were then fed into LSTM for classification [21].In [22], a bidirectional LSTM (Bi-LSTM) network was utilized for the classification of 4-s sEEG epochs, and the method attained 93.61% sensitivity and 91.85% specificity.The RNN model was applied by Yao et al. for seizure detection, and it achieved the averaged sensitivity, specificity and accuracy of 88.80%, 88.60% and 88.69%, respectively [23].
As mentioned above, many conventional machine learning and deep learning methods have been applied to the CHB-MIT sEEG dataset for seizure detection, but many relevant studies only evaluated the performances in a segment-based level.In the segmentbased level, many studies concatenated all seizures of a patient into one seizure, and then the ictal segments cut from the concatenated seizure were used for classification, ignoring the detection of each seizure (the event-based level).From the perspective of the detection of a seizure or in the event-based level, when detecting seizures during long-term EEG recoding, an excellent system should alarm accurately with short latency and low false detection rate (FDR).Therefore, both levels (the segment-based level and the event-based level) should be evaluated simultane-ously in the analysis of long-term EEG recordings for seizure detection.
In this paper, the long-term sEEG and iEEG recordings are analyzed for the detection of seizures.In the long-term EEG recordings, most of the EEG recordings are in the interictal stage, while the time duration of a seizure usually ranges from tens of seconds to several minutes.Consequently, the problem of sample imbalance should be considered and properly resolved in the analysis of the long-term EEG recodings.The novelty and main contributions of this paper are summarized as follows: Two long-term datasets, the CHB-MIT sEEG dataset and the SWEC-ETHZ iEEG dataset [24], are analyzed in this paper.Therefore, the effectiveness of the proposed method in seizure detection is tested with two different datasets, sEEG and iEEG.A stacked 1D-CNN model is proposed in this study.Two different parallel 1D-CNNs with different calculation sizes are used to learn the high-level representations simultaneously.Then, the diverse features of these two 1D-CNNs are concatenated for classification.Since sample imbalance is a key problem in the long-term EEG recordings, a random selection and data augmentation (RS-DA) strategy is proposed to balance samples during the model training phase.To better evaluate the performances of the proposed method, we evaluate the classification results for each patient in the two levels: the segment-based level and the event-based level.In the segment-based level, sensitivity, specificity and accuracy are calculated.In the event-based level, we calculate the sensitivity, FDR and latency (time duration from the onset of a seizure to its detection).
The remaining of this paper is organized as follows: Section 2 describes the materials and the proposed method.Results are showed in Section 3. Discussion and conclusion are given in Section 4 and Section 5, respectively.

Materials and methods
In this section, we first describe two long-term EEG datasets (the sEEG dataset and the iEEG dataset).Then, we present the proposed method including preprocessing, CNN model, model training and system evaluation.
The CHB-MIT sEEG dataset consists of 916 h of sEEG and 198 seizures.The sEEG recordings from 24 patients are recorded at a sampling rate of 256 Hz, and most of recordings contain 23 channels [3].In this study, 24 h of interictal sEEG data (all if less than 24 h) were selected for each patient.The selection criteria of seizures were as follows: (1) If the time interval between two seizures was short (less than 20 min), the two seizures were concatenated into one seizure, (2) A concatenated seizure or a raw seizure lasting more than 10 s was chosen, and so seizures which lasted less than 10 s were not considered.The details of the selected sEEG signals were summarized in Table 1.
In the SWEC-ETHZ iEEG dataset, it contains 2565 h of iEEG and 116 leading seizures from 18 patients.The sampling rate is 512 or 1024 Hz, and the number of iEEG channels ranges from 24 to 128.
More details of this dataset can be found in [24].For this dataset, we also selected 24 h of interictal iEEG for each patient.The selection criteria for seizures were the same as described in the CHB-MIT sEEG dataset.Then, the selected iEEG signals were uniformly down-sampled to 256 Hz (same sampling rate as the CHB-MIT sEEG dataset).We summarized the details of the selected iEEG signals in Table 2.

Preprocessing
Before training and testing the proposed model, we need to generate a certain number of samples.In the preprocessing, 2-s sliding windows were applied to segment the long-term EEG signals (as shown in Fig. 1).Since a seizure lasted from tens of seconds to several minutes (as shown in Tables 1 and 2), the size of 2-s ictal segments was very small.In order to generate more ictal segments, 2-s sliding windows with the corresponding overlap ratio were used to segment the raw ictal EEG signals only during the model training phase.The overlap ratio ranged from 0.75 to 0.9 (depending on the number and the time duration of seizures).For example, the ictal segments from patients 6 and 16 in Table 1 and patient 5 in Table 2 were obtained with the overlap ratio of 0.9, while the ictal segments from patient 15 in Table 1 and patient 1 in Table 2 were attained with the overlap ratio of 0.75.In obtaining 2-s interictal segments, we used 2-s sliding windows without overlap.The preprocessing in obtaining the segments of interictal and ictal signals is illustrated in Fig. 1.
Due to the sampling rate of 256 Hz, one 2-s EEG segment can be regarded as a matrix of n Â512, where n is the number of channels of each patient, and 512 is the number of sampling points.In this study, the 2-s EEG segments were used as the direct inputs of the proposed 1D-CNN model.

Convolutional neural networks (CNN)
CNN is generally composed of convolutional layers, pooling layers and fully connected layers.A convolutional layer contains a certain number of convolution kernels and performs convolution calculations on the input signals.The convolution results are then nonlinearized by activation functions.In our 1D-CNN model, the rectified linear activation unit (ReLU) was used in convolutional layers.The pooling layer is also called the down-sampling layer, which performs pooling operations on the outputs of the convolutional layer to preserve higher-level representations.Pooling processes including maximum pooling and global average pooling were used in our model.After the signals pass through convolutional layers and pooling layers, the high-level features are usually fed into fully connected layers for the final classification.
In this work, a stacked 1D-CNN model was proposed for seizure detection.As shown in Fig. 2, it has two parallel blocks, and the EEG segments are sent to both blocks at the same time.The two blocks are named Block 1 and Block 2, respectively.The Block 1 contains three convolutional blocks.The first convolutional block consists of a convolutional layer (32 kernels with the size of n Â 3 and the stride of 2, where n is the number of channels), a batch normalization (BN) layer and a max-pooling (MP) layer (the pooling size of 3 and the stride of 1).In the second convolutional block, it includes a convolutional layer with 64 kernels (the size of 3 and the stride of 2), a BN layer and a MP layer with the pooling size of 3 and the stride of 1.The third convolutional block also contains a convolutional layer (128 kernels with the size of 3 and stride of 1), a BN layer and a MP layer with the pooling size of 3 and the stride of 1.The structure of the Block 2 is the same as that of the Block 1, and the only difference is the size of convolution kernels in the first and second convolution layers.In the Block 2, the kernel sizes of these two layers are n Â 5 and 5, respectively.At the end of the Block 1 and the Block 2, the learned high-level representations are concatenated.Then, the concatenated features are globally averaged as the inputs of two fully connected layers.The first fully  connected layer has 128 neurons with ReLU function.The second fully connected layer is the output layer with 2 neurons with Softmax function.According to the 1D-CNN model, the number of calculation parameters and the output shape in each layer are summarized in Table 3.
For the outputs from the stacked 1D-CNN model, a simple postprocessing was performed for accurately detecting a seizure and sounding an alarm (as shown in Fig. 2).In order to sound an alarm accurately and reliably, it must meet a condition that L consecutive detection labels were positive.The value of L ranged from 2 to 5, and the final L value was determined according to the classification results.In theory, when the L value increases, the FDR decreases and the latency of an alarm becomes longer.To avoid unnecessary repeated alarms, we should set the minimum time interval (MTI) between two alarms.In this work, the averaged time duration of seizures of each patient was set as the MTI between two alarms for each patient.Therefore, when the first alarm sounded, in the following MTI, the second alarm was prohibited.

Model training
The patient-specific model was trained for each patient.For detecting all seizures of each patient, the approach of eventbased K-fold cross validation was used, where K was the number of seizures per patient.If a subject has K seizures, the model training is performed K rounds.In each round, (K-1) seizures are selected for training, and the remaining one is used for testing (as shown in Fig. 3).
Since the time duration of interictal EEG is about 50 to 1300 times longer than that of ictal EEG among different patients (as shown in Tables 1 and 2), the sample imbalance is a key problem in this work.In order to solve the problem during model training, we proposed a RS-DA strategy.As shown in Fig. 3, we augmented (K-1) ictal seizures by using the oversampling technique mentioned in the preprocessing (Section 2.2.1).However, the size of the augmented ictal segments was still much smaller than that of interictal segments.Therefore, the random selection was performed on interictal segments.We first divided interictal segments into K equal parts.Then, an equal number of interictal segments were randomly selected from (K-1) parts to make the size of the selected interictal segments equal to that of the augmented ictal segments.Finally, the selected interictal segments and the augmented ictal segments were used to train (80%) and monitor (20%) the model during model training.The remaining segments (one interictal part and one seizure) were used to evaluate the trained model.Through this way, all interictal segments and seizures could be tested without repetition after K rounds.
During model training, the Early-Stopping technique was also used to prevent overfitting, and the dropout rate of the second fully connected layer was set to 0.25.Based on Keras 2.3.1 with Tensorflow-1.15.0 backend, our model was implemented in Python 3.6, and one Nvidia Tesla P100 GPU was configured to run the proposed model.

System evaluation
We evaluated the performances of the proposed method in the two levels: the segment-based level and the event-based level.

Segment-based level
In the segment-based level, sensitivity, specificity and accuracy were calculated to evaluate the classification of EEG segments.The three metrics can be expressed as follows: L is the number of consecutive detection labels for an alarm.
where TP is true positive, indicating the number of true detected ictal segments from ictal segments; FN is false negative, indicating the number of ictal segments which are wrongly classified as interictal segments; TN is true negative, indicating the number of true detected interictal segments from interictal segments; FP is false positive, indicating the number of interictal segments which are wrongly classified as ictal segments.Sensitivity is the percentage of true detected ictal segments to total ictal segments, and specificity is the percentage of true detected interictal segments to total interictal segments.An excellent classifier should have high sensitivity and specificity at the same time.

Event-based level
In the event-based level, we calculated the three metrics: sensitivity, FDR and latency.Sensitivity and FDR can be expressed by the following two formulas: Latency is the time duration between the onset of a seizure and its detection.Fig. 4 shows an example of a false detection, a correct detection and its latency.An outstanding system should have high sensitivity with short latency and low FDR.

Results
The results from the CHB-MIT sEEG dataset and the SWEC-ETHZ iEEG dataset are given in this section.The performances of the proposed method are evaluated in the two levels at the same time.In the segment-based level, the averaged results (sensitivity, specificity and accuracy) are calculated for each patient.In the eventbased level, the sensitivity, the FDR and the averaged latency of an alarm are calculated.

Results of CHB-MIT sEEG dataset
Table 4 shows the results of each patient in the two levels after event-based K-fold cross validation.As shown in Table 4, in the segment-based level, the overall sensitivity, specificity and accuracy are 88.14%, 99.62% and 99.54%, respectively.The accuracy of most patients (except patients 8, 12, 13 and 24) is higher than 99%, and that of all patients is higher than 98%.In the eventbased level, 144 out of 145 seizures (except one seizure of patient 16) are accurately detected, with a sensitivity of 99.31%.The over- In each round, one seizure and one interictal part are used as the testing sets, and the remaining (K-1) seizures and (K-1) interictal parts are used as the training sets.After K rounds, all seizures and interictal EEG can be tested without repetition.
X. Wang The value of L is related to sensitivity, FDR and latency in the event-based level.We also calculate these three metrics under different L values.In this work, the value of L ranges from 2 to 5. As shown in Fig. 5(a), we can see that, as the value of L increases, the overall sensitivity and FDR show a decreasing trend, but the overall latency of an alarm shows an increasing trend.When the value of L is 5, the overall sensitivity and FDR are the lowest (93.53% and 0.04/h, respectively), and the overall latency is the longest, at 13 s.

Results of SWEC-ETHZ iEEG dataset
Based on the analysis of the SWEC-ETHZ iEEG dataset, Table 5 also gives the results of each patient in the two levels after event-based K-fold cross validation.In the segment-based level, the overall sensitivity of 90.09%, specificity of 99.81% and accuracy of 99.73% are achieved.The accuracy of all patients is higher than 99%.In the event-based level, 123 out of 126 seizures (except one seizure in patients 4, 6 and 7) are correctly detected, and its sensitivity is 97.52%.The low overall FDR is 0.07/h, and the FDR of 10 patients (1, 6 and 9 to 16) is 0/h.The overall latency of an alarm is 13.2 s, and the longest averaged latency is 52.3 s for patient 8.
The overall sensitivity, FDR and latency with different L values are also calculated in the event-based level.In Fig. 5 (b), as the L value increases from 2 to 5, the sensitivity and FDR also show a general downward trend, but the overall latency has a upward trend.When the L value is equal to 4 or 5, the overall sensitivity and FDR are the lowest, at 96.41% and 0.02/h, respectively.The longest overall latency is 18.1 s when the L value is 5.

Discussion
In this work, we proposed a stacked 1D-CNN model combined with the RS-DA strategy for seizure detection.The details of previous studies and this work, including the number of patients, processing and the corresponding metrics were summarized in Table 6 (the segment-based level) and Table 7 (the event-based level).Since the long-term SWEC-ETHZ iEEG dataset was available from 2019 [24], we compared the results only based on the CHB-MIT sEEG dataset.
From the perspective of the sensitivity (in the segment-based level), although the studies [7,16] attained higher sensitivities at 96.81% and 97.34%, respectively, the time-consuming and complex feature extraction and selection engineering was applied.The other three studies [28,30,32] achieved the high sensitivity of 97.91%, 96.66% and 98.84%, respectively, but one reason for the high sensitivity was that it used the oversampling technique to generate more ictal samples for classification.Because of the overlapping information between these augmented ictal samples, in some sense, their classification was a repeated classification of similar samples.Therefore, in [28,32,30], the high sensitivity was overestimated.Different from the studies [28,32,30], in our work, the oversampling technique was only used during the model training phase, and the ictal samples that were selected as the testing set were obtained without oversampling.In fact, the number of raw ictal samples is small (it can be seen from Tables 1 and 2 minimal amount of misclassification can greatly reduce the sensitivity.Hence, as shown in Table 6, the 88.14% sensitivity of our work was relatively high. In the event-based level, the results of this work and previous studies using the CHB-MIT sEEG dataset were summarized in Table 7.The threshold method [38] and the conventional machine learning methods including SVM [3,16,39], Neural Network Classifier based on Improved Particle Swarm Optimization (IPSONN) [40], Relevance Vector Machine (RVM) [41] and Adaptive Distance-based Change-point Detector (ADCD) [42] were applied for the detection of seizures.These methods achieved the sensitivity of 88.5% to 98.47% and the FDR of 0.08/h to 0.63/h, and the highest sensitivity of 98.47% was obtained using an SVM group with ten SVMs in [16].Deep learning methods, including CNN [31,43], Deep Recurrent Neural Network (DRNN) [44] and AE [45], were used to analyze the same dataset for seizure detection, and the sensitivity ranging from 86.29% to 100% and the FDR ranging from 0.08/h to 0.74/h were achieved.Our method also showed the high performances: (1) the sensitivity of 99.31% and the FDR of 0.2/h for the CHB-MIT sEEG dataset; (2) 97.52% sensitivity and 0.07/h FDR for the SWEC-ETHZ iEEG dataset.Hence, under the event-based level, our method also performed better than most of the methods in Table 7.
In [44], a sensitivity of 100% was attained, but only 5 out of 24 patients were used for the detection of seizures.The detection of seizures with short latency (less than 20 s) can early eliminate symptoms of the seizures [46,47].Although the averaged latencies (8.1 s and 13.2 s) of the CHB-MIT and the ETHZ-SWEC EEG datasets were slightly longer than those in Table 7, they were still in the acceptable range.As the results shown in Tables 6 and 7, our method showed high performances in the two levels, and it performed better than most of the methods in Tables 6 and 7.Moreover, the proposed method was effective for both datasets, the sEEG and the iEEG.According to our work, there are several highlights that need to be emphasized.Firstly, a 1D-CNN model is used in this study, which can be directly applied for the classification of raw EEG signals without additional preprocessing of EEG signals, such as frequency domain analysis and time-frequency domain analysis.Secondly, in order to obtain more different high-level representations for a better classification, we proposed a stacked 1D-CNN model consisting of two parallel 1D-CNN blocks.The two parallel 1D-CNN blocks with different calculation sizes can learn different high-level representations at the same time, and the diverse features of these two 1D-CNN blocks are then concatenated for the further analysis.Thirdly, the RS-DA strategy is first utilized to solve the problem of sample imbalance during model training.However, one limitation of this study is that only a 1D-CNN model is applied.Other deep learning models, such as 2D-CNN and LSTM, combined with the RS-DA strategy can also be applied to the same datasets for more detailed comparisons.Another limitation is that we ignore the use of epilepsy-related EEG features for seizure detection.The EEG features, including statistical parameters, frequency or time-frequency domain features, entropies, etc., can be extracted and incorporated as the input to the 1D-CNN model.By this method, it may improve the results of seizure detection.In the future work, this highlight can be further analyzed and discussed.

Conclusion
In this paper, we presented a stacked 1D-CNN model for the detection of seizure onset.In this model, two parallel 1D-CNN blocks with different calculation sizes were used to learn the high-level representations of the EEG inputs simultaneously.The outputs of these two parallel 1D-CNN blocks were then concatenated for the final classification.Since the sample imbalance was a key issue in the long-term epileptic EEG recordings, a RS-DA strategy combined with the event-based K-fold cross validation was proposed for balancing samples during model training.In this way, we tested all samples of the selected EEG without abandoning the interictal samples.The proposed method was evaluated on two long-term EEG datasets (the CHB-MIT sEEG dataset and the SWEC-ETHZ iEEG dataset) at the same time.To better evaluate the performances of the proposed method, two kinds of evaluation levels (the segment-based level and the event-based level) were calculated.For the CHB-MIT sEEG dataset, in the segment-based level, an accuracy of 99.54% was achieved.In the event-based level, 144 out of 145 seizures were accurately detected with 0.2/h FDR and 8.1-s latency.For the SWEC-ETHZ iEEG dataset, an accuracy of 99.73% was obtained in the segment-based level.In the eventbased level, 123 out of 126 seizures were correctly detected with 0.07/h FDR and 13.2-s latency.Moreover, the selection of the L value was significant in the event-based level, and L = 3 was finally selected in this work.Based on the results obtained, the proposed method showed that it could perform well in the seizure detection with both sEEG and iEEG data.The theoretical contribution of our work may provide more epilepsy patients with the opportunity to possess a seizure detection device in clinical applications.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Fig. 1 .
Fig. 1.For interictal EEG signals, we used 2-s sliding windows without overlap.For ictal EEG signals which were selected as the training set, we used 2-s sliding windows with the corresponding overlap ratio (0.75-0.9).

Fig. 3 .
Fig. 3. Event-based K-fold cross validation combined with a RS-DA strategy is applied during model training.If a subject has K seizures, the model training is performed K rounds.In each round, one seizure and one interictal part are used as the testing sets, and the remaining (K-1) seizures and (K-1) interictal parts are used as the training sets.After K rounds, all seizures and interictal EEG can be tested without repetition.

Fig. 4 .
Fig. 4. Event-based level: the example of a false detection, a correct detection and its latency.

Fig. 5 .
Fig. 5.In the event-based level, the value of L ranges from 2 to 5. (a) For the CHB-MIT sEEG dataset, the overall sensitivity, FDR and latency are showed.(b) For the SWEC-ETHZ iEEG dataset, the overall sensitivity, FDR and latency are showed.L = 3 is finally selected for the event-based level in this work.

Table 1
Details of the selected sEEG singals from the CHB-MIT sEEG dataset.
⁄ Mean and standard deviation of the time duration of seizures per patient.

Table 2
Details of the selected iEEG signals from the SWEC-ETHZ iEEG dataset.

Table 3
In the proposed 1D-CNN model, the number of calculation parameters and the output shape in each layer are summarized as below.f Â n is the size of the input matrix, where f is equal to 512, and n (18 to 128) is the number of EEG channels.
a Two parallel layers.bThenumber is related to the value of n (18 to 128).Fig.2.A stacked 1D-CNN model was proposed for seizure detection.M@n Â k 1 or M@k 2 : M is the number of kernels, n Â k 1 and k 2 are the sizes of convolutional kernels.Abbreviations: Conv, convolution; BN, batch normalization; MP, maxpooling; s1, pooling size; s2, stride; GAP, global average pooling; FC, fully connected.

Table 4
In the CHB-MIT sEEG dataset, results of each patient are given in the two levels.L = 3 is finally selected for the event-based level.Abbreviations: Sen 1 , segment-based sensitivity; Spe, specificity; Acc, accuracy; Sen 2 , event-based sensitivity; FDR, false detection rate; Lat, latency.

Table 5
In the SWEC-ETHZ iEEG dataset, results of each patient are given in the two levels.L = 3 is finally selected for the event-based level.

Table 6
Segment-based level: list of previous studies and this work using the CHB-MIT sEEG dataset for seizure detection.The CHB-MIT sEEG dataset contains a total of 686 records, while one record of each patient is selected. +