Skip to content

springga/blink-detection-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blink detection and counter

Initiative

It's so easy to stare at the screen for too long and forget to blink! So comes this blink detection. But it can only detect and count blinks for now. A reminder will follow if the blink detection engine becomes more efficient. (The CPU burns while it runs!)

Acknowledgement

All honor goes to Affectiva’s Emotion-as-a-Service API. They do all the effort to recognize facial landmarks and derive measurements of facial features.

Most of the code (including Get Started below) are from Udacity's AIND-CV-Mimic project. The only tweak is to count blinks based on eyeClosure measurement and show the measurement history with ECharts.

Get Started

Two ways to start:

  1. Demo page

  2. Run locally:

In order to access the webcam stream, modern browsers require you to serve your web app over HTTPS. To run locally, you will need to general an SSL certificate (this is a one-time step):

  • Open a terminal or command-prompt, and ensure you are inside the blink-detection-js directory.
  • Run the following shell script: generate-pemfile.sh

This creates an SSL certificate file named my-ssl-cert.pem that is used to serve over https.

Now you can launch the server using:

python serve.py

Note: The serve.py script uses Python 3.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. Please refer to Udacity Terms of Service for further information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published