Original Paper
Abstract
Background: Implementing automated seizure detection in long-term electroencephalography (EEG) analysis enables the remote monitoring of patients with epilepsy, thereby improving their quality of life.
Objective: The objective of this study was to explore an mHealth (mobile health) solution by investigating the feasibility of smartphones for processing large EEG recordings for the remote monitoring of patients with epilepsy.
Methods: We developed a mobile app to automatically analyze and classify epileptic seizures using EEG. We used the cross-database model developed in our previous study, incorporating successive decomposition index and matrix determinant as features, adaptive median feature baseline correction for overcoming interdatabase feature variation, and postprocessing-based support vector machine for classification using 5 different EEG databases. The Sezect (Seizure Detect) Android app was built using the Chaquopy software development kit, which uses the Python language in Android Studio. Various durations of EEG signals were tested on different smartphones to check the feasibility of the Sezect app.
Results: We observed a sensitivity of 93.5%, a specificity of 97.5%, and a false detection rate of 1.5 per hour for EEG recordings using the Sezect app. The various mobile phones did not differ substantially in processing time, which indicates a range of phone models can be used for implementation. The computational time required to process real-time EEG data via smartphones and the classification results suggests that our mHealth app could be a valuable asset for monitoring patients with epilepsy.
Conclusions: Smartphones have multipurpose use in health care, offering tools that can improve the quality of patients’ lives.
doi:10.2196/50660
Keywords
Introduction
According to the International League Against Epilepsy, epileptic seizures are characterized by an unpredictable occurrence pattern and transient dysfunctions of the central nervous system due to excessive and synchronous abnormal neuronal activity in the cortex [
]. Electroencephalography (EEG) can be used to determine the epileptogenic zone or to monitor patients in the intensive care unit for seizures or monitor seizures for therapy adjustment. EEG signals are collected over a period of time and analyzed to detect seizure events. Today, almost everyone uses smartphones, and smartphone apps are being used to solve real-world human challenges including health-related issues. Regarding the remote monitoring of patients with epilepsy, there is a need to develop an efficient smartphone app that processes long-term EEG recordings for seizure detection. Therefore, the goal of this paper was to develop and evaluate the feasibility of a mobile app for the remote monitoring of patients with epilepsy.In this context, an automatic mobile phone–based approach for epileptic seizure detection was proposed by Menshawy et al [
] using time, frequency, entropy, and discrete wavelet transform–based features with k-means clustering. EEG signals recorded from the EEG headset were stored in smartphones and transmitted to a server. The preprocessing, feature extraction, feature normalization, feature selection, and classification model of EEG signals were performed on a cloud server. The results were sent to the smartphones of patients and physicians via a backend server. Based on the classification results, caretakers were notified to take appropriate action. This study faced limitations in terms of memory as the complete EEG signal had to be sent to the server. Additionally, this approach was computationally expensive due to the use of a large number of features. McKenzie et al [ ] assessed the ability of Smartphone Brain Scanner-2 to detect epileptiform abnormalities using an Android tablet that was wirelessly connected to a 14-electrode EasyCap headset. An Android-based smartphone app for monitoring patients with epilepsy was proposed using subband features and a support vector machine (SVM) classifier [ ]. mHealth (mobile health) has been proposed to detect generalized tonic-clonic seizures, whereby an alarm is triggered for timely interventions resulting in a possibly reduced risk of sudden unexpected death in epilepsy [ ].Kiral-Kornek et al [
] proposed a mobile system–based epileptic seizure prediction using big data and deep learning using intracranial EEG signals. Typical statistics like seizures per month, average sensitivity, and average warning time were reported. Moreover, other studies have proposed a cloud-based alert system using advanced statistics [ ] and have explored seizure prediction through deep learning techniques for EEG big data [ , ]. Some studies [ , - ] have used cloud computing for EEG analysis and seizure detection. Additionally, a few mobile devices, namely SmartWatch, Embrace Watch, Brain Sentinel, and EpiWatch App, have been developed for seizure detection to alert caretakers and to prevent sudden unexpected death due to epilepsy [ ].Our study focuses on harnessing smartphone capabilities to implement the entire seizure detection model, which eliminates the need for cloud technology. The Sezect (Seizure Detect) app, our mobile phone–based seizure detection model, provides information such as the number of channels, sampling frequency, EEG signal duration, seizure frequency per channel, and seizure-affected channels. Further, the app was developed using open-source software, allowing researchers public access and the ability to replicate the process. Therefore, the proposed approach could be a valuable tool for the remote monitoring of patients with epilepsy.
shows a block diagram of the proposed smartphone-based monitoring approach for patients with epilepsy.Methods
Clinical EEG Recordings
In order to deploy the seizure detection model via smartphone, the cross-database model in our previous study was developed using EEG recordings from Ramaiah Medical College and Hospitals (RMCH) (Bengaluru, India), Children’s Hospital Boston-Massachusetts Institute of Technology (CHB-MIT) (Boston, MA), Temple University Hospitals (TUH) (Philadelphia, PA), Maastricht University Medical Centre (MUMC) (Maastricht, Netherlands), and the University of Bonn (UBonn) (Bonn, Germany) [
]. The same cross-database model was implemented on a smartphone and validated using 20 new patients’ EEG recordings collected from the RMCH and MUMC databases. EEG recordings with a total duration of 13 hours were tested via smartphone.Ethical Considerations
The 3 EEG recordings used in our study, namely from CHB-MIT, TUH, and UBonn, are available publicly. Ethical committee approval was sought for the RMCH and MUMC EEG recordings before use in this study.
Chaquopy
Chaquopy is the Python software development kit for Android [
], which allows reuse of existing Python code on Android and takes advantage of Python Package Index packages including numpy, sci-kit learn, scipy, and others. The GitHub repository provides more details on how to use Chaquopy [ ]. The chaquopy-console template was used to run the seizure detection Python code on the app.Seizure Detection Model
The methods followed in this study were introduced by us in our previous studies [
, - ]. The optimized cross-database seizure detection model was built in our previous study [ ]. Two features, the successive decomposition index [ ] and matrix determinant [ ], were extracted from all 5 databases and their baseline was updated using adaptive median feature baseline correction [ ]. The features were classified using the SVM classifier via the leave-one-database-out cross-validation method and a postprocessing technique was implemented by applying a 10-tap moving average filter to the classifier output to reduce false detections. This model was then coded in Python and exported into a pickle file for smartphones to test the new EEG recordings.Mobile Phone–Based Seizure Monitoring
To demonstrate proof of concept, the Sezect Android app was tested for epileptic seizure detection using EEG signals. It is important to investigate how different versions or models of smartphones perform in processing EEG signals, which will be useful to know to make the proposed method scalable. Therefore, we tested the proposed algorithm on the following mobile phones: Nokia, Moto X Play, and Redmi Note 4. Overall, 20 new EEG recordings from patients with epilepsy from both MUMC and RMCH were used to evaluate the efficiency of these smartphones for seizure detection. Using joblib from the sklearnexternals library, the trained SVM model was dumped into a .pkl file and loaded into the Sezect app to test the recordings.
Results
The Sezect app was tested on 3 Android mobile phones with the following configurations: (1) Nokia 8.1 (Android 10), (2) Moto X Play (Android 8), and (3) Redmi Note 4 (Android 10). Screenshots of the Sezect app results using Nokia are shown in
, and a video of running the app is available online [ ]. As shown in , the app pulls information such as the number of channels, sampling frequency, and duration of the complete EEG data file. Further, it displays the elapsed time required to process the complete EEG file, the number of seizure events detected per channel, and the total number of seizure epochs (each epoch length is 10 seconds).illustrates the time taken by various smartphones to process EEG recordings of different durations. The processing time of the Sezect app shows that a mobile platform is capable of handling large amounts of EEG data and perform feature calculation and classification. The various mobile phones did not differ substantially in processing time, which indicates a range of phone models can be used for implementation. Further, the robustness and scalability of the app was examined using various hardware configurations for all 3 smartphones. We observed a sensitivity of 93.5%, a specificity of 97.5%, and a false detection rate of 1.5 per hour for new EEG recordings using the Sezect app. The results suggest that our proposed seizure detection algorithm could be a valuable asset to remotely monitor patients with epilepsy using smartphone apps.
Discussion
Comparison With State-of-the-Art Studies
Few studies have used cloud technology, the internet of things, and smartphones to analyze EEGs and detect seizure epochs. Menshawy et al [
] used server-based processing for data preprocessing, feature engineering, and classification; subsequently, generated reports were sent to doctors, and caretakers were alerted upon detecting seizures. Cloud computing was effectively used in some studies [ , , , ] to perform feature engineering and classification using cloud technology. Moreover, mobile devices like SmartWatch, Embrace Watch, Brain Sentinel, and the EpiWatch App are in use, designed to detect specific types of seizures [ ]. However, the proposed Sezect app was built using the cross-database model from 5 EEG databases and has been found to be effective in terms of computational time when tested on 3 different smartphones. Physicians and nurses working in rural areas can record EEG data and validate it using the Sezect app.Contributions
The following is a summary of our contributions:
- We developed the Sezect app for Android using open-source software to remotely monitor patients with epilepsy. The app is made available as open-source software to improve the reproducibility of our results. The source code for the Sezect app can be found online [ ].
- The feasibility of smartphones for handling large EEG recordings was determined using the Sezect app. Further, we examined the time complexity by assessing the elapsed time of the mobile app across various EEG durations.
- Running all tasks on the cloud demands substantial memory and can be costly. This study’s major contribution lies in demonstrating the feasibility of automated seizure detection via smartphones, eliminating the involvement of cloud infrastructure.
Clinical Significance
Remote monitoring using smartphone apps will be useful to monitor patients with epilepsy by analyzing EEG signals collected over a period of time. Smartphones can serve multiple uses in health care to improve the quality of patients’ lives. The advanced technology of smartphones can be applied to solve the workload burden of experts.
Future Directions
This study presented a proof of concept for a low-cost mHealth solution aimed at the automated detection of epileptic seizures for remote monitoring.
illustrates the architectural scope for a future remote monitoring system. In such a system, a wireless EEG headset will be provided to the patient and continuous real-time EEG signals will be recorded and stored on smartphones. A cross-database classification model within the smartphone will analyze EEG signals, generating a report sent directly to the relevant physician for further action.Limitations
In our current implementation, we observed a slightly elevated false detection rate, which needs to be addressed in the future.
Conclusion
The feasibility of a mobile phone–based app for the remote monitoring of patients with epilepsy using a database-independent optimized algorithm was demonstrated. The app is open source, allowing researchers to reproduce it according to their specific needs. It was tested using 3 different types of smartphones. The results suggest that smartphones are capable of handling large amounts of EEG data for feature calculation and classification.
Acknowledgments
The authors are grateful to the Department of Clinical Neurophysiology, Maastricht University Medical Centre (Maastricht, The Netherlands), and Ramaiah Medical College and Hospitals (Bengaluru, India) for providing the EEG recordings. The authors are also grateful to Dr Ali Shoeb from Children’s Hospital Boston-Massachusetts Institute of Technology, Dr RG Andrzejak from the University of Bonn, and the team at Temple University Hospitals for permitting the use of their database for our study.
This research did not receive any specific grants from funding agencies in the public, commercial, or not-for-profit sectors.
Data Availability
The EEG data used in this study are intended solely for research purposes and cannot be made available to the public.
Authors' Contributions
SR and NS formulated the problem statement. SR was involved in writing codes, simulations, and drafting the paper. NS, EDG, DMWH, YT, and SVR validated the results and reviewed the manuscript. PK and ASH were involved in clinical validation, clinical discussion, and the review process.
Conflicts of Interest
PK is the editor-in-chief of JMIR Neurotechnology. The other authors declare no conflicts of interest.
References
- Fisher RS, Cross JH, French JA, Higurashi N, Hirsch E, Jansen FE, et al. Operational classification of seizure types by the International League Against Epilepsy: position paper of the ILAE Commission for Classification and Terminology. Epilepsia. Apr 08, 2017;58(4):522-530. [FREE Full text] [CrossRef] [Medline]
- EL Menshawy M, Benharref A, Serhani M. An automatic mobile-health based approach for EEG epileptic seizures detection. Expert Syst Appl. Nov 2015;42(20):7157-7174. [CrossRef]
- McKenzie ED, Lim ASP, Leung ECW, Cole AJ, Lam AD, Eloyan A, et al. Validation of a smartphone-based EEG among people with epilepsy: a prospective study. Sci Rep. Apr 03, 2017;7(1):45567. [FREE Full text] [CrossRef] [Medline]
- Lasefr Z, Reddy RR, Elleithy K. Smart phone application development for monitoring epilepsy seizure detection based on EEG signal classification. Presented at: IEEE Annual Ubiquitous Computing, Electronics & Mobile Communication Conference; Oct 19-21, 2017;83-87; New York, NY. [CrossRef]
- Ryvlin P, Beniczky S. Seizure detection and mobile health devices in epilepsy: update and future developments. Epilepsia. Jun 05, 2018;59 Suppl 1(S1):7-8. [CrossRef] [Medline]
- Kiral-Kornek I, Roy S, Nurse E, Mashford B, Karoly P, Carroll T, et al. Epileptic seizure prediction using big data and deep learning: toward a mobile system. EBioMedicine. Jan 2018;27:103-111. [FREE Full text] [CrossRef] [Medline]
- Baldassano S, Zhao X, Brinkmann B, Kremen V, Bernabei J, Cook M, et al. Cloud computing for seizure detection in implanted neural devices. J Neural Eng. Apr 04, 2019;16(2):026016. [FREE Full text] [CrossRef] [Medline]
- Hosseini M, Pompili D, Elisevich K, Soltanian-Zadeh H. Optimized deep learning for EEG big data and seizure prediction BCI via Internet of Things. IEEE Trans Big Data. Dec 1, 2017;3(4):392-404. [CrossRef]
- Hosseini MP, Soltanian-Zadeh H, Elisevich K, Pompili D. Cloud-based deep learning of big EEG data for epileptic seizure prediction. Presented at: IEEE Global Conference on Signal and Information Processing; Dec 7-9, 2016;1151-1155; Washington DC. [CrossRef]
- Sareen S, Sood SK, Gupta SK. An automatic prediction of epileptic seizures using cloud computing and wireless sensor networks. J Med Syst. Nov 15, 2016;40(11):226. [CrossRef] [Medline]
- Vergara PM, de la Cal E, Villar JR, González VM, Sedano J. An IoT platform for epilepsy monitoring and supervising. J Sensors. 2017;2017:1-18. [CrossRef]
- Escobar Cruz N, Solarte J, Gonzalez-Vargas A. Automated epileptic seizure detection system based on a wearable prototypecloud computing to assist people with epilepsy. In: Figueroa-García J, Villegas J, Orozco-Arroyave J, Maya Duque P, editors. Applied Computer Sciences in Engineering. WEA 2018. Communications in Computer and Information Science, vol 916. Cham, Switzerland. Springer; 2018.
- Zhang Z, Wen T, Huang W, Wang M, Li C. Automatic epileptic seizure detection in EEGs using MF-DFA, SVM based on cloud computing. XST. Mar 21, 2017;25(2):261-272. [CrossRef]
- Marquez A, Dunn M, Ciriaco J, Farahmand F. iSeiz: a low-cost real-time seizure detection system utilizing cloud computing. Presented at: IEEE Global Humanitarian Technology Conference; Oct 19-22, 2017;1-7; San Jose, CA. [CrossRef]
- Greb E. Mobile devices may provide accurate seizure detection and help prevent SUDEP. Neurology Reviews. 2017;25(2):28-29. [FREE Full text]
- Raghu S, Sriraam N, Gommer ED, Hilkman DM, Temel Y, Rao SV, et al. Cross-database evaluation of EEG based epileptic seizures detection driven by adaptive median feature baseline correction. Clin Neurophysiol. Jul 2020;131(7):1567-1578. [CrossRef] [Medline]
- Chaquopy: Python SDK for Android. 2012. URL: https://chaquo.com/chaquopy/ [accessed 2019-05-05]
- Chaquo/chaquopy. GitHub. URL: https://github.com/chaquo/chaquopy [accessed 2023-12-06]
- Raghu S, Sriraam N, Vasudeva Rao S, Hegde AS, Kubben PL. Automated detection of epileptic seizures using successive decomposition index and support vector machine classifier in long-term EEG. Neural Comput & Applic. Jul 31, 2019;32(13):8965-8984. [CrossRef]
- Raghu S, Sriraam N, Hegde AS, Kubben PL. A novel approach for classification of epileptic seizures using matrix determinant. Expert Syst Appl. Aug 2019;127:323-341. [CrossRef]
- Raghu S, Sriraam N, Gommer ED, Hilkman DM, Temel Y, Rao SV, et al. Adaptive median feature baseline correction for improving recognition of epileptic seizures in ICU EEG. Neurocomputing. Sep 2020;407:385-398. [CrossRef]
- Raghu S. Video of Sezect Android app. Zenodo. Dec 30, 2019. URL: https://doi.org/10.5281/zenodo.3595429 [accessed 2023-11-28]
- Raghu S. The proof of concept for epilepsy patients monitoring using Sezect Android app. Zenodo. Dec 24, 2019. URL: http://doi.org/10.5281/zenodo.3592415 [accessed 2019-11-28]
Abbreviations
CHB-MIT: Children’s Hospital Boston-Massachusetts Institute of Technology |
EEG: electroencephalography |
mHealth: mobile health |
MUMC: Maastricht University Medical Centre |
RMCH: Ramaiah Medical College and Hospitals |
Sezect: Seizure Detect |
SVM: support vector machine |
TUH: Temple University Hospitals |
UBonn: University of Bonn |
Edited by T de Azevedo Cardoso; submitted 08.07.23; peer-reviewed by T Yano, P Faroque; comments to author 04.10.23; revised version received 14.11.23; accepted 21.11.23; published 19.12.23.
Copyright©Natarajan Sriraam, S Raghu, Erik D Gommer, Danny M W Hilkman, Yasin Temel, Shyam Vasudeva Rao, Alangar Satyaranjandas Hegde, Pieter L Kubben. Originally published in JMIR Neurotechnology (https://neuro.jmir.org), 19.12.2023.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR Neurotechnology, is properly cited. The complete bibliographic information, a link to the original publication on https://neuro.jmir.org, as well as this copyright and license information must be included.