rebuild full

pull/193/head
Vladimir Mandic 2021-08-17 18:49:49 -04:00
parent 6058e29b90
commit d015677efa
11 changed files with 45 additions and 42 deletions

View File

@ -11,6 +11,7 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
### **HEAD -> main** 2021/08/17 mandic00@live.com
- improve face box caching
- strict type checks
- add webgu checks
- experimental webgpu support

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/human.esm.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/human.js vendored

File diff suppressed because one or more lines are too long

View File

@ -9723,11 +9723,11 @@ var calculateFaceAngle = (face5, imageSize) => {
thetaY = Math.atan2(r21, r22);
thetaX = 0;
}
if (!isNaN(thetaX))
if (isNaN(thetaX))
thetaX = 0;
if (!isNaN(thetaY))
if (isNaN(thetaY))
thetaY = 0;
if (!isNaN(thetaZ))
if (isNaN(thetaZ))
thetaZ = 0;
return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
};

View File

@ -9724,11 +9724,11 @@ var calculateFaceAngle = (face5, imageSize) => {
thetaY = Math.atan2(r21, r22);
thetaX = 0;
}
if (!isNaN(thetaX))
if (isNaN(thetaX))
thetaX = 0;
if (!isNaN(thetaY))
if (isNaN(thetaY))
thetaY = 0;
if (!isNaN(thetaZ))
if (isNaN(thetaZ))
thetaZ = 0;
return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
};

6
dist/human.node.js vendored
View File

@ -9723,11 +9723,11 @@ var calculateFaceAngle = (face5, imageSize) => {
thetaY = Math.atan2(r21, r22);
thetaX = 0;
}
if (!isNaN(thetaX))
if (isNaN(thetaX))
thetaX = 0;
if (!isNaN(thetaY))
if (isNaN(thetaY))
thetaY = 0;
if (!isNaN(thetaZ))
if (isNaN(thetaZ))
thetaZ = 0;
return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
};

View File

@ -1,22 +1,22 @@
2021-08-17 18:45:39 INFO:  @vladmandic/human version 2.1.3
2021-08-17 18:45:39 INFO:  User: vlado Platform: linux Arch: x64 Node: v16.5.0
2021-08-17 18:45:39 INFO:  Toolchain: {"tfjs":"3.8.0","esbuild":"0.12.20","typescript":"4.3.5","typedoc":"0.21.5","eslint":"7.32.0"}
2021-08-17 18:45:39 INFO:  Clean: ["dist/*","types/*","typedoc/*"]
2021-08-17 18:45:39 INFO:  Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true}
2021-08-17 18:45:39 STATE: target: node type: tfjs: {"imports":1,"importBytes":102,"outputBytes":1303,"outputFiles":"dist/tfjs.esm.js"}
2021-08-17 18:45:39 STATE: target: node type: node: {"imports":42,"importBytes":436873,"outputBytes":379820,"outputFiles":"dist/human.node.js"}
2021-08-17 18:45:39 STATE: target: nodeGPU type: tfjs: {"imports":1,"importBytes":110,"outputBytes":1311,"outputFiles":"dist/tfjs.esm.js"}
2021-08-17 18:45:39 STATE: target: nodeGPU type: node: {"imports":42,"importBytes":436881,"outputBytes":379824,"outputFiles":"dist/human.node-gpu.js"}
2021-08-17 18:45:39 STATE: target: nodeWASM type: tfjs: {"imports":1,"importBytes":149,"outputBytes":1378,"outputFiles":"dist/tfjs.esm.js"}
2021-08-17 18:45:39 STATE: target: nodeWASM type: node: {"imports":42,"importBytes":436948,"outputBytes":379896,"outputFiles":"dist/human.node-wasm.js"}
2021-08-17 18:45:39 STATE: target: browserNoBundle type: tfjs: {"imports":1,"importBytes":2168,"outputBytes":1242,"outputFiles":"dist/tfjs.esm.js"}
2021-08-17 18:45:39 STATE: target: browserNoBundle type: esm: {"imports":42,"importBytes":436812,"outputBytes":249178,"outputFiles":"dist/human.esm-nobundle.js"}
2021-08-17 18:45:40 STATE: target: browserBundle type: tfjs: {"modules":1170,"moduleBytes":4145868,"imports":7,"importBytes":2168,"outputBytes":2334701,"outputFiles":"dist/tfjs.esm.js"}
2021-08-17 18:45:40 STATE: target: browserBundle type: iife: {"imports":42,"importBytes":2770271,"outputBytes":1379546,"outputFiles":"dist/human.js"}
2021-08-17 18:45:41 STATE: target: browserBundle type: esm: {"imports":42,"importBytes":2770271,"outputBytes":1379538,"outputFiles":"dist/human.esm.js"}
2021-08-17 18:45:41 INFO:  Running Linter: ["server/","src/","tfjs/","test/","demo/"]
2021-08-17 18:46:02 INFO:  Linter complete: files: 77 errors: 0 warnings: 0
2021-08-17 18:46:02 INFO:  Generate ChangeLog: ["/home/vlado/dev/human/CHANGELOG.md"]
2021-08-17 18:46:02 INFO:  Generate Typings: ["src/human.ts"] outDir: ["types"]
2021-08-17 18:46:14 INFO:  Generate TypeDocs: ["src/human.ts"] outDir: ["typedoc"]
2021-08-17 18:46:26 INFO:  Documentation generated at /home/vlado/dev/human/typedoc 1
2021-08-17 18:48:58 INFO:  @vladmandic/human version 2.1.3
2021-08-17 18:48:58 INFO:  User: vlado Platform: linux Arch: x64 Node: v16.5.0
2021-08-17 18:48:58 INFO:  Toolchain: {"tfjs":"3.8.0","esbuild":"0.12.20","typescript":"4.3.5","typedoc":"0.21.5","eslint":"7.32.0"}
2021-08-17 18:48:58 INFO:  Clean: ["dist/*","types/*","typedoc/*"]
2021-08-17 18:48:58 INFO:  Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true}
2021-08-17 18:48:58 STATE: target: node type: tfjs: {"imports":1,"importBytes":102,"outputBytes":1303,"outputFiles":"dist/tfjs.esm.js"}
2021-08-17 18:48:58 STATE: target: node type: node: {"imports":42,"importBytes":436902,"outputBytes":379817,"outputFiles":"dist/human.node.js"}
2021-08-17 18:48:58 STATE: target: nodeGPU type: tfjs: {"imports":1,"importBytes":110,"outputBytes":1311,"outputFiles":"dist/tfjs.esm.js"}
2021-08-17 18:48:58 STATE: target: nodeGPU type: node: {"imports":42,"importBytes":436910,"outputBytes":379821,"outputFiles":"dist/human.node-gpu.js"}
2021-08-17 18:48:58 STATE: target: nodeWASM type: tfjs: {"imports":1,"importBytes":149,"outputBytes":1378,"outputFiles":"dist/tfjs.esm.js"}
2021-08-17 18:48:58 STATE: target: nodeWASM type: node: {"imports":42,"importBytes":436977,"outputBytes":379893,"outputFiles":"dist/human.node-wasm.js"}
2021-08-17 18:48:58 STATE: target: browserNoBundle type: tfjs: {"imports":1,"importBytes":2168,"outputBytes":1242,"outputFiles":"dist/tfjs.esm.js"}
2021-08-17 18:48:58 STATE: target: browserNoBundle type: esm: {"imports":42,"importBytes":436841,"outputBytes":249178,"outputFiles":"dist/human.esm-nobundle.js"}
2021-08-17 18:48:59 STATE: target: browserBundle type: tfjs: {"modules":1170,"moduleBytes":4145868,"imports":7,"importBytes":2168,"outputBytes":2334701,"outputFiles":"dist/tfjs.esm.js"}
2021-08-17 18:48:59 STATE: target: browserBundle type: iife: {"imports":42,"importBytes":2770300,"outputBytes":1379546,"outputFiles":"dist/human.js"}
2021-08-17 18:49:00 STATE: target: browserBundle type: esm: {"imports":42,"importBytes":2770300,"outputBytes":1379538,"outputFiles":"dist/human.esm.js"}
2021-08-17 18:49:00 INFO:  Running Linter: ["server/","src/","tfjs/","test/","demo/"]
2021-08-17 18:49:20 INFO:  Linter complete: files: 77 errors: 0 warnings: 0
2021-08-17 18:49:20 INFO:  Generate ChangeLog: ["/home/vlado/dev/human/CHANGELOG.md"]
2021-08-17 18:49:20 INFO:  Generate Typings: ["src/human.ts"] outDir: ["types"]
2021-08-17 18:49:32 INFO:  Generate TypeDocs: ["src/human.ts"] outDir: ["typedoc"]
2021-08-17 18:49:43 INFO:  Documentation generated at /home/vlado/dev/human/typedoc 1

View File

@ -70,7 +70,9 @@ const calculateFaceAngle = (face, imageSize): {
const rotationMatrixToEulerAngle = (r) => {
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
const [r00, r01, r02, r10, r11, r12, r20, r21, r22] = r;
let thetaX; let thetaY; let thetaZ;
let thetaX: number;
let thetaY: number;
let thetaZ: number;
if (r10 < 1) { // YZX calculation
if (r10 > -1) {
thetaZ = Math.asin(r10);
@ -86,9 +88,9 @@ const calculateFaceAngle = (face, imageSize): {
thetaY = Math.atan2(r21, r22);
thetaX = 0;
}
if (!isNaN(thetaX)) thetaX = 0;
if (!isNaN(thetaY)) thetaY = 0;
if (!isNaN(thetaZ)) thetaZ = 0;
if (isNaN(thetaX)) thetaX = 0;
if (isNaN(thetaY)) thetaY = 0;
if (isNaN(thetaZ)) thetaZ = 0;
return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
};
// simple Euler angle calculation based existing 3D mesh