mirror of https://github.com/vladmandic/human
initial work on face3d three.js demo
parent
07a94fba84
commit
3006266060
|
@ -9,7 +9,12 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
||||||
|
|
||||||
## Changelog
|
## 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
|
- minor rotation calculation fix
|
||||||
- remove debug output
|
- remove debug output
|
||||||
|
|
|
@ -86,6 +86,8 @@ export class Human {
|
||||||
nanodet: typeof nanodet;
|
nanodet: typeof nanodet;
|
||||||
faceres: typeof faceres;
|
faceres: typeof faceres;
|
||||||
};
|
};
|
||||||
|
faceTriangulation: typeof facemesh.triangulation;
|
||||||
|
faceUVMap: typeof facemesh.uvmap;
|
||||||
sysinfo: { platform: string, agent: string };
|
sysinfo: { platform: string, agent: string };
|
||||||
perf: any;
|
perf: any;
|
||||||
#numTensors: number;
|
#numTensors: number;
|
||||||
|
@ -134,6 +136,8 @@ export class Human {
|
||||||
hand: handpose,
|
hand: handpose,
|
||||||
nanodet,
|
nanodet,
|
||||||
};
|
};
|
||||||
|
this.faceTriangulation = facemesh.triangulation;
|
||||||
|
this.faceUVMap = facemesh.uvmap;
|
||||||
// include platform info
|
// include platform info
|
||||||
this.sysinfo = sysinfo.info();
|
this.sysinfo = sysinfo.info();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ let fx = null;
|
||||||
// input is resized and run through imagefx filter
|
// input is resized and run through imagefx filter
|
||||||
export function process(input, config): { tensor: tf.Tensor, canvas: OffscreenCanvas | HTMLCanvasElement } {
|
export function process(input, config): { tensor: tf.Tensor, canvas: OffscreenCanvas | HTMLCanvasElement } {
|
||||||
let tensor;
|
let tensor;
|
||||||
|
if (!input) throw new Error('Human: Input is missing');
|
||||||
if (input instanceof tf.Tensor) {
|
if (input instanceof tf.Tensor) {
|
||||||
tensor = tf.clone(input);
|
tensor = tf.clone(input);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue