{"id":20157243,"url":"https://github.com/robinka/peye","last_synced_at":"2025-10-10T14:13:24.212Z","repository":{"id":83853972,"uuid":"62962177","full_name":"RobinKa/peye","owner":"RobinKa","description":"A python library to localize the eye's pupils","archived":false,"fork":false,"pushed_at":"2016-07-17T10:43:59.000Z","size":274,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-04T17:00:06.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/RobinKa.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":"2016-07-09T17:58:44.000Z","updated_at":"2017-05-24T13:32:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"60a4daca-86c3-4b58-beba-c59ccd5a15c8","html_url":"https://github.com/RobinKa/peye","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RobinKa/peye","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinKa%2Fpeye","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinKa%2Fpeye/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinKa%2Fpeye/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinKa%2Fpeye/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobinKa","download_url":"https://codeload.github.com/RobinKa/peye/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinKa%2Fpeye/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004180,"owners_count":26083688,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-13T23:44:53.642Z","updated_at":"2025-10-10T14:13:24.207Z","avatar_url":"https://github.com/RobinKa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# peye\nA python library to quickly and accurately localize the eyes' pupils\n[Demo video](https://www.youtube.com/watch?v=zMMMuSPQkhk)\n\n# Dependencies\n- Python 3\n- Python libraries\n  - numpy\n  - cv2\n  - [pytocl](https://github.com/ToraxXx/pytocl) (optional for OpenCL support)\n  - sklearn (optional for clustering)\n  \n# Usage\n[Webcam example](https://github.com/ToraxXx/peye/blob/master/examples/camera.py)\n\n```python\nimport cv2\nfrom peye import EyeDetector, PupilDetector\n\n# Load some image\nimage = cv2.imread(\"someimage.png\")\n\n# Detect the bounding boxes of eyes on the image\neye_detector = EyeDetector(\"haarcascade_eye.xml\")\neyes = eye_detector.detect(image)\n\n# Detect the pupils' coordinates using the eyes' bounding boxes\n# Specify the maximum amount of pixels to be considered without downscaling\n# (Higher = more accurate but slower)\n# Other parameters: \n# cluster_mode=None/\"bestpixel\"/\"bestcluster\"\n# use_opencl=False/True\n# opencl_context=None (None will use cl.create_some_context(False))\npupil_detector = PupilDetector(500)\npupils = [pupil_detector.detect(eye[eye[1]:eye[3], eye[0]:eye[2]]) for eye in eyes]\n```\n\n# OpenCL support (requires pytocl)\nPupilDetector supports OpenCL by passing `use_opencl=True` and optionally a `pyopencl.Context` as `opencl_context`.\nFor 4096 maximum pixels to consider the speedup is about 5x-10x for me on a GPU.\nFor 1024 maximum pixels the speed is about the same.\nThe current implementation uses a lot of memory and is also not very optimized.\n\n# Clustering\nInstead of just outputting the single best pixel it is also possible to let the algorithm cluster the objective function and output\neither the center of the cluster of the single best pixel or the center of the cluster with the best average objective by\npassing `cluster_mode=\"bestpixel\"` or `cluster_mode=\"bestcluster\"` respectively.\nThis might yield more accurate results at the cost of some additional runtime.\n\n# Contributors\n- Toraxxx (Developer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinka%2Fpeye","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinka%2Fpeye","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinka%2Fpeye/lists"}