You are on page 1of 4

Car Racing Driver Distraction Detection Using Brain EEG

Mahsa Salehi Geoffrey Mackellar Christopher Leckie


Department of Computing and Emotiv Research Inc Department of Computing and
Information Systems Sydney, Australia Information Systems
The University of Melbourne geoff@emotiv.com The University of Melbourne
Victoria 3010, Australia Victoria 3010, Australia
salehim@unimelb.edu.au caleckie@unimelb.edu.au

ABSTRACT state during car racing has received little attention. In or-
Monitoring driver attention has a direct effect on decreas- der to detect a drivers mental state, such as distraction,
ing injury/fatality rates. Hence, detecting episodes of driver drowsiness or emotional states, a variety of video process-
distraction is fundamental in reducing car crashes. This is ing (e.g., eye tracking) and speech processing approaches
particularly significant in car racing environments where re- have been proposed. However, in car racing environments
action times are short, and distraction leads to a reduction drivers should wear fire protective suits and helmets which
in drivers performance during a race. Considering the lim- cover their face and head, hence passive video processing
itations of video/speech processing approaches in car rac- approaches are not practical in such situations. Due to the
ing conditions (wearing fire protective suits and helmets, high level of background noise in the environment, speech
noisy environments), in this paper we focus on the feasibility processing techniques become ineffective as well. As a result,
of Brain Computer Interface (BCI) approaches, by using a in this paper we investigate the feasibility of a BCI approach
commercial headset which generates brain EEG signals and to detect distraction episodes of drivers in car racing envi-
gyroscope data wirelessly. Our experimental results show ronments. We propose analyzing the brain EEG signals of
the combination of EEG and gyroscope data can lead to a driver to infer episodes of distraction. We also investi-
a highly accurate distraction detection framework. In addi- gate how the movement data of a drivers head can further
tion, our proposed framework is scalable and can potentially help to detect distraction in drivers. We use a commercial
be parallelized in order to reduce response times and moni- headset which can be put into a drivers helmet to collect
tor racing drivers in real-time. EEG signals from the drivers brain and gyroscope data from
the drivers head wirelessly. We categorize the distraction
scenarios in car racing into three main classes and propose
Keywords scalable data mining algorithms to detect them. To the
Car Racing, Brain Computer Interface, Electroencephalog- best of our knowledge, none of the previous approaches de-
raphy (EEG) Signal, Driver Distraction, Data Stream Clas- tect episodes of car racing driver distraction using electrical
sification, Real-time Response brain activity and gyroscope data.

1. INTRODUCTION 2. RELATED WORK


Based on research by the Alberta Transportation annual
In order to detect driver distraction, researchers have tra-
report in 2011 [1], distracted drivers are 3 times more likely
ditionally focused on video processing techniques [14] and
to be in a crash than attentive drivers [2]. This suggests
tracking eye movement [15]. However, these approaches can
that a considerable number of road fatalities are attributable
not be used in car racing where drivers faces are covered by a
to driver inattention. In terms of car-racing, it is even more
helmet or mask, unless the eye cameras are integrated into
important to detect driver distraction episodes. First, if
the equipment, which has not been studied to our knowl-
drivers are distracted their performance is likely to decrease.
edge.
Second, driver distraction might lead to catastrophic crashes
More recently, researchers have focused on monitoring the
at high speeds. Furthermore, tracking distraction informa-
EEG signals of a drivers brain to find patterns of distrac-
tion for a driver can be used to further train the driver and
tion. In this sense, Lin et al. [9] used a 32-channel EEG
improve his/her driving skills.
system from Neuroscan Compumedics Ltd. to investigate
While researchers have mostly considered the optimal per-
driver cognition. Later, Wang et al. [13] used the same
formance of car operation in racing, monitoring the drivers
system while considering two types of distractions in their
experiments, and achieved high detection accuracy using dif-
ferent machine learning techniques. In [8], 30 electrodes are
used to study the dual task of driver performance, and they
Permission to make digital or hard copies of all or part of this work for found an increase in the theta band power of EEG signals
personal or classroom use is granted without fee provided that copies are in the frontal areas of the brain during distraction. In addi-
not made or distributed for profit or commercial advantage and that copies tion, the authors in [10] also show an increase in the theta
bear this notice and the full citation on the first page. To copy otherwise, to band by studying the effects of iPod usage and text messag-
republish, to post on servers or to redistribute to lists, requires prior specific
permission and/or a fee. ing on driver distraction. In [11], the effect of alpha spindle
Copyright 20XX ACM X-XXXXX-XX-X/XX/XX ...$15.00. in EEG on attention was studied using 32 electrodes from
ActiCap, Brain Products GmbH. Finally in a recent study,
the authors in [12] found patterns of specific driver distrac-
tions, i.e., the beginning and ending of map reviewing, using
a Neuroscan system including 36 EEG channels.
None of the above EEG-based approaches have consid-
ered driver distraction detection in car racing environments.
However, Katsis et al. [7] have recently proposed a system
to detect the emotional state of drivers in car racing. They
use 16 facial EMGs, EDR, ECG and driver respiration data
to detect stress level of drivers in car racing with 76.3% ac- (a) (b)
curacy, whereas in this paper our focus is on analyzing EEG
and head motion signals to detect distraction episodes of Figure 1: EPOC (a) Headset, (b) 14-Channels
drivers in car racing.

