Andrés Giovanni Cañas
All work

Driver distraction detection: Master's thesis

A study of how to combine three in-car cameras with deep learning to detect when a driver is texting or on the phone. Fusing all three raised accuracy from 90.8% to 96.7%.

Company
Master's in Artificial Intelligence, UNIR
Role
Researcher and developer (Master's thesis), supervised by Salvador Cobos Guzmán
Year
2023
Disciplines
Computer visionDeep learningData fusionAutomotive
Driver distraction detection: Master's thesis
96.7%
accuracy with early fusion of 3 cameras
+6 pts
over the best single camera
769,383
images processed

Context

Distraction at the wheel is one of the main causes of road accidents, and driver monitoring systems use cameras inside the car to catch it. Most models look through one camera. My thesis asked a simple question: if a car has several cameras, what is the best way to combine them?

My role

I designed and ran the full experiment as my Master's thesis in Artificial Intelligence at UNIR, supervised by Salvador Cobos Guzmán, using the Driver Monitoring Dataset (DMD) published by Vicomtech.

What I built

  • A data pipeline that exported 769,383 frames from the DMD videos, taken by three cameras (body, face and hands), resized to 224×224 and split 80/20 for training and testing.
  • Five classes to detect: safe driving, texting with the right or left hand, and phone call with the right or left hand.
  • A control group with each camera on its own, using InceptionV3 and MobileNet pretrained on ImageNet as feature extractors in Keras.
  • Four fusion strategies (early, intermediate, late and decision fusion), each tested with every combination of cameras in an ablation study.

Results

Accuracy with the three cameras, by fusion strategy:

  • Best single camera (body, InceptionV3): 90.8%
  • Early fusion: 96.7%
  • Intermediate fusion: 94.0%
  • Late fusion: 92.0%
  • Decision fusion: 88.8%

Combining all three cameras early in the network gave the best result. Fusing only the final decisions made things worse than a single camera. Single cameras struggled most with the texting classes, which are much rarer than safe driving (54% of the data).

Outcome

The best model reached 96.7% accuracy and was tested on real driving video. The thesis points to next steps: other sensors and capture modes, other datasets to test generalisation, and newer models such as Transformers.

Demo of the model on real driving video

What I learned

More data sources only help if you combine them at the right point. The choice of fusion strategy moved accuracy by eight points, more than the choice of model. This work is also where my interest moved from AI on screens to AI that understands the physical world.