OSD_IconOpen Seizure Detector

Free, Open Source tools to Alert Carers if someone suffers an Epileptic Seizure

View the Project on GitHub

Machine Learning (ML) Algorithm

The ML algorithm estimates seizure probability from recent motion data using installed ML models. In current app versions, multiple ML models can be installed and run.

How it works

The app feeds recent acceleration data into one or more ML models and uses model output probabilities.

flowchart TD
    A[Raw acceleration stream] --> B[Build model input window]
    B --> C{Movement level above MlAccelStdThresholdPct?}
    C -->|No| D[Return probability 0]
    C -->|Yes| E[Run each enabled ML model]
    E --> F[Get seizure probability per model]
    F --> G[Compare with MlSeizureProbabilityThresholdPct]
    G --> H[Per-model ALARM or OK]
    H --> I[Combine with voting strategy]

User settings

Setting What it changes
CnnAlarmActive Enables or disables ML detection.
MlAccelStdThresholdPct Minimum movement variability required before ML inference is considered meaningful. Lower values make ML run in calmer motion; higher values suppress low-motion triggers.
MlSeizureProbabilityThresholdPct Probability threshold above which a model reports ALARM. Lower values increase sensitivity; higher values reduce alarms.
MlModelUpdateCheckPeriod How often the app checks for model updates (Never, Daily, Weekly, Monthly).
Add ML Model Downloads and installs an additional model package.

Voting and multiple models

When more than one model is active, the app can combine model outputs using the selected voting strategy.

flowchart LR
    A[ML1 probability] --> D[Voting strategy]
    B[ML2 probability] --> D
    C[ML3 probability] --> D
    D --> E[Combined ML contribution to app alarm state]

Practical tuning effect

Notes