mirror of https://github.com/vladmandic/human
updated samples
parent
d06b444b44
commit
4a18186f96
|
@ -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 |
|
@ -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,
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue