mirror of https://github.com/vladmandic/human
update browser demo defaults
parent
6f380facdb
commit
086c721a77
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue