This application analyzes EEG data to classify mental states, specifically distinguishing between focused states (mental arithmetic) and relaxed baseline states.
This is an older project with tweaks that have been made to make it more open-source friendly. Any and all PRs welcome.
This system:
- Reads raw EEG signals from the PhysioNet EEGMat dataset
- Filters and cleans data to remove noise/artifacts
- Extracts brainwave features (alpha, beta, etc.) linked to mental states
- Uses machine learning to classify mental states
- Provides an API for instant prediction from uploaded EEG data
- Displays results in a real-time web dashboard
eeg_mental_state_classifier/
├── data/ # Dataset storage
├── notebooks/ # Jupyter notebooks for exploration and visualization
├── src/ # Source code
│ ├── data_processing/ # Data loading and preprocessing
│ ├── feature_extraction/ # Brainwave feature extraction
│ ├── models/ # ML models for state classification
│ ├── api/ # API for serving predictions
│ └── dashboard/ # Web dashboard
├── tests/ # Unit and integration tests
└── config/ # Configuration files
- Clone this repository
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Download the dataset and place it in the
data/
directory
python src/data_processing/process_data.py
python src/models/train_model.py
python src/api/app.py
python src/dashboard/app.py