Skip to content

pretrainedmchns/blink-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository hosts code to run a blink detector/alarm in your browser. The code uses a pretrained facial keypoint detector model, hosted on the tf-js models repository.

The code has been taken from the facial landmark detector demo (FLD) page of the repository and has been refactored to work in the browser using Tensorflow-JS 2.4.0.

How Does It Work?

After the FLD model predicts the keypoint location. Eyebrow keypoints (refer to mesh map) are used to calculate the distance between the left and right eyebrows.

The distance is plotted on a line chart for easy visualization. Whenever the distance for both left and right eye falls below a threshold, a beep function is called.

What can YOU Do?

The following are some low hanging fruits for you to try:

  • Add code to make the blink detection robust to camera angle changes.
  • Add code for automatic threshold calculation.

Feedback

Please create an issue on this repository or write to us on pretrainedmachines@gmail.com on any issue/thoughts on this repository.

Follow us on @pretrainedmchns on Twitter and Github.

We are waiting to hear from you.

Releases

No releases published

Packages

No packages published