{"id":28962353,"url":"https://github.com/ammarsufyan/eyeblinkdetectionnonml","last_synced_at":"2026-05-11T07:48:51.000Z","repository":{"id":300528637,"uuid":"1000558168","full_name":"ammarsufyan/EyeBlinkDetectionNonML","owner":"ammarsufyan","description":"Use Vision + Eye Aspect Ratio (EAR)","archived":false,"fork":false,"pushed_at":"2025-06-22T07:23:47.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-22T08:25:12.099Z","etag":null,"topics":["macos","swift","swiftui","vision"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":false,"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/ammarsufyan.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":"2025-06-12T01:24:14.000Z","updated_at":"2025-06-22T07:23:50.000Z","dependencies_parsed_at":"2025-06-22T08:36:03.912Z","dependency_job_id":null,"html_url":"https://github.com/ammarsufyan/EyeBlinkDetectionNonML","commit_stats":null,"previous_names":["ammarsufyan/eyeblinkdetectionnonml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ammarsufyan/EyeBlinkDetectionNonML","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarsufyan%2FEyeBlinkDetectionNonML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarsufyan%2FEyeBlinkDetectionNonML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarsufyan%2FEyeBlinkDetectionNonML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarsufyan%2FEyeBlinkDetectionNonML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ammarsufyan","download_url":"https://codeload.github.com/ammarsufyan/EyeBlinkDetectionNonML/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammarsufyan%2FEyeBlinkDetectionNonML/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261595736,"owners_count":23182243,"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":["macos","swift","swiftui","vision"],"created_at":"2025-06-24T03:04:57.555Z","updated_at":"2026-05-11T07:48:50.962Z","avatar_url":"https://github.com/ammarsufyan.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EyeBlinkDetectionNonML\n\nEyeBlinkDetectionNonML is an application for detecting eye blinks using Vision and the Eye Aspect Ratio (EAR) algorithm, implemented in Swift. This approach utilizes Apple's Vision framework for facial landmark detection and computes blinks using a geometric formula, without the need for machine learning.\n\n## Features\n\n- Real-time eye blink detection using the device camera.\n- Pure geometric method with no machine learning required.\n- Uses Vision for facial and landmark detection.\n- Lightweight, fast, and interpretable.\n- Simple and user-friendly interface.\n\n## Technologies Used\n\n- **Swift**: Main programming language.\n- **Vision**: For face and landmark detection.\n\n## Installation\n\n1. Clone this repository:\n\n   ```bash\n   git clone https://github.com/ammarsufyan/EyeBlinkDetectionNonML.git\n   ```\n\n2. Open the `EyeBlinkDetectionNonML.xcodeproj` project in Xcode.\n\n3. Run the project on a macOS device.\n\n## How It Works\n\n1. The app accesses the camera and detects faces and eye landmarks using Vision.\n2. EAR (Eye Aspect Ratio) is calculated based on the positions of six eye landmarks.\n3. A blink is detected when the EAR drops below a set threshold, as seen in the EAR graph.\n\n### Eye Aspect Ratio (EAR) Formula\n\nThe EAR is given by:\n\n![unnamed-1](https://github.com/user-attachments/assets/7a1c3c32-9471-4fc0-ac8e-c7a38e58f536)\n\nWhere \\( p_1, p_2, ..., p_6 \\) are the coordinates of the six eye landmarks.\n\n### Visual Illustration\n\nThe following illustrates the EAR calculation and landmark positions:\n\n![unnamed](https://github.com/user-attachments/assets/e3fd6cd2-0996-45d4-9c40-0c279e455027)\n\n- The red points are eye landmarks used in the formula.\n- The graph below shows the EAR signal, with a dip corresponding to a blink.\n\n## Contributing\n\nContributions are welcome! Please fork this repository and submit a pull request for any features or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License.\n\n---\n\n**Contact:**  \n[ammarsufyan](https://github.com/ammarsufyan)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammarsufyan%2Feyeblinkdetectionnonml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fammarsufyan%2Feyeblinkdetectionnonml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammarsufyan%2Feyeblinkdetectionnonml/lists"}