To note: Javascript is not running in this browser environment. Our apologies, but this demo has not yet been updated to support progressive enhancement.
Test purpose
- Check that the media stream loads (if browser/device supports it)
- Check that we can load and use both Tensorflow (from a CDN) and its body-pix model
- Apply the model to a live camera feed
- Create a RawAsset object to handle the model's output. In particular
- Parse the output's metadata to identify the left and right eyes
- Calculate the position of each eye, averaged over several iterations
- Update the RawAsset's canvas with two transluscent circles covering over the eyes
To note: this demo is (currently) not working in Safari - even though the browser does ask the user for permission to use the camera.
To note: on Firefox, user may need to click on the canvas before the display shows.
Touch test: not required
Annotated code