/collision-detection

This is a project of binary classifying dangerous situation on the road from the mobile sensors ( Accelerometer/gyroscope/gps/magnetometer)

Primary LanguageJupyter Notebook

Collision Detection

This is a school project done with a company to classify dangerous vs. non dangerous driving on the road. I strted with some exploaration and preprocessing and moved to base models ( Random forest and gradient boosting ) and then tried resnet based on this paper+repo:

https://github.com/hfawaz/dl-4-tsc

Data:

THe data used for this project belong to the company I did the project for, hence could not upload it here. It contains the following:

  • Accelerometer(Csv file @ 50Hz)
  • Gyroscope (Csv file @ 50Hz)
  • Magnetometer(Csv file @ 50Hz)
  • GPS (Csv file @ 1Hz)

Code

THe following files contained modeling and exploratory analysis:

Prerequisites

For the base models all python packages needed are listed in requirements.txt file and can be installed simply using the pip command. this project was running on Google Deep Learning VM Based on: Debian GNU/Linux 9.8 (stretch) (GNU/Linux 4.9.0-8-amd64 x86_64\n)

  • numpy
  • pandas
  • sklearn
  • scipy
  • matplotlib

Results for base models:

Gradientboosting Random Forest
Accelerometer acc: 79.69% recall: 84% precision:80% acc: 82% recall: 89% precision:81%
Accel+Gyro acc: 79.32% recall: 85% precision:78% acc: 81% recall: 87% precision:79%
Accel+ Gyro +GPS acc: 82% recall: 88% precision:81% acc: 81.57% recall: 88% precision:79%