of the mixture components to contribute to the model. In


3. OUR METHODOLOGY this model each mixture has its own set of likelihoods for
We have used the Emotiv EPOC headset1 to record EEG belonging to each output class. Here we used 5 mixture
signals. This wireless lightweight headset can be adapted components, selected on the basis of residual performance
to fit into the drivers helmet and provide monitoring of 14 improvement to avoid over training.
channel positions of a drivers brain in real-time. The EPOC Random Forest In high dimensional, high volume data
headset and its channel positions on the scalp are shown in sets, random forests (RFs) [3] can be used for both feature
Fig. 1a-b. In addition, the headset has a 2-D gyroscope to selection and classification. In addition, since the trees in
measure head movement. the RF model are independent from each other, each tree
In our framework, the driver distraction scenarios in car can be put on different nodes. As a result of such model-
racing are categorized into three main classes: 1) When a ing, distraction detection can be parallelized. Hence, this
driver is communicating to someone in the car (e.g., the approach is highly scalable in terms of time complexity and
navigator), 2) When a driver is communicating to someone is well suited to our real-time application. Therefore, in
remotely (e.g., the support team via radio) and 3) Problem this paper the RF algorithm is used to first select the most
solving activities (e.g., planning fuel consumption, strategy important features and then to detect distraction episodes.
and tactics). AdaBoost Besides using a bagging approach, we used
In this section, we explain our methodology to extract another ensemble technique, AdaBoost [5], to ensure the ro-
features from EEG signals. Thereafter we propose two ap- bustness of our model. In AdaBoost, like other ensemble
proaches to detect the episodes of distraction. First, a shared techniques, a number of classifiers are built. In each round
mixture classifier is proposed. Second, a more scalable algo- of building the classifier, the misclassified observations gain
rithm is proposed by using an ensemble based approach. In higher weights for the next round to have a higher proba-
order to show the robustness of our proposed methods, we bility to participate in building the next classifier. We build
also use a boosting algorithm and detect the distraction of a decision tree using a random subset of features in each
drivers. round of the algorithm in this paper. This approach is also
Feature Extraction The signals are generated at 128Hz scalable and is well suited to our problem.
and data was band-pass filtered at 4-40Hz to reduce ocular
artifacts, epoched into trailing 2 second windows (updated
at 0.5s intervals) and then FFT was applied. Features were
4. EVALUATION
selected based on the usual frequency bands (theta, alpha, In this section, we apply the methodology that is described
low beta, high beta, gamma) and the average power per in the previous section in order to classify data streams
band was recorded for each sensor. In addition the peak into attention/distraction. We first describe our data set
power and peak frequency in each band were recorded at and then the performance measures we used to evaluate
each sensor. Additional features were generated based on our methodology. All the implementations are in Matlab
accumulated power in regions such as left and right frontal R2014b and all experiments were done on a Core i7-2600
regions, left and right hemispheres, left and right tempo- CPU 3.40GHz running Windows 7. We have used the im-
ral/parietal and occipital power within each specified band, plementation of Breimans random forest algorithm [3] and
and by accumulating EEP power over the main process- AdaBoost [5] in Matlab R2014b.
ing bands (beta and gamma). This results in 266 different Data Set There were 18 subjects who attended a driving
features. Additionally, there is another feature extracted simulation which took about 40 minutes each. We asked the
from the gyroscope, indicating the number of times the user subjects to blink a few times before starting the experiment.
looked around in a 15 seconds window. The rationale with the repeated blinks is to make sure there
Shared Mixture Classifier In order to select the most are reference marks aligning the eye tracker, video and EEG
effective features from the 267 features, we first use canonical channels to make sure we align the events correctly. For the
variate analysis [4], which produces vectors in the direction purposes of experiments because of the difficulty of obtaining
of greatest variance between each class and the remaining actual racing conditions, we have provided more controlled
data. We select the features by sorting the features using conditions to normal drivers instead. To do so, for each of
the magnitude of each projection coefficient. Thereafter, the three distraction categories mentioned earlier, we have
we use a shared mixture classifier (SMC) [6], allowing all used the following controlled tasks:
1
http://www.emotiv.com/epoc.php 1. Communicating to navigator: Talking to passenger
2.5 3.5
Out-of-Bag Feature Importance

Out-of-Bag Feature Importance


3 AUC
2 90
2.5 OOB Accuracy

Accuracy(%)
1.5 2
80
1 1.5

1
0.5
0.5 70
0 0
0 50 100 150 200 250 0 50 100 150 200 250
Feature Index Feature Index 60
266 25 20
(a) EEG features (b) EEG+Gyro features
Number of Features

Figure 2: Feature importance using random forests


and OOB error Figure 3: Feature reduction using random forests

73.5 73.5
2. Communicating to the remote support team: Mobile
call, Recording call 73 73

AUC(%)

AUC(%)
3. Problem solving activities: Solving simple mental arith- 72.5 72.5

metic challenges placed on the road, assessed by the


72 72
driving through the chosen answer from a range of al-
ternatives on screen 71.5 71.5
100 200 400 1000 1 5 10
Forest Size Minimum Number data points in Leaf
The resulting data set contains 180,000 records with 267
features. We also recorded the video of the experiments to be (a) (b)
used for labeling the distraction episodes in the data set by
a human expert. A hold out evaluation methodology is used Figure 4: Effect of (a) forest size on AUC, (b) num-
2 ber of data points per tree leaf on AUC
and of subjects are chosen randomly for training purposes
3
and the rest of the subjects are left for evaluation. We have in prediction error if the values of that feature are permuted
rescaled all features in the data set, using zero-mean and across the OOB observations. Fig. 2a-b show the feature
unit-variance. importance for each category. As depicted, the feature im-
Performance Measure The first performance measure portance in both categories are roughly similar and related
is AUC (Area Under Curve) of the ROC curve, which is a to the processing power and peak frequencies in different lo-
curve showing the relationship between false positive rates cations of the brain. In addition, the gyroscope feature in
and true positive rates in our evaluation (testing) set. The the second category (the last bar in the rightmost of Fig. 2b)
output of the classification algorithms is the probability of is the most important feature in this category. Hence, we
being distracted, and each data point on the ROC curve is expect the detection accuracy would increase by using this
related to the threshold of the output probabilities. Hence, feature. Using the feature importance measure can help us
this is the detection accuracy and in this paper we use AUC to select the most important features in the classification
and detection accuracy interchangeably. task.
Since we have used a random forest algorithm in our method- We have selected the features with an OOB feature impor-
ology, the out of bag (OOB) accuracy is the second measure tance measure greater than 1 and 1.5 over the first category
we use for the evaluation. The OOB accuracy is the classifi- of feature sets which results in the top 25 and top 20 features
cation accuracy of observations that are not used in building respectively. Fig. 3 depicts the AUC results and OOB ac-
a tree. In order to compute OOB accuracy for each such ob- curacy results using all features in category one, the top 25
servation, the trees that do not use such observations are features and the top 20 features. We notice a slight decrease
chosen. Hence, it is different to the classification accuracy (0.48%) in the AUC by reducing the number of features to
over the whole training data set. 25. However, if we keep reducing the features to 20, the
AUC drops 1.62%. In addition, the OOB accuracy decrease
4.1 Results and Discussion in the 25 feature set is only 0.07%. If we keep reducing to
The experiments are divided into two main categories. In 20 features, the OOB accuracy drops 1.42%. The results
the first category we consider just the EEG related features suggest that the top 25 features can be considered as a use-
and exclude the gyroscope feature. In this category, the aim ful discriminator set, and we continue our experiments with
is to find out to what extent the brain signals can help us this set of features. In addition to keeping the AUC and
to find the subjects distraction. In the second category, we OOB accuracy roughly the same, selecting the top features
add the gyroscope feature in order to improve the detection reduces the computational complexity and response time,
accuracy. In the random forest algorithm, initially, the forest which is significant in this application. Note that we sim-
size is set to 100, the size of the subset of features is set to ilarly select the features for the second category of feature
50, and the minimum number of data points per tree leaf is sets using Fig. 2b.
set to 1. We now consider the new reduced feature set (top 25) to
investigate the effect of the parameter settings of the random
4.1.1 Feature Selection - RF forest algorithm on AUC in Fig. 4. In Fig. 4a, we increase
We used the training data set and built random forests for the number of ensembles (forest size) in the experiments.
both EEG and EEG+Gyro feature sets. Thereafter, the im- As we construct more trees in the forest, the AUC of the
portance of each feature is calculated based on the increase test set increases. In this figure there is a sudden increase in
74
81
73.5
to the effectiveness of deep learning approaches on complex
80
73 signals, we will apply them to find distraction patterns in
AUC(%)

AUC(%)
79
EEG signals.
72.5
78
72 6. REFERENCES
77
71.5
[1] Alberta Transportation Annual Report. [Online].
RF Ada SMC RF Ada SMC
Available: http://www.transportation.alberta.ca.
(a) EEG features (b) EEG+Gyro features [2] http://distracteddriving.caa.ca/education/.
[3] L. Breiman. Random forests. Machine Learning,
Figure 5: AUC of different algorithms on both cat- 45(1):532, 2001.
egories of features [4] R. B. Darlington, S. L. Weinberg, and H. J. Walberg.
AUC of 0.34% from 100 to 200 ensembles. However, the in- Canonical variate analysis and related techniques.
crease from 400 to 1000 ensembles only gives us a 0.09% rise Review of Educational Research, pages 433454, 1973.
in AUC. Fig. 4b shows the effect of the minimum number of [5] Y. Freund and R. E. Schapire. A decision-theoretic
data points per tree leaf. We notice that by increasing this generalization of on-line learning and an application to
parameter the AUC slightly increases by roughly 0.08%. As boosting. Journal of Computer and System Sciences,
a result, these two parameter values can be set according 55(1):119139, 1997.
to the response time requirements to get more accurate pre- [6] G. A. Jarrad and D. W. McMichael. Shared mixture
dictions. In addition, in our AdaBoost algorithm, the same distributions and shared mixture classifiers. In
feature set and same parameter settings as RF are used. Information, Decision and Control, pages 335340,
1999.
4.1.2 Feature Selection - SMC [7] C. Katsis, Y. Goletsis, G. Rigas, and D. Fotiadis. A
As discussed in the previous section, we use canonical wearable system for the affective monitoring of car
transformation based on the strongly labeled data to sort racing drivers during simulated conditions.
the features using the magnitude of each projection coeffi- Transportation Research Part C: Emerging
cient. In the experiments we select the top 100 features for Technologies, 19(3):541551, 2011.
classification by SMC, which decrease the response time. [8] C.-T. Lin, S.-A. Chen, T.-T. Chiu, H.-Z. Lin, L.-W.
The summary of AUC results of applying RF, AdaBoost Ko, et al. Spatial and temporal EEG dynamics of
and SMC on both categories of features are shown in Fig. 5a- dual-task driving performance. Journal of
b. In Fig. 5a the AUC measure for all methods are es- Neuroengineering and Rehabilitation, 8(1):1123, 2011.
sentially high, which shows the ability of detecting distrac- [9] C.-T. Lin, L.-W. Ko, and T.-K. Shen. Computational
tion episodes based on electrical brain signals. In addition, intelligent brain computer interaction and its
RF is the most accurate method with an AUC equal to applications on driving cognition. Computational
73.53%. However, as expected, adding the gyroscope feature Intelligence Magazine, 4(4):3246, 2009.
increases the detection accuracy in Fig. 5b. While the AUC [10] M. Mouloua, A. Ahern, A. Quevedo, D. Jaramillo,
in all methods is quite high, RF is again the most accurate E. Rinalducci, J. Smither, P. Alberti, and C. Brill.
method with an AUC of 81.1%. In addition, all proposed The effects of iPod and text-messaging use on driver
methods are scalable and can be parallelized, which is an distraction: a bio-behavioral analysis. Work: A
important advantage in real-time scenarios. Journal of Prevention, Assessment and Rehabilitation,
41:58865888, 2012.
5. CONCLUSION AND FUTURE WORK
[11] A. Sonnleitner, M. Simon, W. E. Kincses, A. Buchner,
In this paper we have investigated the feasibility of detect- and M. Schrauf. Alpha spindles as neurophysiological
ing car racing driver distraction episodes in real-time using correlates indicating attentional shift in a simulated
EEG signals from the drivers brain. We proposed an accu- driving task. International Journal of
rate and scalable methodology to this problem. We used fea- Psychophysiology, 83(1):110118, 2012.
ture selection approaches which reduce the response time, as
[12] S. Wang, Y. Zhang, C. Wu, F. Darvas, and W. A.
well as three classification algorithms. Our experimental re-
Chaovalitwongse. Online Prediction of Driver
sults on all three methods suggest that the driver distraction
Distraction Based on Brain Activity Patterns.
patterns can be detected in real-time using 14 channels of
Transactions on Intelligent Transportation Systems,
EEG signals with high accuracy. Moreover, random forests
16(1):136150, 2015.
are the most accurate method with a detection accuracy of
[13] Y.-K. Wang, T.-P. Jung, S.-A. Chen, C.-S. Huang,
73.53%. We found that the most important features in our
and C.-T. Lin. Tracking attention based on EEG
experiments are related to the processing power and peak
spectrum. In HCI International 2013-Posters
frequencies in different locations of the brain. In addition,
Extended Abstracts, pages 450454. 2013.
we show that by adding gyroscope data to the EEG signals,
the detection accuracy of our framework increased to 81.1%. [14] C. Wege, S. Will, and T. Victor. Eye movement and
Using this methodology, racing car drivers can be trained brake reactions to real world brake-capacity forward
to manage their distractions. Moreover, it can provide a collision warnings - A naturalistic driving study.
framework to help with better planning of real-time tasks Accident Analysis & Prevention, 58:259270, 2013.
depending on the drivers distraction state in the race. [15] Y. Zhang, E. Harris, M. Rogers, D. Kaber,
In the future, we intend to investigate the planning meth- J. Hummer, W. Rasdorf, and J. Hu. Driver distraction
ods in combination with the results of this paper to increase and performance effects of highway logo sign design.
the performance of drivers during races. In addition, due Applied Ergonomics, 44(3):472479, 2013.

You might also like