diff --git a/CHANGELOG.md b/CHANGELOG.md index a46bb800..4504c2ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,7 @@ ### **HEAD -> main** 2022/07/13 mandic00@live.com - -### **origin/main** 2022/07/09 animeniac@live.com - +- fix(gear): ensure gear.modelpath is used for loadmodel() - npm default install should be prod only - fix npm v7 compatibility - add getmodelstats method diff --git a/demo/index.html b/demo/index.html index 32881ce5..1cf6f931 100644 --- a/demo/index.html +++ b/demo/index.html @@ -35,7 +35,7 @@ .video { display: none; } .canvas { margin: 0 auto; } .bench { position: absolute; right: 0; bottom: 0; } - .compare-image { width: 256px; position: absolute; top: 150px; left: 30px; box-shadow: 0 0 2px 2px black; background: black; display: none; } + .compare-image { width: 200px; position: absolute; top: 150px; left: 30px; box-shadow: 0 0 2px 2px black; background: black; display: none; } .loader { width: 300px; height: 300px; border: 3px solid transparent; border-radius: 50%; border-top: 4px solid #f15e41; animation: spin 4s linear infinite; position: absolute; bottom: 15%; left: 50%; margin-left: -150px; z-index: 15; } .loader::before, .loader::after { content: ""; position: absolute; top: 6px; bottom: 6px; left: 6px; right: 6px; border-radius: 50%; border: 4px solid transparent; } .loader::before { border-top-color: #bad375; animation: 3s spin linear infinite; } @@ -107,7 +107,7 @@
- +
diff --git a/demo/index.js b/demo/index.js index 7587076a..29cb4424 100644 --- a/demo/index.js +++ b/demo/index.js @@ -56,6 +56,10 @@ let userConfig = { // body: { enabled: true, modelPath: 'movenet-multipose.json' }, segmentation: { enabled: false }, */ + face: { iris: { enabled: false }, emotion: { enabled: false } }, + hand: { enabled: false }, + body: { enabled: false }, + gesture: { enabled: false }, }; const drawOptions = { @@ -203,8 +207,15 @@ async function videoPause() { const compare = { enabled: false, original: null }; async function calcSimmilarity(result) { + document.getElementById('compare-container').onclick = () => { + log('resetting face compare baseline:'); + compare.original = null; + }; document.getElementById('compare-container').style.display = compare.enabled ? 'block' : 'none'; - if (!compare.enabled) return; + if (!compare.enabled) { + compare.original = null; + return; + } if (!result || !result.face || !result.face[0] || !result.face[0].embedding) return; if (!(result.face.length > 0) || (result.face[0].embedding.length <= 64)) return; if (!compare.original) { diff --git a/test/build.log b/test/build.log index 596966d3..4a553957 100644 --- a/test/build.log +++ b/test/build.log @@ -1,24 +1,24 @@ -2022-07-13 08:48:51 INFO:  Application: {"name":"@vladmandic/human","version":"2.8.1"} -2022-07-13 08:48:51 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} -2022-07-13 08:48:51 INFO:  Toolchain: {"build":"0.7.3","esbuild":"0.14.49","typescript":"4.7.4","typedoc":"0.22.18","eslint":"8.19.0"} -2022-07-13 08:48:51 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]} -2022-07-13 08:48:51 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]} -2022-07-13 08:48:51 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":608} -2022-07-13 08:48:51 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":73,"inputBytes":644542,"outputBytes":301481} -2022-07-13 08:48:51 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":612} -2022-07-13 08:48:51 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":73,"inputBytes":644546,"outputBytes":301485} -2022-07-13 08:48:51 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":664} -2022-07-13 08:48:51 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":73,"inputBytes":644598,"outputBytes":301535} -2022-07-13 08:48:51 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":358} -2022-07-13 08:48:51 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":1032,"outputBytes":583} -2022-07-13 08:48:51 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":73,"inputBytes":644517,"outputBytes":300369} -2022-07-13 08:48:52 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1353528} -2022-07-13 08:48:52 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":73,"inputBytes":1997462,"outputBytes":1652983} -2022-07-13 08:48:52 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":73,"inputBytes":1997462,"outputBytes":2140437} -2022-07-13 08:48:58 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":116} -2022-07-13 08:49:01 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":74,"generated":true} -2022-07-13 08:49:01 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6324,"outputBytes":3057} -2022-07-13 08:49:01 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":7820} -2022-07-13 08:49:10 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":106,"errors":0,"warnings":0} -2022-07-13 08:49:10 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"} -2022-07-13 08:49:10 INFO:  Done... +2022-07-13 09:15:44 INFO:  Application: {"name":"@vladmandic/human","version":"2.8.1"} +2022-07-13 09:15:44 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} +2022-07-13 09:15:44 INFO:  Toolchain: {"build":"0.7.3","esbuild":"0.14.49","typescript":"4.7.4","typedoc":"0.22.18","eslint":"8.19.0"} +2022-07-13 09:15:44 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]} +2022-07-13 09:15:44 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]} +2022-07-13 09:15:44 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":608} +2022-07-13 09:15:44 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":73,"inputBytes":644542,"outputBytes":301481} +2022-07-13 09:15:44 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":612} +2022-07-13 09:15:45 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":73,"inputBytes":644546,"outputBytes":301485} +2022-07-13 09:15:45 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":664} +2022-07-13 09:15:45 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":73,"inputBytes":644598,"outputBytes":301535} +2022-07-13 09:15:45 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":358} +2022-07-13 09:15:45 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":1032,"outputBytes":583} +2022-07-13 09:15:45 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":73,"inputBytes":644517,"outputBytes":300369} +2022-07-13 09:15:45 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1353528} +2022-07-13 09:15:45 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":73,"inputBytes":1997462,"outputBytes":1652983} +2022-07-13 09:15:45 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":73,"inputBytes":1997462,"outputBytes":2140437} +2022-07-13 09:15:51 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":116} +2022-07-13 09:15:54 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":74,"generated":true} +2022-07-13 09:15:54 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6324,"outputBytes":3057} +2022-07-13 09:15:54 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":7820} +2022-07-13 09:16:02 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":106,"errors":0,"warnings":0} +2022-07-13 09:16:03 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"} +2022-07-13 09:16:03 INFO:  Done...