Code Monkey home page Code Monkey logo

mouth-open's Introduction

mouth-open

Detecting when a human's mouth is open

Referenced Code

Adrian Rosebrock - drowsiness detection

I was interested in implementing a similar function for calculating the aspect ratio of the mouth instead of both eyes.

Dependencies

Python modules for:

  • scipy
  • imutils
  • numpy
  • dlib
  • cv2

Usage

This sample version uses your webcam, so make sure that the device you are using has one. Otherwise, you will need to change the code to take in a video file.

To run the code

python detect_open_mouth.py

dlib shape predictor

sample gif

sample gif

trump-mouth

mouth-open's People

Contributors

mauckc 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

Watchers

 avatar  avatar  avatar  avatar

mouth-open's Issues

Something wrong with mouth_aspect_ratio( ) function.

As you written:
(mStart, mEnd) = (49, 68)
mouth = shape[mStart:mEnd]
A = dist.euclidean(mouth[2], mouth[9]) # 51, 59
B = dist.euclidean(mouth[4], mouth[7]) # 53, 57
C = dist.euclidean(mouth[0], mouth[6]) # 49, 55

If,mouth[0] means point 49, mouth[6] means point 55, then mouth 9 should be point 58 but not 59, mouth 7 should be 56 but not 57.

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.