This model is used to count number of blink. It uses Opencv Python
First create a file name detect_blinks and copy/paste file from https://github.com/shfaizan/blink-detection/blob/master/detect_blinks.py
Now download pretrained face predictor : http://bit.ly/2lU9vFI
I use Python 3.7
first download pip
now you need to install following library
- pip install opencv-python
- pip install numpy/scipy
- pip install cmake
- pip install dlib
- pip install argparse
- pip install imutils
- For input as a video python detect_blinks.py --shape-predictor shape_predictor_68_face_landmarks.dat --video blink_detection_demo.mp4
2.For input as a webcam python detect_blinks.py --shape-predictor shape_predictor_68_face_landmarks.dat