Skip to content

Distracted Driver Detection system

Abstract:

This project focuses on building a driver state classification system with computer vision. The system will utilize an Inception v3 model to detect and classify ten distinct distraction categories.

Introduction:

Driver distraction is a big worry for road safety. It happens when something makes a driver look away from the road, which makes accidents more likely. Things like using cell phones, eating while driving, or just daydreaming can all cause distractions. These distractions can make a driver stop looking at the road, take their hands off the wheel, or forget about driving safely, and all of these can lead to very serious problems.

The CDC’s motor vehicle safety division reports that distracted driving is responsible for one out of every five car accidents. Tragically, this equates to 425,000 injuries and 3,000 fatalities annually.

State Farm aims to address these concerning figures and enhance insurance coverage for their customers by investigating the potential of dashboard cameras to autonomously identify distracted driving behaviors. With a dataset comprising 2D dashboard camera images, State Farm is inviting Kagglers to analyze and classify each driver’s behavior in this context.

About the Dataset:

The dataset utilized originates from the State Farm Distracted Driver Detection competition data hosted on Kaggle. It consists of over 10,000 images categorized into 10 classes within the training set, along with 2,000+ images in the test set. To maintain the focus on computer vision challenges, metadata such as creation dates has been excluded. The division of the training and test data is based on drivers, ensuring that each driver is exclusively present in either the training or test set

Preprocessing:

During preprocessing, the images underwent resizing to dimensions of 64×64 and conversion to greyscale to ensure consistency across all images and enhance model performance. Subsequently, the training set images were categorized into their respective classes and assigned class labels. Finally, normalization was applied to optimize model generalization, expedite convergence, and enhance overall performance. The following images below shows an image before and after preprocessing.

Model Building:

Inception v3 is a deep convolutional neural network (CNN) architecture that was developed by Google’s research team. It is an evolution of the original Inception model and is designed for image classification and recognition tasks.

The model architecture starts with multiple parallel convolutional “towers” followed by concatenation to capture different levels of spatial information. It then proceeds with additional convolutional layers, batch normalization, max-pooling, and dropout for feature extraction and dimensionality reduction. The final layers include fully connected (dense) layers with ReLU activation functions and SoftMax activation in the output layer for multi-class classification.

Overall, the model aims to achieve better generalization, faster convergence, and improved performance by incorporating elements such as batch normalization, dropout, and parallel convolutional operations inspired by the Inception architecture.

Results:

The model performs well on train set with training accuracy of 98.66% and also on test set with testing accuracy of 98.48%. The graph below shows model accuracy and loss over epochs for both train and test set.

The following images shows the prediction results of the model on new datasets.

Conclusion:

The Inception model demonstrates strong performance in accurately predicting driver distraction from new image data, achieving a commendable accuracy rate of 98.48%. In essence, the issue of driver distraction presents a substantial hazard to road safety, stemming from common triggers like cell phone usage, eating while driving, and moments of inattentiveness. To counteract these distractions and mitigate potential hazards, drivers must prioritize maintaining focus on the road, minimize engagement in multitasking activities, utilize hands-free communication devices, refrain from eating or participating in other distracting behaviours while driving, and take regular breaks to sustain alertness levels. Moreover, the implementation of technological solutions such as the Driver Distraction system, as showcased in this project, plays a pivotal role in alleviating the adverse effects of driver distraction on road safety.

Refer implementation code : https://github.com/Kishan1082/Distracted-Driver-Detection-system-