展示 Pigo 人脸检测库的 Webassembly 演示。
Go to file
2022-12-02 09:57:14 +02:00
.github [CI] deleted workflows 2020-12-19 14:04:09 +02:00
bgblur Updated demos 2022-11-14 10:46:37 +02:00
cascade improvement: loading the cascade files from local directory 2021-01-15 14:47:49 +02:00
css Updated demos 2022-11-14 10:46:37 +02:00
detector wasm: tweak params 2021-09-02 17:49:28 +03:00
draw wasm: updated triangulate demo to use html5 canvas api 2022-05-17 11:04:28 +03:00
faceblur Updated demos 2022-11-14 10:46:37 +02:00
facemask Updated demos 2022-11-14 10:46:37 +02:00
images Adjusting the demos 2020-06-13 08:58:34 +03:00
js Deleted wasm_exec.js 2020-12-07 21:54:46 +02:00
masquerade wasm: check for error condition in image method 2022-05-22 16:48:52 +03:00
pixelate Updated demos 2022-11-14 10:46:37 +02:00
pixels wasm: check for error condition in image method 2022-05-22 16:48:52 +03:00
server refactor server/init.go 2022-12-02 13:04:11 +08:00
triangulate Updated demos 2022-11-14 10:46:37 +02:00
wasm Included basic wasm demo 2022-11-14 11:22:20 +02:00
.gitignore updated gitignore 2020-12-07 21:57:11 +02:00
bgblur.go Updated demos 2022-11-14 10:46:37 +02:00
faceblur.go Updated demos 2022-11-14 10:46:37 +02:00
facemask.go Updated demos 2022-11-14 10:46:37 +02:00
go.mod mod: updated modules 2022-05-27 17:19:08 +03:00
go.sum mod: updated modules 2022-05-27 17:19:08 +03:00
index.html Fine tuning and adding new features 2020-04-29 07:47:58 +03:00
LICENSE Create LICENSE 2020-05-03 16:12:39 +03:00
Makefile refactor server/init.go 2022-12-02 13:04:11 +08:00
masquerade.go Updated demos 2022-11-14 10:46:37 +02:00
pixelate.go Updated demos 2022-11-14 10:46:37 +02:00
README.md Doc update 2022-08-10 20:46:51 +03:00
triangulate.go Updated demos 2022-11-14 10:46:37 +02:00
wasm.go Included basic wasm demo 2022-11-14 11:22:20 +02:00

pigo-wasm-demos

Pigo Wasm demos

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.

Install

Notice: at least Go 1.13 is required in order to run the demos!

$ 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

$ make demo1

pigo_wasm_masquarade

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

$ make demo2

pigo_wasm_faceblur

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)

$ make demo3

pigo_wasm_background_blur

Key bindings:

] - Increase the blur radius
[ - Decrease the blur radius
f - Show/hide the detected face rectangle
s - Show/hide pupils

Face triangulator

$ make demo4

pigo_wasm_triangulate

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

$ make demo5

pigo_wasm_pixelate

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

$ make demo6

facemask

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

License

Copyright © 2020 Endre Simo

This software is distributed under the MIT license. See the LICENSE file for the full license text.