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.

LinkDescription
Github RepositoryRepository with a public release of the project's code.
Report PDFThe dissertation report submitted for my final year project.
Symposium AbstractThe abstract accepted into MobiUK 2024.
Symposium PresentationSlides presented at the symposium.
Poster Competition SubmissionThe 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:

  1. 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.
  2. Model Development: Three CNN models were developed using PyTorch and trained on the datasets.
  3. 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.
  • 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.
  • I was presented with the "Best Final Year Project" award for this study.

End of Article