fix face detection when mesh is disabled

pull/70/head
Vladimir Mandic 2021-01-18 08:22:25 -05:00
parent 79b49b0322
commit 508e7c73cf
22 changed files with 245 additions and 163 deletions

View File

@ -7,11 +7,10 @@ const userConfig = {}; // add any user configuration overrides
/* /*
const userConfig = { const userConfig = {
backend: 'humangl', // backend: 'humangl',
face: { enabled: false, iris: { enabled: false } }, face: { enabled: true, iris: { enabled: false }, mesh: { enabled: false }, age: { enabled: false }, gender: { enabled: false }, emotion: { enabled: false } },
body: { enabled: false }, body: { enabled: false },
hand: { enabled: false }, hand: { enabled: false },
pose: { enabled: true },
}; };
*/ */

View File

@ -41,6 +41,7 @@ async function drawFace(result, canvas, ui, triangulation) {
const emotion = face.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`); const emotion = face.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`);
labels.push(emotion.join(' ')); labels.push(emotion.join(' '));
} }
if (labels.length === 0) labels.push('face');
ctx.fillStyle = ui.baseLabel; ctx.fillStyle = ui.baseLabel;
for (let i = 0; i < labels.length; i++) { for (let i = 0; i < labels.length; i++) {
ctx.fillStyle = 'black'; ctx.fillStyle = 'black';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,11 @@
{ {
"inputs": { "inputs": {
"dist/human.esm.js": { "dist/human.esm.js": {
"bytes": 1907070, "bytes": 1907045,
"imports": [] "imports": []
}, },
"demo/draw.js": { "demo/draw.js": {
"bytes": 10748, "bytes": 10798,
"imports": [] "imports": []
}, },
"demo/menu.js": { "demo/menu.js": {
@ -17,7 +17,7 @@
"imports": [] "imports": []
}, },
"demo/browser.js": { "demo/browser.js": {
"bytes": 25571, "bytes": 25654,
"imports": [ "imports": [
{ {
"path": "dist/human.esm.js" "path": "dist/human.esm.js"
@ -38,17 +38,17 @@
"dist/demo-browser-index.js.map": { "dist/demo-browser-index.js.map": {
"imports": [], "imports": [],
"inputs": {}, "inputs": {},
"bytes": 2028448 "bytes": 2028566
}, },
"dist/demo-browser-index.js": { "dist/demo-browser-index.js": {
"imports": [], "imports": [],
"exports": [], "exports": [],
"inputs": { "inputs": {
"dist/human.esm.js": { "dist/human.esm.js": {
"bytesInOutput": 1899699 "bytesInOutput": 1899674
}, },
"demo/draw.js": { "demo/draw.js": {
"bytesInOutput": 7736 "bytesInOutput": 7775
}, },
"demo/menu.js": { "demo/menu.js": {
"bytesInOutput": 11792 "bytesInOutput": 11792
@ -60,7 +60,7 @@
"bytesInOutput": 19492 "bytesInOutput": 19492
} }
}, },
"bytes": 1953471 "bytes": 1953485
} }
} }
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/human.esm.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

8
dist/human.esm.json vendored
View File

@ -47,7 +47,7 @@
"imports": [] "imports": []
}, },
"src/blazeface/facepipeline.js": { "src/blazeface/facepipeline.js": {
"bytes": 14306, "bytes": 14275,
"imports": [ "imports": [
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js"
@ -422,7 +422,7 @@
"dist/human.esm.js.map": { "dist/human.esm.js.map": {
"imports": [], "imports": [],
"inputs": {}, "inputs": {},
"bytes": 1932950 "bytes": 1932899
}, },
"dist/human.esm.js": { "dist/human.esm.js": {
"imports": [], "imports": [],
@ -443,7 +443,7 @@
"bytesInOutput": 30718 "bytesInOutput": 30718
}, },
"src/blazeface/facepipeline.js": { "src/blazeface/facepipeline.js": {
"bytesInOutput": 9386 "bytesInOutput": 9361
}, },
"src/blazeface/facemesh.js": { "src/blazeface/facemesh.js": {
"bytesInOutput": 2322 "bytesInOutput": 2322
@ -545,7 +545,7 @@
"bytesInOutput": 23 "bytesInOutput": 23
} }
}, },
"bytes": 1907070 "bytes": 1907045
} }
} }
} }

2
dist/human.js vendored

File diff suppressed because one or more lines are too long

4
dist/human.js.map vendored

File diff suppressed because one or more lines are too long

8
dist/human.json vendored
View File

@ -47,7 +47,7 @@
"imports": [] "imports": []
}, },
"src/blazeface/facepipeline.js": { "src/blazeface/facepipeline.js": {
"bytes": 14306, "bytes": 14275,
"imports": [ "imports": [
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js"
@ -422,7 +422,7 @@
"dist/human.js.map": { "dist/human.js.map": {
"imports": [], "imports": [],
"inputs": {}, "inputs": {},
"bytes": 1932967 "bytes": 1932916
}, },
"dist/human.js": { "dist/human.js": {
"imports": [], "imports": [],
@ -441,7 +441,7 @@
"bytesInOutput": 30718 "bytesInOutput": 30718
}, },
"src/blazeface/facepipeline.js": { "src/blazeface/facepipeline.js": {
"bytesInOutput": 9386 "bytesInOutput": 9361
}, },
"src/blazeface/facemesh.js": { "src/blazeface/facemesh.js": {
"bytesInOutput": 2322 "bytesInOutput": 2322
@ -543,7 +543,7 @@
"bytesInOutput": 23 "bytesInOutput": 23
} }
}, },
"bytes": 1907148 "bytes": 1907123
} }
} }
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/human.node.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

