| Epilepsy seriously threatens the life safety of patients.Timely detection of its attack is of great significance to treat patients.In clinical practice,visual examination of EEG is inefficient in detecting epilepsy,and the existing automatic detection methods lack flexibility and applicability.Based on this,this paper introduces two automatic epilepsy detection methods based on feature extraction of convolutional network.In view of lacking flexibility and effectiveness of the previous detection methods in clinical practice,this paper conducted a fusion study of the clinical dataset and public dataset,and proposed an automatic epilepsy detection method based on generalized convolutional neural network.This method learns the prototype of each category from original EEG samples,then calculates the Euclidean distance between the prototype and the discriminative feature of a sample,adds the Euclidean distance as the prototype loss to the cross-entropy loss function to form the total loss function,and then aggregates the EEG samples of the same category by minimizing the total loss function.This method has achieved a great classification effect on both the clinical dataset and the CHB-MIT dataset,and verified its flexibility and effectiveness.Among them,the detection accuracy rate of more than 99% on the clinical dataset is achieved,and the customized development of epilepsy detection applications is realized.Although the above method has achieved high accuracy,CNN will give false predictions with high confidence when classifying adversarial samples,and the number of effective EEG samples during epileptic seizures is small,which leads to poor clinical applicability of CNN-based automatic detection methods.In this paper,we proposed an automatic epilepsy detection method based on convolutional prototype learning.First,CNN is used to extract the discriminative features of samples,and then prototype learning is used for classification,and automatic epilepsy detection is realized based on the classification results.Among them,prototype learning based on Euclidean distance can map EEG samples to the vicinity of the prototype in the feature space,which effectively solves the problem of incorrect prediction of the adversarial sample and the small number of samples in the classification process.In the experiment,the classification performance of convolution prototype learning is better than CNN on the clinical and public datasets,and it also shows great classification effect under the condition of few samples,which proves the applicability of this method in complex clinical environments. |