updated samples

pull/50/head
Vladimir Mandic 2020-10-27 10:30:28 -04:00
parent ed9732e710
commit f56a479983
17 changed files with 29 additions and 51 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 274 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,

6
dist/human.cjs vendored
View File

@ -5777,7 +5777,7 @@ var require_config = __commonJS((exports2) => {
var require_package = __commonJS((exports2, module2) => {
module2.exports = {
name: "@vladmandic/human",
version: "0.4.3",
version: "0.4.4",
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
sideEffects: false,
main: "dist/human.cjs",
@ -6026,19 +6026,15 @@ class Human {
this.state = "config";
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);
timeStamp = now();
this.state = "check";
const error = sanity(input);
if (error) {
this.log(error, input);
return {error};
}
perf.sanity = Math.trunc(now() - timeStamp);
return new Promise(async (resolve) => {
const timeStart = now();
timeStamp = now();

8
dist/human.cjs.json vendored
View File

@ -116,7 +116,7 @@
"imports": []
},
"src/human.js": {
"bytes": 11887,
"bytes": 11743,
"imports": [
{
"path": "src/facemesh/facemesh.js"
@ -260,7 +260,7 @@
"dist/human.cjs.map": {
"imports": [],
"inputs": {},
"bytes": 260858
"bytes": 260478
},
"dist/human.cjs": {
"imports": [],
@ -359,10 +359,10 @@
"bytesInOutput": 47
},
"src/human.js": {
"bytesInOutput": 10755
"bytesInOutput": 10611
}
},
"bytes": 155094
"bytes": 154950
}
}
}

4
dist/human.cjs.map vendored

File diff suppressed because one or more lines are too long

View File

@ -5777,7 +5777,7 @@ var require_config = __commonJS((exports) => {
var require_package = __commonJS((exports, module) => {
module.exports = {
name: "@vladmandic/human",
version: "0.4.3",
version: "0.4.4",
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
sideEffects: false,
main: "dist/human.cjs",
@ -6023,19 +6023,15 @@ class Human {
this.state = "config";
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);
timeStamp = now();
this.state = "check";
const error = sanity(input);
if (error) {
this.log(error, input);
return {error};
}
perf.sanity = Math.trunc(now() - timeStamp);
return new Promise(async (resolve) => {
const timeStart = now();
timeStamp = now();

File diff suppressed because one or more lines are too long

View File

@ -116,7 +116,7 @@
"imports": []
},
"src/human.js": {
"bytes": 11887,
"bytes": 11743,
"imports": [
{
"path": "src/facemesh/facemesh.js"
@ -260,7 +260,7 @@
"dist/human.esm-nobundle.js.map": {
"imports": [],
"inputs": {},
"bytes": 248624
"bytes": 248392
},
"dist/human.esm-nobundle.js": {
"imports": [],
@ -356,13 +356,13 @@
"bytesInOutput": 2747
},
"src/human.js": {
"bytesInOutput": 10755
"bytesInOutput": 10611
},
"src/human.js": {
"bytesInOutput": 0
}
},
"bytes": 154953
"bytes": 154809
}
}
}

6
dist/human.esm.js vendored
View File

@ -72826,7 +72826,7 @@ var require_config = __commonJS((exports) => {
var require_package = __commonJS((exports, module) => {
module.exports = {
name: "@vladmandic/human",
version: "0.4.3",
version: "0.4.4",
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
sideEffects: false,
main: "dist/human.cjs",
@ -73072,19 +73072,15 @@ class Human {
this.state = "config";
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);
timeStamp = now();
this.state = "check";
const error = sanity(input);
if (error) {
this.log(error, input);
return {error};
}
perf.sanity = Math.trunc(now() - timeStamp);
return new Promise(async (resolve) => {
const timeStart = now();
timeStamp = now();

File diff suppressed because one or more lines are too long

8
dist/human.esm.json vendored
View File

@ -291,7 +291,7 @@
"imports": []
},
"src/human.js": {
"bytes": 11887,
"bytes": 11743,
"imports": [
{
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
@ -468,7 +468,7 @@
"dist/human.esm.js.map": {
"imports": [],
"inputs": {},
"bytes": 5121594
"bytes": 5121362
},
"dist/human.esm.js": {
"imports": [],
@ -621,13 +621,13 @@
"bytesInOutput": 2747
},
"src/human.js": {
"bytesInOutput": 10745
"bytesInOutput": 10601
},
"src/human.js": {
"bytesInOutput": 0
}
},
"bytes": 2923581
"bytes": 2923437
}
}
}

6
dist/human.js vendored
View File

@ -72827,7 +72827,7 @@ var Human = (() => {
var require_package = __commonJS((exports, module) => {
module.exports = {
name: "@vladmandic/human",
version: "0.4.3",
version: "0.4.4",
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
sideEffects: false,
main: "dist/human.cjs",
@ -73077,19 +73077,15 @@ var Human = (() => {
this.state = "config";
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);
timeStamp = now();
this.state = "check";
const error = sanity(input);
if (error) {
this.log(error, input);
return {error};
}
perf.sanity = Math.trunc(now() - timeStamp);
return new Promise(async (resolve) => {
const timeStart = now();
timeStamp = now();

4
dist/human.js.map vendored

File diff suppressed because one or more lines are too long

8
dist/human.json vendored
View File

@ -291,7 +291,7 @@
"imports": []
},
"src/human.js": {
"bytes": 11887,
"bytes": 11743,
"imports": [
{
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
@ -468,7 +468,7 @@
"dist/human.js.map": {
"imports": [],
"inputs": {},
"bytes": 5125450
"bytes": 5125218
},
"dist/human.js": {
"imports": [],
@ -621,10 +621,10 @@
"bytesInOutput": 2875
},
"src/human.js": {
"bytesInOutput": 11982
"bytesInOutput": 11822
}
},
"bytes": 3069462
"bytes": 3069302
}
}
}

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) => {