Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esimov/pigo-wasm-demos
Webassembly demos showcasing the Pigo face detection library.
https://github.com/esimov/pigo-wasm-demos
demo face-detection golang pigo pigo-face-detection real-time wasm webassembly
Last synced: 17 days ago
JSON representation
Webassembly demos showcasing the Pigo face detection library.
- Host: GitHub
- URL: https://github.com/esimov/pigo-wasm-demos
- Owner: esimov
- License: mit
- Created: 2020-04-08T16:46:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T00:41:20.000Z (over 1 year ago)
- Last Synced: 2024-10-16T01:10:48.377Z (about 1 month ago)
- Topics: demo, face-detection, golang, pigo, pigo-face-detection, real-time, wasm, webassembly
- Language: Go
- Homepage: https://github.com/esimov/pigo
- Size: 15.1 MB
- Stars: 53
- Watchers: 5
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# pigo-wasm-demos
This repository is a collection of Webassembly demos showcasing a few examples of the [Pigo](https://github.com/esimov/pigo) face detection library running real time. **This repo will be continuously updated**.
## Install
**Notice: at least Go 1.13 is required in order to run the demos!**```bash
$ go install github.com/esimov/pigo-wasm-demos@latest
```## Run
You only need to type `$make demo{no}`. This will build the package and produce an executable WebAssembly file which can be served over an http server. A new tab will be opened automatically in the user's default browser.
## Demos
### Masquerade
```bash
$ make demo1
```
![pigo_wasm_masquarade](https://user-images.githubusercontent.com/883386/82048111-ae450b80-96bc-11ea-9f22-7039ce937140.gif)#### Key bindings:
q - Show/hide the detected face rectangle
z - Show/hide pupils
w - Show/hide eye mask
s - Show/hide mouth mask
e - Select the next eye mask
d - Select the previous eye mask
r - Select the next mouth mask
f - Select the previous mouth mask
x - Show the detected face coordinates### Faceblur
```bash
$ make demo2
```
![pigo_wasm_faceblur](https://user-images.githubusercontent.com/883386/170483688-5a145550-5a7b-4400-af34-842333fb1a8e.gif)#### Key bindings:
] - Increase the blur radius
[ - Decrease the blur radius
f - Show/hide the detected face rectangle
s - Show/hide pupils
b - Enable/disable face blur### Background blur (in Zoom style)
```bash
$ make demo3
```
![pigo_wasm_background_blur](https://user-images.githubusercontent.com/883386/170483670-2ad0f865-d89d-44c4-8cb5-f9d5736d12fb.gif)#### Key bindings:
] - Increase the blur radius
[ - Decrease the blur radius
f - Show/hide the detected face rectangle
s - Show/hide pupils### Face triangulator
```bash
$ make demo4
```
![pigo_wasm_triangulate](https://user-images.githubusercontent.com/883386/170484192-c43bafa5-36c6-41a8-9e23-3f3d04264b08.gif)#### Key bindings:
f - Show/hide the detected face rectangle
s - Show/hide pupils
= - Increase the number of triangles
- - Decrease the number of triangles
] - Increase the threshold
[ - Decrease the threshold
1 - Increase the stroke size
0 - Decrease the stroke size### Pixelate
```bash
$ make demo5
```
![pigo_wasm_pixelate](https://user-images.githubusercontent.com/883386/170484527-b98745e5-5f93-45cb-a86d-ed12332c8d41.gif)#### Key bindings:
f - Show/hide the detected face rectangle
s - Show/hide pupils
= - Increase the number of colors
- - Decrease the number of colors
] - Increase the cells size
[ - Decrease the cells size### Triangulated facemask
```bash
$ make demo6
```
![facemask](https://user-images.githubusercontent.com/883386/170938798-9bc7b9b1-ffd4-4add-a536-057c11542991.gif)This demo is meant to be a proof of concept for an idea of generating personalized triangulated face masks. The rectangle at the top right corner of the screen will turn green when the head alignment is the most appropriate for making a screen capture and this is when the head is aligned perpendicular (+/- a predefined threshold) and close enough to the camera. This demo can be expanded way further.
#### Key bindings:
f - Show/hide detected face marker
s - Show/hide pupils
= - Increase the number of triangles
- - Decrease the number of triangles
] - Increase the threshold
[ - Decrease the threshold
1 - Increase the stroke size
0 - Decrease the stroke size## 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-wasm-demos/blob/master/LICENSE) file for the full license text.