Controlling mouse movements using facial gestures
This technology can be used to browse Netflix, YouTube, and other streaming services. This technology could be added to an Operating System to browse through PC
The example code is in Python (version 2.7 or higher will work).
- import cv2
- import immutils
- import dlib
- import scipy
- import selenium
- import Enum
Each eye is represented by 6 (x, y)-coordinates, starting at the left-corner of the eye (as if you were looking at the person), and then working clockwise around the eye:.
Measure the centroid of the eyes and measure the angle between the points to calculate the angle of face
For more information, Face ALignment EAR
Clone the project and create a virtual environment from Python Virtual Environment package
> virtualenv venv
Activate the environment
> venv\Scripts\activate
Install the project requirements
(venv) C:\...\..> pip install -r requirements.txt
Execute the python script using the command below:
For Mouse control, start the consumer
<venv> C:\...\..> python GestureConsumer.py
and then start the controller
<venv> C:\...\..> python GestureControl.py
To run Smile Detection module
<venv> C:\...\..> python SmileDetector.py


