-
Notifications
You must be signed in to change notification settings - Fork 0
CHAPTER 4 : Breaking Down Modules & Algorithms
Saket Khopkar edited this page Sep 23, 2024
·
1 revision
- Road Anomaly Detection: - The main purpose of this module is to identify or detect the road anomalies (Pothole, speed breakers). We take acceleration values as an input normal to road surface to detect the presence of the intended anomaly we are supposed to detect. For the implementation of this module, we find negative and positive peaks in acceleration values for detecting potholes and speed breakers respectively. These values are taken with normal axis to the road surface so these peaks will help us to determine the presence of the anomaly at particular location. Later we use image processing to confirm the obstacle on the road we detected. As an output, we will then get location of the anomaly so that we can further report it to the local government authority for repairs.
- Driving Analysis: - This module is implemented to monitor the various driving parameters on daily basis when driving on the same route. For this analysis we will require more parameters for more accurate results. These are vehicle speed, upstream and downstream movement, O2 Sensor values (OBD Module), Engine Torque, Power consumption as well as daily fuel consumption. We will monitor the driving data on same route and observe trend of parameters.
Driving Analysis Sub Features:
- Catalytic Convertor Performance: - The main purpose will be to observe the performance / efficiency of Catalytic Converter. We will be taking some values which will be recorded in OBD Port and then enter those in an UI. It will perform calculations based on the machine learning model and will output us the condition of catalytic convertor (good or bad).
- Fuel Consumption Monitoring: - Along with keeping the track of fuel consumption, we will be keeping a track of engine load efficiency in this module too. For this, we will be considering following parameters: Engine Load value, Day to day fuel consumption, KPL (Kilometer per Liter) and Vehicle Speed.
- Over Speeding: - A module to test the driver’s skill during the drive. We will be calculating Power/Torque to Angular Velocity ratio. If the ratio value is found to be greater than 1.2, then the current gear upshifting is required and over speeding instance is noted. This is done internally.
- Sharp Turn Analysis: - The main motive of this module is to test the driving behavior of the driver. We will use compass bearing and Vehicle speed at instances. With the help of compass bearing value. We detect the turn ahead Then based on speed behavior during turn we classify it as good turn or bad turn. With the help of compass bearing value. We detect the turn ahead Then based on speed behavior during turn we classify it as good turn or bad turn
- Streamlit: It is an open-source Python library that makes it easy to create and share beautiful, custom web apps for machine learning and data science. For applying machine learning to our project, we have used Streamlit tool for deploying our Machine Learning algorithm. The 2 classification algorithms which are preferred for implementation of our model were KNN and Random Forest. But as KNN gave us high accuracy as compared to Random Forest, we have developed our model using KNN.
Algorithm:
- Obtain the data from the dataset and the OBD port.
- Clean the generated data by removing unwanted variables.
- Separate the cleaned-up data into 2 excels file (.csv file).
- Trained the data written in CSV file with KNN libraries.
- After getting required and satisfiable result, we started the development phase.
- OpenCV 2: - OpenCV (Open-Source Computer Vision Library) is an open-source computer vision and machine learning software library. OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products. This library is used in this project to detect different objects.
Algorithm:
- Install OBD Port in a car.
- Drive around the designated area. Make sure you capture the whole road as well as vehicles all around.
- Cut the captured video in frames each of 1 second.
- Analyze each frame and run the object detection algorithm on them. Based on previous results, we will get to know the object.
- Classify the output objects into various categories. Object Detection OpenCV 2 plays a huge role here.
- Output the count of each.