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
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 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.
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.
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.
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.
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.
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.
Python and PyTorch: data loaders, preprocessing, models, leak-free evaluation, explanations, the importer and a local web interface, with unit tests.
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 reports behind every number on this page, including what failed and why.
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.
The code ships with the official licence text, unchanged. In short: you may use, change and share it for any non-commercial purpose.
Research, experiments, testing, personal study and hobby projects with no anticipated commercial application.
Charities, universities and schools, public research organisations, public health organisations and government bodies, whatever their source of funding.
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
What Epilepsy AI does, the results on public datasets, and what you need to run it, on five pages.
Tell us who you are and how you plan to use the code. It takes a minute.
We reply by email with the download, a 3 MB zip file, and its SHA-256 checksum.
Build the Docker image, run the tests, then download the data. The README walks you through each step.
Not a medical device. Do not use it to diagnose, monitor or treat anyone.