Coder Social home page Coder Social logo

yudong-lian / drowsy-driver-alert-system Goto Github PK

View Code? Open in Web Editor NEW

This project forked from souvikray/drowsy-driver-alert-system

0.0 0.0 0.0 72.68 MB

An application that can detect a driver drowsing by tracking the eye region and immediately alerts the driver.Additionaly in the event of a long inactivity, it will send sms to the driver's predefined contacts with his/her currrent location.

Python 100.00%

drowsy-driver-alert-system's Introduction

I have build an application that can detect the drowsiness of a driver and alert the driver before any fatal incident occurs.

There are basically three phases in the system

FACE RECOGNITION

This section uses the OpenCV Library to perform the operations. Initially, the driver has to take the driving seat. As soon as the system detects a face, it initiates the process of face recognition.So here, certain continuous frames of the driver’s face is used to identify the face of the driver. The system compares the given frame with the saved pictures of the person in the database. If a match is found, the system identifies the face and shows the name of the person on the screen. The system also saves the identified person’s name and fetches the contacts of that person from the database to be used in case of emergency.

EYE BLINK DETECTION

Here DLib library is used to perform the next set of operations. After the face is recognised and the driver’s data is loaded up, now it performs real time eye blink detection.So the system localises the eye area of the person and checks if the person is drowsing. At any sight of drowsing, it immediately alerts the driver by playing an alarm.The driver is expected to wake up at the sound. If for some reason, the driver continues to drowse, it will trigger the next operation.

FETCH LOCATION AND SEND ALERT

The next part of the operation involves sending an alert message to the driver’s predefined contacts in case of long duration of inactivity.So the driver’s current location is fetched using an online location service called geocoder.Then an SOS message is prepared which contains a google maps link to the driver’s current location and this message is sent to the predefined contacts using a service called Twilio.

To understand how face recognition and eye blink detection works, check out my repositories below

https://github.com/Souvikray/Realtime-Face-Recognition/blob/master/README.md

https://github.com/Souvikray/Eye-Blink-Detection/blob/master/README.md

NOTE I have already trained my system for face recognition.Here I am simply loading up the yml file that contains the pretrained data to speed up the system.

Now let me show you my application in action

1. Initially the driver takes the wheel

Alt text

2. The face is detected

Alt text

3. The system initiates a face recognition scan

Alt text

4. The system localises the eye region

Alt text

5. The system starts eye blink detection check

Alt text

6. If drowsiness detected, an alert sound is played

Alt text

7. If driver is inactive for long duration an emergency alert message is sent to the driver’s contacts

Alt text

Here is a short gif showing the system in action

drowsy-driver-alert-system's People

Contributors

souvikray 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.