-
-
Notifications
You must be signed in to change notification settings - Fork 329
Backends
Vladimir Mandic edited this page Nov 10, 2020
·
12 revisions
Human library includes pre-bundled CPU
, WASM
and WebGL
backends, there is no need to load them externally.
- CPU backend usage is not recommended for performance reasons
as TensorFlow implementation in JavaScript is by far the slowest - WebGL backend usage is fastest on systems with modern GPU
although startup speed is a bit slower - WASM backend has good resuts under specific conditions:
- Enable WASM SIMD support in your browser
(CPU parallel processing instructions) - Reduce size of input image (e.g. webcam)
as WASM does not have optimized image extraction methods
- Enable WASM SIMD support in your browser
Chrome:
- Navigate to chrome://flags
-
WebAssembly SIMD support
set to Enabled
Edge:
- Navigate to chrome://flags
-
WebAssembly SIMD support
set to Enabled
Firefox:
- Navigate to about:config
-
javascript.options.wasm_simd
set to True
-
WASM backend without SIMD has limited processing capabilities before it causes issues
To avoid issues, starthuman
with most models disabled and if needed, enable them one by one as each initializes
Typical errors messages are:
Uncaught (in promise) Error: undefined tfjs-backend-wasm.wasm
or
RuntimeError: memory access out of bounds in tfjs-backend-wasm.wasm
-
NodeJS backend is missing key operatios and thus neither
Face
norHand
models are currently supported
Human Library Wiki Pages
3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition