pigo/wasm
2021-10-23 07:35:27 +03:00
..
canvas wasm: small changes 2021-10-23 07:35:27 +03:00
css Fixed camera width & height 2019-11-17 11:07:39 +02:00
detector wasm: small changes 2021-10-23 07:35:27 +03:00
http wasm: load the cascade files from the local env. 2020-11-22 16:08:38 +02:00
js Use the correct wasm_exec.js file depending on Go ver 2020-03-19 14:49:38 +02:00
index.html fix: #46 new method to avoid running into an infinite loop 2021-01-22 12:26:25 +02:00
Makefile wasm: load the cascade files from the local env. 2020-11-22 16:08:38 +02:00
README.md doc: update readme 2021-03-01 14:21:11 +02:00
wasm.go wasm: small typo correction 2021-09-01 16:09:43 +03:00

WASM (Webassembly) integration

Important notice: in order to run the Webassembly demo at least Go 1.13 is required!

Starting from v1.4.0 Pigo has been ported to Webassembly 🎉. This proves the library real time performance capabilities.

This also means that for real time face detection it's not needed anymore to run the library in a Python environment as a shared library. For more details check the project description from the Readme file and also read this blog post for a more detailed explanation.

How to run it?

In order to run the WASM demo is as simple as to type the make command inside the wasm folder. This will build the wasm file and at the same time will start a new webserver. That's all. It will automatically open a new page in your default browser under the following address: http://localhost:5000/.

In case the lib.wasm is not getting generated automatically you can build it yourself by running the following command:

$ GOOS=js GOARCH=wasm go build -o lib.wasm wasm.go

Supported keys:

s - Show/hide pupils
c - Circle through the detection shape types (rectangle|circle|ellipse)
f - Show/hide facial landmark points (hidden by default)

Demos

For Webassembly related demos using the Pigo library check this separate repo:

https://github.com/esimov/pigo-wasm-demos

License

Copyright © 2019 Endre Simo