Skip to content

Detect eye blinks based on eye aspect ratio (EAR) introduced by Soukupová and Čech in their 2016 paper, Real-Time Eye Blink Detection Using Facial Landmarks.

License

Notifications You must be signed in to change notification settings

Conan1985/Eye-blink-detection

 
 

Repository files navigation

Eye-blink-detection

This project has been completed by help from pyimagesearch.com

Eye blink detection using dlib and OpenCV

What is eye aspect ratio (EAR)?

From the last project - Detecting facial landmarks - we know that we can apply facial landmark detection to localize important regions of the face, including eyes, eyebrows, nose, ears, and mouth. This also implies that we can extract specific facial structures by knowing the indexes of the particular face parts. In terms of blink detection, we are only interested in two sets of facial structures — the eyes.

How to run:

Download or clone this repository on your local device and run the following command in the terminal while being in the Eye-blink-detection folder - python detect_blinks.py. If there's any package/module missing, you can easily install them using the pip command. python3 detect_blinks.py --shape-predictor shape_predictor_68_face_landmarks.dat

USAGE

  • python3 detect_blinks.py --shape-predictor shape_predictor_68_face_landmarks.dat --video blink_detection_demo.mp4
  • python3 detect_blinks.py --shape-predictor shape_predictor_68_face_landmarks.dat

About

Detect eye blinks based on eye aspect ratio (EAR) introduced by Soukupová and Čech in their 2016 paper, Real-Time Eye Blink Detection Using Facial Landmarks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%