Mouse pointer movement driven by head movement, mouse clicks simulated by eyes' blinks.
- Install dlib
pip install -r requirements.txt
- Install PYAutoGUI
python video_facial_landmarks.py -p shape_predictor_68_face_landmarks.dat
where shape_predictor_68_face_landmarks.dat
is a file containing dlib's pre-trained facial landmarsk detector. It can be downloaded from a tutorial linked below.
For the first ~6 seconds, keep your head still in the same position - that's when the initial position of your head is calculated, and head movements will be detected relative to this position. To move the mouse pointer, slightly move your head in a desired direction. To simulate mouse click, blink for about 1.5 seconds.
We used Eye blink detection with OpenCV, Python and dlib tutorial for blink detection