Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esimov/pigo-face-tracking
Play games with your head. A face tracking application using the Pigo library.
https://github.com/esimov/pigo-face-tracking
computer-vision face-tracking golang head-movement headtracking motion-detection pigo pigo-face-detection wasm webassembly
Last synced: 3 months ago
JSON representation
Play games with your head. A face tracking application using the Pigo library.
- Host: GitHub
- URL: https://github.com/esimov/pigo-face-tracking
- Owner: esimov
- License: mit
- Created: 2020-09-01T14:05:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-01T13:14:48.000Z (over 3 years ago)
- Last Synced: 2024-06-20T02:01:20.696Z (7 months ago)
- Topics: computer-vision, face-tracking, golang, head-movement, headtracking, motion-detection, pigo, pigo-face-detection, wasm, webassembly
- Language: Go
- Homepage:
- Size: 68 MB
- Stars: 27
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# pigo-face-tracking
[![CI](https://github.com/esimov/pigo-face-tracking/workflows/CI/badge.svg)](https://github.com/esimov/pigo-face-tracking/actions)
[![License](https://img.shields.io/github/license/esimov/pigo-face-tracking)](https://github.com/esimov/pigo-face-tracking/blob/master/LICENSE)Real time face tracking application using the [Pigo](https://github.com/esimov/pigo) face detection library to convert face movements into keyboard actions like UP, DOWN, LEFT, RIGHT. This means you can play games without being physically attached to a keyboard device or you can navigate through your web browser like you would navigate with the arrow keys.
This is achieved due to the library high performance facial landmark points detection capabilities.
## How does it work?
The **Pigo** library is capable of high accuracy facial landmark points detection, but out of the existing **15** facial landmark points the nose provides the best accuracy for face tracking, so this has been used to track the head movement. When a head movement is detected a keyboard press event is triggered through the OS system events as you would press the key physically.
## Install
**Notice: at least Go 1.13 is required!**```bash
$ go get -u -v github.com/esimov/pigo-face-tracking```
## Run
To run it is as simple as to type a single `make` command from the project root directory:1. This will spawn a new web server listening on `localhost:5000`, will start the webcam and track your head movement continuously.
2. Now find some Atari like online games and start playing. https://m.plonga.com/ is one of the options.
3. Move your head as you would play with the arrow keys.## OS Support
**This program has been tested on Linux and MacOS, but normally it should also run on Windows.**Because of the OS imposed security constrains there are some important steps you need to take:
#### MacOS:
In MacOS you must set the accessibility authorization for the terminal you are running from.### Linux:
On Linux the library used for triggering the keyboard events uses ***uinput***, which on the major distributions requires root permissions.
The easy solution is running the command with `sudo`. Another, but not recommended approach is to change the executable's permissions by using `chmod`. For this reason you can run the accompanied `permission.sh` shell file.## Author
* Endre Simo ([@simo_endre](https://twitter.com/simo_endre))
## License
Copyright © 2020 Endre Simo
This software is distributed under the MIT license. See the [LICENSE](https://github.com/esimov/pigo-face-tracking/blob/master/LICENSE) file for the full license text.