A turnkey, device-agnostic 2.5-hour hands-on Brain–Computer Interface (BCI) workshop built for NeuroTechX city chapters, university student clubs, and hacknights—usable with zero hardware (built-in realistic LSL simulator & file replay) or with 18+ consumer and open-hardware EEG/biosignal boards.
- Slides:
workshop_slides.pdf· Editable sources:slides/workshop_slides.tex(2026–27 NeuroTechX Beamer theme) &slides/workshop_slides.md(Marp/Markdown) - Participant Step-by-Step Guide:
INSTRUCTIONS.md - Supported Hardware & Safety Matrix (22 Targets):
docs/TARGETS.md - Chapter & Student Club Facilitator Guide:
docs/CHAPTER_ORGANIZER_GUIDE.md - 2015 → 2026 Lineage & Legacy Git Tags:
HISTORY.md
We recommend uv (standard python -m venv + pip works identically; see INSTRUCTIONS.md):
git clone https://github.com/NeuroTechX/bci-workshop.git
cd bci-workshop
# 1. Create environment & install core + Riemannian geometry extras
uv venv && uv pip install -e ".[riemann,dev]"
# 2. Verify Python packages, audio cues, and LSL streaming in one command
uv run python exercises/00_check_setup.py --self-testNow open two terminals:
# Terminal 1 — Start an EEG stream (built-in simulator, or see docs/TARGETS.md for Muse/OpenBCI/PiEEG)
uv run python streams/mock_eeg_stream.py# Terminal 2 — Run Exercise 01 (Neurofeedback) and Exercise 02 (Calibrated Live BCI)
uv run python exercises/01_neurofeedback.py
uv run python exercises/02_basic_bci.py --clf lda # or --clf riemann-mdm --online-adapt
uv run python exercises/03_udp_output_demo.py # in a 3rd terminal to receive live BCI JSON!
# Bonus — CPU-fast EEG-to-Image zero-shot retrieval lab (2026 Challenge Track 01 / Alljoined style)
uv run python exercises/05_eeg_to_image_retrieval.py
# Or stream a ~20 MB 1-subject real Alljoined-1.6M shard via HTTP Range (no 6 GB download!):
uv run python streams/prepare_alljoined_shard.py --subject sub-01 --accept-nc-terms
uv run python exercises/05_eeg_to_image_retrieval.py --npz data/alljoined_sub01_shard.npz(In 50 Hz mains regions such as Europe, Asia, Africa, and Australia, pass --mains 50.)
Because BCI evaluation fails silently whenever preprocessing or overlapping time windows leak across train/test splits, we recommend the free Inria / Probabl scikit-learn MOOC (especially the modules on Pipeline composition and non-i.i.d. GroupKFold / TimeSeriesSplit validation).
- Path A — Transparent Python (
exercises/+src/bci_workshop/): Inspectable scripts teaching non-lagging LSL ring buffers, causal IIR notch/bandpass filtering, Welch PSD bandpower neurofeedback (Berger 8–12 Hz alpha effect), Shrinkage LDA vs. Riemannian Geometry (pyRiemannMDM / Tangent Space), temporal leakage auditing & Balanced Accuracy, causal label-free session adaptation (--online-adapt), and live LSL/UDP outputs. - Path B — Declarative Graphs & Browser UI (
timeflux/): Ready-to-run YAML pipelines for Timeflux serving live browser dashboards (http://localhost:8000) and connecting directly intotimeflux/demos(Oddball, EMG Roshambo, P300 Speller, and dry-EEGc-VEPSpeller). Seetimeflux/README.md. - 2026 EEG/EMG Foundation Challenge Bridge (
neural-interfaces26):- Track 01 (
EEG -> Image):exercises/05_eeg_to_image_retrieval.pyimplements CPU-friendly zero-shot visual embedding retrieval (RidgeCVontoDINOv2/CLIPlatents, comparing single-trial vs. multi-repeat SNR) and links directly toAlljoined/Alljoined-1.6M(32-chEmotiv, NEMARnm000134,CC BY-NC-SA 4.0) andAlljoined/ENIGMA(MIT, CLIP + SDXL Turbo reconstruction of viewed images). - Track 02 (
Cross-Session BCI,PROTEUSnm000290): CausalB=1streaming (reset_state()), label-free running recentering (--online-adaptin02_basic_bci.py), and 3-class mental commands (motor imagery, mental subtraction, word generation). - Track 03 (
4-ch Muse Home EEG Regression,nm000287): Continuous time-to-sleep-onset (0–600 s) regression on 4-channel Muse headbands with domain-weighted error (W-bMAE). - Track 04 (
EMG -> Pose,EMG2Pose): 16-ch wrist surface EMG to continuous 20-joint hand pose angles.
- Track 01 (
- Stimulus-locked ERP / VEP experiments (P300, N170, SSVEP):
NeuroTechX/EEG-ExPy - Reproducible multi-dataset BCI benchmarking (36+ datasets):
NeuroTechX/moabb,sylvchev/moabb_minischool, andexercises/04_moabb_pseudoonline.py - Deep learning, geometric DL & foundation-model benchmarks:
Braindecode,SPD Learn,EEGDash,ComputationalReviewDLEEG, andneurotechx.org/learn - Safety, ethics & neural data privacy:
neurotechx.org/safety-and-ethics
- May 2015 — Raymundo Cassani and Hubert Banville created the original workshop for BCI Montréal at District 3, Concordia University. The exercises used MuLES to stream EEG.
- 2015–2018 — Early revisions added Muse streaming and IPython notebooks. The 2017–2018 refresh moved to Python 3 and Lab Streaming Layer (LSL), with contributions from Dano Morrison, Sydney Swaine-Simon, and the NeuroTechX community.
- 2026 — NeuroTechX rebuilt the workshop for chapters, student clubs, and hacknights. Version 2 adds hardware-free EEG simulation and file replay, support for multiple EEG devices, and parallel Python and Timeflux exercises.
See HISTORY.md for legacy Git tags, contributor credits, and details on how the exercises evolved.
Released under the MIT License.