Giter VIP home page Giter VIP logo

distracted-driver-detection's Introduction

Distracted-Driver-Detection

Project Overview

This project is done as a part of Machine Learning Course.

Driving a car is a complex task, and it requires complete attention. Distracted driving is any activity that takes away the driver’s attention from the road. Approximately 1.35 million people die each year as a result of road traffic crashes.

In this project our aim is to identify whether a driver is driving safely or indulged in distraction activities like texting, drinking etc. We show an in breadth & depth analysis of various features like HOG, LBP, SURF, KAZE, pixel values with feature reduction techniques PCA, LDA along with min-max normalization over different classifiers such as SVM XGBoost, Bagging, AdaBoost, K-Nearest Neighbors, Decision Trees and compare their performance by tuning different hyperparameters. We evaluate the performance of these classifiers on metrics such as Accuracy, Precision, Recall, F1 score and ROC.

Project Poster can be found in ML-Poster-Final.pdf.

Project Report can be found in ML_Project_EndTerm_Report.pdf.

Dataset

The dataset contains 22424 driver images in total downloaded from kaggle. The dataset contains coloured images of size 640 x 480 pixels which are resized to 64 X 64 coloured images for training and testing pusposes. Stratified splitting is used to split the dataset into 80:10 Training-Testing ratio. The training dataset is further split into 90:10 Training-Validation set.

The 10 classes to predict are:

  • Safe driving
  • Texting(right hand)
  • Talking on the phone (right hand)
  • Texting (left hand)
  • Talking on the phone (left hand)
  • Operating the radio
  • Drinking
  • Reaching behind
  • Hair and makeup
  • Talking to passenger(s).

Algorithm Used

  • Different combinations of feature sets were used shown in Fig 1(Ugly Duckling Theorem).
  • Evaluated with different classifiers, model parameters were varied using Grid Search to find the best parameters (No Free Lunch Theorem).
  • Deep learning methods CNN and ResNet-101 also used for classification and Performace visualised using Class Activation Maps (CAMs).
  • In PCA, number of components were preserved using Elbow method over variance of PCA projected data (Fig. 2).

Evaluation Metrics and Results

Follwing are the results of the project:

                                    Fig 1. Feature Visualization
                            Fig 2. Variance of PCA projected over min-max normalized data
                            Fig 3 Receiver Operating Characteristic (ROC) Curves
                                a. ROC of PCA reduced data
                                b. ROC of LDA reduced data
                                c. ROC of LDA on PCA reduced data
            Fig 4. Optimal Parameters of classifiers after grid search
 Fig 5. Comparing various classifiers with different feature sets over Accuracy/Recall/Precision/F1 score
                                a. Results of PCA reduced data
                                b. Results of LDA reduced data
                                c. Results of LDA on PCA reduced data
                            Fig 5. CNN architecture 
    Fig 6. Comparing between deep learning classifiers with Accuracy/Recall/Precision/F1 score
                                a. CNN
                                b. ResNet-101 [Stratery-1 : Retrain only last layer]
                                c. ResNet-101 [Stratery-2 : Retrain last few layers]
                Fig 6. ResNet-101 [Stratergy-2] performance measured using Class Activation Maps

Interpretation of Results

  • PCA gives better results compared to LDA and LDA over PCA
  • AdaBoost performed poorly on all sets of data and proved to be a bad choice as data does not suffer from high variance.
  • SVM on PCA projected feature set (HOG, LBP, Color Hist, SURF, GRAY, KAZE & RGB) gave the best metric scores because of the rich features and kernel tricks to classify data.
  • Among Deep Learning methods, ResNet-101 with stratery-2 i.e retrain last few layers gave best accuracy.
  • Feature Extration and Image Augumentation techniques helped in improving overall accuracy.

References

  1. H. Eraqi, Y. Abouelnaga, M. Saad, and M. Moustafa, “Driver Distraction Identification with an Ensemble of Convolutional Neural Networks”, Journal of Advanced Transportation 2019, 1-12; doi: 10.1155/2019/4125865
  2. Class Activation maps
  3. Distracted Driver Detection using Deep Learning
  4. ML techniques for Distacted Driver Detection

Project Team Members

  1. Akanksha Shrimal
  2. Akhil Mahajan
  3. Prabal Jain

distracted-driver-detection's People

Contributors

akankshashrimal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.