mirror of https://github.com/vladmandic/human
updated samples
parent
ed9732e710
commit
f56a479983
|
@ -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 |
Binary file not shown.
Before Width: | Height: | Size: 223 KiB After Width: | Height: | Size: 274 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,
|
||||||
|
|
|
@ -5777,7 +5777,7 @@ var require_config = __commonJS((exports2) => {
|
||||||
var require_package = __commonJS((exports2, module2) => {
|
var require_package = __commonJS((exports2, module2) => {
|
||||||
module2.exports = {
|
module2.exports = {
|
||||||
name: "@vladmandic/human",
|
name: "@vladmandic/human",
|
||||||
version: "0.4.3",
|
version: "0.4.4",
|
||||||
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
|
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
|
||||||
sideEffects: false,
|
sideEffects: false,
|
||||||
main: "dist/human.cjs",
|
main: "dist/human.cjs",
|
||||||
|
@ -6026,19 +6026,15 @@ class Human {
|
||||||
this.state = "config";
|
this.state = "config";
|
||||||
const perf = {};
|
const perf = {};
|
||||||
let timeStamp;
|
let timeStamp;
|
||||||
timeStamp = now();
|
|
||||||
this.config = mergeDeep(defaults, userConfig);
|
this.config = mergeDeep(defaults, userConfig);
|
||||||
if (!this.config.videoOptimized)
|
if (!this.config.videoOptimized)
|
||||||
this.config = mergeDeep(this.config, override);
|
this.config = mergeDeep(this.config, override);
|
||||||
perf.config = Math.trunc(now() - timeStamp);
|
|
||||||
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);
|
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
const timeStart = now();
|
const timeStart = now();
|
||||||
timeStamp = now();
|
timeStamp = now();
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 11887,
|
"bytes": 11743,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/facemesh/facemesh.js"
|
"path": "src/facemesh/facemesh.js"
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
"dist/human.cjs.map": {
|
"dist/human.cjs.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 260858
|
"bytes": 260478
|
||||||
},
|
},
|
||||||
"dist/human.cjs": {
|
"dist/human.cjs": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
|
@ -359,10 +359,10 @@
|
||||||
"bytesInOutput": 47
|
"bytesInOutput": 47
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 10755
|
"bytesInOutput": 10611
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 155094
|
"bytes": 154950
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5777,7 +5777,7 @@ var require_config = __commonJS((exports) => {
|
||||||
var require_package = __commonJS((exports, module) => {
|
var require_package = __commonJS((exports, module) => {
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "@vladmandic/human",
|
name: "@vladmandic/human",
|
||||||
version: "0.4.3",
|
version: "0.4.4",
|
||||||
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
|
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
|
||||||
sideEffects: false,
|
sideEffects: false,
|
||||||
main: "dist/human.cjs",
|
main: "dist/human.cjs",
|
||||||
|
@ -6023,19 +6023,15 @@ class Human {
|
||||||
this.state = "config";
|
this.state = "config";
|
||||||
const perf = {};
|
const perf = {};
|
||||||
let timeStamp;
|
let timeStamp;
|
||||||
timeStamp = now();
|
|
||||||
this.config = mergeDeep(defaults, userConfig);
|
this.config = mergeDeep(defaults, userConfig);
|
||||||
if (!this.config.videoOptimized)
|
if (!this.config.videoOptimized)
|
||||||
this.config = mergeDeep(this.config, override);
|
this.config = mergeDeep(this.config, override);
|
||||||
perf.config = Math.trunc(now() - timeStamp);
|
|
||||||
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);
|
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
const timeStart = now();
|
const timeStart = now();
|
||||||
timeStamp = now();
|
timeStamp = now();
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -116,7 +116,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 11887,
|
"bytes": 11743,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/facemesh/facemesh.js"
|
"path": "src/facemesh/facemesh.js"
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
"dist/human.esm-nobundle.js.map": {
|
"dist/human.esm-nobundle.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 248624
|
"bytes": 248392
|
||||||
},
|
},
|
||||||
"dist/human.esm-nobundle.js": {
|
"dist/human.esm-nobundle.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
|
@ -356,13 +356,13 @@
|
||||||
"bytesInOutput": 2747
|
"bytesInOutput": 2747
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 10755
|
"bytesInOutput": 10611
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 0
|
"bytesInOutput": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 154953
|
"bytes": 154809
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72826,7 +72826,7 @@ var require_config = __commonJS((exports) => {
|
||||||
var require_package = __commonJS((exports, module) => {
|
var require_package = __commonJS((exports, module) => {
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "@vladmandic/human",
|
name: "@vladmandic/human",
|
||||||
version: "0.4.3",
|
version: "0.4.4",
|
||||||
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
|
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
|
||||||
sideEffects: false,
|
sideEffects: false,
|
||||||
main: "dist/human.cjs",
|
main: "dist/human.cjs",
|
||||||
|
@ -73072,19 +73072,15 @@ class Human {
|
||||||
this.state = "config";
|
this.state = "config";
|
||||||
const perf = {};
|
const perf = {};
|
||||||
let timeStamp;
|
let timeStamp;
|
||||||
timeStamp = now();
|
|
||||||
this.config = mergeDeep(defaults, userConfig);
|
this.config = mergeDeep(defaults, userConfig);
|
||||||
if (!this.config.videoOptimized)
|
if (!this.config.videoOptimized)
|
||||||
this.config = mergeDeep(this.config, override);
|
this.config = mergeDeep(this.config, override);
|
||||||
perf.config = Math.trunc(now() - timeStamp);
|
|
||||||
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);
|
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
const timeStart = now();
|
const timeStart = now();
|
||||||
timeStamp = now();
|
timeStamp = now();
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -291,7 +291,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 11887,
|
"bytes": 11743,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||||
|
@ -468,7 +468,7 @@
|
||||||
"dist/human.esm.js.map": {
|
"dist/human.esm.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 5121594
|
"bytes": 5121362
|
||||||
},
|
},
|
||||||
"dist/human.esm.js": {
|
"dist/human.esm.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
|
@ -621,13 +621,13 @@
|
||||||
"bytesInOutput": 2747
|
"bytesInOutput": 2747
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 10745
|
"bytesInOutput": 10601
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 0
|
"bytesInOutput": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 2923581
|
"bytes": 2923437
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72827,7 +72827,7 @@ var Human = (() => {
|
||||||
var require_package = __commonJS((exports, module) => {
|
var require_package = __commonJS((exports, module) => {
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "@vladmandic/human",
|
name: "@vladmandic/human",
|
||||||
version: "0.4.3",
|
version: "0.4.4",
|
||||||
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
|
description: "human: 3D Face Detection, Iris Tracking and Age & Gender Prediction",
|
||||||
sideEffects: false,
|
sideEffects: false,
|
||||||
main: "dist/human.cjs",
|
main: "dist/human.cjs",
|
||||||
|
@ -73077,19 +73077,15 @@ var Human = (() => {
|
||||||
this.state = "config";
|
this.state = "config";
|
||||||
const perf = {};
|
const perf = {};
|
||||||
let timeStamp;
|
let timeStamp;
|
||||||
timeStamp = now();
|
|
||||||
this.config = mergeDeep(defaults, userConfig);
|
this.config = mergeDeep(defaults, userConfig);
|
||||||
if (!this.config.videoOptimized)
|
if (!this.config.videoOptimized)
|
||||||
this.config = mergeDeep(this.config, override);
|
this.config = mergeDeep(this.config, override);
|
||||||
perf.config = Math.trunc(now() - timeStamp);
|
|
||||||
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);
|
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
const timeStart = now();
|
const timeStart = now();
|
||||||
timeStamp = now();
|
timeStamp = now();
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -291,7 +291,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 11887,
|
"bytes": 11743,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||||
|
@ -468,7 +468,7 @@
|
||||||
"dist/human.js.map": {
|
"dist/human.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 5125450
|
"bytes": 5125218
|
||||||
},
|
},
|
||||||
"dist/human.js": {
|
"dist/human.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
|
@ -621,10 +621,10 @@
|
||||||
"bytesInOutput": 2875
|
"bytesInOutput": 2875
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 11982
|
"bytesInOutput": 11822
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 3069462
|
"bytes": 3069302
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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