Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaisayush/fatigue-detection-system-based-on-behavioural-characteristics-of-driver
A computer vision system made with the help of opencv that can automatically detect driver drowsiness in a real-time video stream and then play an alarm if the driver appears to be drowsy.
https://github.com/jaisayush/fatigue-detection-system-based-on-behavioural-characteristics-of-driver
anaconda-environment anaconda3 computer-vision cv cv2 drowsiness-detection drowsy-driver-warning-system imutils miniproject numpy opencv opencv-python opencv2 playsound python python3 scipy
Last synced: 2 months ago
JSON representation
A computer vision system made with the help of opencv that can automatically detect driver drowsiness in a real-time video stream and then play an alarm if the driver appears to be drowsy.
- Host: GitHub
- URL: https://github.com/jaisayush/fatigue-detection-system-based-on-behavioural-characteristics-of-driver
- Owner: jaisayush
- License: mit
- Created: 2019-03-31T09:56:51.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-04T05:10:50.000Z (over 5 years ago)
- Last Synced: 2024-11-07T09:02:34.693Z (2 months ago)
- Topics: anaconda-environment, anaconda3, computer-vision, cv, cv2, drowsiness-detection, drowsy-driver-warning-system, imutils, miniproject, numpy, opencv, opencv-python, opencv2, playsound, python, python3, scipy
- Language: Python
- Homepage:
- Size: 53.6 MB
- Stars: 93
- Watchers: 4
- Forks: 36
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fatigue(Drowsiness) Detection using OpenCV[![](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/jaisayush/Fatigue-Detection-System-Based-On-Behavioural-Characteristics-Of-Driver/blob/master/LICENSE) [![](https://img.shields.io/badge/Ayush-Jaiswal-brightgreen.svg)](https://github.com/jaisayush)
## Applications
### This can be used by riders who tends to drive the vehicle for a longer period of time that may lead to accidents
## Code Requirements
### The example code is in Python ([version 2.7](https://www.python.org/download/releases/2.7/) or higher will work).
## Dependencies
```
1)import cv2
2)import immutils
3)import dlib
4)import scipy
5)import playsound
6)import queue
7)import time
8)import sys
```
## Description
### A computer vision system made with the help of opencv that can automatically detect driver drowsiness in a real-time video stream and then play an alarm if the driver appears to be drowsy.
## Algorithm
● We utilised a pre trained frontal face detector from Dlib’s library which is based on a modification to the Histogram of Oriented Gradients in combination with Linear SVM for classification.● The pre-trained facial landmark detector inside the dlib library is used to estimate the location of 68 (x, y)-coordinates that map to facial structures on the face. The 68 landmark output is shown in the figure below. However, we utilised the 70 landmark model.
● We then calculate the aspect ratio to check whether eyes are opened or closed.
● The eye is open if Eye Aspect ratio is greater than threshold. (Around 0.3)
● A blink is supposed to last 200-300 milliseconds.
● A drowsy blink would last for 800-900 ms.
## Execution
To run the code, run```
python blinkDetect.py
```