• Stars
    star
    122
  • Rank 286,474 (Top 6 %)
  • Language
    Python
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Driver Drowsiness Detector detects if a driver or a person is drowsy or not, using their eye movements.

Tweet GitHub stars GitHub forks

This program is used to detect drowsiness for any given person. In this program we check how long a person's eyes have been closed for. If the eyes have been closed for a long period i.e. beyond a certain threshold value, the program will alert the user by playing an alarm sound.

The program contains 3 files, which are

Files

  • face_and_eye_detector_single_image.py - Detects face and eye from a single image. Demo-
Test Image Result Image
  • face_and_eye_detector_webcam_video.py - Detects face and eye in a webcam feed by userWebcam Face and Eye Detection
  • drowsiness_detect.py- This script detects if person is drowsy or not using webcam video feed

DEMO Drowsiness Detection Demo

Requirements

IMPORTANT

Download shape_predictor_68_face_landmarks.dat.bz2 from Shape Predictor 68 features Extract the file in the project folder using bzip2 -dk shape_predictor_68_face_landmarks.dat.bz2

numpy==1.15.2
dlib==19.16.0
pygame==1.9.4
imutils==0.5.1
opencv_python==3.4.3.18
scipy==1.1.0

Use pip install -r requirements.txtto install the given requirements.

Usage

Detect Face and Eyes in a Single Image

Put your file to be detected in images folder with name test.jpeg or change the file path in Line : 14 face_and_eye_detector_single_image.py to your image file.
Run script using:

python face_and_eye_detector_single_image.py

Detect Face and Eyes in a Webcam Feed

Run script using:

python face_and_eye_detector_webcam_video.py

Drowsiness Detection

Run script using:

python drowsiness_detect.py

The algorithm for Eye Aspect Ratio was taken from pyimagesearch.com blog, by Adrian RoseBrock.

More Repositories

1

Facial-Recognition-Using-FaceNet-Siamese-One-Shot-Learning

Implementation of Facial Recognition System Using Facenet based on One Shot Learning Using Siamese Networks
Python
118
star
2

Do-It

To-Do List App made in Android. Tutorial available on Youtube.
Java
55
star
3

Chat-App-Flask-SocketIO

Chat Application using Flask and SocketIO
HTML
28
star
4

Gesture-Controlled-Snake-Game

This program can be used to play a Snake Game by detecting hand gestures to control movement of the snake on the screen. Implemented in Python using OpenCV.
Python
26
star
5

Penguin-Coders-WebApp

Java
20
star
6

YOLO-v3-Object-Detection

This repository contains code for YOLO v3 Object detection, and is capable of fast object detection. Input can be given through images, videos and webcam input feed.
Python
18
star
7

Bookstore-Manager

A book management software built with Python to store information about Book's name, Author, Year, and ISBN. Built using tkinter and sqllite3 database.
Python
11
star
8

PushDown-Automata-Implementation

Implementation of PushDown Automata to track acceptance or rejection of a string.
Python
8
star
9

Data-Structures-In-C

(Incomplete, In Continuation) Implementation of Data Structures like Stacks, Queues, etc. using C programming language
C
8
star
10

NoInternetLayout

Kotlin
4
star
11

Sentiment-Analysis-Flask-API

This sentiment analysis API allows you to get Sentiment for a sentence using GET and POST methods.
Python
4
star
12

NLP-Tasks-Sentiment-NER

This repository demonstrates the use of Stanford CoreNLP library for doing NLP tasks such as Sentiment Analysis and Named Entity Recognition
Java
4
star
13

CheckSum-Implemetation

8 bit, 16 bit and 32 bit CheckSum Implementation in MATLAB
MATLAB
3
star
14

BMI-Calculator-Android

Kotlin
3
star
15

Ionic-NewsApp

TypeScript
2
star
16

Cats-vs-Dogs-Classification-Flask-WebApp

A flask based web application to differentiate between cats and dogs
Python
2
star
17

EmployeeManagement

This project depicts simple Employee Management System software, which contains various functions that allow the user/company to keep track of its employees and store the details of its employees in a database. This project has been made using C language, and uses some important concepts, features and algorithms to accomplish the task. This software is entirely text based and could be run on any machine having C compiler (GCC, Turbo-C, Borland, etc.) through a Terminal window (LINUX), or Command Prompt (Windows).
C
2
star
18

Project-Jatayu-Website

Project Jatayu Website
HTML
1
star
19

APOD-Wallpaper-Changer

This script changes wallpaper of your desktop daily from the NASA's Astronomical Picture of the Day
Python
1
star
20

FlashLight

Java
1
star
21

Fashion-MNIST-Tensorflow-Keras

This repository contains the code for Fashion MNIST, which can be used to predict clothes categories. Implemented using Tensorflow, and Keras library.
Jupyter Notebook
1
star
22

Website-Blocker

This Python script blocks the websites you choose to, and also in the desired time interval (or Working Hours)
Python
1
star