Inspiration

Emotions influence every decision we make — yet most existing systems rely on facial expressions or speech to detect emotions, which can be easily masked or misunderstood. I wanted to explore something deeper — the brain itself. The idea behind EEG Emotion Detection was to understand human emotions directly from EEG (electroencephalogram) brain signals, providing an objective and science-backed approach that could help in mental health monitoring, stress detection, and human-computer interaction.

What it does

EEG Emotion Detection is a web-based tool that analyzes EEG data to detect human emotions. Users can upload their .edf EEG files, and the app performs: Signal preprocessing (filtering, re-referencing, artifact removal) Feature extraction (band powers, Hjorth parameters, entropy, etc.) Machine learning-based emotion prediction Visualization of EEG waveforms, spectrograms, and topographic brain maps The app outputs emotional states (e.g., positive, negative, neutral) across time segments, allowing users to explore their brain activity in a simple and interactive dashboard.

How we built it

1: Dataset & Input: Used EEG datasets (in .edf format) containing emotional responses recorded from different brain regions.

2: Libraries & Frameworks: Python Streamlit (for interactive web app) MNE (for EEG signal processing) NumPy, SciPy, scikit-learn (for ML and feature extraction)

3: Pipeline: Applied notch and bandpass filters to clean the signal Segmented EEG data into epochs Extracted frequency-domain and time-domain features Used a machine learning classifier to predict emotional states Visualized results using Streamlit charts and topographic plots The result is a fully functional web app where users can upload data, visualize brain signals, and get instant emotion predictions.

Challenges we ran into

Cleaning and preprocessing noisy EEG data was tough — even minor artifacts could mislead the model. Lack of consistent electrode montages made it difficult to generate accurate topographic maps. Limited labeled data for emotion classification made training models challenging. Integrating heavy EEG processing in a lightweight Streamlit interface required optimization to keep it fast and user-friendly.

Accomplishments that we're proud of

Successfully built a working end-to-end EEG analysis and emotion detection system. Designed an interactive web interface that’s both visually clear and scientifically meaningful. Combined neuroscience and machine learning into a single accessible platform. Deployed the app live using Streamlit for anyone to try online.

What we learned

Gained hands-on experience with EEG signal processing and biomedical data analysis. Learned how to extract meaningful features from brain signals for emotion classification. Understood the importance of data quality, noise handling, and model interpretability. Improved skills in Streamlit app design, Python-based ML pipelines, and scientific visualization.

What's next for EEG Emotion Detection

Integrate deep learning models (CNNs, RNNs) for better emotion recognition accuracy. Enable real-time emotion tracking from live EEG streams. Expand emotion categories beyond positive/negative/neutral. Add support for wearable EEG devices for continuous monitoring. Collaborate with psychologists or neurologists to validate the system in real-world studies.

Built With

Share this project:

Updates