mirror of https://github.com/vladmandic/human
update backend
parent
179566cc83
commit
43f44cd114
|
@ -9,7 +9,7 @@
|
|||
|
||||
## Changelog
|
||||
|
||||
### **HEAD -> main** 2022/09/01 mandic00@live.com
|
||||
### **HEAD -> main** 2022/09/02 mandic00@live.com
|
||||
|
||||
- add browser iife tests
|
||||
- minor bug fixes and increased test coverage
|
||||
|
|
|
@ -122,6 +122,7 @@ export async function check(instance: Human, force = false) {
|
|||
|
||||
// customize wasm
|
||||
if (instance.config.backend === 'wasm') {
|
||||
if (instance.config.debug) log('backend wasm: set custom params');
|
||||
if (tf.env().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY) tf.env().set('CANVAS2D_WILL_READ_FREQUENTLY', true);
|
||||
if (instance.config.debug) log('wasm path:', instance.config.wasmPath);
|
||||
if (typeof tf.setWasmPaths !== 'undefined') tf.setWasmPaths(instance.config.wasmPath, instance.config.wasmPlatformFetch);
|
||||
|
@ -150,14 +151,13 @@ export async function check(instance: Human, force = false) {
|
|||
|
||||
// customize humangl
|
||||
if (tf.getBackend() === 'humangl') {
|
||||
if (tf.env().flagRegistry.CHECK_COMPUTATION_FOR_ERRORS) tf.env().set('CHECK_COMPUTATION_FOR_ERRORS', false);
|
||||
if (tf.env().flagRegistry.WEBGL_CPU_FORWARD) tf.env().set('WEBGL_CPU_FORWARD', true);
|
||||
if (tf.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS) tf.env().set('WEBGL_USE_SHAPES_UNIFORMS', true);
|
||||
if (tf.env().flagRegistry.CPU_HANDOFF_SIZE_THRESHOLD) tf.env().set('CPU_HANDOFF_SIZE_THRESHOLD', 256);
|
||||
if (tf.env().flagRegistry.WEBGL_EXP_CONV) tf.env().set('WEBGL_EXP_CONV', true); // <https://github.com/tensorflow/tfjs/issues/6678>
|
||||
if (tf.env().flagRegistry.USE_SETTIMEOUTCUSTOM) tf.env().set('USE_SETTIMEOUTCUSTOM', true); // <https://github.com/tensorflow/tfjs/issues/6687>
|
||||
// if (tf.env().flagRegistry['WEBGL_PACK_DEPTHWISECONV']) tf.env().set('WEBGL_PACK_DEPTHWISECONV', false);
|
||||
// if (if (tf.env().flagRegistry['WEBGL_FORCE_F16_TEXTURES']) && !instance.config.object.enabled) tf.env().set('WEBGL_FORCE_F16_TEXTURES', true); // safe to use 16bit precision
|
||||
if (instance.config.debug) log('backend humangl: set custom params');
|
||||
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_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.CPU_HANDOFF_SIZE_THRESHOLD) tf.env().set('CPU_HANDOFF_SIZE_THRESHOLD', 1024); // default=1000
|
||||
// if (tf.env().flagRegistry['WEBGL_FORCE_F16_TEXTURES'] && !instance.config.object.enabled) tf.env().set('WEBGL_FORCE_F16_TEXTURES', true); // safe to use 16bit precision
|
||||
if (typeof instance.config.deallocate !== 'undefined' && instance.config.deallocate) { // hidden param
|
||||
log('changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:', true);
|
||||
tf.env().set('WEBGL_DELETE_TEXTURE_THRESHOLD', 0);
|
||||
|
@ -170,6 +170,7 @@ export async function check(instance: Human, force = false) {
|
|||
|
||||
// customize webgpu
|
||||
if (tf.getBackend() === 'webgpu') {
|
||||
if (instance.config.debug) log('backend webgpu: set custom params');
|
||||
// if (tf.env().flagRegistry['WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD']) tf.env().set('WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD', 512);
|
||||
// if (tf.env().flagRegistry['WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE']) tf.env().set('WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE', 0);
|
||||
// if (tf.env().flagRegistry['WEBGPU_CPU_FORWARD']) tf.env().set('WEBGPU_CPU_FORWARD', true);
|
||||
|
|
|
@ -21,8 +21,8 @@ export const config = {
|
|||
preserveDrawingBuffer: false,
|
||||
depth: false,
|
||||
stencil: false,
|
||||
failIfMajorPerformanceCaveat: false,
|
||||
desynchronized: true,
|
||||
failIfMajorPerformanceCaveat: false, // default=true
|
||||
desynchronized: true, // default=undefined
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
2022-09-02 08:07:35 [32mDATA: [39m Build {"name":"@vladmandic/human","version":"2.9.4"}
|
||||
2022-09-02 08:07:35 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.9.4"}
|
||||
2022-09-02 08:07:35 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2022-09-02 08:07:35 [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-02 08:07:35 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-09-02 08:07:35 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||
2022-09-02 08:07:35 [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-02 08:07:35 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":75,"inputBytes":655767,"outputBytes":308629}
|
||||
2022-09-02 08:07:35 [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-02 08:07:35 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":75,"inputBytes":655771,"outputBytes":308633}
|
||||
2022-09-02 08:07:35 [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-02 08:07:35 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":75,"inputBytes":655823,"outputBytes":308683}
|
||||
2022-09-02 08:07:35 [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-02 08:07:35 [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-02 08:07:35 [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":655742,"outputBytes":307503}
|
||||
2022-09-02 08:07:35 [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-02 08:07:35 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":75,"inputBytes":3477073,"outputBytes":1687675}
|
||||
2022-09-02 08:07:35 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":75,"inputBytes":3477073,"outputBytes":3108312}
|
||||
2022-09-02 08:07:40 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
||||
2022-09-02 08:07:42 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
||||
2022-09-02 08:07:42 [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-02 08:07:42 [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-02 08:07:53 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":113,"errors":0,"warnings":0}
|
||||
2022-09-02 08:07:53 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-09-02 08:07:53 [35mSTATE:[39m Copy: {"input":"tfjs/tfjs.esm.d.ts"}
|
||||
2022-09-02 08:07:53 [36mINFO: [39m Done...
|
||||
2022-09-02 08:07:54 [35mSTATE:[39m API-Extractor: {"succeeeded":true,"errors":0,"warnings":198}
|
||||
2022-09-02 08:07:54 [35mSTATE:[39m Copy: {"input":"types/human.d.ts"}
|
||||
2022-09-02 08:07:54 [36mINFO: [39m Analyze models: {"folders":8,"result":"models/models.json"}
|
||||
2022-09-02 08:07:54 [35mSTATE:[39m Models {"folder":"./models","models":13}
|
||||
2022-09-02 08:07:54 [35mSTATE:[39m Models {"folder":"../human-models/models","models":42}
|
||||
2022-09-02 08:07:54 [35mSTATE:[39m Models {"folder":"../blazepose/model/","models":4}
|
||||
2022-09-02 08:07:54 [35mSTATE:[39m Models {"folder":"../anti-spoofing/model","models":1}
|
||||
2022-09-02 08:07:54 [35mSTATE:[39m Models {"folder":"../efficientpose/models","models":3}
|
||||
2022-09-02 08:07:54 [35mSTATE:[39m Models {"folder":"../insightface/models","models":5}
|
||||
2022-09-02 08:07:54 [35mSTATE:[39m Models {"folder":"../movenet/models","models":3}
|
||||
2022-09-02 08:07:54 [35mSTATE:[39m Models {"folder":"../nanodet/models","models":4}
|
||||
2022-09-02 08:07:55 [35mSTATE:[39m Models: {"count":57,"totalSize":383017442}
|
||||
2022-09-02 08:07:55 [36mINFO: [39m Human Build complete... {"logFile":"test/build.log"}
|
||||
2022-09-02 10:21:42 [32mDATA: [39m Build {"name":"@vladmandic/human","version":"2.9.4"}
|
||||
2022-09-02 10:21:42 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.9.4"}
|
||||
2022-09-02 10:21:42 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2022-09-02 10:21:42 [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-02 10:21:42 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-09-02 10:21:42 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||
2022-09-02 10:21:42 [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-02 10:21:42 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":75,"inputBytes":655998,"outputBytes":308454}
|
||||
2022-09-02 10:21:42 [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-02 10:21:42 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":75,"inputBytes":656002,"outputBytes":308458}
|
||||
2022-09-02 10:21:42 [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-02 10:21:42 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":75,"inputBytes":656054,"outputBytes":308508}
|
||||
2022-09-02 10:21:42 [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-02 10:21:42 [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-02 10:21:42 [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":655973,"outputBytes":307328}
|
||||
2022-09-02 10:21:42 [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-02 10:21:42 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":75,"inputBytes":3477304,"outputBytes":1687535}
|
||||
2022-09-02 10:21:43 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":75,"inputBytes":3477304,"outputBytes":3108145}
|
||||
2022-09-02 10:21:47 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
||||
2022-09-02 10:21:49 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
||||
2022-09-02 10:21:49 [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-02 10:21:49 [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-02 10:21:59 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":113,"errors":0,"warnings":0}
|
||||
2022-09-02 10:21:59 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-09-02 10:21:59 [35mSTATE:[39m Copy: {"input":"tfjs/tfjs.esm.d.ts"}
|
||||
2022-09-02 10:21:59 [36mINFO: [39m Done...
|
||||
2022-09-02 10:22:00 [35mSTATE:[39m API-Extractor: {"succeeeded":true,"errors":0,"warnings":198}
|
||||
2022-09-02 10:22:00 [35mSTATE:[39m Copy: {"input":"types/human.d.ts"}
|
||||
2022-09-02 10:22:00 [36mINFO: [39m Analyze models: {"folders":8,"result":"models/models.json"}
|
||||
2022-09-02 10:22:00 [35mSTATE:[39m Models {"folder":"./models","models":13}
|
||||
2022-09-02 10:22:00 [35mSTATE:[39m Models {"folder":"../human-models/models","models":42}
|
||||
2022-09-02 10:22:00 [35mSTATE:[39m Models {"folder":"../blazepose/model/","models":4}
|
||||
2022-09-02 10:22:00 [35mSTATE:[39m Models {"folder":"../anti-spoofing/model","models":1}
|
||||
2022-09-02 10:22:00 [35mSTATE:[39m Models {"folder":"../efficientpose/models","models":3}
|
||||
2022-09-02 10:22:00 [35mSTATE:[39m Models {"folder":"../insightface/models","models":5}
|
||||
2022-09-02 10:22:00 [35mSTATE:[39m Models {"folder":"../movenet/models","models":3}
|
||||
2022-09-02 10:22:00 [35mSTATE:[39m Models {"folder":"../nanodet/models","models":4}
|
||||
2022-09-02 10:22:00 [35mSTATE:[39m Models: {"count":57,"totalSize":383017442}
|
||||
2022-09-02 10:22:00 [36mINFO: [39m Human Build complete... {"logFile":"test/build.log"}
|
||||
|
|
Loading…
Reference in New Issue