mirror of https://github.com/vladmandic/human
parent
3e7bbf2538
commit
93b5dfd3ee
|
@ -11,9 +11,8 @@
|
|||
|
||||
### **HEAD -> main** 2021/10/10 mandic00@live.com
|
||||
|
||||
|
||||
### **origin/main** 2021/10/08 mandic00@live.com
|
||||
|
||||
- image processing fixes
|
||||
- redesign body and hand caching and interpolation
|
||||
- demo default config cleanup
|
||||
- improve gaze and face angle visualizations in draw
|
||||
|
||||
|
|
|
@ -1183,8 +1183,8 @@ function process2(input, config3, getTensor = true) {
|
|||
pixels = tfjs_esm_exports.browser ? tfjs_esm_exports.browser.fromPixels(input) : null;
|
||||
} else {
|
||||
depth = input["data"].length / input["height"] / input["width"];
|
||||
const arr = Uint8Array.from(input["data"]);
|
||||
pixels = tfjs_esm_exports.tensor(arr, [input["height"], input["width"], depth], "float32");
|
||||
const arr = new Uint8Array(input["data"]["buffer"]);
|
||||
pixels = tfjs_esm_exports.tensor(arr, [input["height"], input["width"], depth], "int32");
|
||||
}
|
||||
} else {
|
||||
if (!tmpCanvas || outCanvas.width !== tmpCanvas.width || (outCanvas == null ? void 0 : outCanvas.height) !== (tmpCanvas == null ? void 0 : tmpCanvas.height))
|
||||
|
@ -10700,7 +10700,9 @@ async function check(instance, force = false) {
|
|||
}
|
||||
}
|
||||
if (tfjs_esm_exports.getBackend() === "webgpu") {
|
||||
tfjs_esm_exports.ENV.set("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", 256);
|
||||
tfjs_esm_exports.ENV.set("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", 512);
|
||||
tfjs_esm_exports.ENV.set("WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE", 0);
|
||||
tfjs_esm_exports.ENV.set("WEBGPU_CPU_FORWARD", true);
|
||||
}
|
||||
tfjs_esm_exports.enableProdMode();
|
||||
await tfjs_esm_exports.ready();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -68672,8 +68672,8 @@ function process2(input2, config3, getTensor2 = true) {
|
|||
pixels = browser_exports ? browser_exports.fromPixels(input2) : null;
|
||||
} else {
|
||||
depth = input2["data"].length / input2["height"] / input2["width"];
|
||||
const arr = Uint8Array.from(input2["data"]);
|
||||
pixels = tensor(arr, [input2["height"], input2["width"], depth], "float32");
|
||||
const arr = new Uint8Array(input2["data"]["buffer"]);
|
||||
pixels = tensor(arr, [input2["height"], input2["width"], depth], "int32");
|
||||
}
|
||||
} else {
|
||||
if (!tmpCanvas || outCanvas.width !== tmpCanvas.width || (outCanvas == null ? void 0 : outCanvas.height) !== (tmpCanvas == null ? void 0 : tmpCanvas.height))
|
||||
|
@ -78189,7 +78189,9 @@ async function check(instance, force = false) {
|
|||
}
|
||||
}
|
||||
if (getBackend() === "webgpu") {
|
||||
ENV.set("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", 256);
|
||||
ENV.set("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", 512);
|
||||
ENV.set("WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE", 0);
|
||||
ENV.set("WEBGPU_CPU_FORWARD", true);
|
||||
}
|
||||
enableProdMode();
|
||||
await ready();
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1204,8 +1204,8 @@ function process2(input, config3, getTensor = true) {
|
|||
pixels = tf2.browser ? tf2.browser.fromPixels(input) : null;
|
||||
} else {
|
||||
depth = input["data"].length / input["height"] / input["width"];
|
||||
const arr = Uint8Array.from(input["data"]);
|
||||
pixels = tf2.tensor(arr, [input["height"], input["width"], depth], "float32");
|
||||
const arr = new Uint8Array(input["data"]["buffer"]);
|
||||
pixels = tf2.tensor(arr, [input["height"], input["width"], depth], "int32");
|
||||
}
|
||||
} else {
|
||||
if (!tmpCanvas || outCanvas.width !== tmpCanvas.width || (outCanvas == null ? void 0 : outCanvas.height) !== (tmpCanvas == null ? void 0 : tmpCanvas.height))
|
||||
|
@ -10763,7 +10763,9 @@ async function check(instance, force = false) {
|
|||
}
|
||||
}
|
||||
if (tf23.getBackend() === "webgpu") {
|
||||
tf23.ENV.set("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", 256);
|
||||
tf23.ENV.set("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", 512);
|
||||
tf23.ENV.set("WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE", 0);
|
||||
tf23.ENV.set("WEBGPU_CPU_FORWARD", true);
|
||||
}
|
||||
tf23.enableProdMode();
|
||||
await tf23.ready();
|
||||
|
|
|
@ -1205,8 +1205,8 @@ function process2(input, config3, getTensor = true) {
|
|||
pixels = tf2.browser ? tf2.browser.fromPixels(input) : null;
|
||||
} else {
|
||||
depth = input["data"].length / input["height"] / input["width"];
|
||||
const arr = Uint8Array.from(input["data"]);
|
||||
pixels = tf2.tensor(arr, [input["height"], input["width"], depth], "float32");
|
||||
const arr = new Uint8Array(input["data"]["buffer"]);
|
||||
pixels = tf2.tensor(arr, [input["height"], input["width"], depth], "int32");
|
||||
}
|
||||
} else {
|
||||
if (!tmpCanvas || outCanvas.width !== tmpCanvas.width || (outCanvas == null ? void 0 : outCanvas.height) !== (tmpCanvas == null ? void 0 : tmpCanvas.height))
|
||||
|
@ -10764,7 +10764,9 @@ async function check(instance, force = false) {
|
|||
}
|
||||
}
|
||||
if (tf23.getBackend() === "webgpu") {
|
||||
tf23.ENV.set("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", 256);
|
||||
tf23.ENV.set("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", 512);
|
||||
tf23.ENV.set("WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE", 0);
|
||||
tf23.ENV.set("WEBGPU_CPU_FORWARD", true);
|
||||
}
|
||||
tf23.enableProdMode();
|
||||
await tf23.ready();
|
||||
|
|
|
@ -1204,8 +1204,8 @@ function process2(input, config3, getTensor = true) {
|
|||
pixels = tf2.browser ? tf2.browser.fromPixels(input) : null;
|
||||
} else {
|
||||
depth = input["data"].length / input["height"] / input["width"];
|
||||
const arr = Uint8Array.from(input["data"]);
|
||||
pixels = tf2.tensor(arr, [input["height"], input["width"], depth], "float32");
|
||||
const arr = new Uint8Array(input["data"]["buffer"]);
|
||||
pixels = tf2.tensor(arr, [input["height"], input["width"], depth], "int32");
|
||||
}
|
||||
} else {
|
||||
if (!tmpCanvas || outCanvas.width !== tmpCanvas.width || (outCanvas == null ? void 0 : outCanvas.height) !== (tmpCanvas == null ? void 0 : tmpCanvas.height))
|
||||
|
@ -10763,7 +10763,9 @@ async function check(instance, force = false) {
|
|||
}
|
||||
}
|
||||
if (tf23.getBackend() === "webgpu") {
|
||||
tf23.ENV.set("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", 256);
|
||||
tf23.ENV.set("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", 512);
|
||||
tf23.ENV.set("WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE", 0);
|
||||
tf23.ENV.set("WEBGPU_CPU_FORWARD", true);
|
||||
}
|
||||
tf23.enableProdMode();
|
||||
await tf23.ready();
|
||||
|
|
|
@ -165,9 +165,9 @@ export function process(input: Input, config: Config, getTensor: boolean = true)
|
|||
pixels = tf.browser ? tf.browser.fromPixels(input) : null;
|
||||
} else {
|
||||
depth = input['data'].length / input['height'] / input['width'];
|
||||
const arr = Uint8Array.from(input['data']);
|
||||
// const arr = new Uint8Array(input['data']['buffer']);
|
||||
pixels = tf.tensor(arr, [input['height'], input['width'], depth], 'float32');
|
||||
// const arr = Uint8Array.from(input['data']);
|
||||
const arr = new Uint8Array(input['data']['buffer']);
|
||||
pixels = tf.tensor(arr, [input['height'], input['width'], depth], 'int32');
|
||||
}
|
||||
} else {
|
||||
if (!tmpCanvas || (outCanvas.width !== tmpCanvas.width) || (outCanvas?.height !== tmpCanvas?.height)) tmpCanvas = canvas(outCanvas.width, outCanvas.height); // init output canvas
|
||||
|
|
|
@ -91,7 +91,9 @@ export async function check(instance, force = false) {
|
|||
|
||||
// customize webgpu
|
||||
if (tf.getBackend() === 'webgpu') {
|
||||
tf.ENV.set('WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD', 256);
|
||||
tf.ENV.set('WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD', 512);
|
||||
tf.ENV.set('WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE', 0);
|
||||
tf.ENV.set('WEBGPU_CPU_FORWARD', true);
|
||||
}
|
||||
|
||||
// wait for ready
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
2021-10-10 22:23:11 [36mINFO: [39m @vladmandic/human version 2.3.2
|
||||
2021-10-10 22:23:11 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.10.0
|
||||
2021-10-10 22:23:11 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.3.2"}
|
||||
2021-10-10 22:23:11 [36mINFO: [39m Environment: {"profile":"production","config":"build.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2021-10-10 22:23:11 [36mINFO: [39m Toolchain: {"build":"0.5.3","esbuild":"0.13.4","typescript":"4.4.3","typedoc":"0.22.5","eslint":"7.32.0"}
|
||||
2021-10-10 22:23:11 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2021-10-10 22:23:11 [35mSTATE:[39m Clean: {"locations":["dist/*","types/*","typedoc/*"]}
|
||||
2021-10-10 22:23:11 [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":1275}
|
||||
2021-10-10 22:23:11 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":52,"inputBytes":515699,"outputBytes":427792}
|
||||
2021-10-10 22:23:11 [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":1283}
|
||||
2021-10-10 22:23:11 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":52,"inputBytes":515707,"outputBytes":427796}
|
||||
2021-10-10 22:23:11 [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":1350}
|
||||
2021-10-10 22:23:11 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":52,"inputBytes":515774,"outputBytes":427868}
|
||||
2021-10-10 22:23:11 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1631}
|
||||
2021-10-10 22:23:11 [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":3085,"outputBytes":856}
|
||||
2021-10-10 22:23:11 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":52,"inputBytes":515280,"outputBytes":429377}
|
||||
2021-10-10 22:23:12 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/bundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":8,"inputBytes":3085,"outputBytes":2691961}
|
||||
2021-10-10 22:23:12 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":52,"inputBytes":3206385,"outputBytes":1607409}
|
||||
2021-10-10 22:23:13 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":52,"inputBytes":3206385,"outputBytes":2921305}
|
||||
2021-10-10 22:23:29 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types","files":6}
|
||||
2021-10-10 22:23:34 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":35,"generated":true}
|
||||
2021-10-10 22:24:01 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":86,"errors":0,"warnings":0}
|
||||
2021-10-10 22:24:02 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2021-10-10 22:24:02 [36mINFO: [39m Done...
|
||||
2021-10-11 09:17:21 [36mINFO: [39m @vladmandic/human version 2.3.2
|
||||
2021-10-11 09:17:21 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.10.0
|
||||
2021-10-11 09:17:21 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.3.2"}
|
||||
2021-10-11 09:17:21 [36mINFO: [39m Environment: {"profile":"production","config":"build.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2021-10-11 09:17:21 [36mINFO: [39m Toolchain: {"build":"0.5.3","esbuild":"0.13.4","typescript":"4.4.3","typedoc":"0.22.5","eslint":"7.32.0"}
|
||||
2021-10-11 09:17:21 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2021-10-11 09:17:21 [35mSTATE:[39m Clean: {"locations":["dist/*","types/*","typedoc/*"]}
|
||||
2021-10-11 09:17:21 [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":1275}
|
||||
2021-10-11 09:17:21 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":52,"inputBytes":515801,"outputBytes":427907}
|
||||
2021-10-11 09:17:21 [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":1283}
|
||||
2021-10-11 09:17:21 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":52,"inputBytes":515809,"outputBytes":427911}
|
||||
2021-10-11 09:17:21 [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":1350}
|
||||
2021-10-11 09:17:21 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":52,"inputBytes":515876,"outputBytes":427983}
|
||||
2021-10-11 09:17:21 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1631}
|
||||
2021-10-11 09:17:21 [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":3085,"outputBytes":856}
|
||||
2021-10-11 09:17:21 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":52,"inputBytes":515382,"outputBytes":429516}
|
||||
2021-10-11 09:17:22 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/bundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":8,"inputBytes":3085,"outputBytes":2691961}
|
||||
2021-10-11 09:17:22 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":52,"inputBytes":3206487,"outputBytes":1607493}
|
||||
2021-10-11 09:17:23 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":52,"inputBytes":3206487,"outputBytes":2921410}
|
||||
2021-10-11 09:17:39 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types","files":6}
|
||||
2021-10-11 09:17:44 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":35,"generated":true}
|
||||
2021-10-11 09:18:12 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":86,"errors":0,"warnings":0}
|
||||
2021-10-11 09:18:13 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2021-10-11 09:18:13 [36mINFO: [39m Done...
|
||||
|
|
1204
test/test.log
1204
test/test.log
File diff suppressed because it is too large
Load Diff
|
@ -1 +1 @@
|
|||
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../src/tfjs/backend.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAOpD,wBAAsB,KAAK,CAAC,QAAQ,KAAA,EAAE,KAAK,UAAQ,oBAmGlD;AAGD,wBAAgB,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,KAAA,QAazD"}
|
||||
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../src/tfjs/backend.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAOpD,wBAAsB,KAAK,CAAC,QAAQ,KAAA,EAAE,KAAK,UAAQ,oBAqGlD;AAGD,wBAAgB,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,KAAA,QAazD"}
|
Loading…
Reference in New Issue