🧠 BCI MVP

BCI MVP Banner

Python License Space Project Health Release Ready Release Matrix Release Decision Milestone

🌐 Language

  • English (this file)
  • δΈ­ζ–‡: README.zh-CN.md

A lightweight EEG brain-computer interface MVP focused on:

  • EEG preprocessing (EDF)
  • relaxed vs focused classification
  • real-time stable inference (EMA + hysteresis)
  • reproducible evaluation and release workflow
  • Unsupervised Domain Adaptation (CORAL)
  • Stacking Ensemble Classifiers (RF+SVM+MLP)
  • Advanced SHAP explainability
  • Real-time debounced streaming

πŸš€ Live Demo

⚑ Quick Start

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

make check
make train

# API
make api

# Dashboard
streamlit run app/dashboard.py

πŸ“ Project Structure

bci-mvp/
  src/            # preprocessing, training, eval, reports, release tooling
  app/            # streamlit apps
  api/            # fastapi service
  docs/           # reports / readiness / release artifacts
  assets/         # generated charts/badges
  tests/          # unit tests

🧩 Core Commands

# Full pipeline
python src/run_full_pipeline.py
# or
make full

# Final release candidate summary
python src/final_release_candidate.py
python src/quick_health_cli.py

# Space status + smoke test
python src/hf_space_status.py --space williamKang112/bci-mvp-demo
python src/space_smoke_test.py

πŸ“ Model & Math

  • Mathematical model: docs/MATH_NOTATION.md
  • Limitations: docs/LIMITATIONS.md
  • Methods (paper-style): docs/METHODS.md
  • Results summary: docs/RESULTS.md
  • Technical report: docs/TECHNICAL_REPORT.md
  • Model card: docs/MODEL_CARD.md

βœ… Quality & Readiness

  • Quality scorecard: docs/QUALITY_SCORECARD.md
  • Compliance scorecard: docs/COMPLIANCE_SCORECARD.md
  • Release readiness: docs/RELEASE_READINESS.md
  • HF Space readiness: docs/HF_SPACE_READINESS.md
  • Final RC summary: docs/FINAL_RELEASE_CANDIDATE.md
  • Release dashboard: docs/RELEASE_DASHBOARD.md
  • Launch status: docs/LAUNCH_STATUS.md
  • Release guard report: docs/RELEASE_GUARD_REPORT.md
  • v1 release notes: docs/V1_RELEASE_NOTES.md
  • release archive manifest: docs/RELEASE_ARCHIVE_MANIFEST.md

πŸ”₯ Cross-Dataset Heatmap

Cross Dataset Matrix

πŸ“š Documentation Index

  • Docs home: docs/HOME.md
  • One pager: docs/ONE_PAGER.md
  • Space user guide: docs/SPACE_USER_GUIDE.md
  • Docs bundle index: docs/DOCS_BUNDLE_INDEX.md
  • Command center: docs/COMMAND_CENTER.md
  • Figure gallery: docs/FIGURE_GALLERY.md
  • Release packet: docs/RELEASE_PACKET.md

πŸ“„ License

MIT

πŸ“š Citation

If this project helps your work, please cite using CITATION.cff.

Latest Progress

  • 2026-03-23 00:13:58 UTC β€” Added v1-release-gate regression test and CI coverage
  • Full log: logs/progress.md

Public EEG Data Bootstrap (Auto Fetch)

python src/fetch_public_eeg_data.py

This fetches EEGBCI public data and prepares:

  • data/relaxed/*.edf
  • data/focused/*.edf

πŸ“ Results Brief

  • docs/RESULTS_BRIEF_EN.md

πŸ‘₯ Cross-Subject Evaluation

Measure subject-level generalization (Leave-One-Subject-Out):

python src/cross_subject_eval.py

Output:

  • outputs/cross_subject_results.json

πŸ§ͺ Cross-Subject LOSO Visual

python src/plot_cross_subject.py

Output:

  • assets/cross_subject_loso.svg

πŸ‘€ Subject-Holdout Evaluation

Test generalization by holding out one subject at a time:

python src/subject_holdout_eval.py

Output:

  • outputs/subject_holdout_results.json

πŸ” One-command Repro

python src/repro_one_command.py

🧾 Real Data Evidence

See: docs/REAL_DATA_EVIDENCE.md

πŸ”¬ Advanced ML Benchmarks

To reproduce the advanced experiments implemented in this MVP:

make benchmark   # Train RF and SVM baselines
make ensemble    # Train StackingClassifier (RF + SVM + MLP)
make coral       # Cross-Dataset Unsupervised Domain Adaptation (CORAL)
make shap        # Feature Importance Analysis (SHAP Summary Plots)
make stream-viz  # Real-time Streaming Timeline Simulation
make test        # Run Unit Tests automatically (CI)
make tune        # Automated Hyperparameter Tuning (RandomizedSearchCV)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support