mirror of https://github.com/vladmandic/human
updated samples
parent
113a26ab2c
commit
9be15515b5
|
@ -398,10 +398,8 @@ result = {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
performance = { // performance data of last execution for each module measuredin miliseconds
|
performance = { // performance data of last execution for each module measuredin miliseconds
|
||||||
config, // time to parse configuration
|
|
||||||
backend, // time to initialize tf backend
|
backend, // time to initialize tf backend
|
||||||
load, // time to load models
|
load, // time to load models
|
||||||
sanity, // time for input verification
|
|
||||||
image, // time for image processing
|
image, // time for image processing
|
||||||
body, // model time
|
body, // model time
|
||||||
hand, // model time
|
hand, // model time
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 126 KiB |
|
@ -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
|
backend: 'webgl', // if you want to use 'wasm' backend, enable script load of tf and tf-backend-wasm in index.html
|
||||||
filter: {
|
filter: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
width: 720,
|
width: 0,
|
||||||
height: 0,
|
height: 0,
|
||||||
brightness: 0,
|
brightness: 0,
|
||||||
contrast: 0,
|
contrast: 0,
|
||||||
|
|
|
@ -179,20 +179,16 @@ class Human {
|
||||||
const perf = {};
|
const perf = {};
|
||||||
let timeStamp;
|
let timeStamp;
|
||||||
|
|
||||||
timeStamp = now();
|
|
||||||
this.config = mergeDeep(defaults, userConfig);
|
this.config = mergeDeep(defaults, userConfig);
|
||||||
if (!this.config.videoOptimized) this.config = mergeDeep(this.config, override);
|
if (!this.config.videoOptimized) this.config = mergeDeep(this.config, override);
|
||||||
perf.config = Math.trunc(now() - timeStamp);
|
|
||||||
|
|
||||||
// sanity checks
|
// sanity checks
|
||||||
timeStamp = now();
|
|
||||||
this.state = 'check';
|
this.state = 'check';
|
||||||
const error = sanity(input);
|
const error = sanity(input);
|
||||||
if (error) {
|
if (error) {
|
||||||
this.log(error, input);
|
this.log(error, input);
|
||||||
return { error };
|
return { error };
|
||||||
}
|
}
|
||||||
perf.sanity = Math.trunc(now() - timeStamp);
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-async-promise-executor
|
// eslint-disable-next-line no-async-promise-executor
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
|
|
Loading…
Reference in New Issue