mirror of https://github.com/vladmandic/human
add browser test
parent
3af503b508
commit
65c9a45f61
|
@ -11,6 +11,8 @@
|
|||
|
||||
### **HEAD -> main** 2022/08/15 mandic00@live.com
|
||||
|
||||
- add tensorflow library detection
|
||||
- fix wasm detection
|
||||
- enumerate additional models
|
||||
- release refresh
|
||||
|
||||
|
|
4
TODO.md
4
TODO.md
|
@ -63,8 +63,8 @@ Model is supported using `WebGL` backend in browser
|
|||
- Host models in <human-models>
|
||||
Models can be directly used without downloading to local storage
|
||||
Example: `modelPath: 'https://vladmandic.github.io/human-models/models/facemesh.json'`
|
||||
- Host models in **Google Cloud Bucket**
|
||||
Models can be directly used without downloading to local storage
|
||||
- Allow hosting models in **Google Cloud Bucket**
|
||||
Hosted models can be directly used without downloading to local storage
|
||||
Example: `modelPath: 'https://storage.googleapis.com/human-models/facemesh.json'`
|
||||
- Fix **MobileFaceNet** model as alternative for face embedding/descriptor detection
|
||||
Configurable using `config.face.mobilefacenet` config section
|
||||
|
|
12
package.json
12
package.json
|
@ -66,7 +66,7 @@
|
|||
"node-webcam": "^0.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "^7.29.2",
|
||||
"@microsoft/api-extractor": "^7.29.3",
|
||||
"@tensorflow/tfjs": "^3.19.0",
|
||||
"@tensorflow/tfjs-backend-cpu": "^3.19.0",
|
||||
"@tensorflow/tfjs-backend-wasm": "^3.19.0",
|
||||
|
@ -79,15 +79,15 @@
|
|||
"@tensorflow/tfjs-node": "^3.19.0",
|
||||
"@tensorflow/tfjs-node-gpu": "^3.19.0",
|
||||
"@tensorflow/tfjs-tflite": "0.0.1-alpha.8",
|
||||
"@types/node": "^18.7.4",
|
||||
"@types/node": "^18.7.6",
|
||||
"@types/offscreencanvas": "^2019.7.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
||||
"@typescript-eslint/parser": "^5.33.0",
|
||||
"@vladmandic/build": "^0.7.9",
|
||||
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
||||
"@typescript-eslint/parser": "^5.33.1",
|
||||
"@vladmandic/build": "^0.7.10",
|
||||
"@vladmandic/pilogger": "^0.4.6",
|
||||
"@vladmandic/tfjs": "github:vladmandic/tfjs",
|
||||
"@webgpu/types": "^0.1.21",
|
||||
"esbuild": "^0.15.3",
|
||||
"esbuild": "^0.15.5",
|
||||
"eslint": "8.22.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-plugin-html": "^7.1.0",
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
@font-face { font-family: 'Lato'; font-display: swap; font-style: normal; font-weight: 100; src: local('Lato'), url('../../assets/lato-light.woff2') }
|
||||
html { font-family: 'Lato', 'Segoe UI'; font-size: 14px; font-variant: small-caps; }
|
||||
body { margin: 0; background: black; color: white; width: 100vw; overflow-x: hidden; }
|
||||
.canvas { position: absolute; bottom: 10px; right: 10px; width: 256px; height: 256px; z-index: 99; }
|
||||
.canvas { position: fixed; bottom: 10px; right: 10px; width: 256px; height: 256px; z-index: 99; }
|
||||
.events { position: fixed; top: 10px; right: 10px; width: 12rem; height: 1.25rem; background-color: grey; padding: 8px; z-index: 99; }
|
||||
.state { position: fixed; top: 60px; right: 10px; width: 12rem; height: 1.25rem; background-color: grey; padding: 8px; z-index: 99; }
|
||||
.pre { line-height: 150%; white-space: break-spaces; }
|
||||
.events { position: absolute; top: 10px; right: 10px; width: 12rem; height: 1.25rem; background-color: grey; padding: 8px; z-index: 99; }
|
||||
.state { position: absolute; top: 60px; right: 10px; width: 12rem; height: 1.25rem; background-color: grey; padding: 8px; z-index: 99; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -56,7 +56,7 @@
|
|||
const ts = `${dt.getHours().toString().padStart(2, '0')}:${dt.getMinutes().toString().padStart(2, '0')}:${dt.getSeconds().toString().padStart(2, '0')}.${dt.getMilliseconds().toString().padStart(3, '0')}`;
|
||||
const elap = (dt - last).toString().padStart(5, '0');
|
||||
document.getElementById('log').innerHTML += ts + ' +' + elap + 'ms  ' + str(false, ...msgs);
|
||||
document.documentElement.scrollTop = document.documentElement.scrollHeight
|
||||
document.documentElement.scrollTop = document.documentElement.scrollHeight;
|
||||
console.log(ts, elap, ...msgs); // eslint-disable-line no-console
|
||||
last = dt;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@
|
|||
const ts = `${dt.getHours().toString().padStart(2, '0')}:${dt.getMinutes().toString().padStart(2, '0')}:${dt.getSeconds().toString().padStart(2, '0')}.${dt.getMilliseconds().toString().padStart(3, '0')}`;
|
||||
const elap = (dt - last).toString().padStart(5, '0');
|
||||
document.getElementById('log').innerHTML += ts + ' +' + elap + 'ms  ' + str(true, ...msgs);
|
||||
document.documentElement.scrollTop = document.documentElement.scrollHeight
|
||||
document.documentElement.scrollTop = document.documentElement.scrollHeight;
|
||||
console.log(ts, elap, ...msgs); // eslint-disable-line no-console
|
||||
last = dt;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
"/mnt/c/Users/mandi/AppData/Local/Google/Chrome SxS/Application/chrome.exe" --enable-unsafe-gpu --allow-insecure-localhost --auto-open-devtools-for-tabs https://localhost:10031/test/browser.html
|
|
@ -1,39 +1,39 @@
|
|||
2022-08-15 11:36:04 [32mDATA: [39m Build {"name":"@vladmandic/human","version":"2.9.3"}
|
||||
2022-08-15 11:36:04 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.9.3"}
|
||||
2022-08-15 11:36:04 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2022-08-15 11:36:04 [36mINFO: [39m Toolchain: {"build":"0.7.9","esbuild":"0.15.3","typescript":"4.7.4","typedoc":"0.23.10","eslint":"8.22.0"}
|
||||
2022-08-15 11:36:04 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-08-15 11:36:04 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||
2022-08-15 11:36:04 [35mSTATE:[39m 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-08-15 11:36:04 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":75,"inputBytes":655451,"outputBytes":307474}
|
||||
2022-08-15 11:36:04 [35mSTATE:[39m 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-08-15 11:36:04 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":75,"inputBytes":655455,"outputBytes":307478}
|
||||
2022-08-15 11:36:04 [35mSTATE:[39m 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-08-15 11:36:04 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":75,"inputBytes":655507,"outputBytes":307528}
|
||||
2022-08-15 11:36:04 [35mSTATE:[39m 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-08-15 11:36:04 [35mSTATE:[39m 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-08-15 11:36:04 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":75,"inputBytes":655426,"outputBytes":306323}
|
||||
2022-08-15 11:36:04 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":1271,"outputBytes":2787569}
|
||||
2022-08-15 11:36:04 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":75,"inputBytes":3442412,"outputBytes":1669183}
|
||||
2022-08-15 11:36:04 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":75,"inputBytes":3442412,"outputBytes":3073108}
|
||||
2022-08-15 11:36:09 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
||||
2022-08-15 11:36:11 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
||||
2022-08-15 11:36:11 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6716,"outputBytes":3141}
|
||||
2022-08-15 11:36:11 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15629,"outputBytes":7798}
|
||||
2022-08-15 11:36:19 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":109,"errors":0,"warnings":0}
|
||||
2022-08-15 11:36:19 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-08-15 11:36:19 [35mSTATE:[39m Copy: {"input":"tfjs/tfjs.esm.d.ts"}
|
||||
2022-08-15 11:36:19 [36mINFO: [39m Done...
|
||||
2022-08-15 11:36:20 [35mSTATE:[39m API-Extractor: {"succeeeded":true,"errors":0,"warnings":198}
|
||||
2022-08-15 11:36:20 [35mSTATE:[39m Copy: {"input":"types/human.d.ts"}
|
||||
2022-08-15 11:36:20 [36mINFO: [39m Analyze models: {"folders":8,"result":"models/models.json"}
|
||||
2022-08-15 11:36:20 [35mSTATE:[39m Models {"folder":"./models","models":13}
|
||||
2022-08-15 11:36:20 [35mSTATE:[39m Models {"folder":"../human-models/models","models":42}
|
||||
2022-08-15 11:36:20 [35mSTATE:[39m Models {"folder":"../blazepose/model/","models":4}
|
||||
2022-08-15 11:36:20 [35mSTATE:[39m Models {"folder":"../anti-spoofing/model","models":1}
|
||||
2022-08-15 11:36:20 [35mSTATE:[39m Models {"folder":"../efficientpose/models","models":3}
|
||||
2022-08-15 11:36:20 [35mSTATE:[39m Models {"folder":"../insightface/models","models":5}
|
||||
2022-08-15 11:36:20 [35mSTATE:[39m Models {"folder":"../movenet/models","models":3}
|
||||
2022-08-15 11:36:20 [35mSTATE:[39m Models {"folder":"../nanodet/models","models":4}
|
||||
2022-08-15 11:36:20 [35mSTATE:[39m Models: {"count":57,"totalSize":383017442}
|
||||
2022-08-15 11:36:20 [36mINFO: [39m Human Build complete... {"logFile":"test/build.log"}
|
||||
2022-08-19 09:12:22 [32mDATA: [39m Build {"name":"@vladmandic/human","version":"2.9.3"}
|
||||
2022-08-19 09:12:22 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.9.3"}
|
||||
2022-08-19 09:12:22 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2022-08-19 09:12:22 [36mINFO: [39m Toolchain: {"build":"0.7.10","esbuild":"0.15.5","typescript":"4.7.4","typedoc":"0.23.10","eslint":"8.22.0"}
|
||||
2022-08-19 09:12:22 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-08-19 09:12:22 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||
2022-08-19 09:12:22 [35mSTATE:[39m 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-08-19 09:12:22 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":75,"inputBytes":655452,"outputBytes":307474}
|
||||
2022-08-19 09:12:22 [35mSTATE:[39m 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-08-19 09:12:22 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":75,"inputBytes":655456,"outputBytes":307478}
|
||||
2022-08-19 09:12:22 [35mSTATE:[39m 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-08-19 09:12:22 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":75,"inputBytes":655508,"outputBytes":307528}
|
||||
2022-08-19 09:12:22 [35mSTATE:[39m 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-08-19 09:12:22 [35mSTATE:[39m 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-08-19 09:12:22 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":75,"inputBytes":655427,"outputBytes":306323}
|
||||
2022-08-19 09:12:22 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":1271,"outputBytes":2787569}
|
||||
2022-08-19 09:12:22 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":75,"inputBytes":3442413,"outputBytes":1669183}
|
||||
2022-08-19 09:12:22 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":75,"inputBytes":3442413,"outputBytes":3073108}
|
||||
2022-08-19 09:12:27 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
||||
2022-08-19 09:12:29 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
||||
2022-08-19 09:12:29 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6716,"outputBytes":3141}
|
||||
2022-08-19 09:12:29 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15629,"outputBytes":7798}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":109,"errors":0,"warnings":0}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m Copy: {"input":"tfjs/tfjs.esm.d.ts"}
|
||||
2022-08-19 09:12:37 [36mINFO: [39m Done...
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m API-Extractor: {"succeeeded":true,"errors":0,"warnings":198}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m Copy: {"input":"types/human.d.ts"}
|
||||
2022-08-19 09:12:37 [36mINFO: [39m Analyze models: {"folders":8,"result":"models/models.json"}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m Models {"folder":"./models","models":13}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m Models {"folder":"../human-models/models","models":42}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m Models {"folder":"../blazepose/model/","models":4}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m Models {"folder":"../anti-spoofing/model","models":1}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m Models {"folder":"../efficientpose/models","models":3}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m Models {"folder":"../insightface/models","models":5}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m Models {"folder":"../movenet/models","models":3}
|
||||
2022-08-19 09:12:37 [35mSTATE:[39m Models {"folder":"../nanodet/models","models":4}
|
||||
2022-08-19 09:12:38 [35mSTATE:[39m Models: {"count":57,"totalSize":383017442}
|
||||
2022-08-19 09:12:38 [36mINFO: [39m Human Build complete... {"logFile":"test/build.log"}
|
||||
|
|
1950
test/test.log
1950
test/test.log
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue