
Gioele Tiraboschi
EEGNet for Real-time EEG-Based Stress Analysis.
Rel. Francesco Paolo Andriulli. Politecnico di Torino, Corso di laurea magistrale in Ingegneria Biomedica, 2025
![]() |
PDF (Tesi_di_laurea)
- Tesi
Licenza: Creative Commons Attribution Non-commercial No Derivatives. Download (7MB) |
Abstract: |
Chronic stress is an increasingly critical issue for public health, but the current methods to detect it are often subjective, slow, or inadequate for a real-time application. This thesis proposes a system for the automatic analysis of mental stress based on electroencephalographic (EEG) signals, leveraging a convolutional neural network from the EEGNet architecture. The model was optimised to achieve high performance in terms of both accuracy and processing speed, to enable real-time integration in wearable and portable devices. The model has been trained on the public SAM40 dataset, and its hyperparameters were fine-tuned using K-fold cross-validation. To evaluate generalisation capabilities, the model was also tested on newly collected EEG data specifically acquired for this work. Results show a classification accuracy of 92.73% +- 2.08% when all sessions were included in the training set, and 67.65% +- 6.76% when only the first four sessions were used for training and the last session for testing. This indicates that including data from the target subject’s session significantly improves model performance. The inference speed of the complete pipeline, including data loading, data preprocessing, data preparation, and classification, was also evaluated. For each 2-second-long segment, the system required 252.7 ms +- 45.5 ms, corresponding to an Information Transfer Rate (ITR) of 16.62 bits/min. This latency is compatible with real-time applications. However, more than 70% of the processing time is currently consumed by the preprocessing step, which includes Independent Component Analysis (ICA) for artefact removal. Future work should aim to optimise the preprocessing pipeline to reduce computational load without compromising artefact removal quality. Additionally, although the current implementation operates offline on pre-recorded data, transitioning to an online, real-time system represents a key next step. Beyond stress detection, the proposed model has the potential to be adapted for the classification of other cognitive states, such as fatigue, distraction, or cognitive overload. When integrated into neurofeedback systems, it could enable real-time interventions for self-regulation and burnout prevention, paving the way for intelligent, adaptive tools for mental well-being. |
---|---|
Relatori: | Francesco Paolo Andriulli |
Anno accademico: | 2024/25 |
Tipo di pubblicazione: | Elettronica |
Numero di pagine: | 117 |
Soggetti: | |
Corso di laurea: | Corso di laurea magistrale in Ingegneria Biomedica |
Classe di laurea: | Nuovo ordinamento > Laurea magistrale > LM-21 - INGEGNERIA BIOMEDICA |
Ente in cotutela: | DTU - Danmarks Tekniske Universitet (DANIMARCA) |
Aziende collaboratrici: | DTU - Technical University of Denmark |
URI: | http://webthesis.biblio.polito.it/id/eprint/36232 |
![]() |
Modifica (riservato agli operatori) |