248
dist/human.node.json vendored
View File

@ -12,10 +12,12 @@
"bytes": 2171, "bytes": 2171,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
}, },
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
} }
] ]
}, },
@ -23,10 +25,12 @@
"bytes": 7024, "bytes": 7024,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
}, },
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
} }
] ]
}, },
@ -34,7 +38,8 @@
"bytes": 1935, "bytes": 1935,
"imports": [ "imports": [
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
} }
] ]
}, },
@ -47,22 +52,27 @@
"imports": [] "imports": []
}, },
"src/blazeface/facepipeline.js": { "src/blazeface/facepipeline.js": {
"bytes": 14306, "bytes": 14275,
"imports": [ "imports": [
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/blazeface/box.js" "path": "src/blazeface/box.js",
"kind": "import-statement"
}, },
{ {
"path": "src/blazeface/util.js" "path": "src/blazeface/util.js",
"kind": "import-statement"
}, },
{ {
"path": "src/blazeface/coords.js" "path": "src/blazeface/coords.js",
"kind": "import-statement"
}, },
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
} }
] ]
}, },
@ -70,19 +80,24 @@
"bytes": 2991, "bytes": 2991,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
}, },
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/blazeface/blazeface.js" "path": "src/blazeface/blazeface.js",
"kind": "import-statement"
}, },
{ {
"path": "src/blazeface/facepipeline.js" "path": "src/blazeface/facepipeline.js",
"kind": "import-statement"
}, },
{ {
"path": "src/blazeface/coords.js" "path": "src/blazeface/coords.js",
"kind": "import-statement"
} }
] ]
}, },
@ -90,7 +105,8 @@
"bytes": 1045, "bytes": 1045,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
} }
] ]
}, },
@ -98,13 +114,16 @@
"bytes": 2037, "bytes": 2037,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
}, },
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/profile.js" "path": "src/profile.js",
"kind": "import-statement"
} }
] ]
}, },
@ -112,13 +131,16 @@
"bytes": 2906, "bytes": 2906,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
}, },
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/profile.js" "path": "src/profile.js",
"kind": "import-statement"
} }
] ]
}, },
@ -126,13 +148,16 @@
"bytes": 3078, "bytes": 3078,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
}, },
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/profile.js" "path": "src/profile.js",
"kind": "import-statement"
} }
] ]
}, },
@ -140,13 +165,16 @@
"bytes": 2063, "bytes": 2063,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
}, },
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/profile.js" "path": "src/profile.js",
"kind": "import-statement"
} }
] ]
}, },
@ -154,7 +182,8 @@
"bytes": 1343, "bytes": 1343,
"imports": [ "imports": [
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
} }
] ]
}, },
@ -166,7 +195,8 @@
"bytes": 1775, "bytes": 1775,
"imports": [ "imports": [
{ {
"path": "src/posenet/heapSort.js" "path": "src/posenet/heapSort.js",
"kind": "import-statement"
} }
] ]
}, },
@ -178,7 +208,8 @@
"bytes": 1273, "bytes": 1273,
"imports": [ "imports": [
{ {
"path": "src/posenet/keypoints.js" "path": "src/posenet/keypoints.js",
"kind": "import-statement"
} }
] ]
}, },
@ -186,10 +217,12 @@
"bytes": 2083, "bytes": 2083,
"imports": [ "imports": [
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/keypoints.js" "path": "src/posenet/keypoints.js",
"kind": "import-statement"
} }
] ]
}, },
@ -197,13 +230,16 @@
"bytes": 5368, "bytes": 5368,
"imports": [ "imports": [
{ {
"path": "src/posenet/keypoints.js" "path": "src/posenet/keypoints.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/vectors.js" "path": "src/posenet/vectors.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/decoders.js" "path": "src/posenet/decoders.js",
"kind": "import-statement"
} }
] ]
}, },
@ -211,13 +247,16 @@
"bytes": 2373, "bytes": 2373,
"imports": [ "imports": [
{ {
"path": "src/posenet/buildParts.js" "path": "src/posenet/buildParts.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/decodePose.js" "path": "src/posenet/decodePose.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/vectors.js" "path": "src/posenet/vectors.js",
"kind": "import-statement"
} }
] ]
}, },
@ -225,7 +264,8 @@
"bytes": 2262, "bytes": 2262,
"imports": [ "imports": [
{ {
"path": "src/posenet/keypoints.js" "path": "src/posenet/keypoints.js",
"kind": "import-statement"
} }
] ]
}, },
@ -233,22 +273,28 @@
"bytes": 2519, "bytes": 2519,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
}, },
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/modelBase.js" "path": "src/posenet/modelBase.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/decodeMultiple.js" "path": "src/posenet/decodeMultiple.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/decodePose.js" "path": "src/posenet/decodePose.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/util.js" "path": "src/posenet/util.js",
"kind": "import-statement"
} }
] ]
}, },
@ -256,13 +302,16 @@
"bytes": 712, "bytes": 712,
"imports": [ "imports": [
{ {
"path": "src/posenet/modelPoseNet.js" "path": "src/posenet/modelPoseNet.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/keypoints.js" "path": "src/posenet/keypoints.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/util.js" "path": "src/posenet/util.js",
"kind": "import-statement"
} }
] ]
}, },
@ -270,7 +319,8 @@
"bytes": 2522, "bytes": 2522,
"imports": [ "imports": [
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
} }
] ]
}, },
@ -278,10 +328,12 @@
"bytes": 3548, "bytes": 3548,
"imports": [ "imports": [
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/handpose/box.js" "path": "src/handpose/box.js",
"kind": "import-statement"
} }
] ]
}, },
@ -293,16 +345,20 @@
"bytes": 7246, "bytes": 7246,
"imports": [ "imports": [
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/handpose/box.js" "path": "src/handpose/box.js",
"kind": "import-statement"
}, },
{ {
"path": "src/handpose/util.js" "path": "src/handpose/util.js",
"kind": "import-statement"
}, },
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
} }
] ]
}, },
@ -314,19 +370,24 @@
"bytes": 2578, "bytes": 2578,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
}, },
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/handpose/handdetector.js" "path": "src/handpose/handdetector.js",
"kind": "import-statement"
}, },
{ {
"path": "src/handpose/handpipeline.js" "path": "src/handpose/handpipeline.js",
"kind": "import-statement"
}, },
{ {
"path": "src/handpose/anchors.js" "path": "src/handpose/anchors.js",
"kind": "import-statement"
} }
] ]
}, },
@ -342,13 +403,16 @@
"bytes": 5871, "bytes": 5871,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
}, },
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/imagefx.js" "path": "src/imagefx.js",
"kind": "import-statement"
} }
] ]
}, },
@ -368,52 +432,68 @@
"bytes": 18229, "bytes": 18229,
"imports": [ "imports": [
{ {
"path": "src/log.js" "path": "src/log.js",
"kind": "import-statement"
}, },
{ {
"path": "dist/tfjs.esm.js" "path": "dist/tfjs.esm.js",
"kind": "import-statement"
}, },
{ {
"path": "src/tfjs/backend.js" "path": "src/tfjs/backend.js",
"kind": "import-statement"
}, },
{ {
"path": "src/blazeface/facemesh.js" "path": "src/blazeface/facemesh.js",
"kind": "import-statement"
}, },
{ {
"path": "src/age/age.js" "path": "src/age/age.js",
"kind": "import-statement"
}, },
{ {
"path": "src/gender/gender.js" "path": "src/gender/gender.js",
"kind": "import-statement"
}, },
{ {
"path": "src/emotion/emotion.js" "path": "src/emotion/emotion.js",
"kind": "import-statement"
}, },
{ {
"path": "src/embedding/embedding.js" "path": "src/embedding/embedding.js",
"kind": "import-statement"
}, },
{ {
"path": "src/posenet/posenet.js" "path": "src/posenet/posenet.js",
"kind": "import-statement"
}, },
{ {
"path": "src/handpose/handpose.js" "path": "src/handpose/handpose.js",
"kind": "import-statement"
}, },
{ {
"path": "src/gesture/gesture.js" "path": "src/gesture/gesture.js",
"kind": "import-statement"
}, },
{ {
"path": "src/image.js" "path": "src/image.js",
"kind": "import-statement"
}, },
{ {
"path": "src/profile.js" "path": "src/profile.js",
"kind": "import-statement"
}, },
{ {
"path": "config.js" "path": "config.js",
"kind": "import-statement"
}, },
{ {
"path": "src/sample.js" "path": "src/sample.js",
"kind": "import-statement"
}, },
{ {
"path": "package.json" "path": "package.json",
"kind": "import-statement"
} }
] ]
} }
@ -422,7 +502,7 @@
"dist/human.node-gpu.js.map": { "dist/human.node-gpu.js.map": {
"imports": [], "imports": [],
"inputs": {}, "inputs": {},
"bytes": 709451 "bytes": 709400
}, },
"dist/human.node-gpu.js": { "dist/human.node-gpu.js": {
"imports": [], "imports": [],
@ -444,7 +524,7 @@
"bytesInOutput": 30504 "bytesInOutput": 30504
}, },
"src/blazeface/facepipeline.js": { "src/blazeface/facepipeline.js": {
"bytesInOutput": 5611 "bytesInOutput": 5593
}, },
"src/blazeface/facemesh.js": { "src/blazeface/facemesh.js": {
"bytesInOutput": 1556 "bytesInOutput": 1556
@ -543,7 +623,7 @@
"bytesInOutput": 16 "bytesInOutput": 16
} }
}, },
"bytes": 278315 "bytes": 278297
} }
} }
} }

