{"id":13901216,"url":"https://github.com/surya-veer/movement-tracking","last_synced_at":"2025-07-17T21:32:38.984Z","repository":{"id":59955490,"uuid":"282414356","full_name":"surya-veer/movement-tracking","owner":"surya-veer","description":"UP - DOWN - LEFT  - RIGHT movement tracking.","archived":false,"fork":false,"pushed_at":"2020-07-29T16:19:26.000Z","size":175,"stargazers_count":367,"open_issues_count":6,"forks_count":101,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-08-07T21:45:17.176Z","etag":null,"topics":["ai","game","machine-learning","motion-detection","opencv","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/surya-veer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-25T09:41:17.000Z","updated_at":"2024-06-22T12:32:23.000Z","dependencies_parsed_at":"2022-09-25T20:11:48.227Z","dependency_job_id":null,"html_url":"https://github.com/surya-veer/movement-tracking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surya-veer%2Fmovement-tracking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surya-veer%2Fmovement-tracking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surya-veer%2Fmovement-tracking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surya-veer%2Fmovement-tracking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/surya-veer","download_url":"https://codeload.github.com/surya-veer/movement-tracking/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226305260,"owners_count":17603776,"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":["ai","game","machine-learning","motion-detection","opencv","python"],"created_at":"2024-08-06T21:01:01.020Z","updated_at":"2024-11-25T09:31:02.962Z","avatar_url":"https://github.com/surya-veer.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Realtime Face Movement Tracking ![](https://bit.ly/surya-veer-movement-tracking)\n90 Lines of code to convert your face movement into keyboard commands.\n\n# Description\nThis is a basic face movement tracking that can convert face movement into keyboard commands like **UP - DOWN - LEFT  - RIGHT**. I used facial landmarks to detect face and get the nose out of it for better referencing. I have created two versions of it, v1 is using a fixed reference boundary which not work expected properly because we need to come at the same position after each movement. To save this I created V2 which uses position change with respect to the previous position. This is more dynamic and easy to control the moves. No need to set position again and again.\n\n## movement-v1.py\nIn version1, I used a fixed reference boundary. If nose reference is out of boundary then I calculate the direction of movement. After getting direction I am converting it into keyboard commands using the keyboard library.\n\n## movement-v2.py\nIn version2, I am using reference change with respect to the previous position in a particular time window and then calculating the direction vector to get direction and converting it to keyboard command.\n\n## Dependencies\nThis is the list of dependencies for running this application. Use pip to install them.\n * **opencv**\n * **keyboard**\n\n ```\n $ pip install -r requirements.txt\n ```\n\n## How to use\n1. Download or clone this repository.\n2. Extract to some location.\n3. First, run **```movement-v1.py```** (for fix boundary) or run **```movement-v2.py```**(for dynamic movement) \u003cbr\u003e\n  NOTE: If you are getting 215 assertion failed!! on line 81 check this (https://github.com/surya-veer/movement-tracking/issues/4#issuecomment-664018021)\n\n4. open any online atari game like Subway surfers or temple run.\n5. Start doing movements to play game. It will press up-down-left-right based on your movements.\n\n# Fun with face movements\nOpen any online game on the browser which needs UP-DOWN-LEFT-RIGHT movements following games, you can find many games if you search on google.\n1. Subway surfer https://www.kiloo.com/subway-surfers/\n2. Temple run https://m.plonga.com/adventure/Temple-Run-2-Online-Tablet\n\n### You can do a lot more things by the small code change.\n\n### ** SUPPORT OPEN SOURCE **\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurya-veer%2Fmovement-tracking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurya-veer%2Fmovement-tracking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurya-veer%2Fmovement-tracking/lists"}