There are some rules and codes of conduct for those who drive irrespective of their social status. One of them is staying alert and active while driving.
Neglecting our duties toward safer travel has enabled hundreds of
thousands of tragedies to get associated with this wonderful invention
every year. It may seem like a trivial thing to most folks but following rules
and regulations on the road is of utmost importance.
So, in order to mitigate the chances of road accidents, I've built an AI-ML model to alert the driver of his consciousness while driving the vehicle.
System Model:
2 --> After passing our video feed to dlib frame by frame, we are able to detect left eye and right eye features of the face.
3 --> Now, we drew contours around it using OpenCV.
4 --> Using Scipy’s Euclidean function, we calculated the sum of both eyes’ aspect ratio which is the sum of 2 distinct vertical distances between the eyelids divided by their horizontal distance.
5--> Now we check if the aspect ratio value is less than 0.25 (0.25was chosen as a base case after some tests). If it is less the user is warned.