Skip to content

Simple gaze tracking in python that uses an gradient-based algorithm by Timm & Barth to locate iris centers

Notifications You must be signed in to change notification settings

noelledavis/gaze_tracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gaze_tracking

Simple gaze tracking in Python that uses an gradient-based algorithm by Timm & Barth to locate iris centers

Algorithm

  1. Localize centers of irises.
  2. Find faces in image.
  3. Get rough eye regions using hard-coded face proportions.
  4. Locate the iris center for each eye region. 1. Compute x and y image gradients. 2. Compute normalized gradient vector (gi) for each pixel. 3. Test each pixel as a possible center.
    1. Use each pixel's gradient vector.
    2. Compute normalized displacement vector (di) from possible center to position of gradient vector.
    3. Compute dot product of (di) and (gi), and add result to a sum for that possible center.
    4. If the sum for that possible center is greater than the previous max sum, store the coordinates of the possible center and update the max sum. 4. Mark the coordinates for the possible center with the max sum as the center of that eye's iris.
  5. Find reference points outside irises.
  6. Compare iris centers with reference points to determine gaze direction.

Timm & Barth's Eye Center Localization Algorithm

Paper:

Timm, F., & Barth, E. (2011, March). Accurate Eye Centre Localisation by Means of Gradients. In VISAPP (pp. 125-130).
http://www.inb.uni-luebeck.de/publikationen/pdfs/TiBa11b.pdf

Demo:

https://www.youtube.com/watch?v=aGmGyFLQAFM

About

Simple gaze tracking in python that uses an gradient-based algorithm by Timm & Barth to locate iris centers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages