This repository is a collection of Webassembly demos showcasing a few examples of the Pigo face detection library running real time. This repo will be continuously updated.
Notice: at least Go 1.13 is required in order to run the demos!
$ go install github.com/esimov/pigo-wasm-demos@latest
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.
$ make demo1
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
$ make demo2
] - Increase the blur radius
[ - Decrease the blur radius
f - Show/hide the detected face rectangle
s - Show/hide pupils
b - Enable/disable face blur
$ make demo3
] - Increase the blur radius
[ - Decrease the blur radius
f - Show/hide the detected face rectangle
s - Show/hide pupils
$ make demo4
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
$ make demo5
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
$ make demo6
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.
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
- Endre Simo (@simo_endre)
Copyright © 2020 Endre Simo
This software is distributed under the MIT license. See the LICENSE file for the full license text.