mirror of
https://github.com/esimov/pigo-wasm-demos.git
synced 2025-09-26 20:31:20 +08:00
Merge branch 'master' of https://github.com/esimov/pigo-wasm-demos
This commit is contained in:
52
README.md
52
README.md
@@ -4,18 +4,18 @@
|
||||
|
||||
<p align="center"><img src="https://user-images.githubusercontent.com/883386/80915158-06911a80-8d59-11ea-93bd-eca98750ad62.png" alt="Pigo Wasm demos" title="Pigo Wasm demos" width="400"/></p>
|
||||
|
||||
This repository is a collection of Webassembly demos running real time and using the [Pigo](https://github.com/esimov/pigo) face detection library, showcasing various potential use cases. **It is continuously updated**.
|
||||
This repository is a collection of Webassembly demos (which means they are running in the Web browser) showcasing a few examples of using the [Pigo](https://github.com/esimov/pigo) face detection library in real time. **This library meant to be continuously updated**.
|
||||
|
||||
## Install
|
||||
**Notice: at least Go 1.13 is required in order to run the demos!**
|
||||
|
||||
```bash
|
||||
$ go get -u -v github.com/esimov/pigo-wasm-demos
|
||||
|
||||
$ go install github.com/esimov/pigo-wasm-demos@latest
|
||||
```
|
||||
|
||||
## Run
|
||||
Running the demo is as simple as typing a single line of command. This will build the package and produce an executable WebAssembly file which can be served over a http server. A new tab will be opened automatically in the user's default browser.
|
||||
|
||||
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
|
||||
|
||||
@@ -27,7 +27,7 @@ $ make demo1
|
||||
|
||||
|
||||
#### Key bindings:
|
||||
<kbd>q</kbd> - Show/hide detected face marker<br/>
|
||||
<kbd>q</kbd> - Show/hide the detected face rectangle<br/>
|
||||
<kbd>z</kbd> - Show/hide pupils<br/>
|
||||
<kbd>w</kbd> - Show/hide eye mask<br/>
|
||||
<kbd>s</kbd> - Show/hide mouth mask<br/>
|
||||
@@ -41,38 +41,35 @@ $ make demo1
|
||||
```bash
|
||||
$ make demo2
|
||||
```
|
||||

|
||||
|
||||

|
||||
|
||||
#### Key bindings:
|
||||
<kbd>f</kbd> - Show/hide detected face marker<br/>
|
||||
<kbd>s</kbd> - Show/hide pupils<br/>
|
||||
<kbd>b</kbd> - Enable/disable face blur<br/>
|
||||
<kbd>]</kbd> - Increase the blur radius<br/>
|
||||
<kbd>[</kbd> - Decrease the blur radius<br/>
|
||||
<kbd>f</kbd> - Show/hide the detected face rectangle<br/>
|
||||
<kbd>s</kbd> - Show/hide pupils<br/>
|
||||
<kbd>b</kbd> - Enable/disable face blur<br/>
|
||||
|
||||
### Pixelate
|
||||
### Background blur (in Zoom style)
|
||||
```bash
|
||||
$ make demo3
|
||||
```
|
||||

|
||||

|
||||
|
||||
#### Key bindings:
|
||||
<kbd>f</kbd> - Show/hide detected face marker<br/>
|
||||
<kbd>]</kbd> - Increase the blur radius<br/>
|
||||
<kbd>[</kbd> - Decrease the blur radius<br/>
|
||||
<kbd>f</kbd> - Show/hide the detected face rectangle<br/>
|
||||
<kbd>s</kbd> - Show/hide pupils<br/>
|
||||
<kbd>=</kbd> - Increase the number of colors<br/>
|
||||
<kbd>-</kbd> - Decrease the number of colors<br/>
|
||||
<kbd>]</kbd> - Increase the cells size<br/>
|
||||
<kbd>[</kbd> - Decrease the cells size<br/>
|
||||
|
||||
### Face triangulator
|
||||
```bash
|
||||
$ make demo4
|
||||
```
|
||||

|
||||

|
||||
|
||||
#### Key bindings:
|
||||
<kbd>f</kbd> - Show/hide detected face marker<br/>
|
||||
<kbd>f</kbd> - Show/hide the detected face rectangle<br/>
|
||||
<kbd>s</kbd> - Show/hide pupils<br/>
|
||||
<kbd>=</kbd> - Increase the number of triangles<br/>
|
||||
<kbd>-</kbd> - Decrease the number of triangles<br/>
|
||||
@@ -81,10 +78,25 @@ $ make demo4
|
||||
<kbd>1</kbd> - Increase the stroke size<br/>
|
||||
<kbd>0</kbd> - Decrease the stroke size<br/>
|
||||
|
||||
### Triangulated facemask
|
||||
|
||||
### Pixelate
|
||||
```bash
|
||||
$ make demo5
|
||||
```
|
||||

|
||||
|
||||
#### Key bindings:
|
||||
<kbd>f</kbd> - Show/hide the detected face rectangle<br/>
|
||||
<kbd>s</kbd> - Show/hide pupils<br/>
|
||||
<kbd>=</kbd> - Increase the number of colors<br/>
|
||||
<kbd>-</kbd> - Decrease the number of colors<br/>
|
||||
<kbd>]</kbd> - Increase the cells size<br/>
|
||||
<kbd>[</kbd> - Decrease the cells size<br/>
|
||||
|
||||
### Triangulated facemask
|
||||
```bash
|
||||
$ make demo6
|
||||
```
|
||||

|
||||
|
||||
This demo is meant to be a proof of concept for an idea of generating personalized triangulated face masks. The orange dot at the bottom of the screen is showing up 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). This demo can be expanded way further.
|
||||
|
Reference in New Issue
Block a user