10
dist/tfjs.esm.json vendored
View File

@ -1,23 +1,23 @@
{ {
"inputs": { "inputs": {
"node_modules/@tensorflow/tfjs/package.json": { "node_modules/@tensorflow/tfjs/package.json": {
"bytes": 5170, "bytes": 5145,
"imports": [] "imports": []
}, },
"node_modules/@tensorflow/tfjs-core/package.json": { "node_modules/@tensorflow/tfjs-core/package.json": {
"bytes": 5410, "bytes": 5385,
"imports": [] "imports": []
}, },
"node_modules/@tensorflow/tfjs-data/package.json": { "node_modules/@tensorflow/tfjs-data/package.json": {
"bytes": 4196, "bytes": 4171,
"imports": [] "imports": []
}, },
"node_modules/@tensorflow/tfjs-layers/package.json": { "node_modules/@tensorflow/tfjs-layers/package.json": {
"bytes": 3944, "bytes": 3919,
"imports": [] "imports": []
}, },
"node_modules/@tensorflow/tfjs-converter/package.json": { "node_modules/@tensorflow/tfjs-converter/package.json": {
"bytes": 4771, "bytes": 4746,
"imports": [] "imports": []
}, },
"node_modules/@tensorflow/tfjs-core/dist/backends/backend.js": { "node_modules/@tensorflow/tfjs-core/dist/backends/backend.js": {

48
package-lock.json generated
View File

@ -83,9 +83,9 @@
} }
}, },
"@eslint/eslintrc": { "@eslint/eslintrc": {
"version": "0.2.2", "version": "0.3.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz",
"integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==", "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==",
"dev": true, "dev": true,
"requires": { "requires": {
"ajv": "^6.12.4", "ajv": "^6.12.4",
@ -95,7 +95,7 @@
"ignore": "^4.0.6", "ignore": "^4.0.6",
"import-fresh": "^3.2.1", "import-fresh": "^3.2.1",
"js-yaml": "^3.13.1", "js-yaml": "^3.13.1",
"lodash": "^4.17.19", "lodash": "^4.17.20",
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
"strip-json-comments": "^3.1.1" "strip-json-comments": "^3.1.1"
}, },
@ -576,9 +576,9 @@
} }
}, },
"chokidar": { "chokidar": {
"version": "3.5.0", "version": "3.5.1",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.0.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
"integrity": "sha512-JgQM9JS92ZbFR4P90EvmzNpSGhpPBGBSj10PILeDyYFwp4h2/D9OM03wsJ4zW1fEp4ka2DGrnUeD7FuvQ2aZ2Q==", "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==",
"dev": true, "dev": true,
"requires": { "requires": {
"anymatch": "~3.1.1", "anymatch": "~3.1.1",
@ -773,23 +773,25 @@
} }
}, },
"es-abstract": { "es-abstract": {
"version": "1.18.0-next.1", "version": "1.18.0-next.2",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
"dev": true, "dev": true,
"requires": { "requires": {
"call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1", "es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1", "function-bind": "^1.1.1",
"get-intrinsic": "^1.0.2",
"has": "^1.0.3", "has": "^1.0.3",
"has-symbols": "^1.0.1", "has-symbols": "^1.0.1",
"is-callable": "^1.2.2", "is-callable": "^1.2.2",
"is-negative-zero": "^2.0.0", "is-negative-zero": "^2.0.1",
"is-regex": "^1.1.1", "is-regex": "^1.1.1",
"object-inspect": "^1.8.0", "object-inspect": "^1.9.0",
"object-keys": "^1.1.1", "object-keys": "^1.1.1",
"object.assign": "^4.1.1", "object.assign": "^4.1.2",
"string.prototype.trimend": "^1.0.1", "string.prototype.trimend": "^1.0.3",
"string.prototype.trimstart": "^1.0.1" "string.prototype.trimstart": "^1.0.3"
} }
}, },
"es-to-primitive": { "es-to-primitive": {
@ -819,9 +821,9 @@
} }
}, },
"esbuild": { "esbuild": {
"version": "0.8.31", "version": "0.8.33",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.31.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.33.tgz",
"integrity": "sha512-7EIU0VdUxltwivjVezX3HgeNzeIVR1snkrAo57WdUnuBMykdzin5rTrxwCDM6xQqj0RL/HjOEm3wFr2ijHKeaA==", "integrity": "sha512-2ms/P6Y9zJfopR9dKo2vHzhXKfGSNlquVVoVOF8YnhjuzZVrvManMVBPadBsR/t7jzIkRnwqvxrs7d4f3C3eyg==",
"dev": true "dev": true
}, },
"escalade": { "escalade": {
@ -837,13 +839,13 @@
"dev": true "dev": true
}, },
"eslint": { "eslint": {
"version": "7.17.0", "version": "7.18.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.17.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz",
"integrity": "sha512-zJk08MiBgwuGoxes5sSQhOtibZ75pz0J35XTRlZOk9xMffhpA9BTbQZxoXZzOl5zMbleShbGwtw+1kGferfFwQ==", "integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.0.0", "@babel/code-frame": "^7.0.0",
"@eslint/eslintrc": "^0.2.2", "@eslint/eslintrc": "^0.3.0",
"ajv": "^6.10.0", "ajv": "^6.10.0",
"chalk": "^4.0.0", "chalk": "^4.0.0",
"cross-spawn": "^7.0.2", "cross-spawn": "^7.0.2",
@ -867,7 +869,7 @@
"js-yaml": "^3.13.1", "js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1", "json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.4.1", "levn": "^0.4.1",
"lodash": "^4.17.19", "lodash": "^4.17.20",
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
"natural-compare": "^1.4.0", "natural-compare": "^1.4.0",
"optionator": "^0.9.1", "optionator": "^0.9.1",

View File

@ -22,21 +22,21 @@
"dependencies": {}, "dependencies": {},
"peerDependencies": {}, "peerDependencies": {},
"devDependencies": { "devDependencies": {
"@tensorflow/tfjs": "^2.8.3", "@tensorflow/tfjs": "=2.8.3",
"@tensorflow/tfjs-backend-cpu": "^2.8.3", "@tensorflow/tfjs-backend-cpu": "=2.8.3",
"@tensorflow/tfjs-backend-wasm": "^2.8.3", "@tensorflow/tfjs-backend-wasm": "=2.8.3",
"@tensorflow/tfjs-backend-webgl": "^2.8.3", "@tensorflow/tfjs-backend-webgl": "=2.8.3",
"@tensorflow/tfjs-converter": "^2.8.3", "@tensorflow/tfjs-converter": "=2.8.3",
"@tensorflow/tfjs-core": "^2.8.3", "@tensorflow/tfjs-core": "=2.8.3",
"@tensorflow/tfjs-data": "^2.8.3", "@tensorflow/tfjs-data": "=2.8.3",
"@tensorflow/tfjs-layers": "^2.8.3", "@tensorflow/tfjs-layers": "=2.8.3",
"@tensorflow/tfjs-node": "^2.8.3", "@tensorflow/tfjs-node": "=2.8.3",
"@tensorflow/tfjs-node-gpu": "^2.8.3", "@tensorflow/tfjs-node-gpu": "=2.8.3",
"@vladmandic/pilogger": "^0.2.11", "@vladmandic/pilogger": "^0.2.11",
"chokidar": "^3.5.0", "chokidar": "^3.5.1",
"dayjs": "^1.10.3", "dayjs": "^1.10.3",
"esbuild": "^0.8.31", "esbuild": "^0.8.33",
"eslint": "^7.17.0", "eslint": "^7.18.0",
"eslint-config-airbnb-base": "^14.2.1", "eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1", "eslint-plugin-import": "^2.22.1",
"eslint-plugin-json": "^2.1.2", "eslint-plugin-json": "^2.1.2",

View File

@ -143,7 +143,7 @@ class Pipeline {
if (config.videoOptimized) this.skipped++; if (config.videoOptimized) this.skipped++;
// if detector result count doesn't match current working set, use it to reset current working set // if detector result count doesn't match current working set, use it to reset current working set
if (detector && detector.boxes && (detector.boxes.length > 0) && (!config.face.mesh.enabled || (detector.boxes.length !== this.detectedFaces) && (this.detectedFaces !== config.face.detector.maxFaces))) { if (detector && detector.boxes && (!config.face.mesh.enabled || (detector.boxes.length !== this.detectedFaces) && (this.detectedFaces !== config.face.detector.maxFaces))) {
this.storedBoxes = []; this.storedBoxes = [];
this.detectedFaces = 0; this.detectedFaces = 0;
for (const possible of detector.boxes) { for (const possible of detector.boxes) {