/eye-blink

Eye blinks detector using Python 👁

Primary LanguagePythonMIT LicenseMIT

Eye blinks detector 👁

This repository estimates facial landmarks to identify if a person blinks or if the person is sleeping.

Prerequisities

Before you begin, ensure you have met the following requirements:

Setup

To install the dependencies, you can simply follow this steps.

Clone the project repository:

git clone https://github.com/RodolfoFerro/eye-blink.git
cd eye-blink

To create and activate the virtual environment, follow these steps:

Using conda

$ conda create -n eye-blink python=3.7

# Activate the virtual environment:
$ conda activate eye-blink

# To deactivate (when you're done):
(eye-blink)$ conda deactivate

Using virtualenv

# In this case I'm supposing that your latest python3 version is 3.6+
$ virtualenv eye-blink --python=python3

# Activate the virtual environment:
$ source eye-blink/bin/activate

# To deactivate (when you're done):
(eye-blink)$ deactivate

To install the requirements using pip, once the virtual environment is active:

(eye-blink)$ pip install -r requirements.txt

Running the script

Finally, if you want to run the main script:

$ python main.py

This will start your camera and open a window with the output.

Modify parameters

If you want to change the parameters of the blink detector, you can directly modify the specs from the tools/config.py script.