EPILEPSY AI · OPEN RESEARCH · NON-COMMERCIAL LICENCE

Seizure detection on scalp EEG, with the evidence shown.

Research models that read multi-channel EEG, flag epileptic seizures and show which electrodes their decision rests on. Built on public datasets, tested on patients the models never saw, and shared free of charge for non-commercial use.

Research software, not a medical device · Not clinically validated · Free for non-commercial use

A data problem worth working on.

Around 50 million people worldwide live with epilepsy, according to the World Health Organization, and some estimates put the number as high as 65 million.

Djanai is not a medical company, so we approached epilepsy as a data problem. Starting from the basics of the condition, explained to us by a cognitive neuroscientist, we asked whether our experience with machine-learning models and signal processing could produce models that predict seizures from EEG, without first needing a deep understanding of the brain behind the signal.

The first models were a starting point. This project rebuilds them properly: larger public datasets, testing only on patients the models have never seen, and false alarms counted alongside every detection. Today the models detect seizures as they happen; predicting them in advance is a harder question that remains open.

As a startup, we keep this work apart from our main products. We share it free of charge for non-commercial research because we want to help in this area, and we hope researchers will build on it.

A seizure detector you can look inside.

Detects seizures in multi-channel EEG

A graph neural network treats the 18 standard scalp channels as a network of electrodes and scores every 4-second window. Alarms are counted per seizure and false alarms per day, the way clinicians judge a detector.

Shows where the evidence comes from

A 3-D head view colours each electrode by how much it pushed the model towards "seizure" (integrated gradients), next to the raw change in the EEG, so you can see what the model relies on.

Imports your own recordings

EDF and EDF+ files with seizure lists in CSV, TUSZ or CHB-MIT format. Patient names and dates are removed from the file headers on import. Predict with the trained model, or fine-tune it on one patient's own seizures.

Compares the black box with brain models

Biophysical models (Jansen-Rit, a 19-region Epileptor) are fitted to the EEG with simulation-based inference, to test whether interpretable brain parameters can explain or replace the deep model.

3-D head with the right frontal and temporal channels highlighted, and a seizure-probability timeline
Head view, Siena patient never seen in training, 20 seconds into a seizure recorded clinically as right-sided. The model's evidence comes from the right frontal and temporal channels. Below: seizure probability over the 38-minute recording; the dashed box is the annotated seizure, the red bar the alarm.

Measured on public EEG, with false alarms counted.

Seizures detected out of all annotated seizures, on patients or recordings the model was not trained on. These are research results on two public datasets, not clinical performance.

Seizures detected against false alarms per day

Seizures detected against false alarms per day Tuned to each child (CHB-MIT): 138/198 seizures (70%) at 1.9 false alarms per day; Tuned, learning only from the past: 88/139 seizures (63%) at 4.5 false alarms per day; Adults never trained on (Siena): 27/47 seizures (57%) at 7.4 false alarms per day; New child, no tuning (CHB-MIT): 138/198 seizures (70%) at 23 false alarms per day 50% 55% 60% 65% 70% 75% 1 2 5 10 20 30 False alarms per day (log scale) Seizures detected ↖ better: more seizures, fewer false alarms Tuned to each child (CHB-MIT): 138/198 seizures (70%) at 1.9 false alarms per day Tuned to each child (CHB-MIT) 138/198 · 1.9 per day Tuned, learning only from the past: 88/139 seizures (63%) at 4.5 false alarms per day Tuned, learning only from the past 88/139 · 4.5 per day Adults never trained on (Siena): 27/47 seizures (57%) at 7.4 false alarms per day Adults never trained on (Siena) 27/47 · 7.4 per day New child, no tuning (CHB-MIT): 138/198 seizures (70%) at 23 false alarms per day New child, no tuning (CHB-MIT) 138/198 · 23 per day
138/198
Seizures caught
23 children (CHB-MIT), tuned to each child: 1.9 false alarms per day. Without that tuning: 23 per day.
88/139
Learning only from the past
Each recording tested with only earlier recordings for training: 4.5 false alarms per day.
27/47
Adults never trained on
Siena database, 14 adults from another hospital and country, model trained on children only: 7.4 false alarms per day.
11/13
Seizure side matched
The side of the head the model's evidence came from matched the clinically recorded side. Small sample: suggestive, not proof.
35/198
Interpretable detector
Four fitted brain-model parameters alone catch far fewer seizures than the deep model. They help explain; they do not replace it.
By patient
No leakage
Training and test data never share a patient or recording, and accuracy is never reported on its own.

Every number comes from a saved, reproducible run, and the write-ups shipped with the code state what did not work as plainly as what did.

The full research code, ready to run.

Source code and tests

Python and PyTorch: data loaders, preprocessing, models, leak-free evaluation, explanations, the importer and a local web interface, with unit tests.

A reproducible environment

A Docker image built on NVIDIA's PyTorch container, for x86-64 or ARM64 Linux. Requires an NVIDIA GPU. Each experiment is one config file, and each run records its settings, seed, data versions and code version.

The write-ups

The reports behind every number on this page, including what failed and why.

Data: download it from the source

No patient data is included. Scripts fetch the open CHB-MIT and Siena databases from PhysioNet, under their own licences. Trained model weights are not included either.

PolyForm Noncommercial 1.0.0

The code ships with the official licence text, unchanged. In short: you may use, change and share it for any non-commercial purpose.

Personal research and study

Research, experiments, testing, personal study and hobby projects with no anticipated commercial application.

Non-commercial organisations

Charities, universities and schools, public research organisations, public health organisations and government bodies, whatever their source of funding.

Commercial use: ask first

Products, paid services or internal use in a company need a separate licence. Write to info@djanai.com.

This summary does not replace the licence; the licence text decides. Read the full text

Read the details.

Data sheet

What Epilepsy AI does, the results on public datasets, and what you need to run it, on five pages.

Download the data sheet
PDF · 400 KB · English

White paper by email

"Seizure Detection on Scalp EEG, Measured Honestly": how the models work, how they explain their decisions, every result traced to a saved run, and what they cannot do yet. Nine pages, in English. Enter your work email and we send it to you straight away.

We use your address only to send you the white paper and to let our team know who asked. Personal and temporary addresses are not accepted. This website keeps no record of your request, apart from short anti-abuse counters.

Request the code.

  1. 1

    Fill in the form

    Tell us who you are and how you plan to use the code. It takes a minute.

  2. 2

    Receive the code

    We reply by email with the download, a 3 MB zip file, and its SHA-256 checksum.

  3. 3

    Build and run

    Build the Docker image, run the tests, then download the data. The README walks you through each step.

We use these details only to answer your request. They are emailed to us; this website does not keep them, apart from a one-hour anti-abuse counter linked to your connection's IP address.

Built on open data. Shared for research.

Not a medical device. Do not use it to diagnose, monitor or treat anyone.