diff --git a/README.md b/README.md index 65607d3b..2a1484bf 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,13 @@ ### Wiki pages: - [**Home**](https://github.com/vladmandic/human/wiki) +- [**Demos**](https://github.com/vladmandic/human/wiki/Demos) - [**Installation**](https://github.com/vladmandic/human/wiki/Install) - [**Usage**](https://github.com/vladmandic/human/wiki/Usage) +- [**Usage**](https://github.com/vladmandic/human/wiki/Backends) - [**Configuration**](https://github.com/vladmandic/human/wiki/Configuration) - [**Outputs**](https://github.com/vladmandic/human/wiki/Outputs) - [**Gesture Recognition**](https://github.com/vladmandic/human/wiki/Gesture) -- [**Demos**](https://github.com/vladmandic/human/wiki/Demos) - [**Development Server**](https://github.com/vladmandic/human/wiki/Development-Server) - [**Build Process**](https://github.com/vladmandic/human/wiki/Build-Process) - [**Profiling**](https://github.com/vladmandic/human/wiki/Profiling) @@ -33,7 +34,7 @@
Compatible with *Browser*, *WebWorker* and *NodeJS* execution on both Windows and Linux -- Browser/WebWorker: Compatible with *CPU*, *WebGL*, *WASM* and *WebGPU* backends +- Browser/WebWorker: Compatible with *CPU*, *WebGL* and *WASM* backends - NodeJS: Compatible with software *tfjs-node* and CUDA accelerated backends *tfjs-node-gpu* (and maybe with React-Native as it doesn't use any DOM objects) diff --git a/config.js b/config.js index bd761720..f5572fcd 100644 --- a/config.js +++ b/config.js @@ -3,6 +3,8 @@ export default { backend: 'webgl', // select tfjs backend to use + wasmPath: '../assets/', // path for wasm binaries + // only used for backend: wasm console: true, // enable debugging output to console async: true, // execute enabled models in parallel // this disables per-model performance data but diff --git a/demo/browser.js b/demo/browser.js index e47942ea..1340e55d 100644 --- a/demo/browser.js +++ b/demo/browser.js @@ -157,7 +157,7 @@ async function setupCamera() { const track = stream.getVideoTracks()[0]; const settings = track.getSettings(); // log('camera constraints:', constraints, 'window:', { width: window.innerWidth, height: window.innerHeight }, 'settings:', settings, 'track:', track); - ui.camera = { name: track.label, width: settings.width, height: settings.height, facing: settings.facingMode === 'user' ? 'front' : 'back' }; + ui.camera = { name: track.label?.toLowerCase(), width: settings.width, height: settings.height, facing: settings.facingMode === 'user' ? 'front' : 'back' }; return new Promise((resolve) => { video.onloadeddata = async () => { video.width = video.videoWidth; @@ -303,7 +303,7 @@ function setupMenu() { document.getElementById('play').addEventListener('click', () => btn.click()); menu.addHTML('
'); - menu.addList('backend', ['cpu', 'webgl', 'wasm', 'webgpu'], human.config.backend, (val) => human.config.backend = val); + menu.addList('backend', ['cpu', 'webgl', 'wasm'], human.config.backend, (val) => human.config.backend = val); menu.addBool('async operations', human.config, 'async', (val) => human.config.async = val); menu.addBool('enable profiler', human.config, 'profile', (val) => human.config.profile = val); menu.addBool('memory shield', human.config, 'deallocate', (val) => human.config.deallocate = val); diff --git a/demo/index.html b/demo/index.html index 6f798dd5..0bdb62bc 100644 --- a/demo/index.html +++ b/demo/index.html @@ -5,7 +5,7 @@ - + @@ -13,13 +13,9 @@ - - - - - +