Skip to content

Eye blink detection with OpenCV and dlib implemented in Python

Notifications You must be signed in to change notification settings

nWhovian/blink-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Installation guide

I. Local installation

  1. Clone repository:
git clone https://github.com/nWhovian/blink-detection.git
  1. Move to the cloned folder and install requirements:
cd path/to/blink-detection
pip install -r requirements.txt
  1. Download the dlib’s pre-trained facial landmark detector
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=17YdgpbtvxWvPhRHIkuSwjlp9nFSBKv3M' -O shape_predictor_68_face_landmarks.dat
  1. (optional) You can download a video with my face and use it for testing
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=12gbn8y0qt1aIFOw9R8lmVX2LBPCuinJB' -O video.mp4
  1. Run the script with video file argument
python ./blink_detection.py --shape-predictor shape_predictor_68_face_landmarks.dat --video -path/to/video

or with web camera streaming

python ./blink_detection.py --shape-predictor shape_predictor_68_face_landmarks.dat

You can see the video examples of blink detection using here:

https://drive.google.com/file/d/1XwlD3P_TnJui66ysGpBa7b7Zet6SUYea/

About

Eye blink detection with OpenCV and dlib implemented in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages