updated samples

pull/280/head
Vladimir Mandic 2020-10-27 10:30:28 -04:00
parent 113a26ab2c
commit 9be15515b5
4 changed files with 1 additions and 7 deletions

View File

@ -398,10 +398,8 @@ result = {
}
],
performance = { // performance data of last execution for each module measuredin miliseconds
config, // time to parse configuration
backend, // time to initialize tf backend
load, // time to load models
sanity, // time for input verification
image, // time for image processing
body, // model time
hand, // model time

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 126 KiB

View File

@ -32,7 +32,7 @@ const config = {
backend: 'webgl', // if you want to use 'wasm' backend, enable script load of tf and tf-backend-wasm in index.html
filter: {
enabled: true,
width: 720,
width: 0,
height: 0,
brightness: 0,
contrast: 0,

View File

@ -179,20 +179,16 @@ class Human {
const perf = {};
let timeStamp;
timeStamp = now();
this.config = mergeDeep(defaults, userConfig);
if (!this.config.videoOptimized) this.config = mergeDeep(this.config, override);
perf.config = Math.trunc(now() - timeStamp);
// sanity checks
timeStamp = now();
this.state = 'check';
const error = sanity(input);
if (error) {
this.log(error, input);
return { error };
}
perf.sanity = Math.trunc(now() - timeStamp);
// eslint-disable-next-line no-async-promise-executor
return new Promise(async (resolve) => {