update browser demo defaults

pull/134/head
Vladimir Mandic 2021-04-25 16:58:18 -04:00
parent 6f380facdb
commit 086c721a77
1 changed files with 5 additions and 2 deletions

View File

@ -1,15 +1,15 @@
// @ts-nocheck // @ts-nocheck
/* global tf */
import Human from '../dist/human.esm.js'; // equivalent of @vladmandic/human import Human from '../dist/human.esm.js'; // equivalent of @vladmandic/human
// import Human from '../dist/human.esm-nobundle.js'; // this requires that tf is loaded manually and bundled before human can be used // import Human from '../dist/human.esm-nobundle.js'; // this requires that tf is loaded manually and bundled before human can be used
import Menu from './helpers/menu.js'; import Menu from './helpers/menu.js';
import GLBench from './helpers/gl-bench.js'; import GLBench from './helpers/gl-bench.js';
import webRTC from './helpers/webrtc.js'; import webRTC from './helpers/webrtc.js';
// const userConfig = {}; const userConfig = {};
let human; let human;
/*
const userConfig = { const userConfig = {
backend: 'humangl', backend: 'humangl',
async: false, async: false,
@ -32,6 +32,7 @@ const userConfig = {
// body: { enabled: true, modelPath: 'blazepose.json' }, // body: { enabled: true, modelPath: 'blazepose.json' },
// object: { enabled: true }, // object: { enabled: true },
}; };
*/
// ui options // ui options
const ui = { const ui = {
@ -619,7 +620,9 @@ async function main() {
// create instance of human // create instance of human
human = new Human(userConfig); human = new Human(userConfig);
if (typeof tf !== 'undefined') { if (typeof tf !== 'undefined') {
// eslint-disable-next-line no-undef
log('TensorFlow external version:', tf.version); log('TensorFlow external version:', tf.version);
// eslint-disable-next-line no-undef
human.tf = tf; // use externally loaded version of tfjs human.tf = tf; // use externally loaded version of tfjs
} }