Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 895 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 895 Bytes

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