mirror of https://github.com/vladmandic/human
add config flags
parent
ad7463c7d3
commit
c9120d5c67
1
TODO.md
1
TODO.md
|
@ -88,6 +88,7 @@ Enable via `about:config` -> `gfx.offscreencanvas.enabled`
|
|||
Run using: `demo/browser.html`
|
||||
Runs tests for `webgl`, `humangl`, `webgpu` and `wasm`
|
||||
Runs tests for ESM and IIFE versions of library
|
||||
- Add `config.flags` settings to allow setting of custom **TFJS** flags during backend configuration
|
||||
- Increase availability of alternative models
|
||||
See `models/model.json` for full list
|
||||
- Update profiling methods in `human.profile()`
|
||||
|
|
|
@ -212,6 +212,8 @@ export declare interface Config {
|
|||
* default: 0.7
|
||||
*/
|
||||
cacheSensitivity: number;
|
||||
/** Explicit flags passed to initialize TFJS */
|
||||
flags: Record<string, unknown>;
|
||||
/** Software Kernels
|
||||
* Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend
|
||||
*/
|
||||
|
|
|
@ -212,6 +212,8 @@ export declare interface Config {
|
|||
* default: 0.7
|
||||
*/
|
||||
cacheSensitivity: number;
|
||||
/** Explicit flags passed to initialize TFJS */
|
||||
flags: Record<string, unknown>;
|
||||
/** Software Kernels
|
||||
* Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend
|
||||
*/
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -212,6 +212,8 @@ export declare interface Config {
|
|||
* default: 0.7
|
||||
*/
|
||||
cacheSensitivity: number;
|
||||
/** Explicit flags passed to initialize TFJS */
|
||||
flags: Record<string, unknown>;
|
||||
/** Software Kernels
|
||||
* Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend
|
||||
*/
|
||||
|
|
|
@ -101,6 +101,7 @@ var config = {
|
|||
cacheSensitivity: 0.7,
|
||||
skipAllowed: false,
|
||||
deallocate: false,
|
||||
flags: {},
|
||||
softwareKernels: false,
|
||||
filter: {
|
||||
enabled: true,
|
||||
|
@ -83921,7 +83922,7 @@ async function check(instance2, force = false) {
|
|||
defaultFlags = JSON.parse(JSON.stringify(env().flags));
|
||||
}
|
||||
if (getBackend() === "humangl" || getBackend() === "webgl") {
|
||||
if (typeof instance2.config.deallocate !== "undefined" && instance2.config.deallocate) {
|
||||
if (instance2.config.debug && typeof instance2.config.deallocate !== "undefined" && instance2.config.deallocate) {
|
||||
log("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:", true);
|
||||
env().set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0);
|
||||
}
|
||||
|
@ -83936,9 +83937,16 @@ async function check(instance2, force = false) {
|
|||
continue;
|
||||
updatedFlags[key] = newFlags[key];
|
||||
}
|
||||
if (Object.keys(updatedFlags).length > 0)
|
||||
if (instance2.config.debug && Object.keys(updatedFlags).length > 0)
|
||||
log("backend:", getBackend(), "flags:", updatedFlags);
|
||||
}
|
||||
if (instance2.config.flags && Object.keys(instance2.config.flags).length > 0) {
|
||||
if (instance2.config.debug)
|
||||
log("flags:", instance2.config["flags"]);
|
||||
for (const [key, val] of Object.entries(instance2.config.flags)) {
|
||||
env().set(key, val);
|
||||
}
|
||||
}
|
||||
enableProdMode();
|
||||
init2();
|
||||
instance2.performance.initBackend = Math.trunc(now() - timeStamp);
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -212,6 +212,8 @@ export declare interface Config {
|
|||
* default: 0.7
|
||||
*/
|
||||
cacheSensitivity: number;
|
||||
/** Explicit flags passed to initialize TFJS */
|
||||
flags: Record<string, unknown>;
|
||||
/** Software Kernels
|
||||
* Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend
|
||||
*/
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -212,6 +212,8 @@ export declare interface Config {
|
|||
* default: 0.7
|
||||
*/
|
||||
cacheSensitivity: number;
|
||||
/** Explicit flags passed to initialize TFJS */
|
||||
flags: Record<string, unknown>;
|
||||
/** Software Kernels
|
||||
* Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend
|
||||
*/
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -212,6 +212,8 @@ export declare interface Config {
|
|||
* default: 0.7
|
||||
*/
|
||||
cacheSensitivity: number;
|
||||
/** Explicit flags passed to initialize TFJS */
|
||||
flags: Record<string, unknown>;
|
||||
/** Software Kernels
|
||||
* Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend
|
||||
*/
|
||||
|
|
File diff suppressed because one or more lines are too long
10
package.json
10
package.json
|
@ -76,16 +76,16 @@
|
|||
"@tensorflow/tfjs-node": "^3.20.0",
|
||||
"@tensorflow/tfjs-node-gpu": "^3.20.0",
|
||||
"@tensorflow/tfjs-tflite": "0.0.1-alpha.8",
|
||||
"@types/node": "^18.7.14",
|
||||
"@types/node": "^18.7.15",
|
||||
"@types/offscreencanvas": "^2019.7.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.1",
|
||||
"@typescript-eslint/parser": "^5.36.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
||||
"@typescript-eslint/parser": "^5.36.2",
|
||||
"@vladmandic/build": "^0.7.11",
|
||||
"@vladmandic/pilogger": "^0.4.6",
|
||||
"@vladmandic/tfjs": "github:vladmandic/tfjs",
|
||||
"@webgpu/types": "^0.1.21",
|
||||
"canvas": "^2.9.3",
|
||||
"esbuild": "^0.15.6",
|
||||
"canvas": "^2.10.0",
|
||||
"esbuild": "^0.15.7",
|
||||
"eslint": "8.23.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-plugin-html": "^7.1.0",
|
||||
|
|
|
@ -286,6 +286,9 @@ export interface Config {
|
|||
*/
|
||||
cacheSensitivity: number;
|
||||
|
||||
/** Explicit flags passed to initialize TFJS */
|
||||
flags: Record<string, unknown>,
|
||||
|
||||
/** Software Kernels
|
||||
* Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend
|
||||
*/
|
||||
|
@ -333,6 +336,7 @@ const config: Config = {
|
|||
cacheSensitivity: 0.70,
|
||||
skipAllowed: false,
|
||||
deallocate: false,
|
||||
flags: {},
|
||||
softwareKernels: false,
|
||||
filter: {
|
||||
enabled: true,
|
||||
|
|
|
@ -164,7 +164,7 @@ export async function check(instance: Human, force = false) {
|
|||
// 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
|
||||
if (instance.config.debug && 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);
|
||||
}
|
||||
|
@ -184,7 +184,14 @@ export async function check(instance: Human, force = false) {
|
|||
if (defaultFlags[key] === newFlags[key]) continue;
|
||||
updatedFlags[key] = newFlags[key];
|
||||
}
|
||||
if (Object.keys(updatedFlags).length > 0) log('backend:', tf.getBackend(), 'flags:', updatedFlags);
|
||||
if (instance.config.debug && Object.keys(updatedFlags).length > 0) log('backend:', tf.getBackend(), 'flags:', updatedFlags);
|
||||
}
|
||||
|
||||
if (instance.config.flags && Object.keys(instance.config.flags).length > 0) {
|
||||
if (instance.config.debug) log('flags:', instance.config['flags']);
|
||||
for (const [key, val] of Object.entries(instance.config.flags)) {
|
||||
tf.env().set(key, val);
|
||||
}
|
||||
}
|
||||
|
||||
tf.enableProdMode();
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
2022-09-03 17:17:20 [32mDATA: [39m Build {"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 17:17:20 [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 Toolchain: {"build":"0.7.11","esbuild":"0.15.6","typescript":"4.8.2","typedoc":"0.23.14","eslint":"8.23.0"}
|
||||
2022-09-03 17:17:20 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-09-03 17:17:20 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||
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 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 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 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 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 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 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 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 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 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 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 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 17:17:25 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
||||
2022-09-03 17:17:27 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
||||
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 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 17:17:38 [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 ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-09-03 17:17:38 [35mSTATE:[39m Copy: {"input":"tfjs/tfjs.esm.d.ts"}
|
||||
2022-09-03 17:17:38 [36mINFO: [39m Done...
|
||||
2022-09-03 17:17:39 [35mSTATE:[39m API-Extractor: {"succeeeded":true,"errors":0,"warnings":193}
|
||||
2022-09-03 17:17:39 [35mSTATE:[39m Copy: {"input":"types/human.d.ts"}
|
||||
2022-09-03 17:17:39 [36mINFO: [39m Analyze models: {"folders":8,"result":"models/models.json"}
|
||||
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"./models","models":13}
|
||||
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../human-models/models","models":42}
|
||||
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../blazepose/model/","models":4}
|
||||
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../anti-spoofing/model","models":1}
|
||||
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../efficientpose/models","models":3}
|
||||
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../insightface/models","models":5}
|
||||
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../movenet/models","models":3}
|
||||
2022-09-03 17:17:39 [35mSTATE:[39m Models {"folder":"../nanodet/models","models":4}
|
||||
2022-09-03 17:17:40 [35mSTATE:[39m Models: {"count":57,"totalSize":383017442}
|
||||
2022-09-03 17:17:40 [36mINFO: [39m Human Build complete... {"logFile":"test/build.log"}
|
||||
2022-09-06 10:28:18 [32mDATA: [39m Build {"name":"@vladmandic/human","version":"2.10.0"}
|
||||
2022-09-06 10:28:18 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.10.0"}
|
||||
2022-09-06 10:28:18 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2022-09-06 10:28:18 [36mINFO: [39m Toolchain: {"build":"0.7.11","esbuild":"0.15.7","typescript":"4.8.2","typedoc":"0.23.14","eslint":"8.23.0"}
|
||||
2022-09-06 10:28:18 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-09-06 10:28:18 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||
2022-09-06 10:28:18 [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-06 10:28:18 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":75,"inputBytes":656961,"outputBytes":308696}
|
||||
2022-09-06 10:28:18 [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-06 10:28:18 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":75,"inputBytes":656965,"outputBytes":308700}
|
||||
2022-09-06 10:28:18 [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-06 10:28:18 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":75,"inputBytes":657017,"outputBytes":308750}
|
||||
2022-09-06 10:28:18 [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-06 10:28:18 [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-06 10:28:18 [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":656936,"outputBytes":307570}
|
||||
2022-09-06 10:28:18 [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-06 10:28:18 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":75,"inputBytes":3478267,"outputBytes":1687773}
|
||||
2022-09-06 10:28:18 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":75,"inputBytes":3478267,"outputBytes":3108879}
|
||||
2022-09-06 10:28:23 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
||||
2022-09-06 10:28:25 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
||||
2022-09-06 10:28:25 [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-06 10:28:25 [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-06 10:28:35 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":110,"errors":0,"warnings":0}
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m Copy: {"input":"tfjs/tfjs.esm.d.ts"}
|
||||
2022-09-06 10:28:36 [36mINFO: [39m Done...
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m API-Extractor: {"succeeeded":true,"errors":0,"warnings":193}
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m Copy: {"input":"types/human.d.ts"}
|
||||
2022-09-06 10:28:36 [36mINFO: [39m Analyze models: {"folders":8,"result":"models/models.json"}
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m Models {"folder":"./models","models":13}
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m Models {"folder":"../human-models/models","models":42}
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m Models {"folder":"../blazepose/model/","models":4}
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m Models {"folder":"../anti-spoofing/model","models":1}
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m Models {"folder":"../efficientpose/models","models":3}
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m Models {"folder":"../insightface/models","models":5}
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m Models {"folder":"../movenet/models","models":3}
|
||||
2022-09-06 10:28:36 [35mSTATE:[39m Models {"folder":"../nanodet/models","models":4}
|
||||
2022-09-06 10:28:37 [35mSTATE:[39m Models: {"count":57,"totalSize":383017442}
|
||||
2022-09-06 10:28:37 [36mINFO: [39m Human Build complete... {"logFile":"test/build.log"}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -40,6 +40,7 @@ Defaults: <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L
|
|||
<a href="Config.html#debug" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>debug</span></a>
|
||||
<a href="Config.html#face" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>face</span></a>
|
||||
<a href="Config.html#filter" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>filter</span></a>
|
||||
<a href="Config.html#flags" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>flags</span></a>
|
||||
<a href="Config.html#gesture" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>gesture</span></a>
|
||||
<a href="Config.html#hand" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>hand</span></a>
|
||||
<a href="Config.html#modelBasePath" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>model<wbr/>Base<wbr/>Path</span></a>
|
||||
|
@ -81,7 +82,7 @@ default: <code>webgl</code> for browser and <code>tensorflow</code> for nodejs</
|
|||
<div class="tsd-comment tsd-typography"><p>Body config <a href="BodyConfig.html">BodyConfig</a></p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L310">src/config.ts:310</a></li></ul></aside></section>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L313">src/config.ts:313</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="cacheModels" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>cache<wbr/>Models</span><a href="#cacheModels" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature">cache<wbr/>Models<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
|
||||
|
@ -108,7 +109,7 @@ default: true if indexdb is available (browsers), false if its not (nodejs)</p>
|
|||
<div class="tsd-comment tsd-typography"><p>Perform immediate garbage collection on deallocated tensors instead of caching them</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L295">src/config.ts:295</a></li></ul></aside></section>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L298">src/config.ts:298</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="debug" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>debug</span><a href="#debug" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature">debug<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
|
||||
|
@ -123,28 +124,35 @@ default: true if indexdb is available (browsers), false if its not (nodejs)</p>
|
|||
<div class="tsd-comment tsd-typography"><p>Face config <a href="FaceConfig.html">FaceConfig</a></p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L307">src/config.ts:307</a></li></ul></aside></section>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L310">src/config.ts:310</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="filter" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>filter</span><a href="#filter" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature">filter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="FilterConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">FilterConfig</a><span class="tsd-signature-symbol">></span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>Filter config <a href="FilterConfig.html">FilterConfig</a></p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L301">src/config.ts:301</a></li></ul></aside></section>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L304">src/config.ts:304</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="flags" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>flags</span><a href="#flags" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature">flags<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>Explicit flags passed to initialize TFJS</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L290">src/config.ts:290</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gesture" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>gesture</span><a href="#gesture" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature">gesture<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="GestureConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GestureConfig</a><span class="tsd-signature-symbol">></span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>Gesture config <a href="GestureConfig.html">GestureConfig</a></p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L304">src/config.ts:304</a></li></ul></aside></section>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L307">src/config.ts:307</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="hand" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>hand</span><a href="#hand" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature">hand<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="HandConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">HandConfig</a><span class="tsd-signature-symbol">></span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>Hand config <a href="HandConfig.html">HandConfig</a></p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L313">src/config.ts:313</a></li></ul></aside></section>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L316">src/config.ts:316</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="modelBasePath" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>model<wbr/>Base<wbr/>Path</span><a href="#modelBasePath" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature">model<wbr/>Base<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
|
@ -162,21 +170,21 @@ default: true if indexdb is available (browsers), false if its not (nodejs)</p>
|
|||
<div class="tsd-comment tsd-typography"><p>Object config <a href="ObjectConfig.html">ObjectConfig</a></p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L316">src/config.ts:316</a></li></ul></aside></section>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L319">src/config.ts:319</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="segmentation" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>segmentation</span><a href="#segmentation" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature">segmentation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="SegmentationConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">SegmentationConfig</a><span class="tsd-signature-symbol">></span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>Segmentation config <a href="SegmentationConfig.html">SegmentationConfig</a></p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L319">src/config.ts:319</a></li></ul></aside></section>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L322">src/config.ts:322</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="skipAllowed" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>skip<wbr/>Allowed</span><a href="#skipAllowed" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature">skip<wbr/>Allowed<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
|
||||
<div class="tsd-comment tsd-typography"><p>Internal Variable</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L298">src/config.ts:298</a></li></ul></aside></section>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L301">src/config.ts:301</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="softwareKernels" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>software<wbr/>Kernels</span><a href="#softwareKernels" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature">software<wbr/>Kernels<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
|
||||
|
@ -184,7 +192,7 @@ default: true if indexdb is available (browsers), false if its not (nodejs)</p>
|
|||
Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend</p>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L292">src/config.ts:292</a></li></ul></aside></section>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L295">src/config.ts:295</a></li></ul></aside></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="validateModels" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>validate<wbr/>Models</span><a href="#validateModels" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<div class="tsd-signature">validate<wbr/>Models<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
|
||||
|
@ -257,6 +265,7 @@ any errors will be printed on console but will be treated as non-fatal</p>
|
|||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#debug" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>debug</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#face" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>face</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#filter" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>filter</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#flags" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>flags</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#gesture" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>gesture</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#hand" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>hand</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#modelBasePath" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>model<wbr/>Base<wbr/>Path</a></li>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</ul>
|
||||
</div><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L323">src/config.ts:323</a></li></ul></aside></div>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L326">src/config.ts:326</a></li></ul></aside></div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<div class="tsd-navigation settings">
|
||||
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
||||
|
|
|
@ -212,6 +212,8 @@ export declare interface Config {
|
|||
* default: 0.7
|
||||
*/
|
||||
cacheSensitivity: number;
|
||||
/** Explicit flags passed to initialize TFJS */
|
||||
flags: Record<string, unknown>;
|
||||
/** Software Kernels
|
||||
* Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue