Git Product home page Git Product logo

drowsiness_detection's Introduction

Drowsiness Detection OpenCV 😴 🚫 🚗

This code can detect your eyes and alert when the user is drowsy.

Applications 🎯

This can be used by riders who tend to drive for a longer period of time that may lead to accidents

Code Requirements 🦄

The example code is in Python (version 2.7 or higher will work).

Dependencies

  1. import cv2
  2. import imutils
  3. import dlib
  4. import scipy

Description 📌

A computer vision system 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 👨‍🔬

Each eye is represented by 6 (x, y)-coordinates, starting at the left-corner of the eye (as if you were looking at the person), and then working clockwise around the eye.

It checks 20 consecutive frames and if the Eye Aspect ratio is less than 0.25, Alert is generated.

Relationship

Summing up

For more information, see

Results 📊

Execution 🐉

To run the code, type python Drowsiness_Detection.py

python Drowsiness_Detection.py
Made with ❤️ and 🦙 by Akshay Bahadur

References 🔱

drowsiness_detection's People

Contributors

akshaybahadur21 avatar ionicc avatar mrm8488 avatar saanikagupta avatar sankalp-sangle avatar so-ham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drowsiness_detection's Issues

Minute error

You should change cap.stop() to cap.release() in the last line as cv2 doesn't support stop().

video error

can we upload a video instead of using webcam for detection when we did the video is inverted and is not detecting correctly

face_utils.FACIAL_LANDMARKS_IDXS does not exist

For new deployments of imutils, face_utils.FACIAL_LANDMARKS_IDXS has been updated with:

  • face_utils.FACIAL_LANDMARKS_68_IDXS

The project does not work with the new deployments. If you approve then I'll put up a PR to change it.

dessin avion facile

Pour dessiner un avion simple, suivez ces étapes :

Dessinez un ovale légèrement allongé et incliné vers l'avant. Cela représentera le fuselage de l'avion.
À l'arrière de l'ovale, tracez une ligne courbe légèrement inclinée vers le bas. Cela représentera la queue de l'avion.
Ajoutez deux petites ailes près de l'avant de l'ovale, de chaque côté. Les ailes doivent être légèrement inclinées vers le haut.
Dessinez une ligne horizontale juste en dessous du fuselage pour représenter le sol.
Ajoutez une petite fenêtre à l'avant du fuselage et tracez une ligne verticale courte pour la porte de l'avion.
Ajoutez une hélice à l'avant de l'avion en dessinant deux ou trois pales courbes.
Pour donner un aspect tridimensionnel à l'avion, ajoutez des lignes courbes sur les côtés du fuselage pour représenter les fenêtres.
Enfin, utilisez des couleurs pour colorier votre avion. Les avions sont souvent peints en blanc, mais vous pouvez utiliser votre créativité pour choisir les couleurs que vous préférez.de l'avion
N'oubliez pas que ce dessin est une représentation simplifiée d'un avion. Vous pouvez le personnaliser en ajoutant des détails supplémentaires si vous le souhaitez. Amusez-vous bien en dessinant votre avion !

avion dessin
https://dessinai.com/

alaram alert

hai
I want to add a sound alert when eye closes can you say how to add I am trying not working please help me

frame not responding

error Traceback (most recent call last)
in
20 flag=0
21 while True:
---> 22 ret, frame=cap.read()
23 frame = imutils.resize(frame, width=450)
24 gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

error: Unknown C++ exception from OpenCV code

Alert Sound

I am unable to add alert sound in this project so please help me with the same.

RunTimeError

Hello,
When i try running it with everything installed, it is giving me a runtime error unable to open ".\shape_predicctor_68_face_landmarks.dat"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.