polito.it
Politecnico di Torino (logo)

Recurrent Neural Networks for Driver Drowsiness Detection

Catia Sofia Giannuzzi

Recurrent Neural Networks for Driver Drowsiness Detection.

Rel. Massimo Violante, Luigi Pugliese. Politecnico di Torino, Corso di laurea magistrale in Mechatronic Engineering (Ingegneria Meccatronica), 2024

[img]
Preview
PDF (Tesi_di_laurea) - Tesi
Licenza: Creative Commons Attribution Non-commercial No Derivatives.

Download (2MB) | Preview
Abstract:

This thesis explores the feasibility of reverse engineering the PredictS algorithm by Sleep Advice Technologies Srl, which predicts driver drowsiness and potential sleep events. Unlike traditional Advanced Driver Assistance Systems (ADAS) relying on cameras and radars, PredictS uses physiological data sampled at 1Hz from a Garmin Instinct 2 Dezl smartwatch. The smartwatch connects via Bluetooth Low Energy (BLE) to a smartphone, enabling real-time data collection through an Android application. The dataset includes driving simulations from 24 participants (16 males, 8 females; average age 33.75) conducted in September 2023 and March 2024. Each session lasted about 1.5 hours or until the driver fell asleep. Medical experts analyzed physiological signals (e.g., PPG and ECG) according to the American Academy of Sleep Medicine (AASM) standards. PredictS algorithm outputs were cross-referenced with these expert evaluations and drivers' feedback to assess its accuracy against a defined ground truth. Given the time-dependent nature of the data, two types of Recurrent Neural Networks (RNNs) were analyzed: Gated Recurrent Units (GRUs) and Long Short-Term Memory (LSTM) networks. GRUs were prioritized because of their lower computational complexity while maintaining similar performance to LSTMs. The GRU models were trained to replicate PredictS’s predictions, with evaluation based on standard machine learning metrics and visual inspection to verify prediction accuracy, especially at higher drowsiness levels. Traditional metrics were insufficient alone, as the primary goal was to predict changes in drowsiness rather than maintain a given state. Several sliding windows were tested for data preprocessing, with the best results found at 300-240 seconds (5-4 minutes of registration), achieving on test set: 85% accuracy, 97% specificity, and 75% sensitivity and precision—the last two metrics are mostly relevant given the data imbalance. Cross-validation techniques ensured gender representativeness, though age-based analysis was limited due to a polarized age range. Adding age as an input reduced model performance. The thesis also examines the effects of introducing random delays in the PredictS output, particularly in detecting sleep events. It was hypothesized that random jitter could degrade precision and sensitivity without compromising algorithm reliability, important for medical compliance. Experiments confirmed that adding jitter reduced the model's ability to replicate PredictS, particularly at higher drowsiness levels, though some resilience was observed in certain cases. Finally, the best-performing GRU model was implemented into an Android application using Kotlin and Java. The app’s performance in memory usage and battery consumption was compared to the original PredictS software. As anticipated, the neural network-based app required significantly more memory than typical smartphone applications, leading to shorter battery life, highlighting the challenges of deploying such models in hardware-constrained environments.

Relators: Massimo Violante, Luigi Pugliese
Academic year: 2024/25
Publication type: Electronic
Number of Pages: 105
Subjects:
Corso di laurea: Corso di laurea magistrale in Mechatronic Engineering (Ingegneria Meccatronica)
Classe di laurea: New organization > Master science > LM-25 - AUTOMATION ENGINEERING
Aziende collaboratrici: Politecnico di Torino
URI: http://webthesis.biblio.polito.it/id/eprint/33087
Modify record (reserved for operators) Modify record (reserved for operators)