From ff6e0ef196c8556f65a86ea347eb0541bb1afc93 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 21 Apr 2022 09:38:36 -0400 Subject: [PATCH] update tfjs --- CHANGELOG.md | 5 +- api-extractor.json | 2 +- build.js | 3 +- demo/faceid/index.js | 325 +++++++++++++++++++++++++++++- demo/faceid/index.js.map | 2 +- demo/typescript/index.js | 97 ++++++++- demo/typescript/index.js.map | 4 +- demo/typescript/index.ts | 3 +- package.json | 32 +-- test/build.log | 379 ++++++++++++++++++++++++++++++++--- 10 files changed, 799 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cbb1878..fbe66ece 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,8 @@ ### **HEAD -> main** 2022/04/18 mandic00@live.com - -### **origin/main** 2022/04/15 mandic00@live.com - +- fix coloring function +- enable precompile as part of warmup - prepare release beta - change default face crop - face attention model is available in human-models diff --git a/api-extractor.json b/api-extractor.json index 7d96a995..007617e4 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -1,7 +1,7 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "types/lib/src/human.d.ts", - "bundledPackages": ["@types/offscreencanvas", "@tensorflow/tfjs-core", "@tensorflow/tfjs-converter"], + "bundledPackages": ["@types/offscreencanvas", "@tensorflow/tfjs-core", "@tensorflow/tfjs-converter", "@tensorflow/tfjs-data"], "compiler": { "skipLibCheck": false }, diff --git a/build.js b/build.js index 16bff6d0..c25ac27e 100644 --- a/build.js +++ b/build.js @@ -9,6 +9,7 @@ function copy(src, dst) { fs.writeFileSync(dst, buffer); } +// eslint-disable-next-line @typescript-eslint/no-unused-vars const apiExtractorIgnoreList = [ 'ae-missing-release-tag', 'tsdoc-param-tag-missing-hyphen', @@ -18,7 +19,7 @@ const apiExtractorIgnoreList = [ 'ae-unresolved-link', 'ae-forgotten-export', 'tsdoc-malformed-inline-tag', - 'tsdoc-unnecessary-backslash' + 'tsdoc-unnecessary-backslash', ]; async function main() { diff --git a/demo/faceid/index.js b/demo/faceid/index.js index c29a04e1..9184b9bb 100644 --- a/demo/faceid/index.js +++ b/demo/faceid/index.js @@ -4,8 +4,329 @@ author: ' */ -import{Human as H}from"../../dist/human.esm.js";var d,R="human",m="person",g=(...t)=>console.log("indexdb",...t);async function b(){return d?!0:new Promise(t=>{let i=indexedDB.open(R,1);i.onerror=s=>g("error:",s),i.onupgradeneeded=s=>{g("create:",s.target),d=s.target.result,d.createObjectStore(m,{keyPath:"id",autoIncrement:!0})},i.onsuccess=s=>{d=s.target.result,g("open:",d),t(!0)}})}async function C(){let t=[];return d||await b(),new Promise(i=>{let s=d.transaction([m],"readwrite").objectStore(m).openCursor(null,"next");s.onerror=o=>g("load error:",o),s.onsuccess=o=>{o.target.result?(t.push(o.target.result.value),o.target.result.continue()):i(t)}})}async function k(){return d||await b(),new Promise(t=>{let i=d.transaction([m],"readwrite").objectStore(m).count();i.onerror=s=>g("count error:",s),i.onsuccess=()=>t(i.result)})}async function x(t){d||await b();let i={name:t.name,descriptor:t.descriptor,image:t.image};d.transaction([m],"readwrite").objectStore(m).put(i),g("save:",i)}async function D(t){d||await b(),d.transaction([m],"readwrite").objectStore(m).delete(t.id),g("delete:",t)}var v={modelBasePath:"../../models",filter:{equalization:!0},face:{enabled:!0,detector:{rotation:!0,return:!0,cropFactor:1.6,mask:!1},description:{enabled:!0},mobilefacenet:{enabled:!1,modelPath:"https://vladmandic.github.io/human-models/models/mobilefacenet.json"},iris:{enabled:!0},emotion:{enabled:!1},antispoof:{enabled:!0},liveness:{enabled:!0}},body:{enabled:!1},hand:{enabled:!1},object:{enabled:!1},gesture:{enabled:!0}},I={order:2,multiplier:25,min:.2,max:.8},c={minConfidence:.6,minSize:224,maxTime:1e4,blinkMin:10,blinkMax:800,threshold:.5,mask:v.face.detector.mask,rotation:v.face.detector.rotation,cropFactor:v.face.detector.cropFactor,...I},n={faceCount:!1,faceConfidence:!1,facingCenter:!1,lookingCenter:!1,blinkDetected:!1,faceSize:!1,antispoofCheck:!1,livenessCheck:!1,elapsedMs:0},M=()=>n.faceCount&&n.faceSize&&n.blinkDetected&&n.facingCenter&&n.lookingCenter&&n.faceConfidence&&n.antispoofCheck&&n.livenessCheck,r={face:null,record:null},l={start:0,end:0,time:0},a=new H(v);a.env.perfadd=!1;a.draw.options.font='small-caps 18px "Lato"';a.draw.options.lineHeight=20;var e={video:document.getElementById("video"),canvas:document.getElementById("canvas"),log:document.getElementById("log"),fps:document.getElementById("fps"),match:document.getElementById("match"),name:document.getElementById("name"),save:document.getElementById("save"),delete:document.getElementById("delete"),retry:document.getElementById("retry"),source:document.getElementById("source"),ok:document.getElementById("ok")},h={detect:0,draw:0},y={detect:0,draw:0},E=0,p=(...t)=>{e.log.innerText+=t.join(" ")+` -`,console.log(...t)},w=t=>e.fps.innerText=t;async function S(){w("starting webcam...");let t={audio:!1,video:{facingMode:"user",resizeMode:"none",width:{ideal:document.body.clientWidth}}},i=await navigator.mediaDevices.getUserMedia(t),s=new Promise(o=>{e.video.onloadeddata=()=>o(!0)});e.video.srcObject=i,e.video.play(),await s,e.canvas.width=e.video.videoWidth,e.canvas.height=e.video.videoHeight,a.env.initial&&p("video:",e.video.videoWidth,e.video.videoHeight,"|",i.getVideoTracks()[0].label),e.canvas.onclick=()=>{e.video.paused?e.video.play():e.video.pause()}}async function T(){if(!e.video.paused){r.face&&r.face.tensor&&a.tf.dispose(r.face.tensor),await a.detect(e.video);let t=a.now();y.detect=1e3/(t-h.detect),h.detect=t,requestAnimationFrame(T)}}async function L(){let t=await a.next(a.result);await a.draw.canvas(e.video,e.canvas),await a.draw.all(e.canvas,t);let i=a.now();if(y.draw=1e3/(i-h.draw),h.draw=i,w(`fps: ${y.detect.toFixed(1).padStart(5," ")} detect | ${y.draw.toFixed(1).padStart(5," ")} draw`),n.faceCount=a.result.face.length===1,n.faceCount){let o=Object.values(a.result.gesture).map(f=>f.gesture);(o.includes("blink left eye")||o.includes("blink right eye"))&&(l.start=a.now()),l.start>0&&!o.includes("blink left eye")&&!o.includes("blink right eye")&&(l.end=a.now()),n.blinkDetected=n.blinkDetected||Math.abs(l.end-l.start)>c.blinkMin&&Math.abs(l.end-l.start)c.minConfidence&&(a.result.face[0].faceScore||0)>c.minConfidence&&(a.result.face[0].genderScore||0)>c.minConfidence,n.antispoofCheck=(a.result.face[0].real||0)>c.minConfidence,n.livenessCheck=(a.result.face[0].live||0)>c.minConfidence,n.faceSize=a.result.face[0].box[2]>=c.minSize&&a.result.face[0].box[3]>=c.minSize}let s=32;for(let[o,f]of Object.entries(n)){let u=document.getElementById(`ok-${o}`);u||(u=document.createElement("div"),u.innerText=o,u.className="ok",u.style.top=`${s}px`,e.ok.appendChild(u)),typeof f=="boolean"?u.style.backgroundColor=f?"lightgreen":"lightcoral":u.innerText=`${o}:${f}`,s+=28}return M()||n.elapsedMs>c.maxTime?(e.video.pause(),a.result.face[0]):(n.elapsedMs=Math.trunc(a.now()-E),new Promise(o=>{setTimeout(async()=>{await L()&&o(a.result.face[0])},30)}))}async function P(){var t,i;if(e.name.value.length>0){let s=(t=e.canvas.getContext("2d"))==null?void 0:t.getImageData(0,0,e.canvas.width,e.canvas.height),o={id:0,name:e.name.value,descriptor:(i=r.face)==null?void 0:i.embedding,image:s};await x(o),p("saved face record:",o.name)}else p("invalid name")}async function z(){r.record&&r.record.id>0&&await D(r.record)}async function j(){var o,f;if((o=e.canvas.getContext("2d"))==null||o.clearRect(0,0,c.minSize,c.minSize),!r.face||!r.face.tensor||!r.face.embedding)return!1;if(console.log("face record:",r.face),a.tf.browser.toPixels(r.face.tensor,e.canvas),await k()===0)return p("face database is empty"),document.body.style.background="black",e.delete.style.display="none",!1;let t=await C(),i=t.map(u=>u.descriptor),s=await a.match(r.face.embedding,i,I);return r.record=t[s.index]||null,r.record&&(p(`best match: ${r.record.name} | id: ${r.record.id} | similarity: ${Math.round(1e3*s.similarity)/10}%`),e.name.value=r.record.name,e.source.style.display="",(f=e.source.getContext("2d"))==null||f.putImageData(r.record.image,0,0)),document.body.style.background=s.similarity>c.threshold?"darkgreen":"maroon",s.similarity>c.threshold}async function B(){var t,i,s,o;return n.faceCount=!1,n.faceConfidence=!1,n.facingCenter=!1,n.blinkDetected=!1,n.faceSize=!1,n.antispoofCheck=!1,n.livenessCheck=!1,n.elapsedMs=0,e.match.style.display="none",e.retry.style.display="none",e.source.style.display="none",document.body.style.background="black",await S(),await T(),E=a.now(),r.face=await L(),e.canvas.width=((i=(t=r.face)==null?void 0:t.tensor)==null?void 0:i.shape[1])||c.minSize,e.canvas.height=((o=(s=r.face)==null?void 0:s.tensor)==null?void 0:o.shape[0])||c.minSize,e.source.width=e.canvas.width,e.source.height=e.canvas.height,e.canvas.style.width="",e.match.style.display="flex",e.save.style.display="flex",e.delete.style.display="flex",e.retry.style.display="block",M()?j():(p("did not find valid face"),!1)}async function q(){p("human version:",a.version,"| tfjs version:",a.tf.version["tfjs-core"]),p("options:",JSON.stringify(c).replace(/{|}|"|\[|\]/g,"").replace(/,/g," ")),w("loading..."),p("known face records:",await k()),await S(),await a.load(),w("initializing..."),e.retry.addEventListener("click",B),e.save.addEventListener("click",P),e.delete.addEventListener("click",z),await a.warmup(),await B()}window.onload=q; +// demo/faceid/index.ts +import { Human } from "../../dist/human.esm.js"; + +// demo/faceid/indexdb.ts +var db; +var database = "human"; +var table = "person"; +var log = (...msg) => console.log("indexdb", ...msg); +async function open() { + if (db) + return true; + return new Promise((resolve) => { + const request = indexedDB.open(database, 1); + request.onerror = (evt) => log("error:", evt); + request.onupgradeneeded = (evt) => { + log("create:", evt.target); + db = evt.target.result; + db.createObjectStore(table, { keyPath: "id", autoIncrement: true }); + }; + request.onsuccess = (evt) => { + db = evt.target.result; + log("open:", db); + resolve(true); + }; + }); +} +async function load() { + const faceDB = []; + if (!db) + await open(); + return new Promise((resolve) => { + const cursor = db.transaction([table], "readwrite").objectStore(table).openCursor(null, "next"); + cursor.onerror = (evt) => log("load error:", evt); + cursor.onsuccess = (evt) => { + if (evt.target.result) { + faceDB.push(evt.target.result.value); + evt.target.result.continue(); + } else { + resolve(faceDB); + } + }; + }); +} +async function count() { + if (!db) + await open(); + return new Promise((resolve) => { + const store = db.transaction([table], "readwrite").objectStore(table).count(); + store.onerror = (evt) => log("count error:", evt); + store.onsuccess = () => resolve(store.result); + }); +} +async function save(faceRecord) { + if (!db) + await open(); + const newRecord = { name: faceRecord.name, descriptor: faceRecord.descriptor, image: faceRecord.image }; + db.transaction([table], "readwrite").objectStore(table).put(newRecord); + log("save:", newRecord); +} +async function remove(faceRecord) { + if (!db) + await open(); + db.transaction([table], "readwrite").objectStore(table).delete(faceRecord.id); + log("delete:", faceRecord); +} + +// demo/faceid/index.ts +var humanConfig = { + modelBasePath: "../../models", + filter: { equalization: true }, + face: { + enabled: true, + detector: { rotation: true, return: true, cropFactor: 1.6, mask: false }, + description: { enabled: true }, + mobilefacenet: { enabled: false, modelPath: "https://vladmandic.github.io/human-models/models/mobilefacenet.json" }, + iris: { enabled: true }, + emotion: { enabled: false }, + antispoof: { enabled: true }, + liveness: { enabled: true } + }, + body: { enabled: false }, + hand: { enabled: false }, + object: { enabled: false }, + gesture: { enabled: true } +}; +var matchOptions = { order: 2, multiplier: 25, min: 0.2, max: 0.8 }; +var options = { + minConfidence: 0.6, + minSize: 224, + maxTime: 1e4, + blinkMin: 10, + blinkMax: 800, + threshold: 0.5, + mask: humanConfig.face.detector.mask, + rotation: humanConfig.face.detector.rotation, + cropFactor: humanConfig.face.detector.cropFactor, + ...matchOptions +}; +var ok = { + faceCount: false, + faceConfidence: false, + facingCenter: false, + lookingCenter: false, + blinkDetected: false, + faceSize: false, + antispoofCheck: false, + livenessCheck: false, + elapsedMs: 0 +}; +var allOk = () => ok.faceCount && ok.faceSize && ok.blinkDetected && ok.facingCenter && ok.lookingCenter && ok.faceConfidence && ok.antispoofCheck && ok.livenessCheck; +var current = { face: null, record: null }; +var blink = { + start: 0, + end: 0, + time: 0 +}; +var human = new Human(humanConfig); +human.env["perfadd"] = false; +human.draw.options.font = 'small-caps 18px "Lato"'; +human.draw.options.lineHeight = 20; +var dom = { + video: document.getElementById("video"), + canvas: document.getElementById("canvas"), + log: document.getElementById("log"), + fps: document.getElementById("fps"), + match: document.getElementById("match"), + name: document.getElementById("name"), + save: document.getElementById("save"), + delete: document.getElementById("delete"), + retry: document.getElementById("retry"), + source: document.getElementById("source"), + ok: document.getElementById("ok") +}; +var timestamp = { detect: 0, draw: 0 }; +var fps = { detect: 0, draw: 0 }; +var startTime = 0; +var log2 = (...msg) => { + dom.log.innerText += msg.join(" ") + "\n"; + console.log(...msg); +}; +var printFPS = (msg) => dom.fps.innerText = msg; +async function webCam() { + printFPS("starting webcam..."); + const cameraOptions = { audio: false, video: { facingMode: "user", resizeMode: "none", width: { ideal: document.body.clientWidth } } }; + const stream = await navigator.mediaDevices.getUserMedia(cameraOptions); + const ready = new Promise((resolve) => { + dom.video.onloadeddata = () => resolve(true); + }); + dom.video.srcObject = stream; + dom.video.play(); + await ready; + dom.canvas.width = dom.video.videoWidth; + dom.canvas.height = dom.video.videoHeight; + if (human.env.initial) + log2("video:", dom.video.videoWidth, dom.video.videoHeight, "|", stream.getVideoTracks()[0].label); + dom.canvas.onclick = () => { + if (dom.video.paused) + dom.video.play(); + else + dom.video.pause(); + }; +} +async function detectionLoop() { + if (!dom.video.paused) { + if (current.face && current.face.tensor) + human.tf.dispose(current.face.tensor); + await human.detect(dom.video); + const now = human.now(); + fps.detect = 1e3 / (now - timestamp.detect); + timestamp.detect = now; + requestAnimationFrame(detectionLoop); + } +} +async function validationLoop() { + const interpolated = await human.next(human.result); + await human.draw.canvas(dom.video, dom.canvas); + await human.draw.all(dom.canvas, interpolated); + const now = human.now(); + fps.draw = 1e3 / (now - timestamp.draw); + timestamp.draw = now; + printFPS(`fps: ${fps.detect.toFixed(1).padStart(5, " ")} detect | ${fps.draw.toFixed(1).padStart(5, " ")} draw`); + ok.faceCount = human.result.face.length === 1; + if (ok.faceCount) { + const gestures = Object.values(human.result.gesture).map((gesture) => gesture.gesture); + if (gestures.includes("blink left eye") || gestures.includes("blink right eye")) + blink.start = human.now(); + if (blink.start > 0 && !gestures.includes("blink left eye") && !gestures.includes("blink right eye")) + blink.end = human.now(); + ok.blinkDetected = ok.blinkDetected || Math.abs(blink.end - blink.start) > options.blinkMin && Math.abs(blink.end - blink.start) < options.blinkMax; + if (ok.blinkDetected && blink.time === 0) + blink.time = Math.trunc(blink.end - blink.start); + ok.facingCenter = gestures.includes("facing center"); + ok.lookingCenter = gestures.includes("looking center"); + ok.faceConfidence = (human.result.face[0].boxScore || 0) > options.minConfidence && (human.result.face[0].faceScore || 0) > options.minConfidence && (human.result.face[0].genderScore || 0) > options.minConfidence; + ok.antispoofCheck = (human.result.face[0].real || 0) > options.minConfidence; + ok.livenessCheck = (human.result.face[0].live || 0) > options.minConfidence; + ok.faceSize = human.result.face[0].box[2] >= options.minSize && human.result.face[0].box[3] >= options.minSize; + } + let y = 32; + for (const [key, val] of Object.entries(ok)) { + let el = document.getElementById(`ok-${key}`); + if (!el) { + el = document.createElement("div"); + el.innerText = key; + el.className = "ok"; + el.style.top = `${y}px`; + dom.ok.appendChild(el); + } + if (typeof val === "boolean") + el.style.backgroundColor = val ? "lightgreen" : "lightcoral"; + else + el.innerText = `${key}:${val}`; + y += 28; + } + if (allOk()) { + dom.video.pause(); + return human.result.face[0]; + } + if (ok.elapsedMs > options.maxTime) { + dom.video.pause(); + return human.result.face[0]; + } else { + ok.elapsedMs = Math.trunc(human.now() - startTime); + return new Promise((resolve) => { + setTimeout(async () => { + const res = await validationLoop(); + if (res) + resolve(human.result.face[0]); + }, 30); + }); + } +} +async function saveRecords() { + var _a, _b; + if (dom.name.value.length > 0) { + const image = (_a = dom.canvas.getContext("2d")) == null ? void 0 : _a.getImageData(0, 0, dom.canvas.width, dom.canvas.height); + const rec = { id: 0, name: dom.name.value, descriptor: (_b = current.face) == null ? void 0 : _b.embedding, image }; + await save(rec); + log2("saved face record:", rec.name); + } else { + log2("invalid name"); + } +} +async function deleteRecord() { + if (current.record && current.record.id > 0) { + await remove(current.record); + } +} +async function detectFace() { + var _a, _b; + (_a = dom.canvas.getContext("2d")) == null ? void 0 : _a.clearRect(0, 0, options.minSize, options.minSize); + if (!current.face || !current.face.tensor || !current.face.embedding) + return false; + console.log("face record:", current.face); + human.tf.browser.toPixels(current.face.tensor, dom.canvas); + if (await count() === 0) { + log2("face database is empty"); + document.body.style.background = "black"; + dom.delete.style.display = "none"; + return false; + } + const db2 = await load(); + const descriptors = db2.map((rec) => rec.descriptor); + const res = await human.match(current.face.embedding, descriptors, matchOptions); + current.record = db2[res.index] || null; + if (current.record) { + log2(`best match: ${current.record.name} | id: ${current.record.id} | similarity: ${Math.round(1e3 * res.similarity) / 10}%`); + dom.name.value = current.record.name; + dom.source.style.display = ""; + (_b = dom.source.getContext("2d")) == null ? void 0 : _b.putImageData(current.record.image, 0, 0); + } + document.body.style.background = res.similarity > options.threshold ? "darkgreen" : "maroon"; + return res.similarity > options.threshold; +} +async function main() { + var _a, _b, _c, _d; + ok.faceCount = false; + ok.faceConfidence = false; + ok.facingCenter = false; + ok.blinkDetected = false; + ok.faceSize = false; + ok.antispoofCheck = false; + ok.livenessCheck = false; + ok.elapsedMs = 0; + dom.match.style.display = "none"; + dom.retry.style.display = "none"; + dom.source.style.display = "none"; + document.body.style.background = "black"; + await webCam(); + await detectionLoop(); + startTime = human.now(); + current.face = await validationLoop(); + dom.canvas.width = ((_b = (_a = current.face) == null ? void 0 : _a.tensor) == null ? void 0 : _b.shape[1]) || options.minSize; + dom.canvas.height = ((_d = (_c = current.face) == null ? void 0 : _c.tensor) == null ? void 0 : _d.shape[0]) || options.minSize; + dom.source.width = dom.canvas.width; + dom.source.height = dom.canvas.height; + dom.canvas.style.width = ""; + dom.match.style.display = "flex"; + dom.save.style.display = "flex"; + dom.delete.style.display = "flex"; + dom.retry.style.display = "block"; + if (!allOk()) { + log2("did not find valid face"); + return false; + } else { + return detectFace(); + } +} +async function init() { + log2("human version:", human.version, "| tfjs version:", human.tf.version["tfjs-core"]); + log2("options:", JSON.stringify(options).replace(/{|}|"|\[|\]/g, "").replace(/,/g, " ")); + printFPS("loading..."); + log2("known face records:", await count()); + await webCam(); + await human.load(); + printFPS("initializing..."); + dom.retry.addEventListener("click", main); + dom.save.addEventListener("click", saveRecords); + dom.delete.addEventListener("click", deleteRecord); + await human.warmup(); + await main(); +} +window.onload = init; /** * Human demo for browsers * @default Human Library diff --git a/demo/faceid/index.js.map b/demo/faceid/index.js.map index de684c96..76145ea1 100644 --- a/demo/faceid/index.js.map +++ b/demo/faceid/index.js.map @@ -2,6 +2,6 @@ "version": 3, "sources": ["index.ts", "indexdb.ts"], "sourcesContent": ["/**\n * Human demo for browsers\n * @default Human Library\n * @summary \n * @author \n * @copyright \n * @license MIT\n */\n\nimport { Human, TensorLike, FaceResult } from '../../dist/human.esm.js'; // equivalent of @vladmandic/Human\nimport * as indexDb from './indexdb'; // methods to deal with indexdb\n\nconst humanConfig = { // user configuration for human, used to fine-tune behavior\n modelBasePath: '../../models',\n filter: { equalization: true }, // lets run with histogram equilizer\n face: {\n enabled: true,\n detector: { rotation: true, return: true, cropFactor: 1.6, mask: false }, // return tensor is used to get detected face image\n description: { enabled: true }, // default model for face descriptor extraction is faceres\n mobilefacenet: { enabled: false, modelPath: 'https://vladmandic.github.io/human-models/models/mobilefacenet.json' }, // alternative model\n iris: { enabled: true }, // needed to determine gaze direction\n emotion: { enabled: false }, // not needed\n antispoof: { enabled: true }, // enable optional antispoof module\n liveness: { enabled: true }, // enable optional liveness module\n },\n body: { enabled: false },\n hand: { enabled: false },\n object: { enabled: false },\n gesture: { enabled: true }, // parses face and iris gestures\n};\n\n// const matchOptions = { order: 2, multiplier: 1000, min: 0.0, max: 1.0 }; // for embedding model\nconst matchOptions = { order: 2, multiplier: 25, min: 0.2, max: 0.8 }; // for faceres model\n\nconst options = {\n minConfidence: 0.6, // overal face confidence for box, face, gender, real, live\n minSize: 224, // min input to face descriptor model before degradation\n maxTime: 10000, // max time before giving up\n blinkMin: 10, // minimum duration of a valid blink\n blinkMax: 800, // maximum duration of a valid blink\n threshold: 0.5, // minimum similarity\n mask: humanConfig.face.detector.mask,\n rotation: humanConfig.face.detector.rotation,\n cropFactor: humanConfig.face.detector.cropFactor,\n ...matchOptions,\n};\n\nconst ok = { // must meet all rules\n faceCount: false,\n faceConfidence: false,\n facingCenter: false,\n lookingCenter: false,\n blinkDetected: false,\n faceSize: false,\n antispoofCheck: false,\n livenessCheck: false,\n elapsedMs: 0, // total time while waiting for valid face\n};\nconst allOk = () => ok.faceCount && ok.faceSize && ok.blinkDetected && ok.facingCenter && ok.lookingCenter && ok.faceConfidence && ok.antispoofCheck && ok.livenessCheck;\nconst current: { face: FaceResult | null, record: indexDb.FaceRecord | null } = { face: null, record: null }; // current face record and matched database record\n\nconst blink = { // internal timers for blink start/end/duration\n start: 0,\n end: 0,\n time: 0,\n};\n\n// let db: Array<{ name: string, source: string, embedding: number[] }> = []; // holds loaded face descriptor database\nconst human = new Human(humanConfig); // create instance of human with overrides from user configuration\n\nhuman.env['perfadd'] = false; // is performance data showing instant or total values\nhuman.draw.options.font = 'small-caps 18px \"Lato\"'; // set font used to draw labels when using draw methods\nhuman.draw.options.lineHeight = 20;\n\nconst dom = { // grab instances of dom objects so we dont have to look them up later\n video: document.getElementById('video') as HTMLVideoElement,\n canvas: document.getElementById('canvas') as HTMLCanvasElement,\n log: document.getElementById('log') as HTMLPreElement,\n fps: document.getElementById('fps') as HTMLPreElement,\n match: document.getElementById('match') as HTMLDivElement,\n name: document.getElementById('name') as HTMLInputElement,\n save: document.getElementById('save') as HTMLSpanElement,\n delete: document.getElementById('delete') as HTMLSpanElement,\n retry: document.getElementById('retry') as HTMLDivElement,\n source: document.getElementById('source') as HTMLCanvasElement,\n ok: document.getElementById('ok') as HTMLDivElement,\n};\nconst timestamp = { detect: 0, draw: 0 }; // holds information used to calculate performance and possible memory leaks\nconst fps = { detect: 0, draw: 0 }; // holds calculated fps information for both detect and screen refresh\nlet startTime = 0;\n\nconst log = (...msg) => { // helper method to output messages\n dom.log.innerText += msg.join(' ') + '\\n';\n // eslint-disable-next-line no-console\n console.log(...msg);\n};\nconst printFPS = (msg) => dom.fps.innerText = msg; // print status element\n\nasync function webCam() { // initialize webcam\n printFPS('starting webcam...');\n // @ts-ignore resizeMode is not yet defined in tslib\n const cameraOptions: MediaStreamConstraints = { audio: false, video: { facingMode: 'user', resizeMode: 'none', width: { ideal: document.body.clientWidth } } };\n const stream: MediaStream = await navigator.mediaDevices.getUserMedia(cameraOptions);\n const ready = new Promise((resolve) => { dom.video.onloadeddata = () => resolve(true); });\n dom.video.srcObject = stream;\n dom.video.play();\n await ready;\n dom.canvas.width = dom.video.videoWidth;\n dom.canvas.height = dom.video.videoHeight;\n if (human.env.initial) log('video:', dom.video.videoWidth, dom.video.videoHeight, '|', stream.getVideoTracks()[0].label);\n dom.canvas.onclick = () => { // pause when clicked on screen and resume on next click\n if (dom.video.paused) dom.video.play();\n else dom.video.pause();\n };\n}\n\nasync function detectionLoop() { // main detection loop\n if (!dom.video.paused) {\n if (current.face && current.face.tensor) human.tf.dispose(current.face.tensor); // dispose previous tensor\n await human.detect(dom.video); // actual detection; were not capturing output in a local variable as it can also be reached via human.result\n const now = human.now();\n fps.detect = 1000 / (now - timestamp.detect);\n timestamp.detect = now;\n requestAnimationFrame(detectionLoop); // start new frame immediately\n }\n}\n\nasync function validationLoop(): Promise { // main screen refresh loop\n const interpolated = await human.next(human.result); // smoothen result using last-known results\n await human.draw.canvas(dom.video, dom.canvas); // draw canvas to screen\n await human.draw.all(dom.canvas, interpolated); // draw labels, boxes, lines, etc.\n const now = human.now();\n fps.draw = 1000 / (now - timestamp.draw);\n timestamp.draw = now;\n printFPS(`fps: ${fps.detect.toFixed(1).padStart(5, ' ')} detect | ${fps.draw.toFixed(1).padStart(5, ' ')} draw`); // write status\n ok.faceCount = human.result.face.length === 1; // must be exactly detected face\n if (ok.faceCount) { // skip the rest if no face\n const gestures: string[] = Object.values(human.result.gesture).map((gesture) => gesture.gesture); // flatten all gestures\n if (gestures.includes('blink left eye') || gestures.includes('blink right eye')) blink.start = human.now(); // blink starts when eyes get closed\n if (blink.start > 0 && !gestures.includes('blink left eye') && !gestures.includes('blink right eye')) blink.end = human.now(); // if blink started how long until eyes are back open\n ok.blinkDetected = ok.blinkDetected || (Math.abs(blink.end - blink.start) > options.blinkMin && Math.abs(blink.end - blink.start) < options.blinkMax);\n if (ok.blinkDetected && blink.time === 0) blink.time = Math.trunc(blink.end - blink.start);\n ok.facingCenter = gestures.includes('facing center');\n ok.lookingCenter = gestures.includes('looking center'); // must face camera and look at camera\n ok.faceConfidence = (human.result.face[0].boxScore || 0) > options.minConfidence && (human.result.face[0].faceScore || 0) > options.minConfidence && (human.result.face[0].genderScore || 0) > options.minConfidence;\n ok.antispoofCheck = (human.result.face[0].real || 0) > options.minConfidence;\n ok.livenessCheck = (human.result.face[0].live || 0) > options.minConfidence;\n ok.faceSize = human.result.face[0].box[2] >= options.minSize && human.result.face[0].box[3] >= options.minSize;\n }\n let y = 32;\n for (const [key, val] of Object.entries(ok)) {\n let el = document.getElementById(`ok-${key}`);\n if (!el) {\n el = document.createElement('div');\n el.innerText = key;\n el.className = 'ok';\n el.style.top = `${y}px`;\n dom.ok.appendChild(el);\n }\n if (typeof val === 'boolean') el.style.backgroundColor = val ? 'lightgreen' : 'lightcoral';\n else el.innerText = `${key}:${val}`;\n y += 28;\n }\n if (allOk()) { // all criteria met\n dom.video.pause();\n return human.result.face[0];\n }\n if (ok.elapsedMs > options.maxTime) { // give up\n dom.video.pause();\n return human.result.face[0];\n } else { // run again\n ok.elapsedMs = Math.trunc(human.now() - startTime);\n return new Promise((resolve) => {\n setTimeout(async () => {\n const res = await validationLoop(); // run validation loop until conditions are met\n if (res) resolve(human.result.face[0]); // recursive promise resolve\n }, 30); // use to slow down refresh from max refresh rate to target of 30 fps\n });\n }\n}\n\nasync function saveRecords() {\n if (dom.name.value.length > 0) {\n const image = dom.canvas.getContext('2d')?.getImageData(0, 0, dom.canvas.width, dom.canvas.height) as ImageData;\n const rec = { id: 0, name: dom.name.value, descriptor: current.face?.embedding as number[], image };\n await indexDb.save(rec);\n log('saved face record:', rec.name);\n } else {\n log('invalid name');\n }\n}\n\nasync function deleteRecord() {\n if (current.record && current.record.id > 0) {\n await indexDb.remove(current.record);\n }\n}\n\nasync function detectFace() {\n dom.canvas.getContext('2d')?.clearRect(0, 0, options.minSize, options.minSize);\n if (!current.face || !current.face.tensor || !current.face.embedding) return false;\n // eslint-disable-next-line no-console\n console.log('face record:', current.face);\n human.tf.browser.toPixels(current.face.tensor as unknown as TensorLike, dom.canvas);\n if (await indexDb.count() === 0) {\n log('face database is empty');\n document.body.style.background = 'black';\n dom.delete.style.display = 'none';\n return false;\n }\n const db = await indexDb.load();\n const descriptors = db.map((rec) => rec.descriptor);\n const res = await human.match(current.face.embedding, descriptors, matchOptions);\n current.record = db[res.index] || null;\n if (current.record) {\n log(`best match: ${current.record.name} | id: ${current.record.id} | similarity: ${Math.round(1000 * res.similarity) / 10}%`);\n dom.name.value = current.record.name;\n dom.source.style.display = '';\n dom.source.getContext('2d')?.putImageData(current.record.image, 0, 0);\n }\n document.body.style.background = res.similarity > options.threshold ? 'darkgreen' : 'maroon';\n return res.similarity > options.threshold;\n}\n\nasync function main() { // main entry point\n ok.faceCount = false;\n ok.faceConfidence = false;\n ok.facingCenter = false;\n ok.blinkDetected = false;\n ok.faceSize = false;\n ok.antispoofCheck = false;\n ok.livenessCheck = false;\n ok.elapsedMs = 0;\n dom.match.style.display = 'none';\n dom.retry.style.display = 'none';\n dom.source.style.display = 'none';\n document.body.style.background = 'black';\n await webCam();\n await detectionLoop(); // start detection loop\n startTime = human.now();\n current.face = await validationLoop(); // start validation loop\n dom.canvas.width = current.face?.tensor?.shape[1] || options.minSize;\n dom.canvas.height = current.face?.tensor?.shape[0] || options.minSize;\n dom.source.width = dom.canvas.width;\n dom.source.height = dom.canvas.height;\n dom.canvas.style.width = '';\n dom.match.style.display = 'flex';\n dom.save.style.display = 'flex';\n dom.delete.style.display = 'flex';\n dom.retry.style.display = 'block';\n if (!allOk()) { // is all criteria met?\n log('did not find valid face');\n return false;\n } else {\n return detectFace();\n }\n}\n\nasync function init() {\n log('human version:', human.version, '| tfjs version:', human.tf.version['tfjs-core']);\n log('options:', JSON.stringify(options).replace(/{|}|\"|\\[|\\]/g, '').replace(/,/g, ' '));\n printFPS('loading...');\n log('known face records:', await indexDb.count());\n await webCam(); // start webcam\n await human.load(); // preload all models\n printFPS('initializing...');\n dom.retry.addEventListener('click', main);\n dom.save.addEventListener('click', saveRecords);\n dom.delete.addEventListener('click', deleteRecord);\n await human.warmup(); // warmup function to initialize backend for future faster detection\n await main();\n}\n\nwindow.onload = init;\n", "let db: IDBDatabase; // instance of indexdb\n\nconst database = 'human';\nconst table = 'person';\n\nexport type FaceRecord = { id: number, name: string, descriptor: number[], image: ImageData };\n\n// eslint-disable-next-line no-console\nconst log = (...msg) => console.log('indexdb', ...msg);\n\nexport async function open() {\n if (db) return true;\n return new Promise((resolve) => {\n const request: IDBOpenDBRequest = indexedDB.open(database, 1);\n request.onerror = (evt) => log('error:', evt);\n request.onupgradeneeded = (evt: IDBVersionChangeEvent) => { // create if doesnt exist\n log('create:', evt.target);\n db = (evt.target as IDBOpenDBRequest).result;\n db.createObjectStore(table, { keyPath: 'id', autoIncrement: true });\n };\n request.onsuccess = (evt) => { // open\n db = (evt.target as IDBOpenDBRequest).result as IDBDatabase;\n log('open:', db);\n resolve(true);\n };\n });\n}\n\nexport async function load(): Promise {\n const faceDB: Array = [];\n if (!db) await open(); // open or create if not already done\n return new Promise((resolve) => {\n const cursor: IDBRequest = db.transaction([table], 'readwrite').objectStore(table).openCursor(null, 'next');\n cursor.onerror = (evt) => log('load error:', evt);\n cursor.onsuccess = (evt) => {\n if ((evt.target as IDBRequest).result) {\n faceDB.push((evt.target as IDBRequest).result.value);\n (evt.target as IDBRequest).result.continue();\n } else {\n resolve(faceDB);\n }\n };\n });\n}\n\nexport async function count(): Promise {\n if (!db) await open(); // open or create if not already done\n return new Promise((resolve) => {\n const store: IDBRequest = db.transaction([table], 'readwrite').objectStore(table).count();\n store.onerror = (evt) => log('count error:', evt);\n store.onsuccess = () => resolve(store.result);\n });\n}\n\nexport async function save(faceRecord: FaceRecord) {\n if (!db) await open(); // open or create if not already done\n const newRecord = { name: faceRecord.name, descriptor: faceRecord.descriptor, image: faceRecord.image }; // omit id as its autoincrement\n db.transaction([table], 'readwrite').objectStore(table).put(newRecord);\n log('save:', newRecord);\n}\n\nexport async function remove(faceRecord: FaceRecord) {\n if (!db) await open(); // open or create if not already done\n db.transaction([table], 'readwrite').objectStore(table).delete(faceRecord.id); // delete based on id\n log('delete:', faceRecord);\n}\n"], - "mappings": ";;;;;;AASA,gDCTA,GAAI,GAEE,EAAW,QACX,EAAQ,SAKR,EAAM,IAAI,IAAQ,QAAQ,IAAI,UAAW,GAAG,CAAG,EAErD,kBAA6B,CAC3B,MAAI,GAAW,GACR,GAAI,SAAQ,AAAC,GAAY,CAC9B,GAAM,GAA4B,UAAU,KAAK,EAAU,CAAC,EAC5D,EAAQ,QAAU,AAAC,GAAQ,EAAI,SAAU,CAAG,EAC5C,EAAQ,gBAAkB,AAAC,GAA+B,CACxD,EAAI,UAAW,EAAI,MAAM,EACzB,EAAM,EAAI,OAA4B,OACtC,EAAG,kBAAkB,EAAO,CAAE,QAAS,KAAM,cAAe,EAAK,CAAC,CACpE,EACA,EAAQ,UAAY,AAAC,GAAQ,CAC3B,EAAM,EAAI,OAA4B,OACtC,EAAI,QAAS,CAAE,EACf,EAAQ,EAAI,CACd,CACF,CAAC,CACH,CAEA,kBAAoD,CAClD,GAAM,GAA4B,CAAC,EACnC,MAAK,IAAI,KAAM,GAAK,EACb,GAAI,SAAQ,AAAC,GAAY,CAC9B,GAAM,GAAqB,EAAG,Y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AO,EAAE,QAAQ,gBAAgB,EAAE,EAAE,QAAQ,MAAM,GAAG,CAAC;AACtF,WAAS,YAAY;AACrB,OAAI,uBAAuB,MAAM,AAAQ,MAAM,CAAC;AAChD,QAAM,OAAO;AACb,QAAM,MAAM,KAAK;AACjB,WAAS,iBAAiB;AAC1B,MAAI,MAAM,iBAAiB,SAAS,IAAI;AACxC,MAAI,KAAK,iBAAiB,SAAS,WAAW;AAC9C,MAAI,OAAO,iBAAiB,SAAS,YAAY;AACjD,QAAM,MAAM,OAAO;AACnB,QAAM,KAAK;AACb;AAEA,OAAO,SAAS;", "names": [] } diff --git a/demo/typescript/index.js b/demo/typescript/index.js index 271c9736..fa7b379b 100644 --- a/demo/typescript/index.js +++ b/demo/typescript/index.js @@ -4,8 +4,101 @@ author: ' */ -import{Human as p}from"../../dist/human.esm.js";var w={modelBasePath:"../../models",filter:{enabled:!0,equalization:!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")},i={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}}},n=await navigator.mediaDevices.getUserMedia(a),m=new Promise(f=>{e.video.onloadeddata=()=>f(!0)});e.video.srcObject=n,e.video.play(),await m,e.canvas.width=e.video.videoWidth,e.canvas.height=e.video.videoHeight;let o=n.getVideoTracks()[0],v=o.getCapabilities?o.getCapabilities():"",g=o.getSettings?o.getSettings():"",u=o.getConstraints?o.getConstraints():"";s("video:",e.video.videoWidth,e.video.videoHeight,o.label,{stream:n,track:o,settings:g,constraints:u,capabilities:v}),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-i.tensors!==0&&s("allocated tensors:",n-i.tensors),i.tensors=n}let a=t.now();d.detect=1e3/(a-i.detect),i.detect=a,requestAnimationFrame(c)}async function l(){if(!e.video.paused){let n=await t.next(t.result);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-i.draw),i.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("loaded models:",Object.values(t.models).filter(a=>a!==null).length),r("initializing..."),await t.warmup(),await h(),await c(),await l()}window.onload=y; +// demo/typescript/index.ts +import { Human } from "../../dist/human.esm.js"; +var humanConfig = { + modelBasePath: "../../models", + filter: { enabled: true, equalization: false }, + face: { enabled: true, detector: { rotation: false }, mesh: { enabled: true }, attention: { enabled: false }, iris: { enabled: true }, description: { enabled: true }, emotion: { enabled: true } }, + body: { enabled: true }, + hand: { enabled: true }, + object: { enabled: false }, + gesture: { enabled: true } +}; +var human = new Human(humanConfig); +human.env["perfadd"] = false; +human.draw.options.font = 'small-caps 18px "Lato"'; +human.draw.options.lineHeight = 20; +var dom = { + video: document.getElementById("video"), + canvas: document.getElementById("canvas"), + log: document.getElementById("log"), + fps: document.getElementById("status"), + perf: document.getElementById("performance") +}; +var timestamp = { detect: 0, draw: 0, tensors: 0 }; +var fps = { detect: 0, draw: 0 }; +var log = (...msg) => { + dom.log.innerText += msg.join(" ") + "\n"; + console.log(...msg); +}; +var status = (msg) => dom.fps.innerText = msg; +var perf = (msg) => dom.perf.innerText = "tensors:" + human.tf.memory().numTensors + " | performance: " + JSON.stringify(msg).replace(/"|{|}/g, "").replace(/,/g, " | "); +async function webCam() { + status("starting webcam..."); + const options = { audio: false, video: { facingMode: "user", resizeMode: "none", width: { ideal: document.body.clientWidth }, height: { ideal: document.body.clientHeight } } }; + const stream = await navigator.mediaDevices.getUserMedia(options); + const ready = new Promise((resolve) => { + dom.video.onloadeddata = () => resolve(true); + }); + dom.video.srcObject = stream; + dom.video.play(); + await ready; + dom.canvas.width = dom.video.videoWidth; + dom.canvas.height = dom.video.videoHeight; + const track = stream.getVideoTracks()[0]; + const capabilities = track.getCapabilities ? track.getCapabilities() : ""; + const settings = track.getSettings ? track.getSettings() : ""; + const constraints = track.getConstraints ? track.getConstraints() : ""; + log("video:", dom.video.videoWidth, dom.video.videoHeight, track.label, { stream, track, settings, constraints, capabilities }); + dom.canvas.onclick = () => { + if (dom.video.paused) + dom.video.play(); + else + dom.video.pause(); + }; +} +async function detectionLoop() { + if (!dom.video.paused) { + await human.detect(dom.video); + const tensors = human.tf.memory().numTensors; + if (tensors - timestamp.tensors !== 0) + log("allocated tensors:", tensors - timestamp.tensors); + timestamp.tensors = tensors; + } + const now = human.now(); + fps.detect = 1e3 / (now - timestamp.detect); + timestamp.detect = now; + requestAnimationFrame(detectionLoop); +} +async function drawLoop() { + if (!dom.video.paused) { + const interpolated = await human.next(human.result); + await human.draw.canvas(dom.video, dom.canvas); + await human.draw.all(dom.canvas, interpolated); + console.log(dom.canvas.width, dom.canvas.height); + perf(interpolated.performance); + } + const now = human.now(); + fps.draw = 1e3 / (now - timestamp.draw); + timestamp.draw = now; + status(dom.video.paused ? "paused" : `fps: ${fps.detect.toFixed(1).padStart(5, " ")} detect | ${fps.draw.toFixed(1).padStart(5, " ")} draw`); + setTimeout(drawLoop, 30); +} +async function main() { + log("human version:", human.version, "| tfjs version:", human.tf.version["tfjs-core"]); + log("platform:", human.env.platform, "| agent:", human.env.agent); + status("loading..."); + await human.load(); + log("backend:", human.tf.getBackend(), "| available:", human.env.backends); + log("loaded models:", Object.values(human.models).filter((model) => model !== null).length); + status("initializing..."); + await human.warmup(); + await webCam(); + await detectionLoop(); + await drawLoop(); +} +window.onload = main; /** * Human demo for browsers * @default Human Library diff --git a/demo/typescript/index.js.map b/demo/typescript/index.js.map index 11e7c7e8..c3f01432 100644 --- a/demo/typescript/index.js.map +++ b/demo/typescript/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["index.ts"], - "sourcesContent": ["/**\n * Human demo for browsers\n * @default Human Library\n * @summary \n * @author \n * @copyright \n * @license MIT\n */\n\nimport { Human, Config } from '../../dist/human.esm.js'; // equivalent of @vladmandic/Human\n\nconst humanConfig: Partial = { // user configuration for human, used to fine-tune behavior\n // backend: 'webgpu' as const,\n // async: true,\n modelBasePath: '../../models',\n filter: { enabled: true, equalization: false },\n // cacheSensitivity: 0,\n face: { enabled: true, detector: { rotation: false }, mesh: { enabled: true }, attention: { enabled: false }, iris: { enabled: true }, description: { enabled: true }, emotion: { enabled: true } },\n body: { enabled: true },\n hand: { enabled: true },\n object: { enabled: false },\n gesture: { enabled: true },\n};\n\nconst human = new Human(humanConfig); // create instance of human with overrides from user configuration\n\nhuman.env['perfadd'] = false; // is performance data showing instant or total values\nhuman.draw.options.font = 'small-caps 18px \"Lato\"'; // set font used to draw labels when using draw methods\nhuman.draw.options.lineHeight = 20;\n\nconst dom = { // grab instances of dom objects so we dont have to look them up later\n video: document.getElementById('video') as HTMLVideoElement,\n canvas: document.getElementById('canvas') as HTMLCanvasElement,\n log: document.getElementById('log') as HTMLPreElement,\n fps: document.getElementById('status') as HTMLPreElement,\n perf: document.getElementById('performance') as HTMLDivElement,\n};\nconst timestamp = { detect: 0, draw: 0, tensors: 0 }; // holds information used to calculate performance and possible memory leaks\nconst fps = { detect: 0, draw: 0 }; // holds calculated fps information for both detect and screen refresh\n\nconst log = (...msg) => { // helper method to output messages\n dom.log.innerText += msg.join(' ') + '\\n';\n // eslint-disable-next-line no-console\n console.log(...msg);\n};\nconst status = (msg) => dom.fps.innerText = msg; // print status element\nconst perf = (msg) => dom.perf.innerText = 'tensors:' + human.tf.memory().numTensors + ' | performance: ' + JSON.stringify(msg).replace(/\"|{|}/g, '').replace(/,/g, ' | '); // print performance element\n\nasync function webCam() { // initialize webcam\n status('starting webcam...');\n // @ts-ignore resizeMode is not yet defined in tslib\n const options: MediaStreamConstraints = { audio: false, video: { facingMode: 'user', resizeMode: 'none', width: { ideal: document.body.clientWidth } } };\n const stream: MediaStream = await navigator.mediaDevices.getUserMedia(options);\n const ready = new Promise((resolve) => { dom.video.onloadeddata = () => resolve(true); });\n dom.video.srcObject = stream;\n dom.video.play();\n await ready;\n dom.canvas.width = dom.video.videoWidth;\n dom.canvas.height = dom.video.videoHeight;\n const track: MediaStreamTrack = stream.getVideoTracks()[0];\n const capabilities: MediaTrackCapabilities | string = track.getCapabilities ? track.getCapabilities() : '';\n const settings: MediaTrackSettings | string = track.getSettings ? track.getSettings() : '';\n const constraints: MediaTrackConstraints | string = track.getConstraints ? track.getConstraints() : '';\n log('video:', dom.video.videoWidth, dom.video.videoHeight, track.label, { stream, track, settings, constraints, capabilities });\n dom.canvas.onclick = () => { // pause when clicked on screen and resume on next click\n if (dom.video.paused) dom.video.play();\n else dom.video.pause();\n };\n}\n\nasync function detectionLoop() { // main detection loop\n if (!dom.video.paused) {\n // console.log('profiling data:', await human.profile(dom.video));\n await human.detect(dom.video); // actual detection; were not capturing output in a local variable as it can also be reached via human.result\n const tensors = human.tf.memory().numTensors; // check current tensor usage for memory leaks\n if (tensors - timestamp.tensors !== 0) log('allocated tensors:', tensors - timestamp.tensors); // printed on start and each time there is a tensor leak\n timestamp.tensors = tensors;\n }\n const now = human.now();\n fps.detect = 1000 / (now - timestamp.detect);\n timestamp.detect = now;\n requestAnimationFrame(detectionLoop); // start new frame immediately\n}\n\nasync function drawLoop() { // main screen refresh loop\n if (!dom.video.paused) {\n const interpolated = await human.next(human.result); // smoothen result using last-known results\n await human.draw.canvas(dom.video, dom.canvas); // draw canvas to screen\n await human.draw.all(dom.canvas, interpolated); // draw labels, boxes, lines, etc.\n perf(interpolated.performance); // write performance data\n }\n const now = human.now();\n fps.draw = 1000 / (now - timestamp.draw);\n timestamp.draw = now;\n status(dom.video.paused ? 'paused' : `fps: ${fps.detect.toFixed(1).padStart(5, ' ')} detect | ${fps.draw.toFixed(1).padStart(5, ' ')} draw`); // write status\n // requestAnimationFrame(drawLoop); // refresh at screen refresh rate\n setTimeout(drawLoop, 30); // use to slow down refresh from max refresh rate to target of 30 fps\n}\n\nasync function main() { // main entry point\n log('human version:', human.version, '| tfjs version:', human.tf.version['tfjs-core']);\n log('platform:', human.env.platform, '| agent:', human.env.agent);\n status('loading...');\n await human.load(); // preload all models\n log('backend:', human.tf.getBackend(), '| available:', human.env.backends);\n log('loaded models:', Object.values(human.models).filter((model) => model !== null).length);\n status('initializing...');\n await human.warmup(); // warmup function to initialize backend for future faster detection\n await webCam(); // start webcam\n await detectionLoop(); // start detection loop\n await drawLoop(); // start draw loop\n}\n\nwindow.onload = main;\n"], - "mappings": ";;;;;;AASA,gDATA,AAWA,GAAM,GAA+B,CAGnC,cAAe,eACf,OAAQ,CAAE,QAAS,GAAM,aAAc,EAAM,EAE7C,KAAM,CAAE,QAAS,GAAM,SAAU,CAAE,SAAU,EAAM,EAAG,KAAM,CAAE,QAAS,EAAK,EAAG,UAAW,CAAE,QAAS,EAAM,EAAG,KAAM,CAAE,QAAS,EAAK,EAAG,YAAa,CAAE,QAAS,EAAK,EAAG,QAAS,CAAE,QAAS,EAAK,CAAE,EAClM,KAAM,CAAE,QAAS,EAAK,EACtB,KAAM,CAAE,QAAS,EAAK,EACtB,OAAQ,CAAE,QAAS,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AAkB,EAAM,QAAS,kBAAmB,EAAM,GAAG,QAAQ,YAAY,EACrF,EAAI,YAAa,EAAM,IAAI,SAAU,WAAY,EAAM,IAAI,KAAK,EAChE,EAAO,YAAY,EACnB,KAAM,GAAM,KAAK,EACjB,EAAI,WAAY,EAAM,GAAG,WAAW,EAAG,eAAgB,EAAM,IAAI,QAAQ,EACzE,EAAI,iBAAkB,OAAO,OAAO,EAAM,MAAM,EAAE,OAAO,AAAC,GAAU,IAAU,IAAI,EAAE,MAAM,EAC1F,EAAO,iBAAiB,EACxB,KAAM,GAAM,OAAO,EACnB,KAAM,GAAO,EACb,KAAM,GAAc,EACpB,KAAM,GAAS,CACjB,CAEA,OAAO,OAAS", + "sourcesContent": ["/**\n * Human demo for browsers\n * @default Human Library\n * @summary \n * @author \n * @copyright \n * @license MIT\n */\n\nimport { Human, Config } from '../../dist/human.esm.js'; // equivalent of @vladmandic/Human\n\nconst humanConfig: Partial = { // user configuration for human, used to fine-tune behavior\n // backend: 'webgpu' as const,\n // async: true,\n modelBasePath: '../../models',\n filter: { enabled: true, equalization: false },\n // cacheSensitivity: 0,\n face: { enabled: true, detector: { rotation: false }, mesh: { enabled: true }, attention: { enabled: false }, iris: { enabled: true }, description: { enabled: true }, emotion: { enabled: true } },\n body: { enabled: true },\n hand: { enabled: true },\n object: { enabled: false },\n gesture: { enabled: true },\n};\n\nconst human = new Human(humanConfig); // create instance of human with overrides from user configuration\n\nhuman.env['perfadd'] = false; // is performance data showing instant or total values\nhuman.draw.options.font = 'small-caps 18px \"Lato\"'; // set font used to draw labels when using draw methods\nhuman.draw.options.lineHeight = 20;\n\nconst dom = { // grab instances of dom objects so we dont have to look them up later\n video: document.getElementById('video') as HTMLVideoElement,\n canvas: document.getElementById('canvas') as HTMLCanvasElement,\n log: document.getElementById('log') as HTMLPreElement,\n fps: document.getElementById('status') as HTMLPreElement,\n perf: document.getElementById('performance') as HTMLDivElement,\n};\nconst timestamp = { detect: 0, draw: 0, tensors: 0 }; // holds information used to calculate performance and possible memory leaks\nconst fps = { detect: 0, draw: 0 }; // holds calculated fps information for both detect and screen refresh\n\nconst log = (...msg) => { // helper method to output messages\n dom.log.innerText += msg.join(' ') + '\\n';\n // eslint-disable-next-line no-console\n console.log(...msg);\n};\nconst status = (msg) => dom.fps.innerText = msg; // print status element\nconst perf = (msg) => dom.perf.innerText = 'tensors:' + human.tf.memory().numTensors + ' | performance: ' + JSON.stringify(msg).replace(/\"|{|}/g, '').replace(/,/g, ' | '); // print performance element\n\nasync function webCam() { // initialize webcam\n status('starting webcam...');\n // @ts-ignore resizeMode is not yet defined in tslib\n const options: MediaStreamConstraints = { audio: false, video: { facingMode: 'user', resizeMode: 'none', width: { ideal: document.body.clientWidth }, height: { ideal: document.body.clientHeight } } };\n const stream: MediaStream = await navigator.mediaDevices.getUserMedia(options);\n const ready = new Promise((resolve) => { dom.video.onloadeddata = () => resolve(true); });\n dom.video.srcObject = stream;\n dom.video.play();\n await ready;\n dom.canvas.width = dom.video.videoWidth;\n dom.canvas.height = dom.video.videoHeight;\n const track: MediaStreamTrack = stream.getVideoTracks()[0];\n const capabilities: MediaTrackCapabilities | string = track.getCapabilities ? track.getCapabilities() : '';\n const settings: MediaTrackSettings | string = track.getSettings ? track.getSettings() : '';\n const constraints: MediaTrackConstraints | string = track.getConstraints ? track.getConstraints() : '';\n log('video:', dom.video.videoWidth, dom.video.videoHeight, track.label, { stream, track, settings, constraints, capabilities });\n dom.canvas.onclick = () => { // pause when clicked on screen and resume on next click\n if (dom.video.paused) dom.video.play();\n else dom.video.pause();\n };\n}\n\nasync function detectionLoop() { // main detection loop\n if (!dom.video.paused) {\n // console.log('profiling data:', await human.profile(dom.video));\n await human.detect(dom.video); // actual detection; were not capturing output in a local variable as it can also be reached via human.result\n const tensors = human.tf.memory().numTensors; // check current tensor usage for memory leaks\n if (tensors - timestamp.tensors !== 0) log('allocated tensors:', tensors - timestamp.tensors); // printed on start and each time there is a tensor leak\n timestamp.tensors = tensors;\n }\n const now = human.now();\n fps.detect = 1000 / (now - timestamp.detect);\n timestamp.detect = now;\n requestAnimationFrame(detectionLoop); // start new frame immediately\n}\n\nasync function drawLoop() { // main screen refresh loop\n if (!dom.video.paused) {\n const interpolated = await human.next(human.result); // smoothen result using last-known results\n await human.draw.canvas(dom.video, dom.canvas); // draw canvas to screen\n await human.draw.all(dom.canvas, interpolated); // draw labels, boxes, lines, etc.\n console.log(dom.canvas.width, dom.canvas.height);\n perf(interpolated.performance); // write performance data\n }\n const now = human.now();\n fps.draw = 1000 / (now - timestamp.draw);\n timestamp.draw = now;\n status(dom.video.paused ? 'paused' : `fps: ${fps.detect.toFixed(1).padStart(5, ' ')} detect | ${fps.draw.toFixed(1).padStart(5, ' ')} draw`); // write status\n // requestAnimationFrame(drawLoop); // refresh at screen refresh rate\n setTimeout(drawLoop, 30); // use to slow down refresh from max refresh rate to target of 30 fps\n}\n\nasync function main() { // main entry point\n log('human version:', human.version, '| tfjs version:', human.tf.version['tfjs-core']);\n log('platform:', human.env.platform, '| agent:', human.env.agent);\n status('loading...');\n await human.load(); // preload all models\n log('backend:', human.tf.getBackend(), '| available:', human.env.backends);\n log('loaded models:', Object.values(human.models).filter((model) => model !== null).length);\n status('initializing...');\n await human.warmup(); // warmup function to initialize backend for future faster detection\n await webCam(); // start webcam\n await detectionLoop(); // start detection loop\n await drawLoop(); // start draw loop\n}\n\nwindow.onload = main;\n"], + "mappings": ";;;;;;;AASA;AATA,AAWA,IAAM,cAA+B;AAAA,EAGnC,eAAe;AAAA,EACf,QAAQ,EAAE,SAAS,MAAM,cAAc,MAAM;AAAA,EAE7C,MAAM,EAAE,SAAS,MAAM,UAAU,EAAE,UAAU,MAAM,GAAG,MAAM,EAAE,SAAS,KAAK,GAAG,WAAW,EAAE,SAAS,MAAM,GAAG,MAAM,EAAE,SAAS,KAAK,GAAG,aAAa,EAAE,SAAS,KAAK,GAAG,SAAS,EAAE,SAAS,KAAK,EAAE;AAAA,EAClM,MAAM,EAAE,SAAS,KAA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,QAAM,MAAM,MAAM,IAAI;AACtB,MAAI,OAAO,MAAQ,OAAM,UAAU;AACnC,YAAU,OAAO;AACjB,SAAO,IAAI,MAAM,SAAS,WAAW,QAAQ,IAAI,OAAO,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG,cAAc,IAAI,KAAK,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG,QAAQ;AAE3I,aAAW,UAAU,EAAE;AACzB;AAEA,sBAAsB;AACpB,MAAI,kBAAkB,MAAM,SAAS,mBAAmB,MAAM,GAAG,QAAQ,YAAY;AACrF,MAAI,aAAa,MAAM,IAAI,UAAU,YAAY,MAAM,IAAI,KAAK;AAChE,SAAO,YAAY;AACnB,QAAM,MAAM,KAAK;AACjB,MAAI,YAAY,MAAM,GAAG,WAAW,GAAG,gBAAgB,MAAM,IAAI,QAAQ;AACzE,MAAI,kBAAkB,OAAO,OAAO,MAAM,MAAM,EAAE,OAAO,CAAC,UAAU,UAAU,IAAI,EAAE,MAAM;AAC1F,SAAO,iBAAiB;AACxB,QAAM,MAAM,OAAO;AACnB,QAAM,OAAO;AACb,QAAM,cAAc;AACpB,QAAM,SAAS;AACjB;AAEA,OAAO,SAAS;", "names": [] } diff --git a/demo/typescript/index.ts b/demo/typescript/index.ts index af8a373a..cf2e0ff9 100644 --- a/demo/typescript/index.ts +++ b/demo/typescript/index.ts @@ -49,7 +49,7 @@ const perf = (msg) => dom.perf.innerText = 'tensors:' + human.tf.memory().numTen async function webCam() { // initialize webcam status('starting webcam...'); // @ts-ignore resizeMode is not yet defined in tslib - const options: MediaStreamConstraints = { audio: false, video: { facingMode: 'user', resizeMode: 'none', width: { ideal: document.body.clientWidth } } }; + const options: MediaStreamConstraints = { audio: false, video: { facingMode: 'user', resizeMode: 'none', width: { ideal: document.body.clientWidth }, height: { ideal: document.body.clientHeight } } }; const stream: MediaStream = await navigator.mediaDevices.getUserMedia(options); const ready = new Promise((resolve) => { dom.video.onloadeddata = () => resolve(true); }); dom.video.srcObject = stream; @@ -87,6 +87,7 @@ async function drawLoop() { // main screen refresh loop const interpolated = await human.next(human.result); // smoothen result using last-known results await human.draw.canvas(dom.video, dom.canvas); // draw canvas to screen await human.draw.all(dom.canvas, interpolated); // draw labels, boxes, lines, etc. + console.log(dom.canvas.width, dom.canvas.height); perf(interpolated.performance); // write performance data } const now = human.now(); diff --git a/package.json b/package.json index 11ed7971..5ab26473 100644 --- a/package.json +++ b/package.json @@ -54,27 +54,27 @@ ], "devDependencies": { "@microsoft/api-extractor": "^7.22.2", - "@tensorflow/tfjs": "^3.15.0", - "@tensorflow/tfjs-backend-cpu": "^3.15.0", - "@tensorflow/tfjs-backend-wasm": "^3.15.0", - "@tensorflow/tfjs-backend-webgl": "^3.15.0", - "@tensorflow/tfjs-backend-webgpu": "^0.0.1-alpha.8", - "@tensorflow/tfjs-converter": "^3.15.0", - "@tensorflow/tfjs-core": "^3.15.0", - "@tensorflow/tfjs-data": "^3.15.0", - "@tensorflow/tfjs-layers": "^3.15.0", - "@tensorflow/tfjs-node": "^3.15.0", - "@tensorflow/tfjs-node-gpu": "^3.15.0", - "@types/node": "^17.0.24", + "@tensorflow/tfjs": "^3.16.0", + "@tensorflow/tfjs-backend-cpu": "^3.16.0", + "@tensorflow/tfjs-backend-wasm": "^3.16.0", + "@tensorflow/tfjs-backend-webgl": "^3.16.0", + "@tensorflow/tfjs-backend-webgpu": "^0.0.1-alpha.9", + "@tensorflow/tfjs-converter": "^3.16.0", + "@tensorflow/tfjs-core": "^3.16.0", + "@tensorflow/tfjs-data": "^3.16.0", + "@tensorflow/tfjs-layers": "^3.16.0", + "@tensorflow/tfjs-node": "^3.16.0", + "@tensorflow/tfjs-node-gpu": "^3.16.0", + "@types/node": "^17.0.25", "@types/offscreencanvas": "^2019.6.4", - "@typescript-eslint/eslint-plugin": "^5.19.0", - "@typescript-eslint/parser": "^5.19.0", - "@vladmandic/build": "^0.7.2", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "@vladmandic/build": "^0.7.3", "@vladmandic/pilogger": "^0.4.4", "@vladmandic/tfjs": "github:vladmandic/tfjs", "canvas": "^2.9.1", "dayjs": "^1.11.1", - "esbuild": "^0.14.36", + "esbuild": "^0.14.37", "eslint": "8.13.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-html": "^6.2.0", diff --git a/test/build.log b/test/build.log index e2a62ee8..4b2d65b7 100644 --- a/test/build.log +++ b/test/build.log @@ -1,24 +1,355 @@ -2022-04-18 12:24:49 INFO:  Application: {"name":"@vladmandic/human","version":"2.7.0"} -2022-04-18 12:24:49 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} -2022-04-18 12:24:49 INFO:  Toolchain: {"build":"0.7.2","esbuild":"0.14.36","typescript":"4.6.3","typedoc":"0.22.15","eslint":"8.13.0"} -2022-04-18 12:24:49 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]} -2022-04-18 12:24:49 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]} -2022-04-18 12:24:49 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":595} -2022-04-18 12:24:49 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":606671,"outputBytes":297893} -2022-04-18 12:24:49 STATE: 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":599} -2022-04-18 12:24:49 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":606675,"outputBytes":297897} -2022-04-18 12:24:49 STATE: 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":651} -2022-04-18 12:24:49 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":606727,"outputBytes":297947} -2022-04-18 12:24:49 STATE: 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-04-18 12:24:49 STATE: 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-04-18 12:24:49 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606659,"outputBytes":296806} -2022-04-18 12:24:49 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1349864} -2022-04-18 12:24:49 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":1955940,"outputBytes":1645708} -2022-04-18 12:24:50 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":1955940,"outputBytes":2127333} -2022-04-18 12:24:54 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":114} -2022-04-18 12:24:56 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":73,"generated":true} -2022-04-18 12:24:56 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5920,"outputBytes":2938} -2022-04-18 12:24:56 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":7820} -2022-04-18 12:25:03 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":104,"errors":0,"warnings":0} -2022-04-18 12:25:04 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"} -2022-04-18 12:25:04 INFO:  Done... +2022-04-21 09:27:00 INFO:  Application: {"name":"@vladmandic/human","version":"2.7.0"} +2022-04-21 09:27:00 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} +2022-04-21 09:27:00 INFO:  Toolchain: {"build":"0.7.3","esbuild":"0.14.37","typescript":"4.6.3","typedoc":"0.22.15","eslint":"8.13.0"} +2022-04-21 09:27:00 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]} +2022-04-21 09:27:00 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]} +2022-04-21 09:27:00 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":595} +2022-04-21 09:27:00 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":606671,"outputBytes":297893} +2022-04-21 09:27:00 STATE: 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":599} +2022-04-21 09:27:00 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":606675,"outputBytes":297897} +2022-04-21 09:27:00 STATE: 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":651} +2022-04-21 09:27:00 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":606727,"outputBytes":297947} +2022-04-21 09:27:00 STATE: 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-04-21 09:27:00 STATE: 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-04-21 09:27:00 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606659,"outputBytes":296806} +2022-04-21 09:27:01 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1350732} +2022-04-21 09:27:01 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":1956808,"outputBytes":1646576} +2022-04-21 09:27:01 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":1956808,"outputBytes":2128153} +2022-04-21 09:27:04 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":114} +2022-04-21 09:27:06 WARN:  TypeDoc: {"msg":"(node:31573) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time"} +2022-04-21 09:27:06 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":73,"generated":true} +2022-04-21 09:27:06 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5920,"outputBytes":2938} +2022-04-21 09:27:06 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":7820} +2022-04-21 09:27:13 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":104,"errors":0,"warnings":0} +2022-04-21 09:27:13 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"} +2022-04-21 09:27:13 INFO:  Done... +2022-04-21 09:27:48 INFO:  @vladmandic/human version 2.7.0 +2022-04-21 09:27:48 INFO:  User: vlado Platform: linux Arch: x64 Node: v18.0.0 +2022-04-21 09:27:48 INFO:  Application: {"name":"@vladmandic/human","version":"2.7.0"} +2022-04-21 09:27:48 INFO:  Environment: {"profile":"development","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} +2022-04-21 09:27:48 INFO:  Toolchain: {"build":"0.7.3","esbuild":"0.14.37","typescript":"4.6.3","typedoc":"0.22.15","eslint":"8.13.0"} +2022-04-21 09:27:48 INFO:  Build: {"profile":"development","steps":["serve","watch","compile"]} +2022-04-21 09:27:48 STATE: WebServer: {"ssl":false,"port":10030,"root":"."} +2022-04-21 09:27:48 STATE: WebServer: {"ssl":true,"port":10031,"root":".","sslKey":"node_modules/@vladmandic/build/cert/https.key","sslCrt":"node_modules/@vladmandic/build/cert/https.crt"} +2022-04-21 09:27:48 STATE: Watch: {"locations":["src/**/*","tfjs/**/*","demo/**/*.ts"]} +2022-04-21 09:27:48 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1084} +2022-04-21 09:27:48 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":607160,"outputBytes":469368} +2022-04-21 09:27:48 STATE: 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":1104} +2022-04-21 09:27:48 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":607180,"outputBytes":469384} +2022-04-21 09:27:48 STATE: 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":1191} +2022-04-21 09:27:48 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":607267,"outputBytes":469475} +2022-04-21 09:27:48 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":1452} +2022-04-21 09:27:48 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2126,"outputBytes":855} +2022-04-21 09:27:48 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606931,"outputBytes":471310} +2022-04-21 09:27:48 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2532596} +2022-04-21 09:27:49 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":3138672,"outputBytes":1646773} +2022-04-21 09:27:49 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":3138672,"outputBytes":3008628} +2022-04-21 09:27:49 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5920,"outputBytes":4157} +2022-04-21 09:27:49 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} +2022-04-21 09:27:49 INFO:  Listening... +2022-04-21 09:28:00 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:28:01 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4157,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:28:01 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:28:01 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:28:01 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:28:01 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:28:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:28:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4157,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:28:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:28:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:28:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:28:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:28:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:28:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:28:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4157,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:28:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:28:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:28:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:28:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:28:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:30:24 INFO:  Watch: {"event":"modify","input":"demo/typescript/index.ts"} +2022-04-21 09:30:24 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1084} +2022-04-21 09:30:24 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":607160,"outputBytes":469368} +2022-04-21 09:30:24 STATE: 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":1104} +2022-04-21 09:30:24 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":607180,"outputBytes":469384} +2022-04-21 09:30:24 STATE: 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":1191} +2022-04-21 09:30:24 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":607267,"outputBytes":469475} +2022-04-21 09:30:24 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":1452} +2022-04-21 09:30:24 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2126,"outputBytes":855} +2022-04-21 09:30:24 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606931,"outputBytes":471310} +2022-04-21 09:30:25 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2532596} +2022-04-21 09:30:25 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":3138672,"outputBytes":1646773} +2022-04-21 09:30:25 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":3138672,"outputBytes":3008628} +2022-04-21 09:30:25 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5930,"outputBytes":4167} +2022-04-21 09:30:25 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} +2022-04-21 09:30:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:30:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4167,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:30:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:30:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:30:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:30:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:30:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:30:42 INFO:  Watch: {"event":"modify","input":"demo/typescript/index.ts"} +2022-04-21 09:30:42 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1084} +2022-04-21 09:30:42 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":607160,"outputBytes":469368} +2022-04-21 09:30:42 STATE: 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":1104} +2022-04-21 09:30:42 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":607180,"outputBytes":469384} +2022-04-21 09:30:42 STATE: 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":1191} +2022-04-21 09:30:42 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":607267,"outputBytes":469475} +2022-04-21 09:30:42 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":1452} +2022-04-21 09:30:42 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2126,"outputBytes":855} +2022-04-21 09:30:42 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606931,"outputBytes":471310} +2022-04-21 09:30:42 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2532596} +2022-04-21 09:30:42 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":3138672,"outputBytes":1646773} +2022-04-21 09:30:42 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":3138672,"outputBytes":3008628} +2022-04-21 09:30:42 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5930,"outputBytes":4167} +2022-04-21 09:30:42 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} +2022-04-21 09:30:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:30:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4167,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:30:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:30:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:30:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:30:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:30:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:30:50 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:30:50 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":9052,"url":"/typescript/index.js.map","remote":"::1"} +2022-04-21 09:30:50 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5157983,"url":"/dist/human.esm.js.map","remote":"::1"} +2022-04-21 09:30:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:30:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4167,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:30:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:30:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:30:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":9052,"url":"/typescript/index.js.map","remote":"::1"} +2022-04-21 09:30:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5157983,"url":"/dist/human.esm.js.map","remote":"::1"} +2022-04-21 09:30:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:30:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:30:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:31:10 INFO:  Watch: {"event":"modify","input":"demo/typescript/index.ts"} +2022-04-21 09:31:10 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1084} +2022-04-21 09:31:10 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":607160,"outputBytes":469368} +2022-04-21 09:31:10 STATE: 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":1104} +2022-04-21 09:31:10 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":607180,"outputBytes":469384} +2022-04-21 09:31:10 STATE: 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":1191} +2022-04-21 09:31:11 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":607267,"outputBytes":469475} +2022-04-21 09:31:11 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":1452} +2022-04-21 09:31:11 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2126,"outputBytes":855} +2022-04-21 09:31:11 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606931,"outputBytes":471310} +2022-04-21 09:31:11 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2532596} +2022-04-21 09:31:11 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":3138672,"outputBytes":1646773} +2022-04-21 09:31:11 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":3138672,"outputBytes":3008628} +2022-04-21 09:31:11 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5920,"outputBytes":4157} +2022-04-21 09:31:11 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} +2022-04-21 09:31:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:31:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4157,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:31:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:31:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:31:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":9040,"url":"/typescript/index.js.map","remote":"::1"} +2022-04-21 09:31:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5157983,"url":"/dist/human.esm.js.map","remote":"::1"} +2022-04-21 09:31:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:31:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:31:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:31:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:31:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4157,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:31:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:31:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:31:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:31:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:31:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:31:58 INFO:  Watch: {"event":"modify","input":"demo/typescript/index.ts"} +2022-04-21 09:31:58 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1084} +2022-04-21 09:31:58 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":607160,"outputBytes":469368} +2022-04-21 09:31:58 STATE: 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":1104} +2022-04-21 09:31:58 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":607180,"outputBytes":469384} +2022-04-21 09:31:58 STATE: 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":1191} +2022-04-21 09:31:58 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":607267,"outputBytes":469475} +2022-04-21 09:31:58 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":1452} +2022-04-21 09:31:58 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2126,"outputBytes":855} +2022-04-21 09:31:58 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606931,"outputBytes":471310} +2022-04-21 09:31:58 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2532596} +2022-04-21 09:31:58 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":3138672,"outputBytes":1646773} +2022-04-21 09:31:58 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":3138672,"outputBytes":3008628} +2022-04-21 09:31:58 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5967,"outputBytes":4204} +2022-04-21 09:31:58 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} +2022-04-21 09:32:00 INFO:  Watch: {"event":"modify","input":"demo/typescript/index.ts"} +2022-04-21 09:32:00 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1084} +2022-04-21 09:32:00 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":607160,"outputBytes":469368} +2022-04-21 09:32:00 STATE: 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":1104} +2022-04-21 09:32:00 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":607180,"outputBytes":469384} +2022-04-21 09:32:00 STATE: 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":1191} +2022-04-21 09:32:00 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":607267,"outputBytes":469475} +2022-04-21 09:32:00 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":1452} +2022-04-21 09:32:00 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2126,"outputBytes":855} +2022-04-21 09:32:00 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606931,"outputBytes":471310} +2022-04-21 09:32:00 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2532596} +2022-04-21 09:32:00 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":3138672,"outputBytes":1646773} +2022-04-21 09:32:00 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":3138672,"outputBytes":3008628} +2022-04-21 09:32:00 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5967,"outputBytes":4204} +2022-04-21 09:32:00 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} +2022-04-21 09:32:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:32:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4204,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:32:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:32:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:32:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:32:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:32:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:32:16 INFO:  Watch: {"event":"modify","input":"demo/typescript/index.ts"} +2022-04-21 09:32:16 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1084} +2022-04-21 09:32:16 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":607160,"outputBytes":469368} +2022-04-21 09:32:16 STATE: 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":1104} +2022-04-21 09:32:16 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":607180,"outputBytes":469384} +2022-04-21 09:32:16 STATE: 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":1191} +2022-04-21 09:32:16 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":607267,"outputBytes":469475} +2022-04-21 09:32:16 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":1452} +2022-04-21 09:32:16 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2126,"outputBytes":855} +2022-04-21 09:32:16 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606931,"outputBytes":471310} +2022-04-21 09:32:16 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2532596} +2022-04-21 09:32:16 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":3138672,"outputBytes":1646773} +2022-04-21 09:32:17 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":3138672,"outputBytes":3008628} +2022-04-21 09:32:17 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5922,"outputBytes":4159} +2022-04-21 09:32:17 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} +2022-04-21 09:32:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:32:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4159,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:32:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:32:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:32:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:32:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:32:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:32:28 INFO:  Watch: {"event":"modify","input":"demo/typescript/index.ts"} +2022-04-21 09:32:28 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1084} +2022-04-21 09:32:28 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":607160,"outputBytes":469368} +2022-04-21 09:32:28 STATE: 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":1104} +2022-04-21 09:32:28 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":607180,"outputBytes":469384} +2022-04-21 09:32:28 STATE: 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":1191} +2022-04-21 09:32:28 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":607267,"outputBytes":469475} +2022-04-21 09:32:28 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":1452} +2022-04-21 09:32:28 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2126,"outputBytes":855} +2022-04-21 09:32:28 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606931,"outputBytes":471310} +2022-04-21 09:32:28 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2532596} +2022-04-21 09:32:28 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":3138672,"outputBytes":1646773} +2022-04-21 09:32:29 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":3138672,"outputBytes":3008628} +2022-04-21 09:32:29 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5967,"outputBytes":4204} +2022-04-21 09:32:29 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} +2022-04-21 09:32:29 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:32:29 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4204,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:32:29 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:32:29 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:32:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:32:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:32:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:33:29 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:33:29 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4204,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:33:29 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:33:29 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:33:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:33:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:33:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:33:51 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:33:51 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":9122,"url":"/typescript/index.js.map","remote":"::1"} +2022-04-21 09:33:51 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5157983,"url":"/dist/human.esm.js.map","remote":"::1"} +2022-04-21 09:33:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:33:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4204,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:33:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:33:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:33:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":9122,"url":"/typescript/index.js.map","remote":"::1"} +2022-04-21 09:33:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5157983,"url":"/dist/human.esm.js.map","remote":"::1"} +2022-04-21 09:33:56 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:33:56 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:33:56 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:34:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:34:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4204,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:34:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:34:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:34:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":9122,"url":"/typescript/index.js.map","remote":"::1"} +2022-04-21 09:34:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5157983,"url":"/dist/human.esm.js.map","remote":"::1"} +2022-04-21 09:34:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:34:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:34:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:34:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:34:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4204,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:34:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:34:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:34:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":9122,"url":"/typescript/index.js.map","remote":"::1"} +2022-04-21 09:34:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5157983,"url":"/dist/human.esm.js.map","remote":"::1"} +2022-04-21 09:34:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:34:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:34:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:34:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:34:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4204,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:34:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:34:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:34:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":9122,"url":"/typescript/index.js.map","remote":"::1"} +2022-04-21 09:34:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5157983,"url":"/dist/human.esm.js.map","remote":"::1"} +2022-04-21 09:34:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:34:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:34:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:36:24 INFO:  Watch: {"event":"modify","input":"demo/typescript/index.ts"} +2022-04-21 09:36:24 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1084} +2022-04-21 09:36:24 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":607160,"outputBytes":469368} +2022-04-21 09:36:24 STATE: 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":1104} +2022-04-21 09:36:24 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":607180,"outputBytes":469384} +2022-04-21 09:36:24 STATE: 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":1191} +2022-04-21 09:36:24 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":607267,"outputBytes":469475} +2022-04-21 09:36:24 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":1452} +2022-04-21 09:36:24 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2126,"outputBytes":855} +2022-04-21 09:36:24 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606931,"outputBytes":471310} +2022-04-21 09:36:24 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2532596} +2022-04-21 09:36:24 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":3138672,"outputBytes":1646773} +2022-04-21 09:36:24 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":3138672,"outputBytes":3008628} +2022-04-21 09:36:24 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6021,"outputBytes":4258} +2022-04-21 09:36:24 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} +2022-04-21 09:36:28 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:36:28 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4258,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:36:28 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:36:28 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:36:28 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":9223,"url":"/typescript/index.js.map","remote":"::1"} +2022-04-21 09:36:28 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5157983,"url":"/dist/human.esm.js.map","remote":"::1"} +2022-04-21 09:36:28 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:36:28 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:36:28 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:37:52 INFO:  Watch: {"event":"modify","input":"src/image/image.ts"} +2022-04-21 09:37:52 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1084} +2022-04-21 09:37:52 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":607160,"outputBytes":469368} +2022-04-21 09:37:52 STATE: 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":1104} +2022-04-21 09:37:52 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":607180,"outputBytes":469384} +2022-04-21 09:37:52 STATE: 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":1191} +2022-04-21 09:37:52 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":607267,"outputBytes":469475} +2022-04-21 09:37:52 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":1452} +2022-04-21 09:37:52 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2126,"outputBytes":855} +2022-04-21 09:37:52 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606931,"outputBytes":471310} +2022-04-21 09:37:52 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2532596} +2022-04-21 09:37:53 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":3138672,"outputBytes":1646773} +2022-04-21 09:37:53 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":3138672,"outputBytes":3008628} +2022-04-21 09:37:53 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6021,"outputBytes":4258} +2022-04-21 09:37:53 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} +2022-04-21 09:37:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:37:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4258,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:37:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:37:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:37:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":9223,"url":"/typescript/index.js.map","remote":"::1"} +2022-04-21 09:37:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5157983,"url":"/dist/human.esm.js.map","remote":"::1"} +2022-04-21 09:37:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:37:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:37:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:38:10 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1956,"url":"/typescript/index.html","remote":"::1"} +2022-04-21 09:38:10 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4258,"url":"/typescript/index.js","remote":"::1"} +2022-04-21 09:38:10 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} +2022-04-21 09:38:10 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3008628,"url":"/dist/human.esm.js","remote":"::1"} +2022-04-21 09:38:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":9223,"url":"/typescript/index.js.map","remote":"::1"} +2022-04-21 09:38:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5157983,"url":"/dist/human.esm.js.map","remote":"::1"} +2022-04-21 09:38:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} +2022-04-21 09:38:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/manifest.webmanifest","remote":"::1"} +2022-04-21 09:38:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} +2022-04-21 09:38:28 INFO:  Watch: {"event":"modify","input":"src/image/image.ts"} +2022-04-21 09:38:28 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1084} +2022-04-21 09:38:28 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":72,"inputBytes":607160,"outputBytes":469368} +2022-04-21 09:38:28 STATE: 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":1104} +2022-04-21 09:38:28 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":72,"inputBytes":607180,"outputBytes":469384} +2022-04-21 09:38:28 STATE: 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":1191} +2022-04-21 09:38:28 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":72,"inputBytes":607267,"outputBytes":469475} +2022-04-21 09:38:28 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1069,"outputBytes":1452} +2022-04-21 09:38:28 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2126,"outputBytes":855} +2022-04-21 09:38:28 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":72,"inputBytes":606931,"outputBytes":471310} +2022-04-21 09:38:28 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2532596} +2022-04-21 09:38:28 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":72,"inputBytes":3138672,"outputBytes":1646773} +2022-04-21 09:38:28 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":72,"inputBytes":3138672,"outputBytes":3008628} +2022-04-21 09:38:28 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6021,"outputBytes":4258} +2022-04-21 09:38:28 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794}