Skip to content
项目

关于

轻量、可靠的 Python 眼动追踪器。

其他项目

这些数字如何统计

实测星标增长

24小时
0
7天
+5
15天
+7
1个月
+17

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

EyeTracker

A lightweight, robust 3D eye tracker in Python

This repository is an open-source 3D eye tracking algorithm written in Python. Currently, it is an updated version of the pupil tracker from https://github.com/YutaItoh/3D-Eye-Tracker/blob/master/main/pupilFitter.h that has been optimized, simplified, and improved upon.

To use the script, run "python .\OrloskyPupilDetector.py" from your shell. If the hardcoded file path in the select_video() function does not find a video at the specified path, it will open a browse window that allows you to select a video. The process_video() function handles the majority of the processing and can be easily modified to work with a camera capture or image. It returns a rotated_rect that represents the pupil ellipse. A lite version is also included that is more efficient, but less robust. Be sure to have an adequate light source for the lite version.

A test video (eye_test.mp4) is included in the root directory for testing. Algorithm details are explained here: https://www.youtube.com/watch?v=bL92JUBG8xw

When running the script on this test video, your results should look like this: https://youtu.be/B06cUMplDHw.

If you need an eye camera with custome LEDs, I have instructions for building your own IR camera for under $100 here: https://www.youtube.com/watch?v=8lZqCMRMtC8 Alternatively, there is a small $17 IR camera that works well with some modification: https://amzn.to/41x8p2W

To help support this software and other open-source projects, please consider subscribing to my YouTube channel: https://www.youtube.com/@jeoresearch, or joining for $1 per month: https://www.youtube.com/@jeoresearch/join.

Other useful tools/supplies

As an Amazon Associate, I earn from qualifying purchases at no extra cost to you.

Requirements:

  • A Python environment

Packages

  • numpy ****There is a known issue with numpy 2.0.0. Downgrading to 1.26.0 or another version can solve this issue.
  • opencv

Assumptions

  • Works best with 640x480 videos. Images will be cropped to size equally horizontally/vertically if aspect ratio is not 4:3.
  • The image must be that of the entire eye. Dark regions in the corners of the image (e.g. VR display lens borders) should be cropped.

探索相关项目

加载中…