Seizure Seeker is a browser based EEG event detector; built by multiple students; designed for research and learning. The algorithm runs fully on the client; it reads .edf and .csv EEG files with many channels; computes simple energy features with overlapping RMS windows; finds candidate segments using a robust baseline; and can fuse detections across channels using a K of N vote. Your data stays on your machine.
- Overview
- Quick Start
- Features
- Usage
- Repository Structure
- How the algorithm works
- Parameter Tuning
- Performance
- Customization
- Roadmap
- Contributing
- License
- Contact
Seizure Seeker performs detection per channel; then it can combine results across channels if you ask it to. Everything happens in the browser; nothing is uploaded. The goal is to help you flag time ranges that deserve a closer look; not to diagnose.
- Serve
index.htmlwith a simple static server. - Load an EEG file;
.edfor.csvboth work. - For
.csvfiles; enter the sampling rate in Hz. - Adjust sensitivity and optional fusion.
- Run the analysis; inspect per channel and fused segments; export to CSV when ready.
Tip; try
examples/sample.edffor a fast check.
- EDF and CSV input with many channels
- Per channel RMS energy with overlap
- Optional cross channel fusion with K of N voting
- Controls for Z score; minimum duration; merge gap; and K
- Instant feedback in the page
- Privacy; processing stays local
- Select a file; choose
.edfor.csv. - If you chose
.csv; enter the sampling rate in Hz. - Tune the controls; Z score; Min Duration; Merge Gap; K; and toggle Fusion if needed.
- Press Analyze.
- Review the table; you will see per channel rows and fused rows if fusion is on.
- Click Download as CSV to save the segments.
/
├─ index.html # Main UI and detection logic
├─ README.md # This file
Per channel windowing
The signal is split into 1 s windows with 0.5 s steps; this overlap helps catch edges.
Per channel energy
For each window the algorithm computes RMS; a compact proxy for signal amplitude.
Robust baseline
For each channel the algorithm sorts window RMS values; takes the quietest half; then computes the median and the median absolute deviation MAD. These two numbers resist outliers and artifacts.
Thresholding
For each channel the threshold is median + z * MAD; frames above the threshold are candidates. With Auto Z; the algorithm picks z so that only a small fraction of frames exceed the threshold; you control this with Aggressiveness.
Segmentation and merge
Consecutive candidate frames form runs; runs separated by at most Merge Gap are merged; segments shorter than Min Duration are dropped.
Optional fusion K of N
The algorithm converts per channel runs to a shared time grid; counts votes across channels; and marks time points as positive when at least K channels agree; then it converts those positive points back into segments with the same merge and duration rules.
- Z score; higher values mean stricter detection; fewer segments pass
- Min Duration in seconds; removes very short blips after merging
- Merge Gap in seconds; glues nearby runs when the quiet gap is small
- Fusion; enable K of N voting to reduce single channel artifacts
- K; suggested default is about twenty percent of channels with a floor of two
- Sampling rate for CSV; must match the file; EDF rates are read automatically
Practical advice; if you see nothing; lower Z or reduce Min Duration or switch Auto Z to Sensitive. If you see too much; raise Z or increase Min Duration or pick Conservative; and with many channels try enabling fusion or increasing K.
- Complexity; O(N * channels) for RMS and segmentation
- Memory; about O(N/2 * channels) for RMS arrays
- Benchmark; around 0.1 s for a 1 hour; 256 Hz; 16 channel recording on a modern laptop
Numbers will vary with hardware; file size; and browser.
Edit the detect() function in index.html if you want to change any of the following
- window size and hop
- baseline estimation
- merge rules
- fusion logic and voting
- channel selection
- Multi channel detection and per lead thresholds
- Frequency band filtering
- Interactive plot overlay
- Command line and API wrapper
- Real time streaming mode
- Fork the repo
- Create a branch
- Submit a PR
- Celebrate
This project uses the CHB MIT Scalp EEG Database from PhysioNet; available under the PhysioNet Credentialed Health Data License. Use is limited to non commercial research purposes.
Questions or feedback; email sarthaktayal2@gmail.com