mirror of https://github.com/vladmandic/human
update profiling methods
parent
c425cfe6e0
commit
fd9f8b4e95
|
@ -9,7 +9,7 @@
|
|||
|
||||
## Changelog
|
||||
|
||||
### **HEAD -> main** 2022/07/26 mandic00@live.com
|
||||
### **HEAD -> main** 2022/07/29 mandic00@live.com
|
||||
|
||||
|
||||
### **release: 2.9.1** 2022/07/25 mandic00@live.com
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
<video id="video" playsinline style="display: none"></video>
|
||||
<pre id="status" style="position: absolute; top: 12px; right: 20px; background-color: grey; padding: 8px; box-shadow: 2px 2px black"></pre>
|
||||
<pre id="log" style="padding: 8px"></pre>
|
||||
<div id="performance" style="position: absolute; bottom: 1rem; width: 100%; padding: 8px; font-size: 0.8rem;"></div>
|
||||
<div id="performance" style="position: absolute; bottom: 0; width: 100%; padding: 8px; font-size: 0.8rem;"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
author: <https://github.com/vladmandic>'
|
||||
*/
|
||||
|
||||
import{Human as p}from"../../dist/human.esm.js";var w={async:!0,modelBasePath:"../../models",filter:{enabled:!0,equalization:!1,flip:!1},face:{enabled:!0,detector:{rotation:!1},mesh:{enabled:!0},attention:{enabled:!1},iris:{enabled:!0},description:{enabled:!0},emotion:{enabled:!0}},body:{enabled:!0},hand:{enabled:!0},object:{enabled:!1},gesture:{enabled:!0}},t=new p(w);t.env.perfadd=!1;t.draw.options.font='small-caps 18px "Lato"';t.draw.options.lineHeight=20;var e={video:document.getElementById("video"),canvas:document.getElementById("canvas"),log:document.getElementById("log"),fps:document.getElementById("status"),perf:document.getElementById("performance")},o={detect:0,draw:0,tensors:0},d={detect:0,draw:0},s=(...a)=>{e.log.innerText+=a.join(" ")+`
|
||||
`,console.log(...a)},r=a=>e.fps.innerText=a,b=a=>e.perf.innerText="tensors:"+t.tf.memory().numTensors+" | performance: "+JSON.stringify(a).replace(/"|{|}/g,"").replace(/,/g," | ");async function h(){r("starting webcam...");let a={audio:!1,video:{facingMode:"user",resizeMode:"none",width:{ideal:document.body.clientWidth},height:{ideal:document.body.clientHeight}}},n=await navigator.mediaDevices.getUserMedia(a),m=new Promise(u=>{e.video.onloadeddata=()=>u(!0)});e.video.srcObject=n,e.video.play(),await m,e.canvas.width=e.video.videoWidth,e.canvas.height=e.video.videoHeight;let i=n.getVideoTracks()[0],f=i.getCapabilities?i.getCapabilities():"",v=i.getSettings?i.getSettings():"",g=i.getConstraints?i.getConstraints():"";s("video:",e.video.videoWidth,e.video.videoHeight,i.label,{stream:n,track:i,settings:v,constraints:g,capabilities:f}),e.canvas.onclick=()=>{e.video.paused?e.video.play():e.video.pause()}}async function c(){if(!e.video.paused){await t.detect(e.video);let n=t.tf.memory().numTensors;n-o.tensors!==0&&s("allocated tensors:",n-o.tensors),o.tensors=n}let a=t.now();d.detect=1e3/(a-o.detect),o.detect=a,requestAnimationFrame(c)}async function l(){if(!e.video.paused){let n=await t.next(t.result);t.config.filter.flip?await t.draw.canvas(n.canvas,e.canvas):await t.draw.canvas(e.video,e.canvas),await t.draw.all(e.canvas,n),b(n.performance)}let a=t.now();d.draw=1e3/(a-o.draw),o.draw=a,r(e.video.paused?"paused":`fps: ${d.detect.toFixed(1).padStart(5," ")} detect | ${d.draw.toFixed(1).padStart(5," ")} draw`),setTimeout(l,30)}async function y(){s("human version:",t.version,"| tfjs version:",t.tf.version["tfjs-core"]),s("platform:",t.env.platform,"| agent:",t.env.agent),r("loading..."),await t.load(),s("backend:",t.tf.getBackend(),"| available:",t.env.backends),s("models stats:",t.getModelStats()),s("models loaded:",Object.values(t.models).filter(a=>a!==null).length),r("initializing..."),await t.warmup(),await h(),await c(),await l()}window.onload=y;
|
||||
import{Human as p}from"../../dist/human.esm.js";var w={async:!0,modelBasePath:"../../models",filter:{enabled:!0,equalization:!1,flip:!1},face:{enabled:!0,detector:{rotation:!1},mesh:{enabled:!0},attention:{enabled:!1},iris:{enabled:!0},description:{enabled:!0},emotion:{enabled:!0}},body:{enabled:!0},hand:{enabled:!0},object:{enabled:!1},gesture:{enabled:!0}},e=new p(w);e.env.perfadd=!1;e.draw.options.font='small-caps 18px "Lato"';e.draw.options.lineHeight=20;var t={video:document.getElementById("video"),canvas:document.getElementById("canvas"),log:document.getElementById("log"),fps:document.getElementById("status"),perf:document.getElementById("performance")},n={detect:0,draw:0,tensors:0,start:0},o={detectFPS:0,drawFPS:0,frames:0,averageMs:0},i=(...a)=>{t.log.innerText+=a.join(" ")+`
|
||||
`,console.log(...a)},r=a=>t.fps.innerText=a,b=a=>t.perf.innerText="tensors:"+e.tf.memory().numTensors+" | performance: "+JSON.stringify(a).replace(/"|{|}/g,"").replace(/,/g," | ");async function h(){r("starting webcam...");let a={audio:!1,video:{facingMode:"user",resizeMode:"none",width:{ideal:document.body.clientWidth},height:{ideal:document.body.clientHeight}}},d=await navigator.mediaDevices.getUserMedia(a),m=new Promise(u=>{t.video.onloadeddata=()=>u(!0)});t.video.srcObject=d,t.video.play(),await m,t.canvas.width=t.video.videoWidth,t.canvas.height=t.video.videoHeight;let s=d.getVideoTracks()[0],f=s.getCapabilities?s.getCapabilities():"",v=s.getSettings?s.getSettings():"",g=s.getConstraints?s.getConstraints():"";i("video:",t.video.videoWidth,t.video.videoHeight,s.label,{stream:d,track:s,settings:v,constraints:g,capabilities:f}),t.canvas.onclick=()=>{t.video.paused?t.video.play():t.video.pause()}}async function c(){if(!t.video.paused){n.start===0&&(n.start=e.now()),await e.detect(t.video);let a=e.tf.memory().numTensors;a-n.tensors!==0&&i("allocated tensors:",a-n.tensors),n.tensors=a,o.detectFPS=Math.round(1e3*1e3/(e.now()-n.detect))/1e3,o.frames++,o.averageMs=Math.round(1e3*(e.now()-n.start)/o.frames)/1e3,o.frames%100===0&&!t.video.paused&&i("performance",{...o,tensors:n.tensors})}n.detect=e.now(),requestAnimationFrame(c)}async function l(){if(!t.video.paused){let d=await e.next(e.result);e.config.filter.flip?await e.draw.canvas(d.canvas,t.canvas):await e.draw.canvas(t.video,t.canvas),await e.draw.all(t.canvas,d),b(d.performance)}let a=e.now();o.drawFPS=Math.round(1e3*1e3/(a-n.draw))/1e3,n.draw=a,r(t.video.paused?"paused":`fps: ${o.detectFPS.toFixed(1).padStart(5," ")} detect | ${o.drawFPS.toFixed(1).padStart(5," ")} draw`),setTimeout(l,30)}async function M(){i("human version:",e.version,"| tfjs version:",e.tf.version["tfjs-core"]),i("platform:",e.env.platform,"| agent:",e.env.agent),r("loading..."),await e.load(),i("backend:",e.tf.getBackend(),"| available:",e.env.backends),i("models stats:",e.getModelStats()),i("models loaded:",Object.values(e.models).filter(a=>a!==null).length),r("initializing..."),await e.warmup(),await h(),await c(),await l()}window.onload=M;
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -37,8 +37,8 @@ const dom = { // grab instances of dom objects so we dont have to look them up l
|
|||
fps: document.getElementById('status') as HTMLPreElement,
|
||||
perf: document.getElementById('performance') as HTMLDivElement,
|
||||
};
|
||||
const timestamp = { detect: 0, draw: 0, tensors: 0 }; // holds information used to calculate performance and possible memory leaks
|
||||
const fps = { detect: 0, draw: 0 }; // holds calculated fps information for both detect and screen refresh
|
||||
const timestamp = { detect: 0, draw: 0, tensors: 0, start: 0 }; // holds information used to calculate performance and possible memory leaks
|
||||
const fps = { detectFPS: 0, drawFPS: 0, frames: 0, averageMs: 0 }; // holds calculated fps information for both detect and screen refresh
|
||||
|
||||
const log = (...msg) => { // helper method to output messages
|
||||
dom.log.innerText += msg.join(' ') + '\n';
|
||||
|
@ -72,15 +72,18 @@ async function webCam() { // initialize webcam
|
|||
|
||||
async function detectionLoop() { // main detection loop
|
||||
if (!dom.video.paused) {
|
||||
// console.log('profiling data:', await human.profile(dom.video));
|
||||
if (timestamp.start === 0) timestamp.start = human.now();
|
||||
// log('profiling data:', await human.profile(dom.video));
|
||||
await human.detect(dom.video); // actual detection; were not capturing output in a local variable as it can also be reached via human.result
|
||||
const tensors = human.tf.memory().numTensors; // check current tensor usage for memory leaks
|
||||
if (tensors - timestamp.tensors !== 0) log('allocated tensors:', tensors - timestamp.tensors); // printed on start and each time there is a tensor leak
|
||||
timestamp.tensors = tensors;
|
||||
fps.detectFPS = Math.round(1000 * 1000 / (human.now() - timestamp.detect)) / 1000;
|
||||
fps.frames++;
|
||||
fps.averageMs = Math.round(1000 * (human.now() - timestamp.start) / fps.frames) / 1000;
|
||||
if (fps.frames % 100 === 0 && !dom.video.paused) log('performance', { ...fps, tensors: timestamp.tensors });
|
||||
}
|
||||
const now = human.now();
|
||||
fps.detect = 1000 / (now - timestamp.detect);
|
||||
timestamp.detect = now;
|
||||
timestamp.detect = human.now();
|
||||
requestAnimationFrame(detectionLoop); // start new frame immediately
|
||||
}
|
||||
|
||||
|
@ -93,9 +96,9 @@ async function drawLoop() { // main screen refresh loop
|
|||
perf(interpolated.performance); // write performance data
|
||||
}
|
||||
const now = human.now();
|
||||
fps.draw = 1000 / (now - timestamp.draw);
|
||||
fps.drawFPS = Math.round(1000 * 1000 / (now - timestamp.draw)) / 1000;
|
||||
timestamp.draw = now;
|
||||
status(dom.video.paused ? 'paused' : `fps: ${fps.detect.toFixed(1).padStart(5, ' ')} detect | ${fps.draw.toFixed(1).padStart(5, ' ')} draw`); // write status
|
||||
status(dom.video.paused ? 'paused' : `fps: ${fps.detectFPS.toFixed(1).padStart(5, ' ')} detect | ${fps.drawFPS.toFixed(1).padStart(5, ' ')} draw`); // write status
|
||||
// requestAnimationFrame(drawLoop); // refresh at screen refresh rate
|
||||
setTimeout(drawLoop, 30); // use to slow down refresh from max refresh rate to target of 30 fps
|
||||
}
|
||||
|
|
|
@ -1330,7 +1330,11 @@ declare class Human {
|
|||
* - result object will contain total exeuction time information for top-20 kernels
|
||||
* - actual detection object can be accessed via `human.result`
|
||||
*/
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Record<string, number>>;
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Array<{
|
||||
kernel: string;
|
||||
time: number;
|
||||
perc: number;
|
||||
}>>;
|
||||
/** Main detection method
|
||||
* - Analyze configuration: {@link Config}
|
||||
* - Pre-process input: {@link Input}
|
||||
|
|
|
@ -1330,7 +1330,11 @@ declare class Human {
|
|||
* - result object will contain total exeuction time information for top-20 kernels
|
||||
* - actual detection object can be accessed via `human.result`
|
||||
*/
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Record<string, number>>;
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Array<{
|
||||
kernel: string;
|
||||
time: number;
|
||||
perc: number;
|
||||
}>>;
|
||||
/** Main detection method
|
||||
* - Analyze configuration: {@link Config}
|
||||
* - Pre-process input: {@link Input}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1330,7 +1330,11 @@ declare class Human {
|
|||
* - result object will contain total exeuction time information for top-20 kernels
|
||||
* - actual detection object can be accessed via `human.result`
|
||||
*/
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Record<string, number>>;
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Array<{
|
||||
kernel: string;
|
||||
time: number;
|
||||
perc: number;
|
||||
}>>;
|
||||
/** Main detection method
|
||||
* - Analyze configuration: {@link Config}
|
||||
* - Pre-process input: {@link Input}
|
||||
|
|
|
@ -84034,7 +84034,8 @@ async function register(instance) {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
ENV.set("WEBGL_VERSION", 2);
|
||||
if (env().flagRegistry["WEBGL_VERSION"])
|
||||
env().set("WEBGL_VERSION", 2);
|
||||
} catch (err) {
|
||||
log("error: cannot set WebGL backend flags:", err);
|
||||
return;
|
||||
|
@ -84115,10 +84116,8 @@ async function check(instance, force = false) {
|
|||
if (instance.config.debug)
|
||||
log("setting backend:", instance.config.backend);
|
||||
if (instance.config.backend === "wasm") {
|
||||
try {
|
||||
if (env().flagRegistry["CANVAS2D_WILL_READ_FREQUENTLY"])
|
||||
env().set("CANVAS2D_WILL_READ_FREQUENTLY", true);
|
||||
} catch (e2) {
|
||||
}
|
||||
if (instance.config.debug)
|
||||
log("wasm path:", instance.config.wasmPath);
|
||||
if (typeof (tfjs_esm_exports == null ? void 0 : tfjs_esm_exports.setWasmPaths) !== "undefined")
|
||||
|
@ -84142,13 +84141,21 @@ async function check(instance, force = false) {
|
|||
}
|
||||
}
|
||||
if (getBackend() === "humangl") {
|
||||
ENV.set("CHECK_COMPUTATION_FOR_ERRORS", false);
|
||||
ENV.set("WEBGL_CPU_FORWARD", true);
|
||||
ENV.set("WEBGL_USE_SHAPES_UNIFORMS", true);
|
||||
ENV.set("CPU_HANDOFF_SIZE_THRESHOLD", 256);
|
||||
if (env().flagRegistry["CHECK_COMPUTATION_FOR_ERRORS"])
|
||||
env().set("CHECK_COMPUTATION_FOR_ERRORS", false);
|
||||
if (env().flagRegistry["WEBGL_CPU_FORWARD"])
|
||||
env().set("WEBGL_CPU_FORWARD", true);
|
||||
if (env().flagRegistry["WEBGL_USE_SHAPES_UNIFORMS"])
|
||||
env().set("WEBGL_USE_SHAPES_UNIFORMS", true);
|
||||
if (env().flagRegistry["CPU_HANDOFF_SIZE_THRESHOLD"])
|
||||
env().set("CPU_HANDOFF_SIZE_THRESHOLD", 256);
|
||||
if (env().flagRegistry["WEBGL_EXP_CONV"])
|
||||
env().set("WEBGL_EXP_CONV", true);
|
||||
if (env().flagRegistry["USE_SETTIMEOUTWPM"])
|
||||
env().set("USE_SETTIMEOUTWPM", true);
|
||||
if (typeof instance.config["deallocate"] !== "undefined" && instance.config["deallocate"]) {
|
||||
log("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:", true);
|
||||
ENV.set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0);
|
||||
env().set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0);
|
||||
}
|
||||
if (backend().getGPGPUContext) {
|
||||
const gl = await backend().getGPGPUContext().gl;
|
||||
|
@ -86218,6 +86225,8 @@ async function runInference(instance) {
|
|||
return res;
|
||||
}
|
||||
async function runCompile(allModels) {
|
||||
if (!env().flagRegistry["ENGINE_COMPILE_ONLY"])
|
||||
return;
|
||||
const backendType = getBackend();
|
||||
const webGLBackend = backend();
|
||||
if (backendType !== "webgl" && backendType !== "humangl" || (!webGLBackend || !webGLBackend.checkCompileCompletion)) {
|
||||
|
@ -86446,20 +86455,23 @@ var Human = class {
|
|||
async profile(input2, userConfig) {
|
||||
const profile2 = await this.tf.profile(() => this.detect(input2, userConfig));
|
||||
const kernels = {};
|
||||
let total = 0;
|
||||
for (const kernel of profile2.kernels) {
|
||||
if (kernels[kernel.name])
|
||||
kernels[kernel.name] += kernel.kernelTimeMs;
|
||||
else
|
||||
kernels[kernel.name] = kernel.kernelTimeMs;
|
||||
total += kernel.kernelTimeMs;
|
||||
}
|
||||
const kernelArr = [];
|
||||
Object.entries(kernels).forEach((key) => kernelArr.push({ name: key[0], ms: key[1] }));
|
||||
kernelArr.sort((a, b) => b.ms - a.ms);
|
||||
Object.entries(kernels).forEach((key) => kernelArr.push({ kernel: key[0], time: key[1], perc: 0 }));
|
||||
for (const kernel of kernelArr) {
|
||||
kernel.perc = Math.round(1e3 * kernel.time / total) / 1e3;
|
||||
kernel.time = Math.round(1e3 * kernel.time) / 1e3;
|
||||
}
|
||||
kernelArr.sort((a, b) => b.time - a.time);
|
||||
kernelArr.length = 20;
|
||||
const res = {};
|
||||
for (const kernel of kernelArr)
|
||||
res[kernel.name] = kernel.ms;
|
||||
return res;
|
||||
return kernelArr;
|
||||
}
|
||||
async detect(input2, userConfig) {
|
||||
this.state = "detect";
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1330,7 +1330,11 @@ declare class Human {
|
|||
* - result object will contain total exeuction time information for top-20 kernels
|
||||
* - actual detection object can be accessed via `human.result`
|
||||
*/
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Record<string, number>>;
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Array<{
|
||||
kernel: string;
|
||||
time: number;
|
||||
perc: number;
|
||||
}>>;
|
||||
/** Main detection method
|
||||
* - Analyze configuration: {@link Config}
|
||||
* - Pre-process input: {@link Input}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1330,7 +1330,11 @@ declare class Human {
|
|||
* - result object will contain total exeuction time information for top-20 kernels
|
||||
* - actual detection object can be accessed via `human.result`
|
||||
*/
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Record<string, number>>;
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Array<{
|
||||
kernel: string;
|
||||
time: number;
|
||||
perc: number;
|
||||
}>>;
|
||||
/** Main detection method
|
||||
* - Analyze configuration: {@link Config}
|
||||
* - Pre-process input: {@link Input}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1330,7 +1330,11 @@ declare class Human {
|
|||
* - result object will contain total exeuction time information for top-20 kernels
|
||||
* - actual detection object can be accessed via `human.result`
|
||||
*/
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Record<string, number>>;
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Array<{
|
||||
kernel: string;
|
||||
time: number;
|
||||
perc: number;
|
||||
}>>;
|
||||
/** Main detection method
|
||||
* - Analyze configuration: {@link Config}
|
||||
* - Pre-process input: {@link Input}
|
||||
|
|
File diff suppressed because one or more lines are too long
17
package.json
17
package.json
|
@ -55,11 +55,11 @@
|
|||
],
|
||||
"optionalDependencies": {
|
||||
"canvas": "^2.9.3",
|
||||
"node-fetch": "^3.2.9",
|
||||
"node-fetch": "^3.2.10",
|
||||
"node-webcam": "^0.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "^7.28.6",
|
||||
"@microsoft/api-extractor": "^7.29.0",
|
||||
"@tensorflow/tfjs": "^3.19.0",
|
||||
"@tensorflow/tfjs-backend-cpu": "^3.19.0",
|
||||
"@tensorflow/tfjs-backend-wasm": "^3.19.0",
|
||||
|
@ -72,15 +72,16 @@
|
|||
"@tensorflow/tfjs-node": "^3.19.0",
|
||||
"@tensorflow/tfjs-node-gpu": "^3.19.0",
|
||||
"@tensorflow/tfjs-tflite": "0.0.1-alpha.8",
|
||||
"@types/node": "^18.6.2",
|
||||
"@types/node": "^18.6.3",
|
||||
"@types/offscreencanvas": "^2019.7.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.31.0",
|
||||
"@typescript-eslint/parser": "^5.31.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.32.0",
|
||||
"@typescript-eslint/parser": "^5.32.0",
|
||||
"@vladmandic/build": "^0.7.8",
|
||||
"@vladmandic/pilogger": "^0.4.5",
|
||||
"@vladmandic/tfjs": "github:vladmandic/tfjs",
|
||||
"esbuild": "^0.14.51",
|
||||
"eslint": "8.20.0",
|
||||
"@webgpu/types": "^0.1.21",
|
||||
"esbuild": "^0.14.53",
|
||||
"eslint": "8.21.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-plugin-html": "^7.1.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
|
@ -90,7 +91,7 @@
|
|||
"rimraf": "^3.0.2",
|
||||
"seedrandom": "^3.0.5",
|
||||
"tslib": "^2.4.0",
|
||||
"typedoc": "0.23.9",
|
||||
"typedoc": "0.23.10",
|
||||
"typescript": "4.7.4"
|
||||
}
|
||||
}
|
||||
|
|
18
src/human.ts
18
src/human.ts
|
@ -350,20 +350,24 @@ export class Human {
|
|||
* - result object will contain total exeuction time information for top-20 kernels
|
||||
* - actual detection object can be accessed via `human.result`
|
||||
*/
|
||||
async profile(input: Input, userConfig?: Partial<Config>): Promise<Record<string, number>> {
|
||||
async profile(input: Input, userConfig?: Partial<Config>): Promise<Array<{ kernel: string, time: number, perc: number }>> {
|
||||
const profile = await this.tf.profile(() => this.detect(input, userConfig));
|
||||
const kernels: Record<string, number> = {};
|
||||
let total = 0;
|
||||
for (const kernel of profile.kernels) { // sum kernel time values per kernel
|
||||
if (kernels[kernel.name]) kernels[kernel.name] += kernel.kernelTimeMs;
|
||||
else kernels[kernel.name] = kernel.kernelTimeMs;
|
||||
total += kernel.kernelTimeMs;
|
||||
}
|
||||
const kernelArr: Array<{ name: string, ms: number }> = [];
|
||||
Object.entries(kernels).forEach((key) => kernelArr.push({ name: key[0], ms: key[1] as unknown as number })); // convert to array
|
||||
kernelArr.sort((a, b) => b.ms - a.ms); // sort
|
||||
const kernelArr: Array<{ kernel: string, time: number, perc: number }> = [];
|
||||
Object.entries(kernels).forEach((key) => kernelArr.push({ kernel: key[0], time: key[1] as unknown as number, perc: 0 })); // convert to array
|
||||
for (const kernel of kernelArr) {
|
||||
kernel.perc = Math.round(1000 * kernel.time / total) / 1000;
|
||||
kernel.time = Math.round(1000 * kernel.time) / 1000;
|
||||
}
|
||||
kernelArr.sort((a, b) => b.time - a.time); // sort
|
||||
kernelArr.length = 20; // crop
|
||||
const res: Record<string, number> = {};
|
||||
for (const kernel of kernelArr) res[kernel.name] = kernel.ms; // create perf objects
|
||||
return res;
|
||||
return kernelArr;
|
||||
}
|
||||
|
||||
/** Main detection method
|
||||
|
|
|
@ -86,9 +86,7 @@ export async function check(instance: Human, force = false) {
|
|||
|
||||
// customize wasm
|
||||
if (instance.config.backend === 'wasm') {
|
||||
try {
|
||||
tf.env().set('CANVAS2D_WILL_READ_FREQUENTLY', true);
|
||||
} catch { /**/ }
|
||||
if (tf.env().flagRegistry['CANVAS2D_WILL_READ_FREQUENTLY']) tf.env().set('CANVAS2D_WILL_READ_FREQUENTLY', true);
|
||||
if (instance.config.debug) log('wasm path:', instance.config.wasmPath);
|
||||
if (typeof tf?.setWasmPaths !== 'undefined') await tf.setWasmPaths(instance.config.wasmPath, instance.config.wasmPlatformFetch);
|
||||
else throw new Error('backend error: attempting to use wasm backend but wasm path is not set');
|
||||
|
@ -110,15 +108,17 @@ export async function check(instance: Human, force = false) {
|
|||
|
||||
// customize humangl
|
||||
if (tf.getBackend() === 'humangl') {
|
||||
tf.ENV.set('CHECK_COMPUTATION_FOR_ERRORS', false);
|
||||
tf.ENV.set('WEBGL_CPU_FORWARD', true);
|
||||
// tf.ENV.set('WEBGL_PACK_DEPTHWISECONV', false);
|
||||
tf.ENV.set('WEBGL_USE_SHAPES_UNIFORMS', true);
|
||||
tf.ENV.set('CPU_HANDOFF_SIZE_THRESHOLD', 256);
|
||||
// if (!instance.config.object.enabled) tf.ENV.set('WEBGL_FORCE_F16_TEXTURES', true); // safe to use 16bit precision
|
||||
if (tf.env().flagRegistry['CHECK_COMPUTATION_FOR_ERRORS']) tf.env().set('CHECK_COMPUTATION_FOR_ERRORS', false);
|
||||
if (tf.env().flagRegistry['WEBGL_CPU_FORWARD']) tf.env().set('WEBGL_CPU_FORWARD', true);
|
||||
if (tf.env().flagRegistry['WEBGL_USE_SHAPES_UNIFORMS']) tf.env().set('WEBGL_USE_SHAPES_UNIFORMS', true);
|
||||
if (tf.env().flagRegistry['CPU_HANDOFF_SIZE_THRESHOLD']) tf.env().set('CPU_HANDOFF_SIZE_THRESHOLD', 256);
|
||||
if (tf.env().flagRegistry['WEBGL_EXP_CONV']) tf.env().set('WEBGL_EXP_CONV', true); // <https://github.com/tensorflow/tfjs/issues/6678>
|
||||
if (tf.env().flagRegistry['USE_SETTIMEOUTWPM']) tf.env().set('USE_SETTIMEOUTWPM', true); // <https://github.com/tensorflow/tfjs/issues/6687>
|
||||
// if (tf.env().flagRegistry['WEBGL_PACK_DEPTHWISECONV']) tf.env().set('WEBGL_PACK_DEPTHWISECONV', false);
|
||||
// if (if (tf.env().flagRegistry['WEBGL_FORCE_F16_TEXTURES']) && !instance.config.object.enabled) tf.env().set('WEBGL_FORCE_F16_TEXTURES', true); // safe to use 16bit precision
|
||||
if (typeof instance.config['deallocate'] !== 'undefined' && instance.config['deallocate']) { // hidden param
|
||||
log('changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:', true);
|
||||
tf.ENV.set('WEBGL_DELETE_TEXTURE_THRESHOLD', 0);
|
||||
tf.env().set('WEBGL_DELETE_TEXTURE_THRESHOLD', 0);
|
||||
}
|
||||
if (tf.backend().getGPGPUContext) {
|
||||
const gl = await tf.backend().getGPGPUContext().gl;
|
||||
|
@ -128,9 +128,9 @@ export async function check(instance: Human, force = false) {
|
|||
|
||||
// customize webgpu
|
||||
if (tf.getBackend() === 'webgpu') {
|
||||
// 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);
|
||||
// if (tf.env().flagRegistry['WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD']) tf.env().set('WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD', 512);
|
||||
// if (tf.env().flagRegistry['WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE']) tf.env().set('WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE', 0);
|
||||
// if (tf.env().flagRegistry['WEBGPU_CPU_FORWARD']) tf.env().set('WEBGPU_CPU_FORWARD', true);
|
||||
}
|
||||
|
||||
// wait for ready
|
||||
|
|
|
@ -123,7 +123,7 @@ export async function register(instance: Human): Promise<void> {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
tf.ENV.set('WEBGL_VERSION', 2);
|
||||
if (tf.env().flagRegistry['WEBGL_VERSION']) tf.env().set('WEBGL_VERSION', 2);
|
||||
} catch (err) {
|
||||
log('error: cannot set WebGL backend flags:', err);
|
||||
return;
|
||||
|
|
|
@ -109,6 +109,7 @@ async function runInference(instance: Human) {
|
|||
|
||||
/** Runs pre-compile on all loaded models */
|
||||
export async function runCompile(allModels: Models) {
|
||||
if (!tf.env().flagRegistry['ENGINE_COMPILE_ONLY']) return; // tfjs does not support compile-only inference
|
||||
const backendType = tf.getBackend();
|
||||
const webGLBackend = tf.backend();
|
||||
if ((backendType !== 'webgl' && backendType !== 'humangl') || (!webGLBackend || !webGLBackend.checkCompileCompletion)) {
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
2022-07-29 09:21:22 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.9.1"}
|
||||
2022-07-29 09:21:22 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2022-07-29 09:21:22 [36mINFO: [39m Toolchain: {"build":"0.7.8","esbuild":"0.14.51","typescript":"4.7.4","typedoc":"0.23.9","eslint":"8.20.0"}
|
||||
2022-07-29 09:21:22 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-07-29 09:21:22 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||
2022-07-29 09:21:22 [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":608}
|
||||
2022-07-29 09:21:22 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":74,"inputBytes":647939,"outputBytes":303804}
|
||||
2022-07-29 09:21:22 [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":612}
|
||||
2022-07-29 09:21:22 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":74,"inputBytes":647943,"outputBytes":303808}
|
||||
2022-07-29 09:21:22 [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":664}
|
||||
2022-07-29 09:21:22 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":74,"inputBytes":647995,"outputBytes":303858}
|
||||
2022-07-29 09:21:22 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":358}
|
||||
2022-07-29 09:21:22 [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":1032,"outputBytes":583}
|
||||
2022-07-29 09:21:22 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":74,"inputBytes":647914,"outputBytes":302683}
|
||||
2022-07-29 09:21:22 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":1271,"outputBytes":2787569}
|
||||
2022-07-29 09:21:22 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":74,"inputBytes":3434900,"outputBytes":1665591}
|
||||
2022-07-29 09:21:22 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":74,"inputBytes":3434900,"outputBytes":3066202}
|
||||
2022-07-29 09:21:29 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
||||
2022-07-29 09:21:31 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":76,"generated":true}
|
||||
2022-07-29 09:21:31 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6414,"outputBytes":2878}
|
||||
2022-07-29 09:21:31 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":7604}
|
||||
2022-07-29 09:21:40 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":107,"errors":0,"warnings":0}
|
||||
2022-07-29 09:21:40 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-07-29 09:21:40 [36mINFO: [39m Done...
|
||||
2022-08-04 09:11:15 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.9.1"}
|
||||
2022-08-04 09:11:15 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2022-08-04 09:11:15 [36mINFO: [39m Toolchain: {"build":"0.7.8","esbuild":"0.14.53","typescript":"4.7.4","typedoc":"0.23.10","eslint":"8.21.0"}
|
||||
2022-08-04 09:11:15 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2022-08-04 09:11:15 [35mSTATE:[39m Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
|
||||
2022-08-04 09:11:15 [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":608}
|
||||
2022-08-04 09:11:15 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":74,"inputBytes":649269,"outputBytes":304361}
|
||||
2022-08-04 09:11:15 [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":612}
|
||||
2022-08-04 09:11:15 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":74,"inputBytes":649273,"outputBytes":304365}
|
||||
2022-08-04 09:11:15 [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":664}
|
||||
2022-08-04 09:11:15 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":74,"inputBytes":649325,"outputBytes":304415}
|
||||
2022-08-04 09:11:15 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":358}
|
||||
2022-08-04 09:11:15 [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":1032,"outputBytes":583}
|
||||
2022-08-04 09:11:15 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":74,"inputBytes":649244,"outputBytes":303238}
|
||||
2022-08-04 09:11:15 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":1271,"outputBytes":2787569}
|
||||
2022-08-04 09:11:15 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":74,"inputBytes":3436230,"outputBytes":1666096}
|
||||
2022-08-04 09:11:16 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":74,"inputBytes":3436230,"outputBytes":3066923}
|
||||
2022-08-04 09:11:22 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types/lib","files":30}
|
||||
2022-08-04 09:11:25 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":76,"generated":true}
|
||||
2022-08-04 09:11:25 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6787,"outputBytes":3141}
|
||||
2022-08-04 09:11:25 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":7604}
|
||||
2022-08-04 09:11:35 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":107,"errors":0,"warnings":0}
|
||||
2022-08-04 09:11:35 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2022-08-04 09:11:35 [36mINFO: [39m Done...
|
||||
|
|
1368
test/test.log
1368
test/test.log
File diff suppressed because it is too large
Load Diff
|
@ -561,7 +561,7 @@ Returns similarity between two face descriptors normalized to 0..1 range where 0
|
|||
</div></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/Result.html" class="tsd-signature-type" data-tsd-kind="Interface">Result</a><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/human.ts#L379">src/human.ts:379</a></li></ul></aside></li></ul></section>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/human.ts#L385">src/human.ts:385</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="emit" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>emit</span><a href="#emit" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
|
@ -696,7 +696,7 @@ Interpolation is based on time since last known result so can be called independ
|
|||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="profile" class="tsd-anchor"></a>
|
||||
<h3 class="tsd-anchor-link"><span>profile</span><a href="#profile" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-anchor-link" id="profile.profile-1">profile<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><a href="../types/Input.html" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a>, userConfig<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/Config.html" class="tsd-signature-type" data-tsd-kind="Interface">Config</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><a href="#profile.profile-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-signature tsd-anchor-link" id="profile.profile-1">profile<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><a href="../types/Input.html" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a>, userConfig<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/Config.html" class="tsd-signature-type" data-tsd-kind="Interface">Config</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>kernel<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>perc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>time<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#profile.profile-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
|
||||
<li class="tsd-description">
|
||||
<div class="tsd-comment tsd-typography"><p>Run detect with tensorflow profiling</p>
|
||||
<ul>
|
||||
|
@ -711,7 +711,7 @@ Interpolation is based on time since last known result so can be called independ
|
|||
<h5>input: <a href="../types/Input.html" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a></h5></li>
|
||||
<li>
|
||||
<h5><code class="tsd-tag ts-flagOptional">Optional</code> userConfig: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/Config.html" class="tsd-signature-type" data-tsd-kind="Interface">Config</a><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>kernel<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>perc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>time<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/human.ts#L353">src/human.ts:353</a></li></ul></aside></li></ul></section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="reset" class="tsd-anchor"></a>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="BodyKeypoint.html#distance" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>distance</span></a>
|
||||
<div class="tsd-index-list"><a href="BodyKeypoint.html#distance" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>distance?</span></a>
|
||||
<a href="BodyKeypoint.html#part" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>part</span></a>
|
||||
<a href="BodyKeypoint.html#position" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>position</span></a>
|
||||
<a href="BodyKeypoint.html#positionRaw" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>position<wbr/>Raw</span></a>
|
||||
|
@ -98,7 +98,7 @@
|
|||
<ul>
|
||||
<li class="current tsd-kind-interface"><a href="BodyKeypoint.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Body<wbr/>Keypoint</span></a>
|
||||
<ul>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#distance" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>distance</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#distance" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>distance?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#part" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>part</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#position" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>position</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#positionRaw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>position<wbr/>Raw</a></li>
|
||||
|
|
|
@ -33,26 +33,26 @@
|
|||
<div class="tsd-accordion-details">
|
||||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="FaceResult.html#age" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>age</span></a>
|
||||
<div class="tsd-index-list"><a href="FaceResult.html#age" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>age?</span></a>
|
||||
<a href="FaceResult.html#annotations" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>annotations</span></a>
|
||||
<a href="FaceResult.html#box" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>box</span></a>
|
||||
<a href="FaceResult.html#boxRaw" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>box<wbr/>Raw</span></a>
|
||||
<a href="FaceResult.html#boxScore" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>box<wbr/>Score</span></a>
|
||||
<a href="FaceResult.html#embedding" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>embedding</span></a>
|
||||
<a href="FaceResult.html#emotion" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>emotion</span></a>
|
||||
<a href="FaceResult.html#embedding" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>embedding?</span></a>
|
||||
<a href="FaceResult.html#emotion" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>emotion?</span></a>
|
||||
<a href="FaceResult.html#faceScore" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>face<wbr/>Score</span></a>
|
||||
<a href="FaceResult.html#gender" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>gender</span></a>
|
||||
<a href="FaceResult.html#genderScore" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>gender<wbr/>Score</span></a>
|
||||
<a href="FaceResult.html#gender" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>gender?</span></a>
|
||||
<a href="FaceResult.html#genderScore" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>gender<wbr/>Score?</span></a>
|
||||
<a href="FaceResult.html#id" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>id</span></a>
|
||||
<a href="FaceResult.html#iris" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>iris</span></a>
|
||||
<a href="FaceResult.html#live" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>live</span></a>
|
||||
<a href="FaceResult.html#iris" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>iris?</span></a>
|
||||
<a href="FaceResult.html#live" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>live?</span></a>
|
||||
<a href="FaceResult.html#mesh" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>mesh</span></a>
|
||||
<a href="FaceResult.html#meshRaw" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>mesh<wbr/>Raw</span></a>
|
||||
<a href="FaceResult.html#race" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>race</span></a>
|
||||
<a href="FaceResult.html#real" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>real</span></a>
|
||||
<a href="FaceResult.html#rotation" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>rotation</span></a>
|
||||
<a href="FaceResult.html#race" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>race?</span></a>
|
||||
<a href="FaceResult.html#real" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>real?</span></a>
|
||||
<a href="FaceResult.html#rotation" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>rotation?</span></a>
|
||||
<a href="FaceResult.html#score" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>score</span></a>
|
||||
<a href="FaceResult.html#tensor" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>tensor</span></a>
|
||||
<a href="FaceResult.html#tensor" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>tensor?</span></a>
|
||||
</div></section></div></details></section></section>
|
||||
<section class="tsd-panel-group tsd-member-group">
|
||||
<h2>Properties</h2>
|
||||
|
@ -222,24 +222,24 @@
|
|||
<ul>
|
||||
<li class="current tsd-kind-interface"><a href="FaceResult.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Face<wbr/>Result</span></a>
|
||||
<ul>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#age" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>age</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#age" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>age?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#annotations" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>annotations</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#box" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>box</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#boxRaw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>box<wbr/>Raw</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#boxScore" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>box<wbr/>Score</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#embedding" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>embedding</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#emotion" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>emotion</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#embedding" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>embedding?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#emotion" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>emotion?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#faceScore" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>face<wbr/>Score</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#gender" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>gender</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#genderScore" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>gender<wbr/>Score</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#gender" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>gender?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#genderScore" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>gender<wbr/>Score?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#id" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>id</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#iris" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>iris</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#live" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>live</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#iris" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>iris?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#live" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>live?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#mesh" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>mesh</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#meshRaw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>mesh<wbr/>Raw</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#race" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>race</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#real" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>real</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#rotation" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>rotation</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#race" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>race?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#real" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>real?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#rotation" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>rotation?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#score" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>score</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#tensor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>tensor</a></li></ul></li></ul></nav></div></div>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#tensor" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>tensor?</a></li></ul></li></ul></nav></div></div>
|
||||
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@ -34,7 +34,7 @@
|
|||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="PersonResult.html#body" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>body</span></a>
|
||||
<a href="PersonResult.html#box" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>box</span></a>
|
||||
<a href="PersonResult.html#boxRaw" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>box<wbr/>Raw</span></a>
|
||||
<a href="PersonResult.html#boxRaw" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>box<wbr/>Raw?</span></a>
|
||||
<a href="PersonResult.html#face" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>face</span></a>
|
||||
<a href="PersonResult.html#gestures" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>gestures</span></a>
|
||||
<a href="PersonResult.html#hands" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>hands</span></a>
|
||||
|
@ -126,7 +126,7 @@
|
|||
<ul>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#body" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>body</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#box" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>box</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#boxRaw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>box<wbr/>Raw</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#boxRaw" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>box<wbr/>Raw?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#face" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>face</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#gestures" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>gestures</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#hands" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>hands</a></li>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<section class="tsd-index-section">
|
||||
<h3 class="tsd-index-heading">Properties</h3>
|
||||
<div class="tsd-index-list"><a href="Result.html#body" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>body</span></a>
|
||||
<a href="Result.html#canvas" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>canvas</span></a>
|
||||
<a href="Result.html#canvas" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>canvas?</span></a>
|
||||
<a href="Result.html#error" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>error</span></a>
|
||||
<a href="Result.html#face" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>face</span></a>
|
||||
<a href="Result.html#gesture" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>gesture</span></a>
|
||||
|
@ -140,7 +140,7 @@
|
|||
<li class="current tsd-kind-interface"><a href="Result.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Result</span></a>
|
||||
<ul>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#body" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>body</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#canvas" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>canvas</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#canvas" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>canvas?</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#error" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>error</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#face" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>face</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#gesture" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>gesture</a></li>
|
||||
|
|
|
@ -1330,7 +1330,11 @@ declare class Human {
|
|||
* - result object will contain total exeuction time information for top-20 kernels
|
||||
* - actual detection object can be accessed via `human.result`
|
||||
*/
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Record<string, number>>;
|
||||
profile(input: Input, userConfig?: Partial<Config>): Promise<Array<{
|
||||
kernel: string;
|
||||
time: number;
|
||||
perc: number;
|
||||
}>>;
|
||||
/** Main detection method
|
||||
* - Analyze configuration: {@link Config}
|
||||
* - Pre-process input: {@link Input}
|
||||
|
|
Loading…
Reference in New Issue