Giter Site home page Giter Site logo

awake's Introduction

Drowsiness Detection System using Python and Opencv

The Drowsiness Detection System is an innovative application developed using Python and OpenCV. It uses advanced facial recognition techniques to detect signs of drowsiness in the driver. When the system identifies any potential issues, it automatically sends a text message to the registered phone number of the driver.

In the system, a high-speed video camera captures the driver's face at regular intervals. OpenCV then processes the images and uses a pre-trained facial landmarks model to track the eye regions. By analyzing the position and movement of the eyes, the system can accurately determine if the driver is drowsy or distracted.

If the system detects any signs of drowsiness, it activates the Twilio API to send a text message to the driver's registered phone number. The message includes a warning about the drowsiness and the driver's current geographical location, ensuring their safety and security.

In conclusion, the Drowsiness Detection System offers a practical and efficient solution to combating drowsiness on the road. By utilizing advanced facial recognition techniques and integrating the Twilio API, the system ensures prompt notifications and alerts for the driver. This approach ultimately reduces the risk of accidents and enhances overall road safety.

Importing necessary libraries

 pip install cv2
 pip install  dlib

If u get error while installing dlib

 pip install cmake

and add cmake to system variables path (windows)

Make sure u have visual studios development kit for c++ installed for windows

 pip install scipy
 pip install pygame
 pip install subprocess

Setting up twilio for geo-location message

create a twilio account

get account_sid,auth_token,twilio_number from twilio.com and add it to keys.py

Running the main1.py

if you are using the cmd

navigate to folder

python Main1.py

using vscode

ctrl + f5 or run without debugging

about file structure

  • Main1.py - this is the main file that needs to be run

  • Main.py - this file sends alert signal to the user's registered phone number

  • geo.py - this file gets geo-location using ipstack API

  • keys.py - this files is used to store api keys and phone number required for twilio

awake's People

Contributors

derekthedevil avatar

Watchers

Kostas Georgiou avatar  avatar

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.