mirror of
https://github.com/ck-zhang/EyePy.git
synced 2025-12-31 00:10:06 -06:00
e2ca2c720e8ab7cc7e4e3a46b118af3f02b6cd1c
EyePy
This is a Python library that provides webcam-based gaze tracking. Extract facial features, train gaze tracking model and predict gaze with super easy to use interface.
Usage Showcase
Installation
Clone this project:
git clone https://github.com/ck-zhang/EyePy
Install dependencies:
pip install -r requirements.txt
Interactive Demo
python gaze_estimatior.py
Usage
Initialization
from EyePy import GazeEstimator
gaze_estimator = GazeEstimator()
Feature Extraction
import cv2
image = cv2.imread('image.jpg')
features = gaze_estimator.extract_features(image)
print(features)
Training the Model
X = [...] # Features
y = [...] # Gaze coordinates
gaze_estimator.train(X, y)
Predicting Gaze Location
predicted_gaze = gaze_estimator.predict([features])
print(predicted_gaze)
Future Work
Any suggestions for features and improvements are welcome.
If you enjoyed using EyePy, consider giving it a star.
Languages
Python
100%