{"id":27710401,"url":"https://github.com/ck-zhang/EyeTrax","last_synced_at":"2025-04-26T16:02:41.269Z","repository":{"id":257805759,"uuid":"864546447","full_name":"ck-zhang/EyeTrax","owner":"ck-zhang","description":"EyePy – webcam-based eye tracking made simple","archived":false,"fork":false,"pushed_at":"2025-02-28T17:31:29.000Z","size":153,"stargazers_count":105,"open_issues_count":0,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-23T03:42:36.209Z","etag":null,"topics":["eye-tracking","gaze-track","mediapipe","obs-overlay","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ck-zhang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-28T14:06:09.000Z","updated_at":"2025-04-23T03:37:54.000Z","dependencies_parsed_at":"2025-04-13T21:38:18.046Z","dependency_job_id":null,"html_url":"https://github.com/ck-zhang/EyeTrax","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":"0.18181818181818177","last_synced_commit":"8485801cb3fb6abab1d999902235c3469b2ace32"},"previous_names":["ck-zhang/eyepy","ck-zhang/eyetrax"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ck-zhang%2FEyeTrax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ck-zhang%2FEyeTrax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ck-zhang%2FEyeTrax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ck-zhang%2FEyeTrax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ck-zhang","download_url":"https://codeload.github.com/ck-zhang/EyeTrax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251013574,"owners_count":21522869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eye-tracking","gaze-track","mediapipe","obs-overlay","python"],"created_at":"2025-04-26T16:02:39.545Z","updated_at":"2025-04-26T16:02:40.834Z","avatar_url":"https://github.com/ck-zhang.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# EyeTrax\n\n[![PyPI version](https://img.shields.io/pypi/v/eyetrax.svg)](https://pypi.org/project/eyetrax/)\n![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)\n![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)\n[![GitHub stars](https://img.shields.io/github/stars/ck-zhang/EyeTrax.svg?style=social)](https://github.com/ck-zhang/EyeTrax)\n\n![Demo](https://github.com/user-attachments/assets/1b953a10-442f-4c4a-95e0-52a68f1488bc)\n\nEyeTrax is a Python library that provides **webcam-based eye tracking**.\nExtract facial features, train a model and predict gaze with an easy‑to‑use interface.\n\n## Features\n\n- Real‑time gaze estimation\n- Multiple calibration workflows\n- Optional filtering (Kalman / KDE)\n- Model persistence – save / load a trained `GazeEstimator`\n- Virtual-camera overlay that integrates with streaming software (e.g., OBS) via the bundled **`eyetrax-virtualcam`** CLI\n\n## Installation\n\n### From [PyPI](https://pypi.org/project/eyetrax/)\n\n```bash\npip install eyetrax\n```\n\n### From source\n\n```bash\ngit clone https://github.com/ck-zhang/eyetrax \u0026\u0026 cd eyetrax\n\n# editable install — pick one\npython -m pip install -e .\npip install uv \u0026\u0026 uv sync\n```\n\n## Demo\n\nThe **EyeTrax** package provides two command‑line entry points\n\n| Command | Purpose |\n|---------|---------|\n| `eyetrax-demo` | Run an on‑screen gaze overlay demo |\n| `eyetrax-virtualcam` | Stream the overlay to a virtual webcam |\n\nOptions\n\n| Flag | Values | Default | Description |\n|------|--------|---------|-------------|\n| `--filter` | `kalman`, `kde`, `none` | `none` | Smoothing filter |\n| `--camera` | *int* | `0` | Physical webcam index |\n| `--calibration` | `9p`, `5p`, `lissajous` | `9p` | Calibration routine |\n| `--background` *(demo only)* | *path* | — | Background image |\n| `--confidence` *(KDE only)* | *0–1* | `0.5` | Contour probability |\n\n## Quick Examples\n\n```bash\neyetrax-demo --filter kalman\n```\n\n```bash\neyetrax-virtualcam --filter kde --calibration 5p\n```\n\n### Virtual camera demo\n\nhttps://github.com/user-attachments/assets/de4a0b63-8631-4c16-9901-9f83bc0bb766\n\n## Library Usage\n\n```python\nfrom eyetrax import GazeEstimator, run_9_point_calibration\nimport cv2\n\n# Create estimator and calibrate\nestimator = GazeEstimator()\nrun_9_point_calibration(estimator)\n\n# Save model\nestimator.save_model(\"gaze_model.pkl\")\n\n# Load model\nestimator = GazeEstimator()\nestimator.load_model(\"gaze_model.pkl\")\n\ncap = cv2.VideoCapture(0)\n\nwhile True:\n    # Extract features from frame\n    ret, frame = cap.read()\n    features, blink = estimator.extract_features(frame)\n\n    # Predict screen coordinates\n    if features is not None and not blink:\n        x, y = estimator.predict([features])[0]\n        print(f\"Gaze: ({x:.0f}, {y:.0f})\")\n```\n\n## More\n\nIf you find EyeTrax useful, consider starring the repo or contributing. If you use it in your research, please cite it. The project is available under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fck-zhang%2FEyeTrax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fck-zhang%2FEyeTrax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fck-zhang%2FEyeTrax/lists"}