ML engineering project
Mind-Controlled Drone
MCX is a user-friendly Brain-Computer Interface (BCI) implementation that uses EEG data from the Muse S2 headband to classify the user's mental state and control a drone in real-time. **Signal Processing & Features:** Using **MNE**, raw EEG data (256Hz) is bandpass filtered (0.5-50Hz) to remove drift and noise. We use **Welch's method** to compute the Power Spectral Density (PSD) and extract bandpowers (Delta, Theta, Alpha, Beta, Gamma) along with inter-band ratios as features.  **Hybrid CNN-LSTM Architecture:** The core model is a **Hybrid CNN-LSTM** network designed to capture both spatial and temporal dependencies: • **TimeDistributed CNN** - Extracts spatial features from electrode data across time steps • **LSTM Layers** - Captures temporal dynamics and sequence patterns in the EEG signal • **Dense Layers** - Maps extracted features to control states (e.g., Takeoff, Land, Rotate)  **Tech Stack:** Built with **Python**, **TensorFlow/Keras**, **MNE**, and **CustomTkinter**. Data streaming is handled via **Lab Streaming Layer (LSL)**.
Problem
Translate noisy, low-channel EEG signals into reliable real-time commands for an accessible brain-computer interface.
My role
Designed the BCI, built the EEG preprocessing and feature pipeline, trained the command classifier, and implemented real-time socket-based control.
Approach
Stream Muse S2 data, filter it with MNE, extract Welch bandpower features, classify temporal patterns, and map states to socket-based drone control.
Outcome
Achieved 76% offline and 93% real-time command-classification accuracy in the documented MCX evaluation.
Implementation
- Streamed 256 Hz Muse S2 EEG through Lab Streaming Layer.
- Applied bandpass filtering and Welch power spectral-density features.
- Mapped model outputs to real-time control commands over a socket interface.
Evaluation
- Measured command classification both offline and in the live control loop.
- Inspected EEG amplitude and held-out classification behavior.
Results
- 76% offline command-classification accuracy.
- 93% real-time command-classification accuracy in the documented evaluation.
Constraints
- Muse S2 provides a small number of noisy EEG channels.
- Filtering and inference had to remain responsive enough for live control.
- Misclassification needed conservative command mapping around a physical drone.
Tradeoffs
- A lightweight consumer headset improves accessibility but limits signal resolution.
- Real-time smoothing can improve stability while adding command latency.
Next improvements
- Test across more participants and sessions to measure generalization.
- Add confidence-aware abstention and stronger physical safety interlocks.