Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
canvas
css
detector
js
Makefile
README.md
index.html
wasm.go

README.md

WASM (Webassembly) support

Important note: to run the Webassembly demo Go 1.13 is required!

Thanks to the syscall/js package included into the Go code base, Pigo has been ported to WASM 🎉. This gives a huge gain in terms of real time performance.

This means that there is no need anymore to run it in a Python environment as a shared library. For more details check the project description from the Readme file and also this blog post.

How to run it?

First download and build the serve package for making a simple webserver. Then simply type the $ make to build the wasm file and start the webserver. That's all. It will open a new page under http://localhost:5000/.

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

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

Supported keys:

s - Show/hide pupils
c - Toggle circle/rectangle detection mark
f - Show/hide facial landmark points (hidden by default)

You can’t perform that action at this time.