Read Time: 3m
Epileptic seizure detection w/ Tiny Machine Learning
Brief
A study exploring the development and implementation of efficient Tiny Machine Learning models for the detection of epileptic seizures on an Arduino Platform.
Quick Links
A quick table of relevant links.
Link | Description |
---|---|
Github Repository | Repository with a public release of the project's code. |
Report PDF | The dissertation report submitted for my final year project. |
Symposium Abstract | The abstract accepted into MobiUK 2024. |
Symposium Presentation | Slides presented at the symposium. |
Poster Competition Submission | The poster submitted to the student poster competition on “AI, Smart Healthcare, and IoT” |
Dissertation Information
This study was conducted as part of my final year project for my BSc in Computer Science at Cardiff University and was supervised by Dr. Nhat Pham. Submitted in May 2024, the dissertation achieved a final grade of 93% and was awarded the "Best Final Year Project" prize.
View the full report that was submitted here.
Project Overview
This study develops three deployable tiny machine learning models for the detection of three types of epeleptic seizures: Absence, Tonic-Clonic, and Generalised Non-Specific. The models were trained on an open seizure dataset collected by Temple University [view].
For a more comprehensive overview of the project, including all technologies used, the methodology, results, evaluations, and references, please refer to the full dissertation report.
Technologies
- Hardware: Arduino Nano 33 BLE Sense
- Core Libraries: PyTorch, TensorFlow Lite, MNE Python
Methodology
The study focused on developing three individual models designed to detect one seizure. This produced three models in a model-per-seizure approach. To allow for deployment, the models were first developed with PyTorch and then converted to TensorFlow Lite to produce MCU-compatible models with full-integer quantisation.
To summarise the development process, the study was divided into three main stages:
- Data Preprocessing: The raw EEG data was preprocessed using MNE Python. A simplified and trainable representation was then produced with Melspectrograms, allowing for suitable image-based input for the models. Three datasets were produced, each containing the data for one seizure type.
- Model Development: Three CNN models were developed using PyTorch and trained on the datasets.
- Model Deployment: The models were converted to TFLite and deployed on the Arduino Nano 33 BLE Sense. The models were tested on the device to ensure deployment success.
Publications & Awards
- The preliminary results of this study was accepted into and presented at the 2024 MobiUK Wearable and Ubiquitous Systems Research Symposium.
Epileptic seizure detection with Tiny Machine Learning - a Preliminary Study. MobiUK 2024 - Sixth UK Mobile, Wearable and Ubiquitous Systems Research Symposium. Loic Lemoine and Nhat Pham.
- A short poster featuring the results of the study was submitted to a Cardiff University and Vietnam National University Student Poster Competition on “AI, Smart Healthcare, and IoT” and won first prize.
First Prize, Student Poster Competition on “AI, Smart Healthcare, and IoT” Global Wales, Cardiff University and Vietnam National University - Ho Chi Minh University of Technology
- I was presented with the "Best Final Year Project" award for this study.
Best Final Year Project, BSc Computer Science and Variants Cardiff University, School of Computer Science and Informatics
End of Article