mirror of https://github.com/vladmandic/human
default face.rotation disabled
parent
5156b18f4f
commit
cb3646652e
|
@ -12,6 +12,9 @@
|
|||
### **HEAD -> main** 2022/11/22 mandic00@live.com
|
||||
|
||||
|
||||
### **release: 3.0.1** 2022/11/22 mandic00@live.com
|
||||
|
||||
|
||||
### **3.0.1** 2022/11/22 mandic00@live.com
|
||||
|
||||
- support dynamic loads
|
||||
|
|
|
@ -15,7 +15,7 @@ const humanConfig = { // user configuration for human, used to fine-tune behavio
|
|||
filter: { enabled: true, equalization: false, flip: false },
|
||||
face: {
|
||||
enabled: true,
|
||||
detector: { rotation: true, maxDetected: 100, minConfidence: 0.2, return: true },
|
||||
detector: { rotation: false, maxDetected: 100, minConfidence: 0.2, return: true },
|
||||
iris: { enabled: true },
|
||||
description: { enabled: true },
|
||||
emotion: { enabled: true },
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
author: <https://github.com/vladmandic>'
|
||||
*/
|
||||
|
||||
var st=Object.defineProperty;var Zn=Object.getOwnPropertyDescriptor;var Xn=Object.getOwnPropertyNames;var qn=Object.prototype.hasOwnProperty;var Un=(e,t,n)=>t in e?st(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var oe=(e,t)=>{for(var n in t)st(e,n,{get:t[n],enumerable:!0})},F5=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Xn(t))!qn.call(e,s)&&s!==n&&st(e,s,{get:()=>t[s],enumerable:!(o=Zn(t,s))||o.enumerable});return e},w=(e,t,n)=>(F5(e,t,"default"),n&&F5(n,t,"default"));var E=(e,t,n)=>(Un(e,typeof t!="symbol"?t+"":t,n),n),B5=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var v0=(e,t,n)=>(B5(e,t,"read from private field"),n?n.call(e):t.get(e)),Z0=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Y0=(e,t,n,o)=>(B5(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);var r={};oe(r,{version:()=>Ke});w(r,fA);w(r,mA);w(r,pA);w(r,uA);w(r,hA);w(r,bA);import*as fA from"@tensorflow/tfjs-core/dist/index.js";import*as mA from"@tensorflow/tfjs-converter/dist/index.js";import*as pA from"@tensorflow/tfjs-backend-cpu/dist/index.js";import*as uA from"@tensorflow/tfjs-backend-webgl/dist/index.js";import*as hA from"@tensorflow/tfjs-backend-wasm/dist/index.js";import*as bA from"@tensorflow/tfjs-backend-webgpu/dist/index.js";var H5="4.1.0",Yn="4.1.0",Kn="4.1.0",Jn="4.1.0",Qn="4.1.0",_n="0.0.1-alpha.16",Ke={tfjs:H5,"tfjs-core":H5,"tfjs-converter":Yn,"tfjs-backend-cpu":Kn,"tfjs-backend-webgl":Jn,"tfjs-backend-wasm":Qn,"tfjs-backend-webgpu":_n};function h(...e){let t=new Date,n=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`;e&&console.log(n,"Human:",...e)}function G5(e,t){let n=e.endsWith("/")?"":"/",s=t.startsWith(".")||t.startsWith("/")||t.startsWith("http:")||t.startsWith("https:")||t.startsWith("file:")?`${t}`:`${e}${n}${t}`;if(!s.toLocaleLowerCase().includes(".json"))throw new Error(`modelpath error: expecting json file: ${s}`);return s}var T=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function At(e,t,n="config",o=[]){for(let s of Object.keys(t))if(typeof t[s]=="object")At(e[s],t[s],s,o);else{let A=e&&typeof e[s]!="undefined";A||o.push({reason:"unknown property",where:`${n}.${s} = ${t[s]}`});let a=e&&typeof e[s]==typeof t[s];A&&!a&&o.push({reason:"property type mismatch",where:`${n}.${s} = ${t[s]}`,expected:typeof e[s]})}return t.debug&&n==="config"&&o.length>0&&h("invalid configuration",o),o}function Q(...e){let t=n=>n&&typeof n=="object";return e.reduce((n,o)=>(Object.keys(o||{}).forEach(s=>{let A=n[s],a=o[s];Array.isArray(A)&&Array.isArray(a)?n[s]=A.concat(...a):t(A)&&t(a)?n[s]=Q(A,a):n[s]=a}),n),{})}var Le={backend:"",modelBasePath:"",cacheModels:!0,validateModels:!0,wasmPath:"",wasmPlatformFetch:!1,debug:!1,async:!0,warmup:"full",cacheSensitivity:.7,skipAllowed:!1,deallocate:!1,flags:{},softwareKernels:!1,filter:{enabled:!0,equalization:!1,width:0,height:0,flip:!1,return:!0,autoBrightness:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!0,maxDetected:1,skipFrames:99,skipTime:2500,minConfidence:.2,iouThreshold:.1,mask:!1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json",keepInvalid:!1},attention:{enabled:!1,modelPath:"facemesh-attention.json"},iris:{enabled:!0,modelPath:"iris.json"},emotion:{enabled:!0,minConfidence:.1,skipFrames:99,skipTime:1500,modelPath:"emotion.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:99,skipTime:3e3,minConfidence:.1},antispoof:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"antispoof.json"},liveness:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"liveness.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:-1,minConfidence:.3,skipFrames:1,skipTime:200},hand:{enabled:!0,rotation:!0,skipFrames:99,skipTime:1e3,minConfidence:.5,iouThreshold:.2,maxDetected:-1,landmarks:!0,detector:{modelPath:"handtrack.json"},skeleton:{modelPath:"handlandmark-lite.json"}},object:{enabled:!1,modelPath:"centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:99,skipTime:2e3},segmentation:{enabled:!1,modelPath:"rvm.json",ratio:.5,mode:"default"}};var V5=`
|
||||
var st=Object.defineProperty;var Zn=Object.getOwnPropertyDescriptor;var Xn=Object.getOwnPropertyNames;var qn=Object.prototype.hasOwnProperty;var Un=(e,t,n)=>t in e?st(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var oe=(e,t)=>{for(var n in t)st(e,n,{get:t[n],enumerable:!0})},F5=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Xn(t))!qn.call(e,s)&&s!==n&&st(e,s,{get:()=>t[s],enumerable:!(o=Zn(t,s))||o.enumerable});return e},w=(e,t,n)=>(F5(e,t,"default"),n&&F5(n,t,"default"));var E=(e,t,n)=>(Un(e,typeof t!="symbol"?t+"":t,n),n),B5=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var v0=(e,t,n)=>(B5(e,t,"read from private field"),n?n.call(e):t.get(e)),Z0=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Y0=(e,t,n,o)=>(B5(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);var r={};oe(r,{version:()=>Ke});w(r,fA);w(r,mA);w(r,pA);w(r,uA);w(r,hA);w(r,bA);import*as fA from"@tensorflow/tfjs-core/dist/index.js";import*as mA from"@tensorflow/tfjs-converter/dist/index.js";import*as pA from"@tensorflow/tfjs-backend-cpu/dist/index.js";import*as uA from"@tensorflow/tfjs-backend-webgl/dist/index.js";import*as hA from"@tensorflow/tfjs-backend-wasm/dist/index.js";import*as bA from"@tensorflow/tfjs-backend-webgpu/dist/index.js";var H5="4.1.0",Yn="4.1.0",Kn="4.1.0",Jn="4.1.0",Qn="4.1.0",_n="0.0.1-alpha.16",Ke={tfjs:H5,"tfjs-core":H5,"tfjs-converter":Yn,"tfjs-backend-cpu":Kn,"tfjs-backend-webgl":Jn,"tfjs-backend-wasm":Qn,"tfjs-backend-webgpu":_n};function h(...e){let t=new Date,n=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`;e&&console.log(n,"Human:",...e)}function G5(e,t){let n=e.endsWith("/")?"":"/",s=t.startsWith(".")||t.startsWith("/")||t.startsWith("http:")||t.startsWith("https:")||t.startsWith("file:")?`${t}`:`${e}${n}${t}`;if(!s.toLocaleLowerCase().includes(".json"))throw new Error(`modelpath error: expecting json file: ${s}`);return s}var T=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function At(e,t,n="config",o=[]){for(let s of Object.keys(t))if(typeof t[s]=="object")At(e[s],t[s],s,o);else{let A=e&&typeof e[s]!="undefined";A||o.push({reason:"unknown property",where:`${n}.${s} = ${t[s]}`});let a=e&&typeof e[s]==typeof t[s];A&&!a&&o.push({reason:"property type mismatch",where:`${n}.${s} = ${t[s]}`,expected:typeof e[s]})}return t.debug&&n==="config"&&o.length>0&&h("invalid configuration",o),o}function Q(...e){let t=n=>n&&typeof n=="object";return e.reduce((n,o)=>(Object.keys(o||{}).forEach(s=>{let A=n[s],a=o[s];Array.isArray(A)&&Array.isArray(a)?n[s]=A.concat(...a):t(A)&&t(a)?n[s]=Q(A,a):n[s]=a}),n),{})}var Le={backend:"",modelBasePath:"",cacheModels:!0,validateModels:!0,wasmPath:"",wasmPlatformFetch:!1,debug:!1,async:!0,warmup:"full",cacheSensitivity:.7,skipAllowed:!1,deallocate:!1,flags:{},softwareKernels:!1,filter:{enabled:!0,equalization:!1,width:0,height:0,flip:!1,return:!0,autoBrightness:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!1,maxDetected:1,skipFrames:99,skipTime:2500,minConfidence:.2,iouThreshold:.1,mask:!1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json",keepInvalid:!1},attention:{enabled:!1,modelPath:"facemesh-attention.json"},iris:{enabled:!0,modelPath:"iris.json"},emotion:{enabled:!0,minConfidence:.1,skipFrames:99,skipTime:1500,modelPath:"emotion.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:99,skipTime:3e3,minConfidence:.1},antispoof:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"antispoof.json"},liveness:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"liveness.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:-1,minConfidence:.3,skipFrames:1,skipTime:200},hand:{enabled:!0,rotation:!0,skipFrames:99,skipTime:1e3,minConfidence:.5,iouThreshold:.2,maxDetected:-1,landmarks:!0,detector:{modelPath:"handtrack.json"},skeleton:{modelPath:"handlandmark-lite.json"}},object:{enabled:!1,modelPath:"centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:99,skipTime:2e3},segmentation:{enabled:!1,modelPath:"rvm.json",ratio:.5,mode:"default"}};var V5=`
|
||||
precision highp float;
|
||||
attribute vec2 pos;
|
||||
attribute vec2 uv;
|
||||
|
|
|
@ -30818,7 +30818,7 @@ var config = {
|
|||
enabled: true,
|
||||
detector: {
|
||||
modelPath: "blazeface.json",
|
||||
rotation: true,
|
||||
rotation: false,
|
||||
maxDetected: 1,
|
||||
skipFrames: 99,
|
||||
skipTime: 2500,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7291,7 +7291,7 @@ return a / b;`,GK=`
|
|||
setOutputAtIndex(index, outputValue);
|
||||
}
|
||||
}
|
||||
`}};function Qde(e){let{inputs:t,backend:a,attrs:n}=e,{image:r,transforms:s}=t,{interpolation:i,fillMode:o,fillValue:l,outputShape:u}=n,[p,c,d,h]=r.shape,[f,m]=u!=null?u:[c,d],g=[p,f,m,h],x=new Jde(g),A=i==="nearest"?1:2,y;switch(o){case"constant":y=1;break;case"reflect":y=2;break;case"wrap":y=3;break;case"nearest":y=4;break;default:y=1;break}let b=[{type:"int32",data:[A]},{type:"int32",data:[y]},{type:"float32",data:[l]}];return a.runWebGPUProgram(x,[r,s],"float32",b)}var epe={kernelName:ho,backendName:"webgpu",kernelFunc:Qde};function tpe(e){let{inputs:t,backend:a,attrs:n}=e,{value:r}=t,{axis:s}=n;s<0&&(s+=r.shape.length);let i=r,o=i.shape.length,l=r.shape[s],u=new Array(o-1),p=0;for(let m=0;m<o;m++)m!==s&&(u[p++]=i.shape[m]);let c=[],d=new Array(o).fill(0),h=i.shape.slice();h[s]=1;let f=new Array(l);for(let m=0;m<f.length;m++){d[s]=m;let g=Au({inputs:{x:i},backend:a,attrs:{begin:d,size:h}}),x=Ie({inputs:{x:g},backend:a,attrs:{shape:u}});f[m]=x,c.push(g)}return c.forEach(m=>a.disposeData(m.dataId)),f}var ape={kernelName:au,backendName:"webgpu",kernelFunc:tpe},npe=[Nse,pie,hie,mie,xie,bie,Cie,Eie,Mie,_ie,Fie,Die,Lie,Wie,Uie,Xie,Zie,toe,soe,uoe,poe,moe,Rse,yoe,Coe,$oe,Poe,Ooe,Loe,Woe,Uoe,Hoe,Xoe,Yoe,tle,nle,sle,ole,lle,ule,ple,hle,Sse,mle,vle,xle,yle,Ile,Tle,Nle,Mle,Ple,Ole,zle,Ese,Ble,xoe,Vle,Gle,jle,Xle,Zle,Jle,aue,eue,rue,iue,Hie,lue,due,jie,cue,fue,gue,Aue,Joe,bue,wue,Iue,ioe,Cue,Eue,Mue,_ue,Fue,Due,Lue,Wue,ooe,Vue,Gue,jue,Xue,Tse,Yue,ede,nde,sde,ode,ude,cde,mde,xde,yde,vde,Qie,Wde,Ude,Ide,Tde,Mde,_de,Fde,Ode,zde,wde,Qoe,Hde,qde,Ede,Yde,epe,Iie,ape,Nue];for(let e of npe)mn(e);var tA="4.1.0",rpe="4.1.0",spe="4.1.0",ipe="4.1.0",ope="4.1.0",lpe="0.0.1-alpha.16",xp={tfjs:tA,"tfjs-core":tA,"tfjs-converter":rpe,"tfjs-backend-cpu":spe,"tfjs-backend-webgl":ipe,"tfjs-backend-wasm":ope,"tfjs-backend-webgpu":lpe};function K(...e){let t=new Date,a=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`;e&&console.log(a,"Human:",...e)}function Q8(e,t){let a=e.endsWith("/")?"":"/",r=t.startsWith(".")||t.startsWith("/")||t.startsWith("http:")||t.startsWith("https:")||t.startsWith("file:")?`${t}`:`${e}${a}${t}`;if(!r.toLocaleLowerCase().includes(".json"))throw new Error(`modelpath error: expecting json file: ${r}`);return r}var te=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function U3(e,t,a="config",n=[]){for(let r of Object.keys(t))if(typeof t[r]=="object")U3(e[r],t[r],r,n);else{let s=e&&typeof e[r]!="undefined";s||n.push({reason:"unknown property",where:`${a}.${r} = ${t[r]}`});let i=e&&typeof e[r]==typeof t[r];s&&!i&&n.push({reason:"property type mismatch",where:`${a}.${r} = ${t[r]}`,expected:typeof e[r]})}return t.debug&&a==="config"&&n.length>0&&K("invalid configuration",n),n}function Ct(...e){let t=a=>a&&typeof a=="object";return e.reduce((a,n)=>(Object.keys(n||{}).forEach(r=>{let s=a[r],i=n[r];Array.isArray(s)&&Array.isArray(i)?a[r]=s.concat(...i):t(s)&&t(i)?a[r]=Ct(s,i):a[r]=i}),a),{})}var Io={backend:"",modelBasePath:"",cacheModels:!0,validateModels:!0,wasmPath:"",wasmPlatformFetch:!1,debug:!1,async:!0,warmup:"full",cacheSensitivity:.7,skipAllowed:!1,deallocate:!1,flags:{},softwareKernels:!1,filter:{enabled:!0,equalization:!1,width:0,height:0,flip:!1,return:!0,autoBrightness:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!0,maxDetected:1,skipFrames:99,skipTime:2500,minConfidence:.2,iouThreshold:.1,mask:!1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json",keepInvalid:!1},attention:{enabled:!1,modelPath:"facemesh-attention.json"},iris:{enabled:!0,modelPath:"iris.json"},emotion:{enabled:!0,minConfidence:.1,skipFrames:99,skipTime:1500,modelPath:"emotion.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:99,skipTime:3e3,minConfidence:.1},antispoof:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"antispoof.json"},liveness:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"liveness.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:-1,minConfidence:.3,skipFrames:1,skipTime:200},hand:{enabled:!0,rotation:!0,skipFrames:99,skipTime:1e3,minConfidence:.5,iouThreshold:.2,maxDetected:-1,landmarks:!0,detector:{modelPath:"handtrack.json"},skeleton:{modelPath:"handlandmark-lite.json"}},object:{enabled:!1,modelPath:"centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:99,skipTime:2e3},segmentation:{enabled:!1,modelPath:"rvm.json",ratio:.5,mode:"default"}};var e9=`
|
||||
`}};function Qde(e){let{inputs:t,backend:a,attrs:n}=e,{image:r,transforms:s}=t,{interpolation:i,fillMode:o,fillValue:l,outputShape:u}=n,[p,c,d,h]=r.shape,[f,m]=u!=null?u:[c,d],g=[p,f,m,h],x=new Jde(g),A=i==="nearest"?1:2,y;switch(o){case"constant":y=1;break;case"reflect":y=2;break;case"wrap":y=3;break;case"nearest":y=4;break;default:y=1;break}let b=[{type:"int32",data:[A]},{type:"int32",data:[y]},{type:"float32",data:[l]}];return a.runWebGPUProgram(x,[r,s],"float32",b)}var epe={kernelName:ho,backendName:"webgpu",kernelFunc:Qde};function tpe(e){let{inputs:t,backend:a,attrs:n}=e,{value:r}=t,{axis:s}=n;s<0&&(s+=r.shape.length);let i=r,o=i.shape.length,l=r.shape[s],u=new Array(o-1),p=0;for(let m=0;m<o;m++)m!==s&&(u[p++]=i.shape[m]);let c=[],d=new Array(o).fill(0),h=i.shape.slice();h[s]=1;let f=new Array(l);for(let m=0;m<f.length;m++){d[s]=m;let g=Au({inputs:{x:i},backend:a,attrs:{begin:d,size:h}}),x=Ie({inputs:{x:g},backend:a,attrs:{shape:u}});f[m]=x,c.push(g)}return c.forEach(m=>a.disposeData(m.dataId)),f}var ape={kernelName:au,backendName:"webgpu",kernelFunc:tpe},npe=[Nse,pie,hie,mie,xie,bie,Cie,Eie,Mie,_ie,Fie,Die,Lie,Wie,Uie,Xie,Zie,toe,soe,uoe,poe,moe,Rse,yoe,Coe,$oe,Poe,Ooe,Loe,Woe,Uoe,Hoe,Xoe,Yoe,tle,nle,sle,ole,lle,ule,ple,hle,Sse,mle,vle,xle,yle,Ile,Tle,Nle,Mle,Ple,Ole,zle,Ese,Ble,xoe,Vle,Gle,jle,Xle,Zle,Jle,aue,eue,rue,iue,Hie,lue,due,jie,cue,fue,gue,Aue,Joe,bue,wue,Iue,ioe,Cue,Eue,Mue,_ue,Fue,Due,Lue,Wue,ooe,Vue,Gue,jue,Xue,Tse,Yue,ede,nde,sde,ode,ude,cde,mde,xde,yde,vde,Qie,Wde,Ude,Ide,Tde,Mde,_de,Fde,Ode,zde,wde,Qoe,Hde,qde,Ede,Yde,epe,Iie,ape,Nue];for(let e of npe)mn(e);var tA="4.1.0",rpe="4.1.0",spe="4.1.0",ipe="4.1.0",ope="4.1.0",lpe="0.0.1-alpha.16",xp={tfjs:tA,"tfjs-core":tA,"tfjs-converter":rpe,"tfjs-backend-cpu":spe,"tfjs-backend-webgl":ipe,"tfjs-backend-wasm":ope,"tfjs-backend-webgpu":lpe};function K(...e){let t=new Date,a=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`;e&&console.log(a,"Human:",...e)}function Q8(e,t){let a=e.endsWith("/")?"":"/",r=t.startsWith(".")||t.startsWith("/")||t.startsWith("http:")||t.startsWith("https:")||t.startsWith("file:")?`${t}`:`${e}${a}${t}`;if(!r.toLocaleLowerCase().includes(".json"))throw new Error(`modelpath error: expecting json file: ${r}`);return r}var te=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function U3(e,t,a="config",n=[]){for(let r of Object.keys(t))if(typeof t[r]=="object")U3(e[r],t[r],r,n);else{let s=e&&typeof e[r]!="undefined";s||n.push({reason:"unknown property",where:`${a}.${r} = ${t[r]}`});let i=e&&typeof e[r]==typeof t[r];s&&!i&&n.push({reason:"property type mismatch",where:`${a}.${r} = ${t[r]}`,expected:typeof e[r]})}return t.debug&&a==="config"&&n.length>0&&K("invalid configuration",n),n}function Ct(...e){let t=a=>a&&typeof a=="object";return e.reduce((a,n)=>(Object.keys(n||{}).forEach(r=>{let s=a[r],i=n[r];Array.isArray(s)&&Array.isArray(i)?a[r]=s.concat(...i):t(s)&&t(i)?a[r]=Ct(s,i):a[r]=i}),a),{})}var Io={backend:"",modelBasePath:"",cacheModels:!0,validateModels:!0,wasmPath:"",wasmPlatformFetch:!1,debug:!1,async:!0,warmup:"full",cacheSensitivity:.7,skipAllowed:!1,deallocate:!1,flags:{},softwareKernels:!1,filter:{enabled:!0,equalization:!1,width:0,height:0,flip:!1,return:!0,autoBrightness:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!1,maxDetected:1,skipFrames:99,skipTime:2500,minConfidence:.2,iouThreshold:.1,mask:!1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json",keepInvalid:!1},attention:{enabled:!1,modelPath:"facemesh-attention.json"},iris:{enabled:!0,modelPath:"iris.json"},emotion:{enabled:!0,minConfidence:.1,skipFrames:99,skipTime:1500,modelPath:"emotion.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:99,skipTime:3e3,minConfidence:.1},antispoof:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"antispoof.json"},liveness:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"liveness.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:-1,minConfidence:.3,skipFrames:1,skipTime:200},hand:{enabled:!0,rotation:!0,skipFrames:99,skipTime:1e3,minConfidence:.5,iouThreshold:.2,maxDetected:-1,landmarks:!0,detector:{modelPath:"handtrack.json"},skeleton:{modelPath:"handlandmark-lite.json"}},object:{enabled:!1,modelPath:"centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:99,skipTime:2e3},segmentation:{enabled:!1,modelPath:"rvm.json",ratio:.5,mode:"default"}};var e9=`
|
||||
precision highp float;
|
||||
attribute vec2 pos;
|
||||
attribute vec2 uv;
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -91,7 +91,7 @@
|
|||
"@vladmandic/pilogger": "^0.4.6",
|
||||
"@vladmandic/tfjs": "github:vladmandic/tfjs",
|
||||
"canvas": "^2.10.2",
|
||||
"esbuild": "^0.15.15",
|
||||
"esbuild": "^0.15.16",
|
||||
"eslint": "8.28.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-plugin-html": "^7.1.0",
|
||||
|
|
|
@ -374,7 +374,7 @@ const config: Config = {
|
|||
enabled: true,
|
||||
detector: {
|
||||
modelPath: 'blazeface.json',
|
||||
rotation: true,
|
||||
rotation: false,
|
||||
maxDetected: 1,
|
||||
skipFrames: 99,
|
||||
skipTime: 2500,
|
||||
|
|
100
test/build.log
100
test/build.log
|
@ -1,50 +1,50 @@
|
|||
2022-11-22 10:59:38 [32mDATA: [39m Build {"name":"@vladmandic/human","version":"3.0.1"}
|
||||
2022-11-22 10:59:38 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"3.0.1"}
|
||||
2022-11-22 10:59:38 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2022-11-22 10:59:38 [36mINFO: [39m Toolchain: {"build":"0.7.14","esbuild":"0.15.15","typescript":"4.9.3","typedoc":"0.23.21","eslint":"8.28.0"}
|
||||
2022-11-22 10:59:38 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-11-22 10:59:38 [35mSTATE:[39m Clean: {"locations":["dist/*","types/*","typedoc/*"]}
|
||||
2022-11-22 10:59:38 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1289,"outputBytes":361}
|
||||
2022-11-22 10:59:38 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":569,"outputBytes":924}
|
||||
2022-11-22 10:59:38 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":80,"inputBytes":670542,"outputBytes":317619}
|
||||
2022-11-22 10:59:38 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":577,"outputBytes":928}
|
||||
2022-11-22 10:59:38 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":80,"inputBytes":670546,"outputBytes":317623}
|
||||
2022-11-22 10:59:38 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":665,"outputBytes":1876}
|
||||
2022-11-22 10:59:38 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":80,"inputBytes":671494,"outputBytes":317734}
|
||||
2022-11-22 10:59:38 [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":1375,"outputBytes":670}
|
||||
2022-11-22 10:59:38 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":80,"inputBytes":670288,"outputBytes":316195}
|
||||
2022-11-22 10:59:39 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/bundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":10,"inputBytes":1375,"outputBytes":1138192}
|
||||
2022-11-22 10:59:39 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":80,"inputBytes":1807810,"outputBytes":1450757}
|
||||
2022-11-22 10:59:39 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":80,"inputBytes":1807810,"outputBytes":1894174}
|
||||
2022-11-22 10:59:43 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":15}
|
||||
2022-11-22 10:59:45 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
||||
2022-11-22 10:59:45 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6082,"outputBytes":2872}
|
||||
2022-11-22 10:59:45 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17572,"outputBytes":9456}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Lint: {"locations":["**/*.json","src/**/*.ts","test/**/*.js","demo/**/*.js","**/*.md"],"files":169,"errors":0,"warnings":0}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Copy: {"input":"node_modules/@vladmandic/tfjs/types/tfjs-core.d.ts","output":"types/tfjs-core.d.ts"}
|
||||
2022-11-22 10:59:54 [36mINFO: [39m Done...
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Copy: {"input":"node_modules/@vladmandic/tfjs/types/tfjs.d.ts","output":"types/tfjs.esm.d.ts"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Copy: {"input":"src/types/tsconfig.json","output":"types/tsconfig.json"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Copy: {"input":"src/types/eslint.json","output":"types/.eslintrc.json"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Copy: {"input":"src/types/tfjs.esm.d.ts","output":"dist/tfjs.esm.d.ts"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Filter: {"input":"types/tfjs-core.d.ts"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m API-Extractor: {"succeeeded":true,"errors":0,"warnings":204}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Filter: {"input":"types/human.d.ts"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Write: {"output":"dist/human.esm-nobundle.d.ts"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Write: {"output":"dist/human.esm.d.ts"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Write: {"output":"dist/human.d.ts"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Write: {"output":"dist/human.node-gpu.d.ts"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Write: {"output":"dist/human.node.d.ts"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Write: {"output":"dist/human.node-wasm.d.ts"}
|
||||
2022-11-22 10:59:54 [36mINFO: [39m Analyze models: {"folders":8,"result":"models/models.json"}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Models {"folder":"./models","models":12}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Models {"folder":"../human-models/models","models":41}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Models {"folder":"../blazepose/model/","models":4}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Models {"folder":"../anti-spoofing/model","models":1}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Models {"folder":"../efficientpose/models","models":3}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Models {"folder":"../insightface/models","models":5}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Models {"folder":"../movenet/models","models":3}
|
||||
2022-11-22 10:59:54 [35mSTATE:[39m Models {"folder":"../nanodet/models","models":4}
|
||||
2022-11-22 10:59:55 [35mSTATE:[39m Models: {"count":55,"totalSize":372917743}
|
||||
2022-11-22 10:59:55 [36mINFO: [39m Human Build complete... {"logFile":"test/build.log"}
|
||||
2022-11-28 10:20:43 [32mDATA: [39m Build {"name":"@vladmandic/human","version":"3.0.1"}
|
||||
2022-11-28 10:20:43 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"3.0.1"}
|
||||
2022-11-28 10:20:43 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2022-11-28 10:20:43 [36mINFO: [39m Toolchain: {"build":"0.7.14","esbuild":"0.15.16","typescript":"4.9.3","typedoc":"0.23.21","eslint":"8.28.0"}
|
||||
2022-11-28 10:20:43 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-11-28 10:20:43 [35mSTATE:[39m Clean: {"locations":["dist/*","types/*","typedoc/*"]}
|
||||
2022-11-28 10:20:43 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1289,"outputBytes":361}
|
||||
2022-11-28 10:20:43 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":569,"outputBytes":924}
|
||||
2022-11-28 10:20:43 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":80,"inputBytes":670543,"outputBytes":317619}
|
||||
2022-11-28 10:20:43 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":577,"outputBytes":928}
|
||||
2022-11-28 10:20:43 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":80,"inputBytes":670547,"outputBytes":317623}
|
||||
2022-11-28 10:20:43 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":665,"outputBytes":1876}
|
||||
2022-11-28 10:20:43 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":80,"inputBytes":671495,"outputBytes":317734}
|
||||
2022-11-28 10:20:43 [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":1375,"outputBytes":670}
|
||||
2022-11-28 10:20:43 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":80,"inputBytes":670289,"outputBytes":316195}
|
||||
2022-11-28 10:20:43 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/bundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":10,"inputBytes":1375,"outputBytes":1138192}
|
||||
2022-11-28 10:20:43 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":80,"inputBytes":1807811,"outputBytes":1450757}
|
||||
2022-11-28 10:20:44 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":80,"inputBytes":1807811,"outputBytes":1894175}
|
||||
2022-11-28 10:20:48 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":15}
|
||||
2022-11-28 10:20:50 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":77,"generated":true}
|
||||
2022-11-28 10:20:50 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6082,"outputBytes":2872}
|
||||
2022-11-28 10:20:50 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17572,"outputBytes":9456}
|
||||
2022-11-28 10:20:58 [35mSTATE:[39m Lint: {"locations":["**/*.json","src/**/*.ts","test/**/*.js","demo/**/*.js","**/*.md"],"files":169,"errors":0,"warnings":0}
|
||||
2022-11-28 10:20:59 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-11-28 10:20:59 [35mSTATE:[39m Copy: {"input":"node_modules/@vladmandic/tfjs/types/tfjs-core.d.ts","output":"types/tfjs-core.d.ts"}
|
||||
2022-11-28 10:20:59 [36mINFO: [39m Done...
|
||||
2022-11-28 10:20:59 [35mSTATE:[39m Copy: {"input":"node_modules/@vladmandic/tfjs/types/tfjs.d.ts","output":"types/tfjs.esm.d.ts"}
|
||||
2022-11-28 10:20:59 [35mSTATE:[39m Copy: {"input":"src/types/tsconfig.json","output":"types/tsconfig.json"}
|
||||
2022-11-28 10:20:59 [35mSTATE:[39m Copy: {"input":"src/types/eslint.json","output":"types/.eslintrc.json"}
|
||||
2022-11-28 10:20:59 [35mSTATE:[39m Copy: {"input":"src/types/tfjs.esm.d.ts","output":"dist/tfjs.esm.d.ts"}
|
||||
2022-11-28 10:20:59 [35mSTATE:[39m Filter: {"input":"types/tfjs-core.d.ts"}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m API-Extractor: {"succeeeded":true,"errors":0,"warnings":204}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Filter: {"input":"types/human.d.ts"}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Write: {"output":"dist/human.esm-nobundle.d.ts"}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Write: {"output":"dist/human.esm.d.ts"}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Write: {"output":"dist/human.d.ts"}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Write: {"output":"dist/human.node-gpu.d.ts"}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Write: {"output":"dist/human.node.d.ts"}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Write: {"output":"dist/human.node-wasm.d.ts"}
|
||||
2022-11-28 10:21:00 [36mINFO: [39m Analyze models: {"folders":8,"result":"models/models.json"}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Models {"folder":"./models","models":12}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Models {"folder":"../human-models/models","models":41}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Models {"folder":"../blazepose/model/","models":4}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Models {"folder":"../anti-spoofing/model","models":1}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Models {"folder":"../efficientpose/models","models":3}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Models {"folder":"../insightface/models","models":5}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Models {"folder":"../movenet/models","models":3}
|
||||
2022-11-28 10:21:00 [35mSTATE:[39m Models {"folder":"../nanodet/models","models":4}
|
||||
2022-11-28 10:21:01 [35mSTATE:[39m Models: {"count":55,"totalSize":372917743}
|
||||
2022-11-28 10:21:01 [36mINFO: [39m Human Build complete... {"logFile":"test/build.log"}
|
||||
|
|
Loading…
Reference in New Issue