mirror of https://github.com/vladmandic/human
test update
parent
4da18dda84
commit
ad7463c7d3
|
@ -9,8 +9,10 @@
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
### **HEAD -> main** 2022/09/02 mandic00@live.com
|
### **HEAD -> main** 2022/09/03 mandic00@live.com
|
||||||
|
|
||||||
|
- release preview
|
||||||
|
- optimize startup sequence
|
||||||
- reorder backend init code
|
- reorder backend init code
|
||||||
- test embedding
|
- test embedding
|
||||||
- embedding test
|
- embedding test
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -83921,10 +83921,6 @@ async function check(instance2, force = false) {
|
||||||
defaultFlags = JSON.parse(JSON.stringify(env().flags));
|
defaultFlags = JSON.parse(JSON.stringify(env().flags));
|
||||||
}
|
}
|
||||||
if (getBackend() === "humangl" || getBackend() === "webgl") {
|
if (getBackend() === "humangl" || getBackend() === "webgl") {
|
||||||
if (env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS)
|
|
||||||
env().set("WEBGL_USE_SHAPES_UNIFORMS", true);
|
|
||||||
if (env().flagRegistry.WEBGL_EXP_CONV)
|
|
||||||
env().set("WEBGL_EXP_CONV", true);
|
|
||||||
if (typeof instance2.config.deallocate !== "undefined" && instance2.config.deallocate) {
|
if (typeof instance2.config.deallocate !== "undefined" && instance2.config.deallocate) {
|
||||||
log("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:", true);
|
log("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:", true);
|
||||||
env().set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0);
|
env().set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0);
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -97,7 +97,7 @@
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"seedrandom": "^3.0.5",
|
"seedrandom": "^3.0.5",
|
||||||
"tslib": "^2.4.0",
|
"tslib": "^2.4.0",
|
||||||
"typedoc": "0.23.13",
|
"typedoc": "0.23.14",
|
||||||
"typescript": "4.8.2"
|
"typescript": "4.8.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,8 +158,8 @@ export async function check(instance: Human, force = false) {
|
||||||
|
|
||||||
// customize humangl
|
// customize humangl
|
||||||
if (tf.getBackend() === 'humangl' || tf.getBackend() === 'webgl') {
|
if (tf.getBackend() === 'humangl' || tf.getBackend() === 'webgl') {
|
||||||
if (tf.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS) tf.env().set('WEBGL_USE_SHAPES_UNIFORMS', true); // default=false <https://github.com/tensorflow/tfjs/issues/5205>
|
// if (tf.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS) tf.env().set('WEBGL_USE_SHAPES_UNIFORMS', true); // default=false <https://github.com/tensorflow/tfjs/issues/5205>
|
||||||
if (tf.env().flagRegistry.WEBGL_EXP_CONV) tf.env().set('WEBGL_EXP_CONV', true); // default=false <https://github.com/tensorflow/tfjs/issues/6678>
|
// if (tf.env().flagRegistry.WEBGL_EXP_CONV) tf.env().set('WEBGL_EXP_CONV', true); // default=false <https://github.com/tensorflow/tfjs/issues/6678>
|
||||||
// if (tf.env().flagRegistry['WEBGL_PACK_DEPTHWISECONV']) tf.env().set('WEBGL_PACK_DEPTHWISECONV', false); // default=true <https://github.com/tensorflow/tfjs/pull/4909>
|
// if (tf.env().flagRegistry['WEBGL_PACK_DEPTHWISECONV']) tf.env().set('WEBGL_PACK_DEPTHWISECONV', false); // default=true <https://github.com/tensorflow/tfjs/pull/4909>
|
||||||
// if (tf.env().flagRegistry.USE_SETTIMEOUTCUSTOM) tf.env().set('USE_SETTIMEOUTCUSTOM', true); // default=false <https://github.com/tensorflow/tfjs/issues/6687>
|
// if (tf.env().flagRegistry.USE_SETTIMEOUTCUSTOM) tf.env().set('USE_SETTIMEOUTCUSTOM', true); // default=false <https://github.com/tensorflow/tfjs/issues/6687>
|
||||||
// if (tf.env().flagRegistry.CPU_HANDOFF_SIZE_THRESHOLD) tf.env().set('CPU_HANDOFF_SIZE_THRESHOLD', 1024); // default=1000
|
// if (tf.env().flagRegistry.CPU_HANDOFF_SIZE_THRESHOLD) tf.env().set('CPU_HANDOFF_SIZE_THRESHOLD', 1024); // default=1000
|
||||||
|
|
|
@ -1,39 +1,39 @@
|
||||||
2022-09-03 07:09:51 [32mDATA: [39m Build {"name":"@vladmandic/human","version":"2.10.0"}
|
2022-09-03 17:17:20 [32mDATA: [39m Build {"name":"@vladmandic/human","version":"2.10.0"}
|
||||||
2022-09-03 07:09:51 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.10.0"}
|
2022-09-03 17:17:20 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.10.0"}
|
||||||
2022-09-03 07:09:51 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
2022-09-03 17:17:20 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||||
2022-09-03 07:09:51 [36mINFO: [39m Toolchain: {"build":"0.7.11","esbuild":"0.15.6","typescript":"4.8.2","typedoc":"0.23.13","eslint":"8.23.0"}
|
2022-09-03 17:17:20 [36mINFO: [39m Toolchain: {"build":"0.7.11","esbuild":"0.15.6","typescript":"4.8.2","typedoc":"0.23.14","eslint":"8.23.0"}
|
||||||
2022-09-03 07:09:51 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
2022-09-03 17:17:20 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||||
2022-09-03 07:09:51 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
2022-09-03 17:17:20 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||||
2022-09-03 07:09:51 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":608}
|
2022-09-03 17:17:20 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":608}
|
||||||
2022-09-03 07:09:51 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":75,"inputBytes":656531,"outputBytes":308656}
|
2022-09-03 17:17:20 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":75,"inputBytes":656537,"outputBytes":308492}
|
||||||
2022-09-03 07:09:51 [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":167,"outputBytes":612}
|
2022-09-03 17:17:20 [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":167,"outputBytes":612}
|
||||||
2022-09-03 07:09:51 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":75,"inputBytes":656535,"outputBytes":308660}
|
2022-09-03 17:17:20 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":75,"inputBytes":656541,"outputBytes":308496}
|
||||||
2022-09-03 07:09:51 [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":206,"outputBytes":664}
|
2022-09-03 17:17:20 [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":206,"outputBytes":664}
|
||||||
2022-09-03 07:09:51 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":75,"inputBytes":656587,"outputBytes":308710}
|
2022-09-03 17:17:20 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":75,"inputBytes":656593,"outputBytes":308546}
|
||||||
2022-09-03 07:09:51 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":358}
|
2022-09-03 17:17:20 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":358}
|
||||||
2022-09-03 07:09:51 [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":1088,"outputBytes":583}
|
2022-09-03 17:17:20 [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":1088,"outputBytes":583}
|
||||||
2022-09-03 07:09:51 [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":656506,"outputBytes":307530}
|
2022-09-03 17:17:20 [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":656512,"outputBytes":307366}
|
||||||
2022-09-03 07:09:52 [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":1344,"outputBytes":2821914}
|
2022-09-03 17:17:20 [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":1344,"outputBytes":2821914}
|
||||||
2022-09-03 07:09:52 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":75,"inputBytes":3477837,"outputBytes":1687720}
|
2022-09-03 17:17:20 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":75,"inputBytes":3477843,"outputBytes":1687572}
|
||||||
2022-09-03 07:09:52 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":75,"inputBytes":3477837,"outputBytes":3108728}
|
2022-09-03 17:17:21 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":75,"inputBytes":3477843,"outputBytes":3108530}
|
||||||
2022-09-03 07:09:56 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
2022-09-03 17:17:25 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
||||||
2022-09-03 07:09:58 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
2022-09-03 17:17:27 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
||||||
2022-09-03 07:09:58 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6714,"outputBytes":3134}
|
2022-09-03 17:17:27 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6714,"outputBytes":3134}
|
||||||
2022-09-03 07:09:58 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15488,"outputBytes":7788}
|
2022-09-03 17:17:27 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15488,"outputBytes":7788}
|
||||||
2022-09-03 07:10:09 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":110,"errors":0,"warnings":0}
|
2022-09-03 17:17:38 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":110,"errors":0,"warnings":0}
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
2022-09-03 17:17:38 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m Copy: {"input":"tfjs/tfjs.esm.d.ts"}
|
2022-09-03 17:17:38 [35mSTATE:[39m Copy: {"input":"tfjs/tfjs.esm.d.ts"}
|
||||||
2022-09-03 07:10:10 [36mINFO: [39m Done...
|
2022-09-03 17:17:38 [36mINFO: [39m Done...
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m API-Extractor: {"succeeeded":true,"errors":0,"warnings":193}
|
2022-09-03 17:17:39 [35mSTATE:[39m API-Extractor: {"succeeeded":true,"errors":0,"warnings":193}
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m Copy: {"input":"types/human.d.ts"}
|
2022-09-03 17:17:39 [35mSTATE:[39m Copy: {"input":"types/human.d.ts"}
|
||||||
2022-09-03 07:10:10 [36mINFO: [39m Analyze models: {"folders":8,"result":"models/models.json"}
|
2022-09-03 17:17:39 [36mINFO: [39m Analyze models: {"folders":8,"result":"models/models.json"}
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m Models {"folder":"./models","models":13}
|
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"./models","models":13}
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m Models {"folder":"../human-models/models","models":42}
|
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../human-models/models","models":42}
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m Models {"folder":"../blazepose/model/","models":4}
|
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../blazepose/model/","models":4}
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m Models {"folder":"../anti-spoofing/model","models":1}
|
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../anti-spoofing/model","models":1}
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m Models {"folder":"../efficientpose/models","models":3}
|
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../efficientpose/models","models":3}
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m Models {"folder":"../insightface/models","models":5}
|
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../insightface/models","models":5}
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m Models {"folder":"../movenet/models","models":3}
|
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../movenet/models","models":3}
|
||||||
2022-09-03 07:10:10 [35mSTATE:[39m Models {"folder":"../nanodet/models","models":4}
|
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../nanodet/models","models":4}
|
||||||
2022-09-03 07:10:11 [35mSTATE:[39m Models: {"count":57,"totalSize":383017442}
|
2022-09-03 17:17:40 [35mSTATE:[39m Models: {"count":57,"totalSize":383017442}
|
||||||
2022-09-03 07:10:11 [36mINFO: [39m Human Build complete... {"logFile":"test/build.log"}
|
2022-09-03 17:17:40 [36mINFO: [39m Human Build complete... {"logFile":"test/build.log"}
|
||||||
|
|
|
@ -10,6 +10,13 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div style="position: fixed; top: 20px; right: 20px; background: #333333; padding: 10px">
|
||||||
|
<input type="checkbox" id="glShapesUniform" name="glShapesUniform" value="glShapesUniform">
|
||||||
|
<label for="glShapesUniform">Enable WebGL Uniforms for Shapes</label><br>
|
||||||
|
<input type="checkbox" id="glExpandedConv" name="glExpandedConv" value="glExpandedConv">
|
||||||
|
<label for="glExpandedConv">Enable WebGL Expanded Convolutions</label><br><br>
|
||||||
|
<button id="run">Run Test</button>
|
||||||
|
</div>
|
||||||
<pre id="log" style="line-height: 150%; overflow-x: hidden; white-space: pre-wrap"></pre>
|
<pre id="log" style="line-height: 150%; overflow-x: hidden; white-space: pre-wrap"></pre>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { Human } from '../dist/human.esm.js';
|
import { Human } from '../dist/human.esm.js';
|
||||||
|
@ -46,25 +53,34 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
document.getElementById('run').disabled = true;
|
||||||
const human = new Human(testConfig);
|
const human = new Human(testConfig);
|
||||||
const ops = await human.check();
|
await human.init();
|
||||||
if (ops && ops.length > 0) log(backend, { backend: human.tf.getBackend(), ops });
|
const glShapesUniform = document.getElementById('glShapesUniform').checked;
|
||||||
const env = JSON.parse(JSON.stringify(human.env));
|
const glExpandedConv = document.getElementById('glExpandedConv').checked
|
||||||
env.kernels = human.env.kernels.length;
|
if (glShapesUniform) tf.env().set('WEBGL_USE_SHAPES_UNIFORMS', true);
|
||||||
// log(backend, { backend: human.tf.getBackend(), env, tfjs: human.tf.env().flags });
|
if (glExpandedConv) tf.env().set('WEBGL_EXP_CONV', true);
|
||||||
|
await human.load();
|
||||||
|
await human.check();
|
||||||
let res;
|
let res;
|
||||||
res = await human.warmup({ warmup: 'none' });
|
res = await human.warmup({ warmup: 'none' });
|
||||||
if (Array.isArray(res?.face?.[0]?.embedding) && (res?.face?.[0]?.embedding.length === 1024)) res.face[0].embedding.length = 10;
|
if (Array.isArray(res?.face?.[0]?.embedding) && (res?.face?.[0]?.embedding.length === 1024)) res.face[0].embedding.length = 10;
|
||||||
log({ backend: human.tf.getBackend(), warmup: human.config.warmup, gender: res?.face?.[0]?.gender, genderScore: res?.face?.[0]?.genderScore, age: res?.face?.[0]?.age, embedding: res?.face?.[0]?.embedding });
|
const pass0 = res?.face?.[0]?.embedding?.[0] === 0 ? true : false;
|
||||||
|
log({ backend: human.tf.getBackend(), pass: pass0, warmup: human.config.warmup, gender: res?.face?.[0]?.gender, genderScore: res?.face?.[0]?.genderScore, age: res?.face?.[0]?.age, embedding: res?.face?.[0]?.embedding });
|
||||||
res = await human.warmup({ warmup: 'face' });
|
res = await human.warmup({ warmup: 'face' });
|
||||||
if (Array.isArray(res?.face?.[0]?.embedding) && (res?.face?.[0]?.embedding.length === 1024)) res.face[0].embedding.length = 10;
|
if (Array.isArray(res?.face?.[0]?.embedding) && (res?.face?.[0]?.embedding.length === 1024)) res.face[0].embedding.length = 10;
|
||||||
log({ backend: human.tf.getBackend(), warmup: human.config.warmup, gender: res?.face?.[0]?.gender, genderScore: res?.face?.[0]?.genderScore, age: res?.face?.[0]?.age, embedding: res?.face?.[0]?.embedding });
|
console.log('EEEE', res?.face?.[0]?.embedding?.[0]);
|
||||||
|
const pass1 = res?.face?.[0]?.embedding?.[0] === 0 ? true : false;
|
||||||
|
log({ backend: human.tf.getBackend(), pass: pass1, warmup: human.config.warmup, gender: res?.face?.[0]?.gender, genderScore: res?.face?.[0]?.genderScore, age: res?.face?.[0]?.age, embedding: res?.face?.[0]?.embedding });
|
||||||
res = await human.warmup({ warmup: 'body' });
|
res = await human.warmup({ warmup: 'body' });
|
||||||
if (Array.isArray(res?.face?.[0]?.embedding) && (res?.face?.[0]?.embedding.length === 1024)) res.face[0].embedding.length = 10;
|
if (Array.isArray(res?.face?.[0]?.embedding) && (res?.face?.[0]?.embedding.length === 1024)) res.face[0].embedding.length = 10;
|
||||||
log({ backend: human.tf.getBackend(), warmup: human.config.warmup, gender: res?.face?.[0]?.gender, genderScore: res?.face?.[0]?.genderScore, age: res?.face?.[0]?.age, embedding: res?.face?.[0]?.embedding });
|
const pass2 = res?.face?.[0]?.embedding?.[0] === 0 ? true : false;
|
||||||
|
log({ backend: human.tf.getBackend(), pass: pass2, warmup: human.config.warmup, gender: res?.face?.[0]?.gender, genderScore: res?.face?.[0]?.genderScore, age: res?.face?.[0]?.age, embedding: res?.face?.[0]?.embedding });
|
||||||
|
const pass = !pass0 && pass1 && pass2;
|
||||||
|
log({ test: 'complete', pass, glShapesUniform, glExpandedConv });
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
document.getElementById('run').addEventListener('click', main);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1109,7 +1109,6 @@ ul.tsd-type-parameter-list h5 {
|
||||||
background: var(--color-background-secondary);
|
background: var(--color-background-secondary);
|
||||||
border-bottom: 1px var(--color-accent) solid;
|
border-bottom: 1px var(--color-accent) solid;
|
||||||
transition: transform 0.3s ease-in-out;
|
transition: transform 0.3s ease-in-out;
|
||||||
margin: 0 auto;
|
|
||||||
}
|
}
|
||||||
.tsd-page-toolbar a {
|
.tsd-page-toolbar a {
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
@ -1125,6 +1124,7 @@ ul.tsd-type-parameter-list h5 {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 2.5rem;
|
height: 2.5rem;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.tsd-page-toolbar .table-cell {
|
.tsd-page-toolbar .table-cell {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
Loading…
Reference in New Issue