diff --git a/README.md b/README.md
index 03f89805..66d2a185 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,8 @@
- [**Change Log**](./CHANGELOG.md)
- [**Live Demo**](https://vladmandic.github.io/human/demo/index.html)
-Compatible with Browser, WebWorker and NodeJS execution!
+Compatible with *Browser*, *WebWorker* and *NodeJS* execution
+Compatible with *CPU*, *WebGL*, *WASM* and *WebGPU* backends
(and maybe with React-Native as it doesn't use any DOM objects)
*This is a pre-release project, see [issues](https://github.com/vladmandic/human/issues) for list of known limitations and planned enhancements*
@@ -159,10 +160,12 @@ If your application resides in a different folder, modify `modelPath` property i
Demos are included in `/demo`:
-Browser:
+**Browser**:
- `index.html`, `browser.js`, `worker.js`: Full demo using Browser with ESM module, includes selectable backends and webworkers
-NodeJS:
+*If you want to test `wasm` or `webgpu` backends, enable loading in `index.html`*
+
+**NodeJS**:
- `node.js`: Demo using NodeJS with CommonJS module
This is a very simple demo as althought `Human` library is compatible with NodeJS execution
and is able to load images and models from local filesystem,
diff --git a/demo/browser.js b/demo/browser.js
index 7b99587b..cd20ca75 100644
--- a/demo/browser.js
+++ b/demo/browser.js
@@ -29,7 +29,8 @@ const ui = {
// configuration overrides
const config = {
- backend: 'webgl', // if you want to use 'wasm' backend, enable script load of tf and tf-backend-wasm in index.html
+ backend: 'webgl',
+ wasm: { path: '../assets' },
filter: {
enabled: true,
width: 0,
@@ -108,7 +109,7 @@ function drawResults(input, result, canvas) {
// update log
const engine = human.tf.engine();
const memory = `${engine.state.numBytes.toLocaleString()} bytes ${engine.state.numDataBuffers.toLocaleString()} buffers ${engine.state.numTensors.toLocaleString()} tensors`;
- const gpu = engine.backendInstance ? `GPU: ${engine.backendInstance.numBytesInGPU.toLocaleString()} bytes` : '';
+ const gpu = engine.backendInstance ? `GPU: ${(engine.backendInstance.numBytesInGPU ? engine.backendInstance.numBytesInGPU : 0).toLocaleString()} bytes` : '';
document.getElementById('log').innerText = `
TFJS Version: ${human.tf.version_core} | Backend: ${human.tf.getBackend()} | Memory: ${memory} ${gpu}
Performance: ${str(result.performance)} | Object size: ${(str(result)).length.toLocaleString()} bytes
@@ -267,6 +268,7 @@ function setupMenu() {
menu.addButton('Process Images', 'Process Images', () => detectSampleImages());
menu.addHTML('