initial work on face3d three.js demo

pull/280/head
Vladimir Mandic 2021-03-29 15:59:16 -04:00
parent fd3b67851b
commit b4c4364953
3 changed files with 11 additions and 1 deletions

View File

@ -9,7 +9,12 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
## Changelog
### **HEAD -> main** 2021/03/28 mandic00@live.com
### **HEAD -> main** 2021/03/29 mandic00@live.com
- new icons
- new serve module and demo structure
### **origin/main** 2021/03/28 mandic00@live.com
- minor rotation calculation fix
- remove debug output

View File

@ -86,6 +86,8 @@ export class Human {
nanodet: typeof nanodet;
faceres: typeof faceres;
};
faceTriangulation: typeof facemesh.triangulation;
faceUVMap: typeof facemesh.uvmap;
sysinfo: { platform: string, agent: string };
perf: any;
#numTensors: number;
@ -134,6 +136,8 @@ export class Human {
hand: handpose,
nanodet,
};
this.faceTriangulation = facemesh.triangulation;
this.faceUVMap = facemesh.uvmap;
// include platform info
this.sysinfo = sysinfo.info();
}

View File

@ -16,6 +16,7 @@ let fx = null;
// input is resized and run through imagefx filter
export function process(input, config): { tensor: tf.Tensor, canvas: OffscreenCanvas | HTMLCanvasElement } {
let tensor;
if (!input) throw new Error('Human: Input is missing');
if (input instanceof tf.Tensor) {
tensor = tf.clone(input);
} else {