optimize centernet

pull/233/head
Vladimir Mandic 2021-11-16 20:16:49 -05:00
parent 788e3827a9
commit 4c9cd78012
29 changed files with 1927 additions and 2649 deletions

View File

@ -9,8 +9,10 @@
## Changelog
### **release 2.5.2** 2021/11/15 mandic00@live.com
### **HEAD -> main** 2021/11/16 mandic00@live.com
- add extra face rotation prior to mesh
- release 2.5.2
- improve error handling
### **2.5.2** 2021/11/14 mandic00@live.com

View File

@ -44,12 +44,12 @@ async function main() {
const inputImage = await canvas.loadImage(input); // load image using canvas library
log.info('Loaded image', input, inputImage.width, inputImage.height);
const inputCanvas = new canvas.Canvas(inputImage.width, inputImage.height); // create canvas
const ctx = inputCanvas.getContext('2d');
ctx.drawImage(inputImage, 0, 0); // draw input image onto canvas
const inputCtx = inputCanvas.getContext('2d');
inputCtx.drawImage(inputImage, 0, 0); // draw input image onto canvas
const imageData = inputCtx.getImageData(0, 0, inputCanvas.width, inputCanvas.height);
// run detection
const result = await human.detect(inputCanvas);
const result = await human.detect(imageData);
// run segmentation
// const seg = await human.segmentation(inputCanvas);
// log.data('Segmentation:', { data: seg.data.length, alpha: typeof seg.alpha, canvas: typeof seg.canvas });
@ -65,11 +65,14 @@ async function main() {
}
// draw detected results onto canvas and save it to a file
human.draw.all(inputCanvas, result); // use human build-in method to draw results as overlays on canvas
const outputCanvas = new canvas.Canvas(inputImage.width, inputImage.height); // create canvas
const outputCtx = outputCanvas.getContext('2d');
outputCtx.drawImage(result.canvas || inputImage, 0, 0); // draw input image onto canvas
human.draw.all(outputCanvas, result); // use human build-in method to draw results as overlays on canvas
const outFile = fs.createWriteStream(output); // write canvas to new image file
outFile.on('finish', () => log.state('Output image:', output, inputCanvas.width, inputCanvas.height));
outFile.on('finish', () => log.state('Output image:', output, outputCanvas.width, outputCanvas.height));
outFile.on('error', (err) => log.error('Output error:', output, err));
const stream = inputCanvas.createJPEGStream({ quality: 0.5, progressive: true, chromaSubsampling: true });
const stream = outputCanvas.createJPEGStream({ quality: 0.5, progressive: true, chromaSubsampling: true });
stream.pipe(outFile);
}
}

View File

@ -983,9 +983,9 @@ async function histogramEqualization(inputImage) {
const range = [tfjs_esm_exports.sub(max4[0], min2[0]), tfjs_esm_exports.sub(max4[1], min2[1]), tfjs_esm_exports.sub(max4[2], min2[2])];
const fact = [tfjs_esm_exports.div(maxValue, range[0]), tfjs_esm_exports.div(maxValue, range[1]), tfjs_esm_exports.div(maxValue, range[2])];
const enh = [tfjs_esm_exports.mul(sub9[0], fact[0]), tfjs_esm_exports.mul(sub9[1], fact[1]), tfjs_esm_exports.mul(sub9[2], fact[2])];
const rgb3 = tfjs_esm_exports.stack([enh[0], enh[1], enh[2]], 2);
const reshape8 = tfjs_esm_exports.reshape(rgb3, [1, squeeze9.shape[0], squeeze9.shape[1], 3]);
tfjs_esm_exports.dispose([...channels, ...min2, ...max4, ...sub9, ...range, ...fact, ...enh, rgb3, squeeze9]);
const rgb2 = tfjs_esm_exports.stack([enh[0], enh[1], enh[2]], 2);
const reshape8 = tfjs_esm_exports.reshape(rgb2, [1, squeeze9.shape[0], squeeze9.shape[1], 3]);
tfjs_esm_exports.dispose([...channels, ...min2, ...max4, ...sub9, ...range, ...fact, ...enh, rgb2, squeeze9]);
return reshape8;
}
@ -1048,9 +1048,9 @@ async function process2(input, config3, getTensor = true) {
if (input.shape[2] === 3) {
tensor3 = tfjs_esm_exports.expandDims(input, 0);
} else if (input.shape[2] === 4) {
const rgb3 = tfjs_esm_exports.slice3d(input, [0, 0, 0], [-1, -1, 3]);
tensor3 = tfjs_esm_exports.expandDims(rgb3, 0);
tfjs_esm_exports.dispose(rgb3);
const rgb2 = tfjs_esm_exports.slice3d(input, [0, 0, 0], [-1, -1, 3]);
tensor3 = tfjs_esm_exports.expandDims(rgb2, 0);
tfjs_esm_exports.dispose(rgb2);
}
} else if (input.shape.length === 4) {
if (input.shape[3] === 3) {
@ -1199,9 +1199,9 @@ async function process2(input, config3, getTensor = true) {
}
}
if (depth === 4) {
const rgb3 = tfjs_esm_exports.slice3d(pixels, [0, 0, 0], [-1, -1, 3]);
const rgb2 = tfjs_esm_exports.slice3d(pixels, [0, 0, 0], [-1, -1, 3]);
tfjs_esm_exports.dispose(pixels);
pixels = rgb3;
pixels = rgb2;
}
if (!pixels)
throw new Error("input error: cannot create tensor");
@ -1439,12 +1439,22 @@ async function predict(image29, config3, idx, count2) {
}
// src/tfjs/constants.ts
var tf255 = tfjs_esm_exports.scalar(255, "float32");
var tf1 = tfjs_esm_exports.scalar(1, "float32");
var tf22 = tfjs_esm_exports.scalar(2, "float32");
var tf05 = tfjs_esm_exports.scalar(0.5, "float32");
var tf127 = tfjs_esm_exports.scalar(127.5, "float32");
var rgb = tfjs_esm_exports.tensor1d([0.2989, 0.587, 0.114], "float32");
var constants = {
tf255: 255,
tf1: 1,
tf2: 2,
tf05: 0.5,
tf127: 127.5,
rgb: [0.2989, 0.587, 0.114]
};
function init() {
constants.tf255 = tfjs_esm_exports.scalar(255, "float32");
constants.tf1 = tfjs_esm_exports.scalar(1, "float32");
constants.tf2 = tfjs_esm_exports.scalar(2, "float32");
constants.tf05 = tfjs_esm_exports.scalar(0.5, "float32");
constants.tf127 = tfjs_esm_exports.scalar(127.5, "float32");
constants.rgb = tfjs_esm_exports.tensor1d([0.2989, 0.587, 0.114], "float32");
}
// src/gear/ssrnet-age.ts
var model2;
@ -1483,7 +1493,7 @@ async function predict2(image29, config3, idx, count2) {
return;
const t = {};
t.resize = tfjs_esm_exports.image.resizeBilinear(image29, [model2.inputs[0].shape[2], model2.inputs[0].shape[1]], false);
t.enhance = tfjs_esm_exports.mul(t.resize, tf255);
t.enhance = tfjs_esm_exports.mul(t.resize, constants.tf255);
const obj = { age: 0 };
if (config3.face["ssrnet"].enabled)
t.age = model2.execute(t.enhance);
@ -1505,7 +1515,7 @@ var last4 = [];
var lastCount3 = 0;
var lastTime3 = 0;
var skipped3 = Number.MAX_SAFE_INTEGER;
var rgb2 = [0.2989, 0.587, 0.114];
var rgb = [0.2989, 0.587, 0.114];
async function load3(config3) {
if (env.initial)
model3 = null;
@ -1537,11 +1547,11 @@ async function predict3(image29, config3, idx, count2) {
t.resize = tfjs_esm_exports.image.resizeBilinear(image29, [model3.inputs[0].shape[2], model3.inputs[0].shape[1]], false);
t.enhance = tfjs_esm_exports.tidy(() => {
const [red, green, blue] = tfjs_esm_exports.split(t.resize, 3, 3);
const redNorm = tfjs_esm_exports.mul(red, rgb2[0]);
const greenNorm = tfjs_esm_exports.mul(green, rgb2[1]);
const blueNorm = tfjs_esm_exports.mul(blue, rgb2[2]);
const redNorm = tfjs_esm_exports.mul(red, rgb[0]);
const greenNorm = tfjs_esm_exports.mul(green, rgb[1]);
const blueNorm = tfjs_esm_exports.mul(blue, rgb[2]);
const grayscale = tfjs_esm_exports.addN([redNorm, greenNorm, blueNorm]);
const normalize = tfjs_esm_exports.mul(tfjs_esm_exports.sub(grayscale, tf05), 2);
const normalize = tfjs_esm_exports.mul(tfjs_esm_exports.sub(grayscale, constants.tf05), 2);
return normalize;
});
const obj = { gender: "", genderScore: 0 };
@ -4908,7 +4918,7 @@ var cutBoxFromImageAndResize = (box4, image29, cropSize) => {
const h = image29.shape[1];
const w = image29.shape[2];
const crop2 = tfjs_esm_exports.image.cropAndResize(image29, [[box4.startPoint[1] / h, box4.startPoint[0] / w, box4.endPoint[1] / h, box4.endPoint[0] / w]], [0], cropSize);
const norm = tfjs_esm_exports.div(crop2, tf255);
const norm = tfjs_esm_exports.div(crop2, constants.tf255);
tfjs_esm_exports.dispose(crop2);
return norm;
};
@ -5063,7 +5073,7 @@ function decodeBounds(boxOutputs) {
t.boxSizes = tfjs_esm_exports.slice(boxOutputs, [0, 3], [-1, 2]);
t.boxSizesNormalized = tfjs_esm_exports.div(t.boxSizes, inputSizeT);
t.centersNormalized = tfjs_esm_exports.div(t.centers, inputSizeT);
t.halfBoxSize = tfjs_esm_exports.div(t.boxSizesNormalized, tf22);
t.halfBoxSize = tfjs_esm_exports.div(t.boxSizesNormalized, constants.tf2);
t.starts = tfjs_esm_exports.sub(t.centersNormalized, t.halfBoxSize);
t.ends = tfjs_esm_exports.add(t.centersNormalized, t.halfBoxSize);
t.startNormalized = tfjs_esm_exports.mul(t.starts, inputSizeT);
@ -5078,8 +5088,8 @@ async function getBoxes(inputImage, config3) {
return { boxes: [] };
const t = {};
t.resized = tfjs_esm_exports.image.resizeBilinear(inputImage, [inputSize, inputSize]);
t.div = tfjs_esm_exports.div(t.resized, tf127);
t.normalized = tfjs_esm_exports.sub(t.div, tf05);
t.div = tfjs_esm_exports.div(t.resized, constants.tf127);
t.normalized = tfjs_esm_exports.sub(t.div, constants.tf05);
const res = model5 == null ? void 0 : model5.execute(t.normalized);
if (Array.isArray(res)) {
const sorted = res.sort((a, b) => a.size - b.size);
@ -5247,7 +5257,7 @@ async function prepareImage(input) {
];
t.pad = tfjs_esm_exports.pad(input, padding);
t.resize = tfjs_esm_exports.image.resizeBilinear(t.pad, [inputSize2[1][0], inputSize2[1][1]]);
const final = tfjs_esm_exports.div(t.resize, tf255);
const final = tfjs_esm_exports.div(t.resize, constants.tf255);
Object.keys(t).forEach((tensor3) => tfjs_esm_exports.dispose(t[tensor3]));
return final;
}
@ -5428,26 +5438,20 @@ async function load6(config3) {
async function process3(res, outputShape, config3) {
if (!res)
return [];
const t = {};
const results = [];
const detections = await res.array();
const squeezeT = tfjs_esm_exports.squeeze(res);
tfjs_esm_exports.dispose(res);
const arr = tfjs_esm_exports.split(squeezeT, 6, 1);
tfjs_esm_exports.dispose(squeezeT);
const stackT = tfjs_esm_exports.stack([arr[1], arr[0], arr[3], arr[2]], 1);
const boxesT = tfjs_esm_exports.squeeze(stackT);
tfjs_esm_exports.dispose(stackT);
const scoresT = tfjs_esm_exports.squeeze(arr[4]);
const classesT = tfjs_esm_exports.squeeze(arr[5]);
arr.forEach((t) => tfjs_esm_exports.dispose(t));
const nmsT = await tfjs_esm_exports.image.nonMaxSuppressionAsync(boxesT, scoresT, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
tfjs_esm_exports.dispose(boxesT);
tfjs_esm_exports.dispose(scoresT);
tfjs_esm_exports.dispose(classesT);
const nms = await nmsT.data();
tfjs_esm_exports.dispose(nmsT);
t.squeeze = tfjs_esm_exports.squeeze(res);
const arr = tfjs_esm_exports.split(t.squeeze, 6, 1);
t.stack = tfjs_esm_exports.stack([arr[1], arr[0], arr[3], arr[2]], 1);
t.boxes = tfjs_esm_exports.squeeze(t.stack);
t.scores = tfjs_esm_exports.squeeze(arr[4]);
t.classes = tfjs_esm_exports.squeeze(arr[5]);
tfjs_esm_exports.dispose([res, ...arr]);
t.nms = await tfjs_esm_exports.image.nonMaxSuppressionAsync(t.boxes, t.scores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
const nms = await t.nms.data();
let i = 0;
for (const id of nms) {
for (const id of Array.from(nms)) {
const score = Math.trunc(100 * detections[0][id][4]) / 100;
const classVal = detections[0][id][5];
const label = labels[classVal].label;
@ -5469,6 +5473,7 @@ async function process3(res, outputShape, config3) {
];
results.push({ id: i++, score, class: classVal, label, box: box4, boxRaw });
}
Object.keys(t).forEach((tensor3) => tfjs_esm_exports.dispose(t[tensor3]));
return results;
}
async function predict6(input, config3) {
@ -5573,8 +5578,8 @@ async function predict7(image29, config3) {
if (!(model7 == null ? void 0 : model7.inputs[0].shape))
return null;
const resize = tfjs_esm_exports.image.resizeBilinear(image29, [model7.inputs[0].shape[2], model7.inputs[0].shape[1]], false);
const enhance3 = tfjs_esm_exports.mul(resize, tf22);
const norm = tfjs_esm_exports.sub(enhance3, tf1);
const enhance3 = tfjs_esm_exports.mul(resize, constants.tf2);
const norm = tfjs_esm_exports.sub(enhance3, constants.tf1);
return norm;
});
let resT;
@ -5677,10 +5682,10 @@ async function predict8(image29, config3, idx, count2) {
const t = {};
const inputSize8 = (model8 == null ? void 0 : model8.inputs[0].shape) ? model8.inputs[0].shape[2] : 0;
t.resize = tfjs_esm_exports.image.resizeBilinear(image29, [inputSize8, inputSize8], false);
t.channels = tfjs_esm_exports.mul(t.resize, rgb);
t.channels = tfjs_esm_exports.mul(t.resize, constants.rgb);
t.grayscale = tfjs_esm_exports.sum(t.channels, 3, true);
t.grayscaleSub = tfjs_esm_exports.sub(t.grayscale, tf05);
t.grayscaleMul = tfjs_esm_exports.mul(t.grayscaleSub, tf22);
t.grayscaleSub = tfjs_esm_exports.sub(t.grayscale, constants.tf05);
t.grayscaleMul = tfjs_esm_exports.mul(t.grayscaleSub, constants.tf2);
t.emotion = model8 == null ? void 0 : model8.execute(t.grayscaleMul);
lastTime8 = now();
const data = await t.emotion.data();
@ -6019,7 +6024,7 @@ function enhance2(input) {
if (!(model12 == null ? void 0 : model12.inputs[0].shape))
return tensor3;
const crop2 = tfjs_esm_exports.image.resizeBilinear(tensor3, [model12.inputs[0].shape[2], model12.inputs[0].shape[1]], false);
const norm = tfjs_esm_exports.mul(crop2, tf255);
const norm = tfjs_esm_exports.mul(crop2, constants.tf255);
tfjs_esm_exports.dispose(crop2);
return norm;
}
@ -9174,8 +9179,8 @@ var HandDetector = class {
async predict(input, config3) {
const t = {};
t.resize = tfjs_esm_exports.image.resizeBilinear(input, [this.inputSize, this.inputSize]);
t.div = tfjs_esm_exports.div(t.resize, tf127);
t.image = tfjs_esm_exports.sub(t.div, tf1);
t.div = tfjs_esm_exports.div(t.resize, constants.tf127);
t.image = tfjs_esm_exports.sub(t.div, constants.tf1);
t.batched = this.model.execute(t.image);
t.predictions = tfjs_esm_exports.squeeze(t.batched);
t.slice = tfjs_esm_exports.slice(t.predictions, [0, 0], [-1, 1]);
@ -9305,7 +9310,7 @@ var HandPipeline = class {
const rotationMatrix = buildRotationMatrix2(-angle, palmCenter);
const newBox = useFreshBox ? this.getBoxForPalmLandmarks(currentBox.palmLandmarks, rotationMatrix) : currentBox;
const croppedInput = cutBoxFromImageAndResize2(newBox, rotatedImage, [this.inputSize, this.inputSize]);
const handImage = tfjs_esm_exports.div(croppedInput, tf255);
const handImage = tfjs_esm_exports.div(croppedInput, constants.tf255);
tfjs_esm_exports.dispose(croppedInput);
tfjs_esm_exports.dispose(rotatedImage);
const [confidenceT, keypoints] = this.handPoseModel.execute(handImage);
@ -10012,7 +10017,7 @@ async function detectFingers(input, h, config3) {
if (input && models2[1] && config3.hand.landmarks && h.score > (config3.hand.minConfidence || 0)) {
const t = {};
t.crop = tfjs_esm_exports.image.cropAndResize(input, [h.boxCrop], [0], [inputSize6[1][0], inputSize6[1][1]], "bilinear");
t.div = tfjs_esm_exports.div(t.crop, tf255);
t.div = tfjs_esm_exports.div(t.crop, constants.tf255);
[t.score, t.keypoints] = models2[1].execute(t.div, ["Identity_1", "Identity"]);
const rawScore = (await t.score.data())[0];
const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100;
@ -10504,7 +10509,7 @@ async function predict16(image29, config3) {
return new Promise(async (resolve) => {
const outputSize2 = [image29.shape[2], image29.shape[1]];
const resize = tfjs_esm_exports.image.resizeBilinear(image29, [model15.inputSize, model15.inputSize], false);
const norm = tfjs_esm_exports.div(resize, tf255);
const norm = tfjs_esm_exports.div(resize, constants.tf255);
const transpose = norm.transpose([0, 3, 1, 2]);
tfjs_esm_exports.dispose(norm);
tfjs_esm_exports.dispose(resize);
@ -10888,7 +10893,7 @@ async function process5(input, background, config3) {
const t = {};
t.resize = tfjs_esm_exports.image.resizeBilinear(inputImage.tensor, [model17.inputs[0].shape ? model17.inputs[0].shape[1] : 0, model17.inputs[0].shape ? model17.inputs[0].shape[2] : 0], false);
tfjs_esm_exports.dispose(inputImage.tensor);
t.norm = tfjs_esm_exports.div(t.resize, tf255);
t.norm = tfjs_esm_exports.div(t.resize, constants.tf255);
t.res = model17.execute(t.norm);
t.squeeze = tfjs_esm_exports.squeeze(t.res, 0);
if (t.squeeze.shape[2] === 2) {
@ -11257,6 +11262,7 @@ async function check(instance, force = false) {
try {
await tfjs_esm_exports.setBackend(instance.config.backend);
await tfjs_esm_exports.ready();
init();
} catch (err) {
log("error: cannot set backend:", instance.config.backend, err);
return false;

File diff suppressed because one or more lines are too long

188
dist/human.esm.js vendored
View File

@ -1837,7 +1837,7 @@ var require_xorshift7 = __commonJS({
me.i = i + 1 & 7;
return v;
};
function init2(me2, seed2) {
function init22(me2, seed2) {
var j, w, X = [];
if (seed2 === (seed2 | 0)) {
w = X[0] = seed2;
@ -1861,7 +1861,7 @@ var require_xorshift7 = __commonJS({
me2.next();
}
}
init2(me, seed);
init22(me, seed);
}
function copy2(f, t) {
t.x = f.x.slice();
@ -1921,7 +1921,7 @@ var require_xor4096 = __commonJS({
me.i = i;
return v + (w ^ w >>> 16) | 0;
};
function init2(me2, seed2) {
function init22(me2, seed2) {
var t, v, i, j, w, X = [], limit = 128;
if (seed2 === (seed2 | 0)) {
v = seed2;
@ -1963,7 +1963,7 @@ var require_xor4096 = __commonJS({
me2.X = X;
me2.i = i;
}
init2(me, seed);
init22(me, seed);
}
function copy2(f, t) {
t.i = f.i;
@ -6185,12 +6185,12 @@ function getGlobalMap() {
}
return ns._tfGlobals;
}
function getGlobal(key, init2) {
function getGlobal(key, init22) {
const globalMap = getGlobalMap();
if (globalMap.has(key)) {
return globalMap.get(key);
} else {
const singleton = init2();
const singleton = init22();
globalMap.set(key, singleton);
return globalMap.get(key);
}
@ -9083,8 +9083,8 @@ async function moveModel(sourceURL, destURL) {
return cloneModelInternal(sourceURL, destURL, deleteSource);
}
var PlatformBrowser = class {
fetch(path, init2) {
return fetch(path, init2);
fetch(path, init22) {
return fetch(path, init22);
}
now() {
return performance.now();
@ -9517,18 +9517,18 @@ var HTTPRequest = class {
if (modelArtifacts.modelTopology instanceof ArrayBuffer) {
throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");
}
const init2 = Object.assign({ method: this.DEFAULT_METHOD }, this.requestInit);
init2.body = new FormData();
const init22 = Object.assign({ method: this.DEFAULT_METHOD }, this.requestInit);
init22.body = new FormData();
const weightsManifest = [{
paths: ["./model.weights.bin"],
weights: modelArtifacts.weightSpecs
}];
const modelTopologyAndWeightManifest = getModelJSONForModelArtifacts(modelArtifacts, weightsManifest);
init2.body.append("model.json", new Blob([JSON.stringify(modelTopologyAndWeightManifest)], { type: JSON_TYPE }), "model.json");
init22.body.append("model.json", new Blob([JSON.stringify(modelTopologyAndWeightManifest)], { type: JSON_TYPE }), "model.json");
if (modelArtifacts.weightData != null) {
init2.body.append("model.weights.bin", new Blob([modelArtifacts.weightData], { type: OCTET_STREAM_MIME_TYPE }), "model.weights.bin");
init22.body.append("model.weights.bin", new Blob([modelArtifacts.weightData], { type: OCTET_STREAM_MIME_TYPE }), "model.weights.bin");
}
const response = await this.fetch(this.path, init2);
const response = await this.fetch(this.path, init22);
if (response.ok) {
return {
modelArtifactsInfo: getModelArtifactsInfoForJSON(modelArtifacts),
@ -24804,13 +24804,13 @@ var DepthwiseConv2D = class extends BaseConv {
};
DepthwiseConv2D.className = "DepthwiseConv2D";
serialization_exports.registerClass(DepthwiseConv2D);
function standardizeArgs(inputs, initialState, constants14, numConstants) {
function standardizeArgs(inputs, initialState, constants3, numConstants) {
if (Array.isArray(inputs)) {
if (initialState != null || constants14 != null) {
if (initialState != null || constants3 != null) {
throw new ValueError("When inputs is an array, neither initialState or constants should be provided");
}
if (numConstants != null) {
constants14 = inputs.slice(inputs.length - numConstants, inputs.length);
constants3 = inputs.slice(inputs.length - numConstants, inputs.length);
inputs = inputs.slice(0, inputs.length - numConstants);
}
if (inputs.length > 1) {
@ -24826,10 +24826,10 @@ function standardizeArgs(inputs, initialState, constants14, numConstants) {
}
}
initialState = toListOrNull(initialState);
constants14 = toListOrNull(constants14);
return { inputs, initialState, constants: constants14 };
constants3 = toListOrNull(constants3);
return { inputs, initialState, constants: constants3 };
}
function rnn(stepFunction, inputs, initialStates, goBackwards = false, mask3, constants14, unroll = false, needPerStepOutputs = false) {
function rnn(stepFunction, inputs, initialStates, goBackwards = false, mask3, constants3, unroll = false, needPerStepOutputs = false) {
return tidy(() => {
const ndim = inputs.shape.length;
if (ndim < 3) {
@ -24837,7 +24837,7 @@ function rnn(stepFunction, inputs, initialStates, goBackwards = false, mask3, co
}
const axes = [1, 0].concat(range2(2, ndim));
inputs = transpose(inputs, axes);
if (constants14 != null) {
if (constants3 != null) {
throw new NotImplementedError("The rnn() functoin of the deeplearn.js backend does not support constants yet.");
}
if (unroll) {
@ -25077,14 +25077,14 @@ var _RNN = class extends Layer {
}
apply(inputs, kwargs) {
let initialState = kwargs == null ? null : kwargs["initialState"];
let constants14 = kwargs == null ? null : kwargs["constants"];
let constants3 = kwargs == null ? null : kwargs["constants"];
if (kwargs == null) {
kwargs = {};
}
const standardized = standardizeArgs(inputs, initialState, constants14, this.numConstants);
const standardized = standardizeArgs(inputs, initialState, constants3, this.numConstants);
inputs = standardized.inputs;
initialState = standardized.initialState;
constants14 = standardized.constants;
constants3 = standardized.constants;
let additionalInputs = [];
let additionalSpecs = [];
if (initialState != null) {
@ -25096,10 +25096,10 @@ var _RNN = class extends Layer {
}
additionalSpecs = additionalSpecs.concat(this.stateSpec);
}
if (constants14 != null) {
kwargs["constants"] = constants14;
additionalInputs = additionalInputs.concat(constants14);
this.numConstants = constants14.length;
if (constants3 != null) {
kwargs["constants"] = constants3;
additionalInputs = additionalInputs.concat(constants3);
this.numConstants = constants3.length;
}
const isTensor = additionalInputs[0] instanceof SymbolicTensor;
if (isTensor) {
@ -25996,13 +25996,13 @@ var ConvLSTM2DCell = class extends LSTMCell {
if (this.useBias) {
let biasInitializer;
if (this.unitForgetBias) {
const init2 = this.biasInitializer;
const init22 = this.biasInitializer;
const filters = this.filters;
biasInitializer = new (_a = class extends Initializer {
apply(shape, dtype) {
const biasI = init2.apply([filters]);
const biasI = init22.apply([filters]);
const biasF = ones2([filters]);
const biasCAndO = init2.apply([filters * 2]);
const biasCAndO = init22.apply([filters * 2]);
return concatenate([biasI, biasF, biasCAndO]);
}
}, _a.className = "CustomInit", _a)();
@ -28198,19 +28198,19 @@ var Bidirectional = class extends Wrapper {
}
apply(inputs, kwargs) {
let initialState = kwargs == null ? null : kwargs["initialState"];
let constants14 = kwargs == null ? null : kwargs["constants"];
let constants3 = kwargs == null ? null : kwargs["constants"];
if (kwargs == null) {
kwargs = {};
}
const standardized = standardizeArgs(inputs, initialState, constants14, this.numConstants);
const standardized = standardizeArgs(inputs, initialState, constants3, this.numConstants);
inputs = standardized.inputs;
initialState = standardized.initialState;
constants14 = standardized.constants;
constants3 = standardized.constants;
if (Array.isArray(inputs)) {
initialState = inputs.slice(1);
inputs = inputs[0];
}
if ((initialState == null || initialState.length === 0) && constants14 == null) {
if ((initialState == null || initialState.length === 0) && constants3 == null) {
return super.apply(inputs, kwargs);
}
const additionalInputs = [];
@ -28227,7 +28227,7 @@ var Bidirectional = class extends Wrapper {
this.backwardLayer.stateSpec = stateSpecs.slice(numStates / 2);
additionalSpecs.push(...stateSpecs);
}
if (constants14 != null) {
if (constants3 != null) {
throw new NotImplementedError("Support for constants in Bidirectional layers is not implemented yet.");
}
const isSymbolicTensor = additionalInputs[0] instanceof SymbolicTensor;
@ -39449,7 +39449,7 @@ async function urlChunkIterator(url, options3 = {}, fetchFunc) {
}
}
var getRequestInitFromRequest = (request) => {
const init2 = {
const init22 = {
method: request.method,
headers: request.headers,
body: request.body,
@ -39460,7 +39460,7 @@ var getRequestInitFromRequest = (request) => {
referrer: request.referrer,
integrity: request.integrity
};
return init2;
return init22;
};
function isLocalPath(source) {
return typeof source === "string" && source.substr(0, 7) === "file://";
@ -71309,9 +71309,9 @@ async function histogramEqualization(inputImage) {
const range7 = [sub(max7[0], min7[0]), sub(max7[1], min7[1]), sub(max7[2], min7[2])];
const fact = [div(maxValue, range7[0]), div(maxValue, range7[1]), div(maxValue, range7[2])];
const enh = [mul(sub5[0], fact[0]), mul(sub5[1], fact[1]), mul(sub5[2], fact[2])];
const rgb3 = stack([enh[0], enh[1], enh[2]], 2);
const reshape7 = reshape(rgb3, [1, squeeze2.shape[0], squeeze2.shape[1], 3]);
dispose([...channels, ...min7, ...max7, ...sub5, ...range7, ...fact, ...enh, rgb3, squeeze2]);
const rgb2 = stack([enh[0], enh[1], enh[2]], 2);
const reshape7 = reshape(rgb2, [1, squeeze2.shape[0], squeeze2.shape[1], 3]);
dispose([...channels, ...min7, ...max7, ...sub5, ...range7, ...fact, ...enh, rgb2, squeeze2]);
return reshape7;
}
@ -71374,9 +71374,9 @@ async function process2(input2, config3, getTensor2 = true) {
if (input2.shape[2] === 3) {
tensor2 = expandDims(input2, 0);
} else if (input2.shape[2] === 4) {
const rgb3 = slice3d(input2, [0, 0, 0], [-1, -1, 3]);
tensor2 = expandDims(rgb3, 0);
dispose(rgb3);
const rgb2 = slice3d(input2, [0, 0, 0], [-1, -1, 3]);
tensor2 = expandDims(rgb2, 0);
dispose(rgb2);
}
} else if (input2.shape.length === 4) {
if (input2.shape[3] === 3) {
@ -71525,9 +71525,9 @@ async function process2(input2, config3, getTensor2 = true) {
}
}
if (depth === 4) {
const rgb3 = slice3d(pixels, [0, 0, 0], [-1, -1, 3]);
const rgb2 = slice3d(pixels, [0, 0, 0], [-1, -1, 3]);
dispose(pixels);
pixels = rgb3;
pixels = rgb2;
}
if (!pixels)
throw new Error("input error: cannot create tensor");
@ -71765,12 +71765,22 @@ async function predict(image7, config3, idx, count3) {
}
// src/tfjs/constants.ts
var tf255 = scalar(255, "float32");
var tf1 = scalar(1, "float32");
var tf22 = scalar(2, "float32");
var tf05 = scalar(0.5, "float32");
var tf127 = scalar(127.5, "float32");
var rgb = tensor1d([0.2989, 0.587, 0.114], "float32");
var constants = {
tf255: 255,
tf1: 1,
tf2: 2,
tf05: 0.5,
tf127: 127.5,
rgb: [0.2989, 0.587, 0.114]
};
function init2() {
constants.tf255 = scalar(255, "float32");
constants.tf1 = scalar(1, "float32");
constants.tf2 = scalar(2, "float32");
constants.tf05 = scalar(0.5, "float32");
constants.tf127 = scalar(127.5, "float32");
constants.rgb = tensor1d([0.2989, 0.587, 0.114], "float32");
}
// src/gear/ssrnet-age.ts
var model3;
@ -71809,7 +71819,7 @@ async function predict2(image7, config3, idx, count3) {
return;
const t = {};
t.resize = image.resizeBilinear(image7, [model3.inputs[0].shape[2], model3.inputs[0].shape[1]], false);
t.enhance = mul(t.resize, tf255);
t.enhance = mul(t.resize, constants.tf255);
const obj = { age: 0 };
if (config3.face["ssrnet"].enabled)
t.age = model3.execute(t.enhance);
@ -71831,7 +71841,7 @@ var last4 = [];
var lastCount3 = 0;
var lastTime3 = 0;
var skipped3 = Number.MAX_SAFE_INTEGER;
var rgb2 = [0.2989, 0.587, 0.114];
var rgb = [0.2989, 0.587, 0.114];
async function load3(config3) {
if (env2.initial)
model4 = null;
@ -71863,11 +71873,11 @@ async function predict3(image7, config3, idx, count3) {
t.resize = image.resizeBilinear(image7, [model4.inputs[0].shape[2], model4.inputs[0].shape[1]], false);
t.enhance = tidy(() => {
const [red, green, blue] = split(t.resize, 3, 3);
const redNorm = mul(red, rgb2[0]);
const greenNorm = mul(green, rgb2[1]);
const blueNorm = mul(blue, rgb2[2]);
const redNorm = mul(red, rgb[0]);
const greenNorm = mul(green, rgb[1]);
const blueNorm = mul(blue, rgb[2]);
const grayscale = addN([redNorm, greenNorm, blueNorm]);
const normalize = mul(sub(grayscale, tf05), 2);
const normalize = mul(sub(grayscale, constants.tf05), 2);
return normalize;
});
const obj = { gender: "", genderScore: 0 };
@ -75234,7 +75244,7 @@ var cutBoxFromImageAndResize = (box4, image7, cropSize) => {
const h = image7.shape[1];
const w = image7.shape[2];
const crop2 = image.cropAndResize(image7, [[box4.startPoint[1] / h, box4.startPoint[0] / w, box4.endPoint[1] / h, box4.endPoint[0] / w]], [0], cropSize);
const norm2 = div(crop2, tf255);
const norm2 = div(crop2, constants.tf255);
dispose(crop2);
return norm2;
};
@ -75389,7 +75399,7 @@ function decodeBounds(boxOutputs) {
t.boxSizes = slice(boxOutputs, [0, 3], [-1, 2]);
t.boxSizesNormalized = div(t.boxSizes, inputSizeT);
t.centersNormalized = div(t.centers, inputSizeT);
t.halfBoxSize = div(t.boxSizesNormalized, tf22);
t.halfBoxSize = div(t.boxSizesNormalized, constants.tf2);
t.starts = sub(t.centersNormalized, t.halfBoxSize);
t.ends = add2(t.centersNormalized, t.halfBoxSize);
t.startNormalized = mul(t.starts, inputSizeT);
@ -75404,8 +75414,8 @@ async function getBoxes(inputImage, config3) {
return { boxes: [] };
const t = {};
t.resized = image.resizeBilinear(inputImage, [inputSize, inputSize]);
t.div = div(t.resized, tf127);
t.normalized = sub(t.div, tf05);
t.div = div(t.resized, constants.tf127);
t.normalized = sub(t.div, constants.tf05);
const res = model6 == null ? void 0 : model6.execute(t.normalized);
if (Array.isArray(res)) {
const sorted = res.sort((a, b) => a.size - b.size);
@ -75573,7 +75583,7 @@ async function prepareImage(input2) {
];
t.pad = pad(input2, padding);
t.resize = image.resizeBilinear(t.pad, [inputSize2[1][0], inputSize2[1][1]]);
const final = div(t.resize, tf255);
const final = div(t.resize, constants.tf255);
Object.keys(t).forEach((tensor2) => dispose(t[tensor2]));
return final;
}
@ -75754,26 +75764,20 @@ async function load6(config3) {
async function process3(res, outputShape, config3) {
if (!res)
return [];
const t = {};
const results = [];
const detections = await res.array();
const squeezeT = squeeze(res);
dispose(res);
const arr = split(squeezeT, 6, 1);
dispose(squeezeT);
const stackT = stack([arr[1], arr[0], arr[3], arr[2]], 1);
const boxesT = squeeze(stackT);
dispose(stackT);
const scoresT = squeeze(arr[4]);
const classesT = squeeze(arr[5]);
arr.forEach((t) => dispose(t));
const nmsT = await image.nonMaxSuppressionAsync(boxesT, scoresT, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
dispose(boxesT);
dispose(scoresT);
dispose(classesT);
const nms = await nmsT.data();
dispose(nmsT);
t.squeeze = squeeze(res);
const arr = split(t.squeeze, 6, 1);
t.stack = stack([arr[1], arr[0], arr[3], arr[2]], 1);
t.boxes = squeeze(t.stack);
t.scores = squeeze(arr[4]);
t.classes = squeeze(arr[5]);
dispose([res, ...arr]);
t.nms = await image.nonMaxSuppressionAsync(t.boxes, t.scores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
const nms = await t.nms.data();
let i = 0;
for (const id of nms) {
for (const id of Array.from(nms)) {
const score = Math.trunc(100 * detections[0][id][4]) / 100;
const classVal = detections[0][id][5];
const label = labels[classVal].label;
@ -75795,6 +75799,7 @@ async function process3(res, outputShape, config3) {
];
results.push({ id: i++, score, class: classVal, label, box: box4, boxRaw });
}
Object.keys(t).forEach((tensor2) => dispose(t[tensor2]));
return results;
}
async function predict6(input2, config3) {
@ -75899,8 +75904,8 @@ async function predict7(image7, config3) {
if (!(model8 == null ? void 0 : model8.inputs[0].shape))
return null;
const resize = image.resizeBilinear(image7, [model8.inputs[0].shape[2], model8.inputs[0].shape[1]], false);
const enhance3 = mul(resize, tf22);
const norm2 = sub(enhance3, tf1);
const enhance3 = mul(resize, constants.tf2);
const norm2 = sub(enhance3, constants.tf1);
return norm2;
});
let resT;
@ -76003,10 +76008,10 @@ async function predict8(image7, config3, idx, count3) {
const t = {};
const inputSize8 = (model9 == null ? void 0 : model9.inputs[0].shape) ? model9.inputs[0].shape[2] : 0;
t.resize = image.resizeBilinear(image7, [inputSize8, inputSize8], false);
t.channels = mul(t.resize, rgb);
t.channels = mul(t.resize, constants.rgb);
t.grayscale = sum2(t.channels, 3, true);
t.grayscaleSub = sub(t.grayscale, tf05);
t.grayscaleMul = mul(t.grayscaleSub, tf22);
t.grayscaleSub = sub(t.grayscale, constants.tf05);
t.grayscaleMul = mul(t.grayscaleSub, constants.tf2);
t.emotion = model9 == null ? void 0 : model9.execute(t.grayscaleMul);
lastTime8 = now();
const data = await t.emotion.data();
@ -76345,7 +76350,7 @@ function enhance2(input2) {
if (!(model13 == null ? void 0 : model13.inputs[0].shape))
return tensor2;
const crop2 = image.resizeBilinear(tensor2, [model13.inputs[0].shape[2], model13.inputs[0].shape[1]], false);
const norm2 = mul(crop2, tf255);
const norm2 = mul(crop2, constants.tf255);
dispose(crop2);
return norm2;
}
@ -79500,8 +79505,8 @@ var HandDetector = class {
async predict(input2, config3) {
const t = {};
t.resize = image.resizeBilinear(input2, [this.inputSize, this.inputSize]);
t.div = div(t.resize, tf127);
t.image = sub(t.div, tf1);
t.div = div(t.resize, constants.tf127);
t.image = sub(t.div, constants.tf1);
t.batched = this.model.execute(t.image);
t.predictions = squeeze(t.batched);
t.slice = slice(t.predictions, [0, 0], [-1, 1]);
@ -79631,7 +79636,7 @@ var HandPipeline = class {
const rotationMatrix = buildRotationMatrix2(-angle, palmCenter);
const newBox = useFreshBox ? this.getBoxForPalmLandmarks(currentBox.palmLandmarks, rotationMatrix) : currentBox;
const croppedInput = cutBoxFromImageAndResize2(newBox, rotatedImage, [this.inputSize, this.inputSize]);
const handImage = div(croppedInput, tf255);
const handImage = div(croppedInput, constants.tf255);
dispose(croppedInput);
dispose(rotatedImage);
const [confidenceT, keypoints] = this.handPoseModel.execute(handImage);
@ -80338,7 +80343,7 @@ async function detectFingers(input2, h, config3) {
if (input2 && models2[1] && config3.hand.landmarks && h.score > (config3.hand.minConfidence || 0)) {
const t = {};
t.crop = image.cropAndResize(input2, [h.boxCrop], [0], [inputSize6[1][0], inputSize6[1][1]], "bilinear");
t.div = div(t.crop, tf255);
t.div = div(t.crop, constants.tf255);
[t.score, t.keypoints] = models2[1].execute(t.div, ["Identity_1", "Identity"]);
const rawScore = (await t.score.data())[0];
const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100;
@ -80830,7 +80835,7 @@ async function predict16(image7, config3) {
return new Promise(async (resolve) => {
const outputSize2 = [image7.shape[2], image7.shape[1]];
const resize = image.resizeBilinear(image7, [model16.inputSize, model16.inputSize], false);
const norm2 = div(resize, tf255);
const norm2 = div(resize, constants.tf255);
const transpose6 = norm2.transpose([0, 3, 1, 2]);
dispose(norm2);
dispose(resize);
@ -81214,7 +81219,7 @@ async function process5(input2, background, config3) {
const t = {};
t.resize = image.resizeBilinear(inputImage.tensor, [model18.inputs[0].shape ? model18.inputs[0].shape[1] : 0, model18.inputs[0].shape ? model18.inputs[0].shape[2] : 0], false);
dispose(inputImage.tensor);
t.norm = div(t.resize, tf255);
t.norm = div(t.resize, constants.tf255);
t.res = model18.execute(t.norm);
t.squeeze = squeeze(t.res, 0);
if (t.squeeze.shape[2] === 2) {
@ -81583,6 +81588,7 @@ async function check(instance, force = false) {
try {
await setBackend(instance.config.backend);
await ready();
init2();
} catch (err) {
log("error: cannot set backend:", instance.config.backend, err);
return false;

File diff suppressed because one or more lines are too long

820
dist/human.js vendored

File diff suppressed because one or more lines are too long

390
dist/human.node-gpu.js vendored
View File

@ -993,9 +993,9 @@ async function histogramEqualization(inputImage) {
const range = [tf.sub(max4[0], min2[0]), tf.sub(max4[1], min2[1]), tf.sub(max4[2], min2[2])];
const fact = [tf.div(maxValue, range[0]), tf.div(maxValue, range[1]), tf.div(maxValue, range[2])];
const enh = [tf.mul(sub9[0], fact[0]), tf.mul(sub9[1], fact[1]), tf.mul(sub9[2], fact[2])];
const rgb3 = tf.stack([enh[0], enh[1], enh[2]], 2);
const reshape8 = tf.reshape(rgb3, [1, squeeze9.shape[0], squeeze9.shape[1], 3]);
tf.dispose([...channels, ...min2, ...max4, ...sub9, ...range, ...fact, ...enh, rgb3, squeeze9]);
const rgb2 = tf.stack([enh[0], enh[1], enh[2]], 2);
const reshape8 = tf.reshape(rgb2, [1, squeeze9.shape[0], squeeze9.shape[1], 3]);
tf.dispose([...channels, ...min2, ...max4, ...sub9, ...range, ...fact, ...enh, rgb2, squeeze9]);
return reshape8;
}
@ -1058,9 +1058,9 @@ async function process2(input, config3, getTensor = true) {
if (input.shape[2] === 3) {
tensor3 = tf2.expandDims(input, 0);
} else if (input.shape[2] === 4) {
const rgb3 = tf2.slice3d(input, [0, 0, 0], [-1, -1, 3]);
tensor3 = tf2.expandDims(rgb3, 0);
tf2.dispose(rgb3);
const rgb2 = tf2.slice3d(input, [0, 0, 0], [-1, -1, 3]);
tensor3 = tf2.expandDims(rgb2, 0);
tf2.dispose(rgb2);
}
} else if (input.shape.length === 4) {
if (input.shape[3] === 3) {
@ -1209,9 +1209,9 @@ async function process2(input, config3, getTensor = true) {
}
}
if (depth === 4) {
const rgb3 = tf2.slice3d(pixels, [0, 0, 0], [-1, -1, 3]);
const rgb2 = tf2.slice3d(pixels, [0, 0, 0], [-1, -1, 3]);
tf2.dispose(pixels);
pixels = rgb3;
pixels = rgb2;
}
if (!pixels)
throw new Error("input error: cannot create tensor");
@ -1381,13 +1381,13 @@ var Env = class {
var env = new Env();
// src/human.ts
var tf36 = __toModule(require_tfjs_esm());
var tf35 = __toModule(require_tfjs_esm());
// package.json
var version = "2.5.2";
// src/tfjs/humangl.ts
var tf31 = __toModule(require_tfjs_esm());
var tf30 = __toModule(require_tfjs_esm());
// src/gear/gear.ts
var tf4 = __toModule(require_tfjs_esm());
@ -1460,12 +1460,22 @@ var tf6 = __toModule(require_tfjs_esm());
// src/tfjs/constants.ts
var tf5 = __toModule(require_tfjs_esm());
var tf255 = tf5.scalar(255, "float32");
var tf1 = tf5.scalar(1, "float32");
var tf22 = tf5.scalar(2, "float32");
var tf05 = tf5.scalar(0.5, "float32");
var tf127 = tf5.scalar(127.5, "float32");
var rgb = tf5.tensor1d([0.2989, 0.587, 0.114], "float32");
var constants = {
tf255: 255,
tf1: 1,
tf2: 2,
tf05: 0.5,
tf127: 127.5,
rgb: [0.2989, 0.587, 0.114]
};
function init() {
constants.tf255 = tf5.scalar(255, "float32");
constants.tf1 = tf5.scalar(1, "float32");
constants.tf2 = tf5.scalar(2, "float32");
constants.tf05 = tf5.scalar(0.5, "float32");
constants.tf127 = tf5.scalar(127.5, "float32");
constants.rgb = tf5.tensor1d([0.2989, 0.587, 0.114], "float32");
}
// src/gear/ssrnet-age.ts
var model2;
@ -1504,7 +1514,7 @@ async function predict2(image29, config3, idx, count2) {
return;
const t = {};
t.resize = tf6.image.resizeBilinear(image29, [model2.inputs[0].shape[2], model2.inputs[0].shape[1]], false);
t.enhance = tf6.mul(t.resize, tf255);
t.enhance = tf6.mul(t.resize, constants.tf255);
const obj = { age: 0 };
if (config3.face["ssrnet"].enabled)
t.age = model2.execute(t.enhance);
@ -1527,7 +1537,7 @@ var last4 = [];
var lastCount3 = 0;
var lastTime3 = 0;
var skipped3 = Number.MAX_SAFE_INTEGER;
var rgb2 = [0.2989, 0.587, 0.114];
var rgb = [0.2989, 0.587, 0.114];
async function load3(config3) {
if (env.initial)
model3 = null;
@ -1559,11 +1569,11 @@ async function predict3(image29, config3, idx, count2) {
t.resize = tf7.image.resizeBilinear(image29, [model3.inputs[0].shape[2], model3.inputs[0].shape[1]], false);
t.enhance = tf7.tidy(() => {
const [red, green, blue] = tf7.split(t.resize, 3, 3);
const redNorm = tf7.mul(red, rgb2[0]);
const greenNorm = tf7.mul(green, rgb2[1]);
const blueNorm = tf7.mul(blue, rgb2[2]);
const redNorm = tf7.mul(red, rgb[0]);
const greenNorm = tf7.mul(green, rgb[1]);
const blueNorm = tf7.mul(blue, rgb[2]);
const grayscale = tf7.addN([redNorm, greenNorm, blueNorm]);
const normalize = tf7.mul(tf7.sub(grayscale, tf05), 2);
const normalize = tf7.mul(tf7.sub(grayscale, constants.tf05), 2);
return normalize;
});
const obj = { gender: "", genderScore: 0 };
@ -4937,7 +4947,7 @@ var cutBoxFromImageAndResize = (box4, image29, cropSize) => {
const h = image29.shape[1];
const w = image29.shape[2];
const crop2 = tf9.image.cropAndResize(image29, [[box4.startPoint[1] / h, box4.startPoint[0] / w, box4.endPoint[1] / h, box4.endPoint[0] / w]], [0], cropSize);
const norm = tf9.div(crop2, tf255);
const norm = tf9.div(crop2, constants.tf255);
tf9.dispose(crop2);
return norm;
};
@ -5092,7 +5102,7 @@ function decodeBounds(boxOutputs) {
t.boxSizes = tf10.slice(boxOutputs, [0, 3], [-1, 2]);
t.boxSizesNormalized = tf10.div(t.boxSizes, inputSizeT);
t.centersNormalized = tf10.div(t.centers, inputSizeT);
t.halfBoxSize = tf10.div(t.boxSizesNormalized, tf22);
t.halfBoxSize = tf10.div(t.boxSizesNormalized, constants.tf2);
t.starts = tf10.sub(t.centersNormalized, t.halfBoxSize);
t.ends = tf10.add(t.centersNormalized, t.halfBoxSize);
t.startNormalized = tf10.mul(t.starts, inputSizeT);
@ -5107,8 +5117,8 @@ async function getBoxes(inputImage, config3) {
return { boxes: [] };
const t = {};
t.resized = tf10.image.resizeBilinear(inputImage, [inputSize, inputSize]);
t.div = tf10.div(t.resized, tf127);
t.normalized = tf10.sub(t.div, tf05);
t.div = tf10.div(t.resized, constants.tf127);
t.normalized = tf10.sub(t.div, constants.tf05);
const res = model5 == null ? void 0 : model5.execute(t.normalized);
if (Array.isArray(res)) {
const sorted = res.sort((a, b) => a.size - b.size);
@ -5279,7 +5289,7 @@ async function prepareImage(input) {
];
t.pad = tf11.pad(input, padding);
t.resize = tf11.image.resizeBilinear(t.pad, [inputSize2[1][0], inputSize2[1][1]]);
const final = tf11.div(t.resize, tf255);
const final = tf11.div(t.resize, constants.tf255);
Object.keys(t).forEach((tensor3) => tf11.dispose(t[tensor3]));
return final;
}
@ -5463,26 +5473,20 @@ async function load6(config3) {
async function process3(res, outputShape, config3) {
if (!res)
return [];
const t = {};
const results = [];
const detections = await res.array();
const squeezeT = tf12.squeeze(res);
tf12.dispose(res);
const arr = tf12.split(squeezeT, 6, 1);
tf12.dispose(squeezeT);
const stackT = tf12.stack([arr[1], arr[0], arr[3], arr[2]], 1);
const boxesT = tf12.squeeze(stackT);
tf12.dispose(stackT);
const scoresT = tf12.squeeze(arr[4]);
const classesT = tf12.squeeze(arr[5]);
arr.forEach((t) => tf12.dispose(t));
const nmsT = await tf12.image.nonMaxSuppressionAsync(boxesT, scoresT, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
tf12.dispose(boxesT);
tf12.dispose(scoresT);
tf12.dispose(classesT);
const nms = await nmsT.data();
tf12.dispose(nmsT);
t.squeeze = tf12.squeeze(res);
const arr = tf12.split(t.squeeze, 6, 1);
t.stack = tf12.stack([arr[1], arr[0], arr[3], arr[2]], 1);
t.boxes = tf12.squeeze(t.stack);
t.scores = tf12.squeeze(arr[4]);
t.classes = tf12.squeeze(arr[5]);
tf12.dispose([res, ...arr]);
t.nms = await tf12.image.nonMaxSuppressionAsync(t.boxes, t.scores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
const nms = await t.nms.data();
let i = 0;
for (const id of nms) {
for (const id of Array.from(nms)) {
const score = Math.trunc(100 * detections[0][id][4]) / 100;
const classVal = detections[0][id][5];
const label = labels[classVal].label;
@ -5504,6 +5508,7 @@ async function process3(res, outputShape, config3) {
];
results.push({ id: i++, score, class: classVal, label, box: box4, boxRaw });
}
Object.keys(t).forEach((tensor3) => tf12.dispose(t[tensor3]));
return results;
}
async function predict6(input, config3) {
@ -5611,8 +5616,8 @@ async function predict7(image29, config3) {
if (!(model7 == null ? void 0 : model7.inputs[0].shape))
return null;
const resize = tf13.image.resizeBilinear(image29, [model7.inputs[0].shape[2], model7.inputs[0].shape[1]], false);
const enhance3 = tf13.mul(resize, tf22);
const norm = tf13.sub(enhance3, tf1);
const enhance3 = tf13.mul(resize, constants.tf2);
const norm = tf13.sub(enhance3, constants.tf1);
return norm;
});
let resT;
@ -5716,10 +5721,10 @@ async function predict8(image29, config3, idx, count2) {
const t = {};
const inputSize8 = (model8 == null ? void 0 : model8.inputs[0].shape) ? model8.inputs[0].shape[2] : 0;
t.resize = tf14.image.resizeBilinear(image29, [inputSize8, inputSize8], false);
t.channels = tf14.mul(t.resize, rgb);
t.channels = tf14.mul(t.resize, constants.rgb);
t.grayscale = tf14.sum(t.channels, 3, true);
t.grayscaleSub = tf14.sub(t.grayscale, tf05);
t.grayscaleMul = tf14.mul(t.grayscaleSub, tf22);
t.grayscaleSub = tf14.sub(t.grayscale, constants.tf05);
t.grayscaleMul = tf14.mul(t.grayscaleSub, constants.tf2);
t.emotion = model8 == null ? void 0 : model8.execute(t.grayscaleMul);
lastTime8 = now();
const data = await t.emotion.data();
@ -6064,7 +6069,7 @@ function enhance2(input) {
if (!(model12 == null ? void 0 : model12.inputs[0].shape))
return tensor3;
const crop2 = tf18.image.resizeBilinear(tensor3, [model12.inputs[0].shape[2], model12.inputs[0].shape[1]], false);
const norm = tf18.mul(crop2, tf255);
const norm = tf18.mul(crop2, constants.tf255);
tf18.dispose(crop2);
return norm;
}
@ -6117,7 +6122,7 @@ async function predict11(image29, config3, idx, count2) {
}
// src/hand/handpose.ts
var tf23 = __toModule(require_tfjs_esm());
var tf22 = __toModule(require_tfjs_esm());
// src/hand/handposedetector.ts
var tf20 = __toModule(require_tfjs_esm());
@ -9226,8 +9231,8 @@ var HandDetector = class {
async predict(input, config3) {
const t = {};
t.resize = tf20.image.resizeBilinear(input, [this.inputSize, this.inputSize]);
t.div = tf20.div(t.resize, tf127);
t.image = tf20.sub(t.div, tf1);
t.div = tf20.div(t.resize, constants.tf127);
t.image = tf20.sub(t.div, constants.tf1);
t.batched = this.model.execute(t.image);
t.predictions = tf20.squeeze(t.batched);
t.slice = tf20.slice(t.predictions, [0, 0], [-1, 1]);
@ -9358,7 +9363,7 @@ var HandPipeline = class {
const rotationMatrix = buildRotationMatrix2(-angle, palmCenter);
const newBox = useFreshBox ? this.getBoxForPalmLandmarks(currentBox.palmLandmarks, rotationMatrix) : currentBox;
const croppedInput = cutBoxFromImageAndResize2(newBox, rotatedImage, [this.inputSize, this.inputSize]);
const handImage = tf21.div(croppedInput, tf255);
const handImage = tf21.div(croppedInput, constants.tf255);
tf21.dispose(croppedInput);
tf21.dispose(rotatedImage);
const [confidenceT, keypoints] = this.handPoseModel.execute(handImage);
@ -9888,8 +9893,8 @@ async function load13(config3) {
}
if (!handDetectorModel || !handPoseModel) {
[handDetectorModel, handPoseModel] = await Promise.all([
config3.hand.enabled ? tf23.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""), { fromTFHub: (((_b = config3.hand.detector) == null ? void 0 : _b.modelPath) || "").includes("tfhub.dev") }) : null,
config3.hand.landmarks ? tf23.loadGraphModel(join(config3.modelBasePath, ((_c = config3.hand.skeleton) == null ? void 0 : _c.modelPath) || ""), { fromTFHub: (((_d = config3.hand.skeleton) == null ? void 0 : _d.modelPath) || "").includes("tfhub.dev") }) : null
config3.hand.enabled ? tf22.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""), { fromTFHub: (((_b = config3.hand.detector) == null ? void 0 : _b.modelPath) || "").includes("tfhub.dev") }) : null,
config3.hand.landmarks ? tf22.loadGraphModel(join(config3.modelBasePath, ((_c = config3.hand.skeleton) == null ? void 0 : _c.modelPath) || ""), { fromTFHub: (((_d = config3.hand.skeleton) == null ? void 0 : _d.modelPath) || "").includes("tfhub.dev") }) : null
]);
if (config3.hand.enabled) {
if (!handDetectorModel || !handDetectorModel["modelUrl"])
@ -9947,7 +9952,7 @@ function crop(box4) {
}
// src/hand/handtrack.ts
var tf24 = __toModule(require_tfjs_esm());
var tf23 = __toModule(require_tfjs_esm());
var models2 = [null, null];
var modelOutputNodes = ["StatefulPartitionedCall/Postprocessor/Slice", "StatefulPartitionedCall/Postprocessor/ExpandDims_1"];
var inputSize6 = [[0, 0], [0, 0]];
@ -9977,7 +9982,7 @@ async function loadDetect2(config3) {
models2[0] = null;
if (!models2[0]) {
fakeOps(["tensorlistreserve", "enter", "tensorlistfromtensor", "merge", "loopcond", "switch", "exit", "tensorliststack", "nextiteration", "tensorlistsetitem", "tensorlistgetitem", "reciprocal", "shape", "split", "where"], config3);
models2[0] = await tf24.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""));
models2[0] = await tf23.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""));
const inputs = Object.values(models2[0].modelSignature["inputs"]);
inputSize6[0][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;
inputSize6[0][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;
@ -9994,7 +9999,7 @@ async function loadSkeleton(config3) {
if (env.initial)
models2[1] = null;
if (!models2[1]) {
models2[1] = await tf24.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.skeleton) == null ? void 0 : _a.modelPath) || ""));
models2[1] = await tf23.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.skeleton) == null ? void 0 : _a.modelPath) || ""));
const inputs = Object.values(models2[1].modelSignature["inputs"]);
inputSize6[1][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;
inputSize6[1][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;
@ -10014,27 +10019,27 @@ async function detectHands(input, config3) {
const ratio = (input.shape[2] || 1) / (input.shape[1] || 1);
const height = Math.min(Math.round((input.shape[1] || 0) / 8) * 8, maxDetectorResolution);
const width = Math.round(height * ratio / 8) * 8;
t.resize = tf24.image.resizeBilinear(input, [height, width]);
t.cast = tf24.cast(t.resize, "int32");
t.resize = tf23.image.resizeBilinear(input, [height, width]);
t.cast = tf23.cast(t.resize, "int32");
[t.rawScores, t.rawBoxes] = await models2[0].executeAsync(t.cast, modelOutputNodes);
t.boxes = tf24.squeeze(t.rawBoxes, [0, 2]);
t.scores = tf24.squeeze(t.rawScores, [0]);
const classScores = tf24.unstack(t.scores, 1);
tf24.dispose(classScores[faceIndex]);
t.boxes = tf23.squeeze(t.rawBoxes, [0, 2]);
t.scores = tf23.squeeze(t.rawScores, [0]);
const classScores = tf23.unstack(t.scores, 1);
tf23.dispose(classScores[faceIndex]);
classScores.splice(faceIndex, 1);
t.filtered = tf24.stack(classScores, 1);
tf24.dispose(classScores);
t.max = tf24.max(t.filtered, 1);
t.argmax = tf24.argMax(t.filtered, 1);
t.filtered = tf23.stack(classScores, 1);
tf23.dispose(classScores);
t.max = tf23.max(t.filtered, 1);
t.argmax = tf23.argMax(t.filtered, 1);
let id = 0;
t.nms = await tf24.image.nonMaxSuppressionAsync(t.boxes, t.max, config3.hand.maxDetected, config3.hand.iouThreshold, config3.hand.minConfidence);
t.nms = await tf23.image.nonMaxSuppressionAsync(t.boxes, t.max, config3.hand.maxDetected, config3.hand.iouThreshold, config3.hand.minConfidence);
const nms = await t.nms.data();
const scores = await t.max.data();
const classNum = await t.argmax.data();
for (const nmsIndex of Array.from(nms)) {
const boxSlice = tf24.slice(t.boxes, nmsIndex, 1);
const boxSlice = tf23.slice(t.boxes, nmsIndex, 1);
const boxYX = await boxSlice.data();
tf24.dispose(boxSlice);
tf23.dispose(boxSlice);
const boxData = [boxYX[1], boxYX[0], boxYX[3] - boxYX[1], boxYX[2] - boxYX[0]];
const boxRaw = scale(boxData, detectorExpandFact);
const boxCrop = crop(boxRaw);
@ -10044,7 +10049,7 @@ async function detectHands(input, config3) {
const hand3 = { id: id++, score, box: boxFull, boxRaw, boxCrop, label };
hands.push(hand3);
}
Object.keys(t).forEach((tensor3) => tf24.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf23.dispose(t[tensor3]));
hands.sort((a, b) => b.score - a.score);
if (hands.length > (config3.hand.maxDetected || 1))
hands.length = config3.hand.maxDetected || 1;
@ -10065,14 +10070,14 @@ async function detectFingers(input, h, config3) {
};
if (input && models2[1] && config3.hand.landmarks && h.score > (config3.hand.minConfidence || 0)) {
const t = {};
t.crop = tf24.image.cropAndResize(input, [h.boxCrop], [0], [inputSize6[1][0], inputSize6[1][1]], "bilinear");
t.div = tf24.div(t.crop, tf255);
t.crop = tf23.image.cropAndResize(input, [h.boxCrop], [0], [inputSize6[1][0], inputSize6[1][1]], "bilinear");
t.div = tf23.div(t.crop, constants.tf255);
[t.score, t.keypoints] = models2[1].execute(t.div, ["Identity_1", "Identity"]);
const rawScore = (await t.score.data())[0];
const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100;
if (score >= (config3.hand.minConfidence || 0)) {
hand3.fingerScore = score;
t.reshaped = tf24.reshape(t.keypoints, [-1, 3]);
t.reshaped = tf23.reshape(t.keypoints, [-1, 3]);
const coordsData = await t.reshaped.array();
const coordsRaw = coordsData.map((kpt4) => [kpt4[0] / inputSize6[1][1], kpt4[1] / inputSize6[1][0], kpt4[2] || 0]);
const coordsNorm = coordsRaw.map((kpt4) => [kpt4[0] * h.boxRaw[2], kpt4[1] * h.boxRaw[3], kpt4[2] || 0]);
@ -10086,7 +10091,7 @@ async function detectFingers(input, h, config3) {
hand3.annotations[key] = fingerMap[key].map((index2) => hand3.landmarks && hand3.keypoints[index2] ? hand3.keypoints[index2] : null);
}
}
Object.keys(t).forEach((tensor3) => tf24.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf23.dispose(t[tensor3]));
}
return hand3;
}
@ -10137,7 +10142,7 @@ async function predict13(input, config3) {
}
// src/face/liveness.ts
var tf25 = __toModule(require_tfjs_esm());
var tf24 = __toModule(require_tfjs_esm());
var model13;
var cached2 = [];
var skipped13 = Number.MAX_SAFE_INTEGER;
@ -10148,7 +10153,7 @@ async function load14(config3) {
if (env.initial)
model13 = null;
if (!model13) {
model13 = await tf25.loadGraphModel(join(config3.modelBasePath, ((_a = config3.face.liveness) == null ? void 0 : _a.modelPath) || ""));
model13 = await tf24.loadGraphModel(join(config3.modelBasePath, ((_a = config3.face.liveness) == null ? void 0 : _a.modelPath) || ""));
if (!model13 || !model13["modelUrl"])
log("load model failed:", (_b = config3.face.liveness) == null ? void 0 : _b.modelPath);
else if (config3.debug)
@ -10169,19 +10174,19 @@ async function predict14(image29, config3, idx, count2) {
}
skipped13 = 0;
return new Promise(async (resolve) => {
const resize = tf25.image.resizeBilinear(image29, [(model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[2] : 0, (model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[1] : 0], false);
const resize = tf24.image.resizeBilinear(image29, [(model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[2] : 0, (model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[1] : 0], false);
const res = model13 == null ? void 0 : model13.execute(resize);
const num = (await res.data())[0];
cached2[idx] = Math.round(100 * num) / 100;
lastCount8 = count2;
lastTime14 = now();
tf25.dispose([resize, res]);
tf24.dispose([resize, res]);
resolve(cached2[idx]);
});
}
// src/body/movenet.ts
var tf27 = __toModule(require_tfjs_esm());
var tf26 = __toModule(require_tfjs_esm());
// src/body/movenetcoords.ts
var movenetcoords_exports = {};
@ -10241,7 +10246,7 @@ var connected3 = {
};
// src/body/movenetfix.ts
var tf26 = __toModule(require_tfjs_esm());
var tf25 = __toModule(require_tfjs_esm());
var maxJitter = 5e-3;
var cache4 = {
keypoints: [],
@ -10315,10 +10320,10 @@ function padInput(input, inputSize8) {
[input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0],
[0, 0]
];
t.pad = tf26.pad(input, cache4.padding);
t.resize = tf26.image.resizeBilinear(t.pad, [inputSize8, inputSize8]);
const final = tf26.cast(t.resize, "int32");
Object.keys(t).forEach((tensor3) => tf26.dispose(t[tensor3]));
t.pad = tf25.pad(input, cache4.padding);
t.resize = tf25.image.resizeBilinear(t.pad, [inputSize8, inputSize8]);
const final = tf25.cast(t.resize, "int32");
Object.keys(t).forEach((tensor3) => tf25.dispose(t[tensor3]));
return final;
}
function rescaleBody(body4, outputSize2) {
@ -10353,7 +10358,7 @@ async function load15(config3) {
model14 = null;
if (!model14) {
fakeOps(["size"], config3);
model14 = await tf27.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
model14 = await tf26.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
if (!model14 || !model14["modelUrl"])
log("load model failed:", config3.body.modelPath);
else if (config3.debug)
@ -10465,13 +10470,13 @@ async function predict15(input, config3) {
rescaleBody(body4, [input.shape[2] || 1, input.shape[1] || 1]);
jitter(body4.keypoints);
}
Object.keys(t).forEach((tensor3) => tf27.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf26.dispose(t[tensor3]));
resolve(cache5.bodies);
});
}
// src/object/nanodet.ts
var tf28 = __toModule(require_tfjs_esm());
var tf27 = __toModule(require_tfjs_esm());
var model15;
var last9 = [];
var lastTime15 = 0;
@ -10479,7 +10484,7 @@ var skipped15 = Number.MAX_SAFE_INTEGER;
var scaleBox = 2.5;
async function load16(config3) {
if (!model15 || env.initial) {
model15 = await tf28.loadGraphModel(join(config3.modelBasePath, config3.object.modelPath || ""));
model15 = await tf27.loadGraphModel(join(config3.modelBasePath, config3.object.modelPath || ""));
const inputs = Object.values(model15.modelSignature["inputs"]);
model15.inputSize = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : null;
if (!model15 || !model15.modelUrl)
@ -10494,7 +10499,7 @@ async function process4(res, inputSize8, outputShape, config3) {
let id = 0;
let results = [];
for (const strideSize of [1, 2, 4]) {
tf28.tidy(async () => {
tf27.tidy(async () => {
var _a, _b;
const baseSize = strideSize * 13;
const scoresT = (_a = res.find((a) => a.shape[1] === baseSize ** 2 && a.shape[2] === labels.length)) == null ? void 0 : _a.squeeze();
@ -10539,14 +10544,14 @@ async function process4(res, inputSize8, outputShape, config3) {
}
});
}
res.forEach((t) => tf28.dispose(t));
res.forEach((t) => tf27.dispose(t));
const nmsBoxes = results.map((a) => [a.boxRaw[1], a.boxRaw[0], a.boxRaw[3], a.boxRaw[2]]);
const nmsScores = results.map((a) => a.score);
let nmsIdx = [];
if (nmsBoxes && nmsBoxes.length > 0) {
const nms = await tf28.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
const nms = await tf27.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
nmsIdx = await nms.data();
tf28.dispose(nms);
tf27.dispose(nms);
}
results = results.filter((_val, idx) => nmsIdx.includes(idx)).sort((a, b) => b.score - a.score);
return results;
@ -10563,16 +10568,16 @@ async function predict16(image29, config3) {
return last9;
return new Promise(async (resolve) => {
const outputSize2 = [image29.shape[2], image29.shape[1]];
const resize = tf28.image.resizeBilinear(image29, [model15.inputSize, model15.inputSize], false);
const norm = tf28.div(resize, tf255);
const resize = tf27.image.resizeBilinear(image29, [model15.inputSize, model15.inputSize], false);
const norm = tf27.div(resize, constants.tf255);
const transpose = norm.transpose([0, 3, 1, 2]);
tf28.dispose(norm);
tf28.dispose(resize);
tf27.dispose(norm);
tf27.dispose(resize);
let objectT;
if (config3.object.enabled)
objectT = model15.execute(transpose);
lastTime15 = now();
tf28.dispose(transpose);
tf27.dispose(transpose);
const obj = await process4(objectT, model15.inputSize, outputSize2, config3);
last9 = obj;
resolve(obj);
@ -10580,7 +10585,7 @@ async function predict16(image29, config3) {
}
// src/body/posenet.ts
var tf29 = __toModule(require_tfjs_esm());
var tf28 = __toModule(require_tfjs_esm());
// src/body/posenetutils.ts
var partNames = [
@ -10891,19 +10896,19 @@ function decode(offsets, scores, displacementsFwd, displacementsBwd, maxDetected
return poses;
}
async function predict17(input, config3) {
const res = tf29.tidy(() => {
const res = tf28.tidy(() => {
if (!model16.inputs[0].shape)
return [];
const resized = tf29.image.resizeBilinear(input, [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]);
const normalized = tf29.sub(tf29.div(tf29.cast(resized, "float32"), 127.5), 1);
const resized = tf28.image.resizeBilinear(input, [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]);
const normalized = tf28.sub(tf28.div(tf28.cast(resized, "float32"), 127.5), 1);
const results = model16.execute(normalized, poseNetOutputs);
const results3d = results.map((y) => tf29.squeeze(y, [0]));
const results3d = results.map((y) => tf28.squeeze(y, [0]));
results3d[1] = results3d[1].sigmoid();
return results3d;
});
const buffers = await Promise.all(res.map((tensor3) => tensor3.buffer()));
for (const t of res)
tf29.dispose(t);
tf28.dispose(t);
const decoded = await decode(buffers[0], buffers[1], buffers[2], buffers[3], config3.body.maxDetected, config3.body.minConfidence);
if (!model16.inputs[0].shape)
return [];
@ -10912,7 +10917,7 @@ async function predict17(input, config3) {
}
async function load17(config3) {
if (!model16 || env.initial) {
model16 = await tf29.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
model16 = await tf28.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
if (!model16 || !model16["modelUrl"])
log("load model failed:", config3.body.modelPath);
else if (config3.debug)
@ -10923,12 +10928,12 @@ async function load17(config3) {
}
// src/segmentation/segmentation.ts
var tf30 = __toModule(require_tfjs_esm());
var tf29 = __toModule(require_tfjs_esm());
var model17;
var busy = false;
async function load18(config3) {
if (!model17 || env.initial) {
model17 = await tf30.loadGraphModel(join(config3.modelBasePath, config3.segmentation.modelPath || ""));
model17 = await tf29.loadGraphModel(join(config3.modelBasePath, config3.segmentation.modelPath || ""));
if (!model17 || !model17["modelUrl"])
log("load model failed:", config3.segmentation.modelPath);
else if (config3.debug)
@ -10950,30 +10955,30 @@ async function process5(input, background, config3) {
if (!inputImage.tensor)
return { data: [], canvas: null, alpha: null };
const t = {};
t.resize = tf30.image.resizeBilinear(inputImage.tensor, [model17.inputs[0].shape ? model17.inputs[0].shape[1] : 0, model17.inputs[0].shape ? model17.inputs[0].shape[2] : 0], false);
tf30.dispose(inputImage.tensor);
t.norm = tf30.div(t.resize, tf255);
t.resize = tf29.image.resizeBilinear(inputImage.tensor, [model17.inputs[0].shape ? model17.inputs[0].shape[1] : 0, model17.inputs[0].shape ? model17.inputs[0].shape[2] : 0], false);
tf29.dispose(inputImage.tensor);
t.norm = tf29.div(t.resize, constants.tf255);
t.res = model17.execute(t.norm);
t.squeeze = tf30.squeeze(t.res, 0);
t.squeeze = tf29.squeeze(t.res, 0);
if (t.squeeze.shape[2] === 2) {
t.softmax = tf30.softmax(t.squeeze);
[t.bg, t.fg] = tf30.unstack(t.softmax, 2);
t.expand = tf30.expandDims(t.fg, 2);
t.pad = tf30.expandDims(t.expand, 0);
t.crop = tf30.image.cropAndResize(t.pad, [[0, 0, 0.5, 0.5]], [0], [width, height]);
t.data = tf30.squeeze(t.crop, 0);
t.softmax = tf29.softmax(t.squeeze);
[t.bg, t.fg] = tf29.unstack(t.softmax, 2);
t.expand = tf29.expandDims(t.fg, 2);
t.pad = tf29.expandDims(t.expand, 0);
t.crop = tf29.image.cropAndResize(t.pad, [[0, 0, 0.5, 0.5]], [0], [width, height]);
t.data = tf29.squeeze(t.crop, 0);
} else {
t.data = tf30.image.resizeBilinear(t.squeeze, [height, width]);
t.data = tf29.image.resizeBilinear(t.squeeze, [height, width]);
}
const data = Array.from(await t.data.data());
if (env.node && !env.Canvas && typeof ImageData === "undefined") {
if (config3.debug)
log("canvas support missing");
Object.keys(t).forEach((tensor3) => tf30.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf29.dispose(t[tensor3]));
return { data, canvas: null, alpha: null };
}
const alphaCanvas = canvas(width, height);
await tf30.browser.toPixels(t.data, alphaCanvas);
await tf29.browser.toPixels(t.data, alphaCanvas);
const alphaCtx = alphaCanvas.getContext("2d");
if (config3.segmentation.blur && config3.segmentation.blur > 0)
alphaCtx.filter = `blur(${config3.segmentation.blur}px)`;
@ -10996,12 +11001,12 @@ async function process5(input, background, config3) {
if (background && compositeCanvas) {
mergedCanvas = canvas(width, height);
const bgImage = await process2(background, config3);
tf30.dispose(bgImage.tensor);
tf29.dispose(bgImage.tensor);
const ctxMerge = mergedCanvas.getContext("2d");
ctxMerge.drawImage(bgImage.canvas, 0, 0, mergedCanvas.width, mergedCanvas.height);
ctxMerge.drawImage(compositeCanvas, 0, 0);
}
Object.keys(t).forEach((tensor3) => tf30.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf29.dispose(t[tensor3]));
busy = false;
return { data, canvas: compositeCanvas, alpha: alphaCanvas };
}
@ -11163,11 +11168,11 @@ async function register(instance) {
var _a;
if (instance.config.backend !== "humangl")
return;
if (config2.name in tf31.engine().registry && (!config2.gl || !config2.gl.getParameter(config2.gl.VERSION))) {
if (config2.name in tf30.engine().registry && (!config2.gl || !config2.gl.getParameter(config2.gl.VERSION))) {
log("error: humangl backend invalid context");
reset(instance);
}
if (!tf31.findBackend(config2.name)) {
if (!tf30.findBackend(config2.name)) {
try {
config2.canvas = await canvas(100, 100);
} catch (err) {
@ -11201,29 +11206,29 @@ async function register(instance) {
return;
}
try {
tf31.setWebGLContext(2, config2.gl);
tf30.setWebGLContext(2, config2.gl);
} catch (err) {
log("error: cannot set WebGL context:", err);
return;
}
try {
const ctx = new tf31.GPGPUContext(config2.gl);
tf31.registerBackend(config2.name, () => new tf31.MathBackendWebGL(ctx), config2.priority);
const ctx = new tf30.GPGPUContext(config2.gl);
tf30.registerBackend(config2.name, () => new tf30.MathBackendWebGL(ctx), config2.priority);
} catch (err) {
log("error: cannot register WebGL backend:", err);
return;
}
try {
const kernels = tf31.getKernelsForBackend("webgl");
const kernels = tf30.getKernelsForBackend("webgl");
kernels.forEach((kernelConfig) => {
const newKernelConfig = { ...kernelConfig, backendName: config2.name };
tf31.registerKernel(newKernelConfig);
tf30.registerKernel(newKernelConfig);
});
} catch (err) {
log("error: cannot update WebGL backend registration:", err);
return;
}
const current = tf31.backend().getGPGPUContext ? tf31.backend().getGPGPUContext().gl : null;
const current = tf30.backend().getGPGPUContext ? tf30.backend().getGPGPUContext().gl : null;
if (current) {
log(`humangl webgl version:${current.getParameter(current.VERSION)} renderer:${current.getParameter(current.RENDERER)}`);
} else {
@ -11231,7 +11236,7 @@ async function register(instance) {
return;
}
try {
tf31.ENV.set("WEBGL_VERSION", 2);
tf30.ENV.set("WEBGL_VERSION", 2);
} catch (err) {
log("error: cannot set WebGL backend flags:", err);
return;
@ -11242,30 +11247,30 @@ async function register(instance) {
}
// src/tfjs/backend.ts
var tf32 = __toModule(require_tfjs_esm());
var tf31 = __toModule(require_tfjs_esm());
function registerCustomOps() {
if (!env.kernels.includes("mod")) {
const kernelMod = {
kernelName: "Mod",
backendName: tf32.getBackend(),
kernelFunc: (op) => tf32.tidy(() => tf32.sub(op.inputs.a, tf32.mul(tf32.div(op.inputs.a, op.inputs.b), op.inputs.b)))
backendName: tf31.getBackend(),
kernelFunc: (op) => tf31.tidy(() => tf31.sub(op.inputs.a, tf31.mul(tf31.div(op.inputs.a, op.inputs.b), op.inputs.b)))
};
tf32.registerKernel(kernelMod);
tf31.registerKernel(kernelMod);
env.kernels.push("mod");
}
if (!env.kernels.includes("floormod")) {
const kernelMod = {
kernelName: "FloorMod",
backendName: tf32.getBackend(),
kernelFunc: (op) => tf32.tidy(() => tf32.floorDiv(op.inputs.a / op.inputs.b) * op.inputs.b + tf32.mod(op.inputs.a, op.inputs.b))
backendName: tf31.getBackend(),
kernelFunc: (op) => tf31.tidy(() => tf31.floorDiv(op.inputs.a / op.inputs.b) * op.inputs.b + tf31.mod(op.inputs.a, op.inputs.b))
};
tf32.registerKernel(kernelMod);
tf31.registerKernel(kernelMod);
env.kernels.push("floormod");
}
}
async function check(instance, force = false) {
instance.state = "backend";
if (force || env.initial || instance.config.backend && instance.config.backend.length > 0 && tf32.getBackend() !== instance.config.backend) {
if (force || env.initial || instance.config.backend && instance.config.backend.length > 0 && tf31.getBackend() !== instance.config.backend) {
const timeStamp = now();
if (instance.config.backend && instance.config.backend.length > 0) {
if (typeof window === "undefined" && typeof WorkerGlobalScope !== "undefined" && instance.config.debug) {
@ -11294,7 +11299,7 @@ async function check(instance, force = false) {
}
if (instance.config.backend === "humangl")
await register(instance);
const available = Object.keys(tf32.engine().registryFactory);
const available = Object.keys(tf31.engine().registryFactory);
if (instance.config.debug)
log("available backends:", available);
if (!available.includes(instance.config.backend)) {
@ -11308,46 +11313,47 @@ async function check(instance, force = false) {
if (instance.config.backend === "wasm") {
if (instance.config.debug)
log("wasm path:", instance.config.wasmPath);
if (typeof (tf32 == null ? void 0 : tf32.setWasmPaths) !== "undefined")
await tf32.setWasmPaths(instance.config.wasmPath);
if (typeof (tf31 == null ? void 0 : tf31.setWasmPaths) !== "undefined")
await tf31.setWasmPaths(instance.config.wasmPath);
else
throw new Error("backend error: attempting to use wasm backend but wasm path is not set");
const simd = await tf32.env().getAsync("WASM_HAS_SIMD_SUPPORT");
const mt = await tf32.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT");
const simd = await tf31.env().getAsync("WASM_HAS_SIMD_SUPPORT");
const mt = await tf31.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT");
if (instance.config.debug)
log(`wasm execution: ${simd ? "SIMD" : "no SIMD"} ${mt ? "multithreaded" : "singlethreaded"}`);
if (instance.config.debug && !simd)
log("warning: wasm simd support is not enabled");
}
try {
await tf32.setBackend(instance.config.backend);
await tf32.ready();
await tf31.setBackend(instance.config.backend);
await tf31.ready();
init();
} catch (err) {
log("error: cannot set backend:", instance.config.backend, err);
return false;
}
}
if (tf32.getBackend() === "humangl") {
tf32.ENV.set("CHECK_COMPUTATION_FOR_ERRORS", false);
tf32.ENV.set("WEBGL_CPU_FORWARD", true);
tf32.ENV.set("WEBGL_USE_SHAPES_UNIFORMS", true);
tf32.ENV.set("CPU_HANDOFF_SIZE_THRESHOLD", 256);
if (tf31.getBackend() === "humangl") {
tf31.ENV.set("CHECK_COMPUTATION_FOR_ERRORS", false);
tf31.ENV.set("WEBGL_CPU_FORWARD", true);
tf31.ENV.set("WEBGL_USE_SHAPES_UNIFORMS", true);
tf31.ENV.set("CPU_HANDOFF_SIZE_THRESHOLD", 256);
if (typeof instance.config["deallocate"] !== "undefined" && instance.config["deallocate"]) {
log("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:", true);
tf32.ENV.set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0);
tf31.ENV.set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0);
}
if (tf32.backend().getGPGPUContext) {
const gl = await tf32.backend().getGPGPUContext().gl;
if (tf31.backend().getGPGPUContext) {
const gl = await tf31.backend().getGPGPUContext().gl;
if (instance.config.debug)
log(`gl version:${gl.getParameter(gl.VERSION)} renderer:${gl.getParameter(gl.RENDERER)}`);
}
}
if (tf32.getBackend() === "webgpu") {
if (tf31.getBackend() === "webgpu") {
}
tf32.enableProdMode();
await tf32.ready();
tf31.enableProdMode();
await tf31.ready();
instance.performance.initBackend = Math.trunc(now() - timeStamp);
instance.config.backend = tf32.getBackend();
instance.config.backend = tf31.getBackend();
await env.updateBackend();
registerCustomOps();
}
@ -11363,9 +11369,9 @@ function fakeOps(kernelNames, config3) {
log("kernelFunc", kernelName, config3.backend);
}
};
tf32.registerKernel(kernelConfig);
tf31.registerKernel(kernelConfig);
}
env.kernels = tf32.getKernelsForBackend(tf32.getBackend()).map((kernel) => kernel.kernelName.toLowerCase());
env.kernels = tf31.getKernelsForBackend(tf31.getBackend()).map((kernel) => kernel.kernelName.toLowerCase());
}
// src/util/draw.ts
@ -11849,10 +11855,10 @@ async function all(inCanvas2, result, drawOptions) {
}
// src/face/face.ts
var tf34 = __toModule(require_tfjs_esm());
var tf33 = __toModule(require_tfjs_esm());
// src/face/mask.ts
var tf33 = __toModule(require_tfjs_esm());
var tf32 = __toModule(require_tfjs_esm());
var expandFact = 0.1;
var alpha = 0.5;
function insidePoly(x, y, polygon) {
@ -11888,7 +11894,7 @@ async function mask(face5) {
}
}
const output = buffer.toTensor();
tf33.dispose(buffer);
tf32.dispose(buffer);
return output;
}
@ -12027,79 +12033,79 @@ var detectFace = async (instance, input) => {
}
if ((_a = instance.config.face.detector) == null ? void 0 : _a.mask) {
const masked = await mask(faces[i]);
tf34.dispose(faces[i].tensor);
tf33.dispose(faces[i].tensor);
faces[i].tensor = masked;
}
const rotation = faces[i].mesh && faces[i].mesh.length > 200 ? calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]) : null;
instance.analyze("Start Emotion:");
if (instance.config.async) {
emotionRes = ((_b = instance.config.face.emotion) == null ? void 0 : _b.enabled) ? predict8(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
emotionRes = ((_b = instance.config.face.emotion) == null ? void 0 : _b.enabled) ? predict8(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:emotion";
timeStamp = now();
emotionRes = ((_c = instance.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict8(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
emotionRes = ((_c = instance.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict8(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.emotion = env.perfadd ? (instance.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End Emotion:");
instance.analyze("Start AntiSpoof:");
if (instance.config.async) {
antispoofRes = ((_d = instance.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict4(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
antispoofRes = ((_d = instance.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict4(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:antispoof";
timeStamp = now();
antispoofRes = ((_e = instance.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict4(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
antispoofRes = ((_e = instance.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict4(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.antispoof = env.perfadd ? (instance.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End AntiSpoof:");
instance.analyze("Start Liveness:");
if (instance.config.async) {
livenessRes = ((_f = instance.config.face.liveness) == null ? void 0 : _f.enabled) ? predict14(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
livenessRes = ((_f = instance.config.face.liveness) == null ? void 0 : _f.enabled) ? predict14(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:liveness";
timeStamp = now();
livenessRes = ((_g = instance.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict14(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
livenessRes = ((_g = instance.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict14(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.liveness = env.perfadd ? (instance.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End Liveness:");
instance.analyze("Start GEAR:");
if (instance.config.async) {
gearRes = ((_h = instance.config.face["gear"]) == null ? void 0 : _h.enabled) ? predict(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
gearRes = ((_h = instance.config.face["gear"]) == null ? void 0 : _h.enabled) ? predict(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
} else {
instance.state = "run:gear";
timeStamp = now();
gearRes = ((_i = instance.config.face["gear"]) == null ? void 0 : _i.enabled) ? await predict(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
gearRes = ((_i = instance.config.face["gear"]) == null ? void 0 : _i.enabled) ? await predict(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
instance.performance.gear = Math.trunc(now() - timeStamp);
}
instance.analyze("End GEAR:");
instance.analyze("Start SSRNet:");
if (instance.config.async) {
ageRes = ((_j = instance.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict2(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_k = instance.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict3(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
ageRes = ((_j = instance.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict2(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_k = instance.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict3(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
} else {
instance.state = "run:ssrnet";
timeStamp = now();
ageRes = ((_l = instance.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict2(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_m = instance.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict3(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
ageRes = ((_l = instance.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict2(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_m = instance.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict3(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
instance.performance.ssrnet = Math.trunc(now() - timeStamp);
}
instance.analyze("End SSRNet:");
instance.analyze("Start MobileFaceNet:");
if (instance.config.async) {
mobilefacenetRes = ((_n = instance.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict9(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
mobilefacenetRes = ((_n = instance.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict9(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
} else {
instance.state = "run:mobilefacenet";
timeStamp = now();
mobilefacenetRes = ((_o = instance.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict9(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
mobilefacenetRes = ((_o = instance.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict9(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
instance.performance.mobilefacenet = Math.trunc(now() - timeStamp);
}
instance.analyze("End MobileFaceNet:");
instance.analyze("Start Description:");
if (instance.config.async) {
descRes = ((_p = instance.config.face.description) == null ? void 0 : _p.enabled) ? predict11(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
descRes = ((_p = instance.config.face.description) == null ? void 0 : _p.enabled) ? predict11(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:description";
timeStamp = now();
descRes = ((_q = instance.config.face.description) == null ? void 0 : _q.enabled) ? await predict11(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
descRes = ((_q = instance.config.face.description) == null ? void 0 : _q.enabled) ? await predict11(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.description = env.perfadd ? (instance.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End Description:");
@ -12118,8 +12124,8 @@ var detectFace = async (instance, input) => {
delete faces[i].annotations.rightEyeIris;
}
const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0;
const tensor3 = ((_z = instance.config.face.detector) == null ? void 0 : _z.return) ? tf34.squeeze(faces[i].tensor) : null;
tf34.dispose(faces[i].tensor);
const tensor3 = ((_z = instance.config.face.detector) == null ? void 0 : _z.return) ? tf33.squeeze(faces[i].tensor) : null;
tf33.dispose(faces[i].tensor);
if (faces[i].tensor)
delete faces[i].tensor;
const res = {
@ -13233,7 +13239,7 @@ lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/
2Q==`;
// src/warmup.ts
var tf35 = __toModule(require_tfjs_esm());
var tf34 = __toModule(require_tfjs_esm());
async function warmupBitmap(instance) {
const b64toBlob = (base64, type = "application/octet-stream") => fetch(`data:${type};base64,${base64}`).then((res2) => res2.blob());
let blob;
@ -13305,8 +13311,8 @@ async function warmupNode(instance) {
if (!img)
return null;
let res;
if (typeof tf35["node"] !== "undefined") {
const data = tf35["node"].decodeJpeg(img);
if (typeof tf34["node"] !== "undefined") {
const data = tf34["node"].decodeJpeg(img);
const expanded = data.expandDims(0);
instance.tf.dispose(data);
res = await instance.detect(expanded, instance.config);
@ -13376,7 +13382,7 @@ var Human = class {
return null;
if (!input)
return "input is not defined";
if (this.env.node && !(input instanceof tf36.Tensor))
if (this.env.node && !(input instanceof tf35.Tensor))
return "input must be a tensor";
try {
this.tf.getBackend();
@ -13394,7 +13400,7 @@ var Human = class {
(_a = this.events) == null ? void 0 : _a.dispatchEvent(new Event(event));
});
this.env = env;
config.wasmPath = tf36.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf36.version_core}/dist/`;
config.wasmPath = tf35.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf35.version_core}/dist/`;
config.modelBasePath = env.browser ? "../models/" : "file://models/";
config.backend = env.browser ? "humangl" : "tensorflow";
this.version = version;
@ -13403,7 +13409,7 @@ var Human = class {
Object.seal(this.config);
if (userConfig)
this.config = mergeDeep(this.config, userConfig);
this.tf = tf36;
this.tf = tf35;
this.state = "idle";
__privateSet(this, _numTensors, 0);
__privateSet(this, _analyzeMemoryLeaks, false);
@ -13469,7 +13475,7 @@ var Human = class {
log(`tfjs version: ${this.tf.version_core}`);
if (!await check(this))
log("error: backend check failed");
await tf36.ready();
await tf35.ready();
if (this.env.browser) {
if (this.config.debug)
log("configuration:", this.config);
@ -13671,7 +13677,7 @@ var Human = class {
return join2(faceRes, bodyRes, handRes, gestureRes, shape);
}
};
tf36.dispose(img.tensor);
tf35.dispose(img.tensor);
this.emit("detect");
this.state = "idle";
resolve(this.result);

View File

@ -994,9 +994,9 @@ async function histogramEqualization(inputImage) {
const range = [tf.sub(max4[0], min2[0]), tf.sub(max4[1], min2[1]), tf.sub(max4[2], min2[2])];
const fact = [tf.div(maxValue, range[0]), tf.div(maxValue, range[1]), tf.div(maxValue, range[2])];
const enh = [tf.mul(sub9[0], fact[0]), tf.mul(sub9[1], fact[1]), tf.mul(sub9[2], fact[2])];
const rgb3 = tf.stack([enh[0], enh[1], enh[2]], 2);
const reshape8 = tf.reshape(rgb3, [1, squeeze9.shape[0], squeeze9.shape[1], 3]);
tf.dispose([...channels, ...min2, ...max4, ...sub9, ...range, ...fact, ...enh, rgb3, squeeze9]);
const rgb2 = tf.stack([enh[0], enh[1], enh[2]], 2);
const reshape8 = tf.reshape(rgb2, [1, squeeze9.shape[0], squeeze9.shape[1], 3]);
tf.dispose([...channels, ...min2, ...max4, ...sub9, ...range, ...fact, ...enh, rgb2, squeeze9]);
return reshape8;
}
@ -1059,9 +1059,9 @@ async function process2(input, config3, getTensor = true) {
if (input.shape[2] === 3) {
tensor3 = tf2.expandDims(input, 0);
} else if (input.shape[2] === 4) {
const rgb3 = tf2.slice3d(input, [0, 0, 0], [-1, -1, 3]);
tensor3 = tf2.expandDims(rgb3, 0);
tf2.dispose(rgb3);
const rgb2 = tf2.slice3d(input, [0, 0, 0], [-1, -1, 3]);
tensor3 = tf2.expandDims(rgb2, 0);
tf2.dispose(rgb2);
}
} else if (input.shape.length === 4) {
if (input.shape[3] === 3) {
@ -1210,9 +1210,9 @@ async function process2(input, config3, getTensor = true) {
}
}
if (depth === 4) {
const rgb3 = tf2.slice3d(pixels, [0, 0, 0], [-1, -1, 3]);
const rgb2 = tf2.slice3d(pixels, [0, 0, 0], [-1, -1, 3]);
tf2.dispose(pixels);
pixels = rgb3;
pixels = rgb2;
}
if (!pixels)
throw new Error("input error: cannot create tensor");
@ -1382,13 +1382,13 @@ var Env = class {
var env = new Env();
// src/human.ts
var tf36 = __toModule(require_tfjs_esm());
var tf35 = __toModule(require_tfjs_esm());
// package.json
var version = "2.5.2";
// src/tfjs/humangl.ts
var tf31 = __toModule(require_tfjs_esm());
var tf30 = __toModule(require_tfjs_esm());
// src/gear/gear.ts
var tf4 = __toModule(require_tfjs_esm());
@ -1461,12 +1461,22 @@ var tf6 = __toModule(require_tfjs_esm());
// src/tfjs/constants.ts
var tf5 = __toModule(require_tfjs_esm());
var tf255 = tf5.scalar(255, "float32");
var tf1 = tf5.scalar(1, "float32");
var tf22 = tf5.scalar(2, "float32");
var tf05 = tf5.scalar(0.5, "float32");
var tf127 = tf5.scalar(127.5, "float32");
var rgb = tf5.tensor1d([0.2989, 0.587, 0.114], "float32");
var constants = {
tf255: 255,
tf1: 1,
tf2: 2,
tf05: 0.5,
tf127: 127.5,
rgb: [0.2989, 0.587, 0.114]
};
function init() {
constants.tf255 = tf5.scalar(255, "float32");
constants.tf1 = tf5.scalar(1, "float32");
constants.tf2 = tf5.scalar(2, "float32");
constants.tf05 = tf5.scalar(0.5, "float32");
constants.tf127 = tf5.scalar(127.5, "float32");
constants.rgb = tf5.tensor1d([0.2989, 0.587, 0.114], "float32");
}
// src/gear/ssrnet-age.ts
var model2;
@ -1505,7 +1515,7 @@ async function predict2(image29, config3, idx, count2) {
return;
const t = {};
t.resize = tf6.image.resizeBilinear(image29, [model2.inputs[0].shape[2], model2.inputs[0].shape[1]], false);
t.enhance = tf6.mul(t.resize, tf255);
t.enhance = tf6.mul(t.resize, constants.tf255);
const obj = { age: 0 };
if (config3.face["ssrnet"].enabled)
t.age = model2.execute(t.enhance);
@ -1528,7 +1538,7 @@ var last4 = [];
var lastCount3 = 0;
var lastTime3 = 0;
var skipped3 = Number.MAX_SAFE_INTEGER;
var rgb2 = [0.2989, 0.587, 0.114];
var rgb = [0.2989, 0.587, 0.114];
async function load3(config3) {
if (env.initial)
model3 = null;
@ -1560,11 +1570,11 @@ async function predict3(image29, config3, idx, count2) {
t.resize = tf7.image.resizeBilinear(image29, [model3.inputs[0].shape[2], model3.inputs[0].shape[1]], false);
t.enhance = tf7.tidy(() => {
const [red, green, blue] = tf7.split(t.resize, 3, 3);
const redNorm = tf7.mul(red, rgb2[0]);
const greenNorm = tf7.mul(green, rgb2[1]);
const blueNorm = tf7.mul(blue, rgb2[2]);
const redNorm = tf7.mul(red, rgb[0]);
const greenNorm = tf7.mul(green, rgb[1]);
const blueNorm = tf7.mul(blue, rgb[2]);
const grayscale = tf7.addN([redNorm, greenNorm, blueNorm]);
const normalize = tf7.mul(tf7.sub(grayscale, tf05), 2);
const normalize = tf7.mul(tf7.sub(grayscale, constants.tf05), 2);
return normalize;
});
const obj = { gender: "", genderScore: 0 };
@ -4938,7 +4948,7 @@ var cutBoxFromImageAndResize = (box4, image29, cropSize) => {
const h = image29.shape[1];
const w = image29.shape[2];
const crop2 = tf9.image.cropAndResize(image29, [[box4.startPoint[1] / h, box4.startPoint[0] / w, box4.endPoint[1] / h, box4.endPoint[0] / w]], [0], cropSize);
const norm = tf9.div(crop2, tf255);
const norm = tf9.div(crop2, constants.tf255);
tf9.dispose(crop2);
return norm;
};
@ -5093,7 +5103,7 @@ function decodeBounds(boxOutputs) {
t.boxSizes = tf10.slice(boxOutputs, [0, 3], [-1, 2]);
t.boxSizesNormalized = tf10.div(t.boxSizes, inputSizeT);
t.centersNormalized = tf10.div(t.centers, inputSizeT);
t.halfBoxSize = tf10.div(t.boxSizesNormalized, tf22);
t.halfBoxSize = tf10.div(t.boxSizesNormalized, constants.tf2);
t.starts = tf10.sub(t.centersNormalized, t.halfBoxSize);
t.ends = tf10.add(t.centersNormalized, t.halfBoxSize);
t.startNormalized = tf10.mul(t.starts, inputSizeT);
@ -5108,8 +5118,8 @@ async function getBoxes(inputImage, config3) {
return { boxes: [] };
const t = {};
t.resized = tf10.image.resizeBilinear(inputImage, [inputSize, inputSize]);
t.div = tf10.div(t.resized, tf127);
t.normalized = tf10.sub(t.div, tf05);
t.div = tf10.div(t.resized, constants.tf127);
t.normalized = tf10.sub(t.div, constants.tf05);
const res = model5 == null ? void 0 : model5.execute(t.normalized);
if (Array.isArray(res)) {
const sorted = res.sort((a, b) => a.size - b.size);
@ -5280,7 +5290,7 @@ async function prepareImage(input) {
];
t.pad = tf11.pad(input, padding);
t.resize = tf11.image.resizeBilinear(t.pad, [inputSize2[1][0], inputSize2[1][1]]);
const final = tf11.div(t.resize, tf255);
const final = tf11.div(t.resize, constants.tf255);
Object.keys(t).forEach((tensor3) => tf11.dispose(t[tensor3]));
return final;
}
@ -5464,26 +5474,20 @@ async function load6(config3) {
async function process3(res, outputShape, config3) {
if (!res)
return [];
const t = {};
const results = [];
const detections = await res.array();
const squeezeT = tf12.squeeze(res);
tf12.dispose(res);
const arr = tf12.split(squeezeT, 6, 1);
tf12.dispose(squeezeT);
const stackT = tf12.stack([arr[1], arr[0], arr[3], arr[2]], 1);
const boxesT = tf12.squeeze(stackT);
tf12.dispose(stackT);
const scoresT = tf12.squeeze(arr[4]);
const classesT = tf12.squeeze(arr[5]);
arr.forEach((t) => tf12.dispose(t));
const nmsT = await tf12.image.nonMaxSuppressionAsync(boxesT, scoresT, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
tf12.dispose(boxesT);
tf12.dispose(scoresT);
tf12.dispose(classesT);
const nms = await nmsT.data();
tf12.dispose(nmsT);
t.squeeze = tf12.squeeze(res);
const arr = tf12.split(t.squeeze, 6, 1);
t.stack = tf12.stack([arr[1], arr[0], arr[3], arr[2]], 1);
t.boxes = tf12.squeeze(t.stack);
t.scores = tf12.squeeze(arr[4]);
t.classes = tf12.squeeze(arr[5]);
tf12.dispose([res, ...arr]);
t.nms = await tf12.image.nonMaxSuppressionAsync(t.boxes, t.scores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
const nms = await t.nms.data();
let i = 0;
for (const id of nms) {
for (const id of Array.from(nms)) {
const score = Math.trunc(100 * detections[0][id][4]) / 100;
const classVal = detections[0][id][5];
const label = labels[classVal].label;
@ -5505,6 +5509,7 @@ async function process3(res, outputShape, config3) {
];
results.push({ id: i++, score, class: classVal, label, box: box4, boxRaw });
}
Object.keys(t).forEach((tensor3) => tf12.dispose(t[tensor3]));
return results;
}
async function predict6(input, config3) {
@ -5612,8 +5617,8 @@ async function predict7(image29, config3) {
if (!(model7 == null ? void 0 : model7.inputs[0].shape))
return null;
const resize = tf13.image.resizeBilinear(image29, [model7.inputs[0].shape[2], model7.inputs[0].shape[1]], false);
const enhance3 = tf13.mul(resize, tf22);
const norm = tf13.sub(enhance3, tf1);
const enhance3 = tf13.mul(resize, constants.tf2);
const norm = tf13.sub(enhance3, constants.tf1);
return norm;
});
let resT;
@ -5717,10 +5722,10 @@ async function predict8(image29, config3, idx, count2) {
const t = {};
const inputSize8 = (model8 == null ? void 0 : model8.inputs[0].shape) ? model8.inputs[0].shape[2] : 0;
t.resize = tf14.image.resizeBilinear(image29, [inputSize8, inputSize8], false);
t.channels = tf14.mul(t.resize, rgb);
t.channels = tf14.mul(t.resize, constants.rgb);
t.grayscale = tf14.sum(t.channels, 3, true);
t.grayscaleSub = tf14.sub(t.grayscale, tf05);
t.grayscaleMul = tf14.mul(t.grayscaleSub, tf22);
t.grayscaleSub = tf14.sub(t.grayscale, constants.tf05);
t.grayscaleMul = tf14.mul(t.grayscaleSub, constants.tf2);
t.emotion = model8 == null ? void 0 : model8.execute(t.grayscaleMul);
lastTime8 = now();
const data = await t.emotion.data();
@ -6065,7 +6070,7 @@ function enhance2(input) {
if (!(model12 == null ? void 0 : model12.inputs[0].shape))
return tensor3;
const crop2 = tf18.image.resizeBilinear(tensor3, [model12.inputs[0].shape[2], model12.inputs[0].shape[1]], false);
const norm = tf18.mul(crop2, tf255);
const norm = tf18.mul(crop2, constants.tf255);
tf18.dispose(crop2);
return norm;
}
@ -6118,7 +6123,7 @@ async function predict11(image29, config3, idx, count2) {
}
// src/hand/handpose.ts
var tf23 = __toModule(require_tfjs_esm());
var tf22 = __toModule(require_tfjs_esm());
// src/hand/handposedetector.ts
var tf20 = __toModule(require_tfjs_esm());
@ -9227,8 +9232,8 @@ var HandDetector = class {
async predict(input, config3) {
const t = {};
t.resize = tf20.image.resizeBilinear(input, [this.inputSize, this.inputSize]);
t.div = tf20.div(t.resize, tf127);
t.image = tf20.sub(t.div, tf1);
t.div = tf20.div(t.resize, constants.tf127);
t.image = tf20.sub(t.div, constants.tf1);
t.batched = this.model.execute(t.image);
t.predictions = tf20.squeeze(t.batched);
t.slice = tf20.slice(t.predictions, [0, 0], [-1, 1]);
@ -9359,7 +9364,7 @@ var HandPipeline = class {
const rotationMatrix = buildRotationMatrix2(-angle, palmCenter);
const newBox = useFreshBox ? this.getBoxForPalmLandmarks(currentBox.palmLandmarks, rotationMatrix) : currentBox;
const croppedInput = cutBoxFromImageAndResize2(newBox, rotatedImage, [this.inputSize, this.inputSize]);
const handImage = tf21.div(croppedInput, tf255);
const handImage = tf21.div(croppedInput, constants.tf255);
tf21.dispose(croppedInput);
tf21.dispose(rotatedImage);
const [confidenceT, keypoints] = this.handPoseModel.execute(handImage);
@ -9889,8 +9894,8 @@ async function load13(config3) {
}
if (!handDetectorModel || !handPoseModel) {
[handDetectorModel, handPoseModel] = await Promise.all([
config3.hand.enabled ? tf23.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""), { fromTFHub: (((_b = config3.hand.detector) == null ? void 0 : _b.modelPath) || "").includes("tfhub.dev") }) : null,
config3.hand.landmarks ? tf23.loadGraphModel(join(config3.modelBasePath, ((_c = config3.hand.skeleton) == null ? void 0 : _c.modelPath) || ""), { fromTFHub: (((_d = config3.hand.skeleton) == null ? void 0 : _d.modelPath) || "").includes("tfhub.dev") }) : null
config3.hand.enabled ? tf22.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""), { fromTFHub: (((_b = config3.hand.detector) == null ? void 0 : _b.modelPath) || "").includes("tfhub.dev") }) : null,
config3.hand.landmarks ? tf22.loadGraphModel(join(config3.modelBasePath, ((_c = config3.hand.skeleton) == null ? void 0 : _c.modelPath) || ""), { fromTFHub: (((_d = config3.hand.skeleton) == null ? void 0 : _d.modelPath) || "").includes("tfhub.dev") }) : null
]);
if (config3.hand.enabled) {
if (!handDetectorModel || !handDetectorModel["modelUrl"])
@ -9948,7 +9953,7 @@ function crop(box4) {
}
// src/hand/handtrack.ts
var tf24 = __toModule(require_tfjs_esm());
var tf23 = __toModule(require_tfjs_esm());
var models2 = [null, null];
var modelOutputNodes = ["StatefulPartitionedCall/Postprocessor/Slice", "StatefulPartitionedCall/Postprocessor/ExpandDims_1"];
var inputSize6 = [[0, 0], [0, 0]];
@ -9978,7 +9983,7 @@ async function loadDetect2(config3) {
models2[0] = null;
if (!models2[0]) {
fakeOps(["tensorlistreserve", "enter", "tensorlistfromtensor", "merge", "loopcond", "switch", "exit", "tensorliststack", "nextiteration", "tensorlistsetitem", "tensorlistgetitem", "reciprocal", "shape", "split", "where"], config3);
models2[0] = await tf24.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""));
models2[0] = await tf23.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""));
const inputs = Object.values(models2[0].modelSignature["inputs"]);
inputSize6[0][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;
inputSize6[0][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;
@ -9995,7 +10000,7 @@ async function loadSkeleton(config3) {
if (env.initial)
models2[1] = null;
if (!models2[1]) {
models2[1] = await tf24.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.skeleton) == null ? void 0 : _a.modelPath) || ""));
models2[1] = await tf23.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.skeleton) == null ? void 0 : _a.modelPath) || ""));
const inputs = Object.values(models2[1].modelSignature["inputs"]);
inputSize6[1][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;
inputSize6[1][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;
@ -10015,27 +10020,27 @@ async function detectHands(input, config3) {
const ratio = (input.shape[2] || 1) / (input.shape[1] || 1);
const height = Math.min(Math.round((input.shape[1] || 0) / 8) * 8, maxDetectorResolution);
const width = Math.round(height * ratio / 8) * 8;
t.resize = tf24.image.resizeBilinear(input, [height, width]);
t.cast = tf24.cast(t.resize, "int32");
t.resize = tf23.image.resizeBilinear(input, [height, width]);
t.cast = tf23.cast(t.resize, "int32");
[t.rawScores, t.rawBoxes] = await models2[0].executeAsync(t.cast, modelOutputNodes);
t.boxes = tf24.squeeze(t.rawBoxes, [0, 2]);
t.scores = tf24.squeeze(t.rawScores, [0]);
const classScores = tf24.unstack(t.scores, 1);
tf24.dispose(classScores[faceIndex]);
t.boxes = tf23.squeeze(t.rawBoxes, [0, 2]);
t.scores = tf23.squeeze(t.rawScores, [0]);
const classScores = tf23.unstack(t.scores, 1);
tf23.dispose(classScores[faceIndex]);
classScores.splice(faceIndex, 1);
t.filtered = tf24.stack(classScores, 1);
tf24.dispose(classScores);
t.max = tf24.max(t.filtered, 1);
t.argmax = tf24.argMax(t.filtered, 1);
t.filtered = tf23.stack(classScores, 1);
tf23.dispose(classScores);
t.max = tf23.max(t.filtered, 1);
t.argmax = tf23.argMax(t.filtered, 1);
let id = 0;
t.nms = await tf24.image.nonMaxSuppressionAsync(t.boxes, t.max, config3.hand.maxDetected, config3.hand.iouThreshold, config3.hand.minConfidence);
t.nms = await tf23.image.nonMaxSuppressionAsync(t.boxes, t.max, config3.hand.maxDetected, config3.hand.iouThreshold, config3.hand.minConfidence);
const nms = await t.nms.data();
const scores = await t.max.data();
const classNum = await t.argmax.data();
for (const nmsIndex of Array.from(nms)) {
const boxSlice = tf24.slice(t.boxes, nmsIndex, 1);
const boxSlice = tf23.slice(t.boxes, nmsIndex, 1);
const boxYX = await boxSlice.data();
tf24.dispose(boxSlice);
tf23.dispose(boxSlice);
const boxData = [boxYX[1], boxYX[0], boxYX[3] - boxYX[1], boxYX[2] - boxYX[0]];
const boxRaw = scale(boxData, detectorExpandFact);
const boxCrop = crop(boxRaw);
@ -10045,7 +10050,7 @@ async function detectHands(input, config3) {
const hand3 = { id: id++, score, box: boxFull, boxRaw, boxCrop, label };
hands.push(hand3);
}
Object.keys(t).forEach((tensor3) => tf24.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf23.dispose(t[tensor3]));
hands.sort((a, b) => b.score - a.score);
if (hands.length > (config3.hand.maxDetected || 1))
hands.length = config3.hand.maxDetected || 1;
@ -10066,14 +10071,14 @@ async function detectFingers(input, h, config3) {
};
if (input && models2[1] && config3.hand.landmarks && h.score > (config3.hand.minConfidence || 0)) {
const t = {};
t.crop = tf24.image.cropAndResize(input, [h.boxCrop], [0], [inputSize6[1][0], inputSize6[1][1]], "bilinear");
t.div = tf24.div(t.crop, tf255);
t.crop = tf23.image.cropAndResize(input, [h.boxCrop], [0], [inputSize6[1][0], inputSize6[1][1]], "bilinear");
t.div = tf23.div(t.crop, constants.tf255);
[t.score, t.keypoints] = models2[1].execute(t.div, ["Identity_1", "Identity"]);
const rawScore = (await t.score.data())[0];
const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100;
if (score >= (config3.hand.minConfidence || 0)) {
hand3.fingerScore = score;
t.reshaped = tf24.reshape(t.keypoints, [-1, 3]);
t.reshaped = tf23.reshape(t.keypoints, [-1, 3]);
const coordsData = await t.reshaped.array();
const coordsRaw = coordsData.map((kpt4) => [kpt4[0] / inputSize6[1][1], kpt4[1] / inputSize6[1][0], kpt4[2] || 0]);
const coordsNorm = coordsRaw.map((kpt4) => [kpt4[0] * h.boxRaw[2], kpt4[1] * h.boxRaw[3], kpt4[2] || 0]);
@ -10087,7 +10092,7 @@ async function detectFingers(input, h, config3) {
hand3.annotations[key] = fingerMap[key].map((index2) => hand3.landmarks && hand3.keypoints[index2] ? hand3.keypoints[index2] : null);
}
}
Object.keys(t).forEach((tensor3) => tf24.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf23.dispose(t[tensor3]));
}
return hand3;
}
@ -10138,7 +10143,7 @@ async function predict13(input, config3) {
}
// src/face/liveness.ts
var tf25 = __toModule(require_tfjs_esm());
var tf24 = __toModule(require_tfjs_esm());
var model13;
var cached2 = [];
var skipped13 = Number.MAX_SAFE_INTEGER;
@ -10149,7 +10154,7 @@ async function load14(config3) {
if (env.initial)
model13 = null;
if (!model13) {
model13 = await tf25.loadGraphModel(join(config3.modelBasePath, ((_a = config3.face.liveness) == null ? void 0 : _a.modelPath) || ""));
model13 = await tf24.loadGraphModel(join(config3.modelBasePath, ((_a = config3.face.liveness) == null ? void 0 : _a.modelPath) || ""));
if (!model13 || !model13["modelUrl"])
log("load model failed:", (_b = config3.face.liveness) == null ? void 0 : _b.modelPath);
else if (config3.debug)
@ -10170,19 +10175,19 @@ async function predict14(image29, config3, idx, count2) {
}
skipped13 = 0;
return new Promise(async (resolve) => {
const resize = tf25.image.resizeBilinear(image29, [(model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[2] : 0, (model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[1] : 0], false);
const resize = tf24.image.resizeBilinear(image29, [(model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[2] : 0, (model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[1] : 0], false);
const res = model13 == null ? void 0 : model13.execute(resize);
const num = (await res.data())[0];
cached2[idx] = Math.round(100 * num) / 100;
lastCount8 = count2;
lastTime14 = now();
tf25.dispose([resize, res]);
tf24.dispose([resize, res]);
resolve(cached2[idx]);
});
}
// src/body/movenet.ts
var tf27 = __toModule(require_tfjs_esm());
var tf26 = __toModule(require_tfjs_esm());
// src/body/movenetcoords.ts
var movenetcoords_exports = {};
@ -10242,7 +10247,7 @@ var connected3 = {
};
// src/body/movenetfix.ts
var tf26 = __toModule(require_tfjs_esm());
var tf25 = __toModule(require_tfjs_esm());
var maxJitter = 5e-3;
var cache4 = {
keypoints: [],
@ -10316,10 +10321,10 @@ function padInput(input, inputSize8) {
[input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0],
[0, 0]
];
t.pad = tf26.pad(input, cache4.padding);
t.resize = tf26.image.resizeBilinear(t.pad, [inputSize8, inputSize8]);
const final = tf26.cast(t.resize, "int32");
Object.keys(t).forEach((tensor3) => tf26.dispose(t[tensor3]));
t.pad = tf25.pad(input, cache4.padding);
t.resize = tf25.image.resizeBilinear(t.pad, [inputSize8, inputSize8]);
const final = tf25.cast(t.resize, "int32");
Object.keys(t).forEach((tensor3) => tf25.dispose(t[tensor3]));
return final;
}
function rescaleBody(body4, outputSize2) {
@ -10354,7 +10359,7 @@ async function load15(config3) {
model14 = null;
if (!model14) {
fakeOps(["size"], config3);
model14 = await tf27.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
model14 = await tf26.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
if (!model14 || !model14["modelUrl"])
log("load model failed:", config3.body.modelPath);
else if (config3.debug)
@ -10466,13 +10471,13 @@ async function predict15(input, config3) {
rescaleBody(body4, [input.shape[2] || 1, input.shape[1] || 1]);
jitter(body4.keypoints);
}
Object.keys(t).forEach((tensor3) => tf27.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf26.dispose(t[tensor3]));
resolve(cache5.bodies);
});
}
// src/object/nanodet.ts
var tf28 = __toModule(require_tfjs_esm());
var tf27 = __toModule(require_tfjs_esm());
var model15;
var last9 = [];
var lastTime15 = 0;
@ -10480,7 +10485,7 @@ var skipped15 = Number.MAX_SAFE_INTEGER;
var scaleBox = 2.5;
async function load16(config3) {
if (!model15 || env.initial) {
model15 = await tf28.loadGraphModel(join(config3.modelBasePath, config3.object.modelPath || ""));
model15 = await tf27.loadGraphModel(join(config3.modelBasePath, config3.object.modelPath || ""));
const inputs = Object.values(model15.modelSignature["inputs"]);
model15.inputSize = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : null;
if (!model15 || !model15.modelUrl)
@ -10495,7 +10500,7 @@ async function process4(res, inputSize8, outputShape, config3) {
let id = 0;
let results = [];
for (const strideSize of [1, 2, 4]) {
tf28.tidy(async () => {
tf27.tidy(async () => {
var _a, _b;
const baseSize = strideSize * 13;
const scoresT = (_a = res.find((a) => a.shape[1] === baseSize ** 2 && a.shape[2] === labels.length)) == null ? void 0 : _a.squeeze();
@ -10540,14 +10545,14 @@ async function process4(res, inputSize8, outputShape, config3) {
}
});
}
res.forEach((t) => tf28.dispose(t));
res.forEach((t) => tf27.dispose(t));
const nmsBoxes = results.map((a) => [a.boxRaw[1], a.boxRaw[0], a.boxRaw[3], a.boxRaw[2]]);
const nmsScores = results.map((a) => a.score);
let nmsIdx = [];
if (nmsBoxes && nmsBoxes.length > 0) {
const nms = await tf28.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
const nms = await tf27.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
nmsIdx = await nms.data();
tf28.dispose(nms);
tf27.dispose(nms);
}
results = results.filter((_val, idx) => nmsIdx.includes(idx)).sort((a, b) => b.score - a.score);
return results;
@ -10564,16 +10569,16 @@ async function predict16(image29, config3) {
return last9;
return new Promise(async (resolve) => {
const outputSize2 = [image29.shape[2], image29.shape[1]];
const resize = tf28.image.resizeBilinear(image29, [model15.inputSize, model15.inputSize], false);
const norm = tf28.div(resize, tf255);
const resize = tf27.image.resizeBilinear(image29, [model15.inputSize, model15.inputSize], false);
const norm = tf27.div(resize, constants.tf255);
const transpose = norm.transpose([0, 3, 1, 2]);
tf28.dispose(norm);
tf28.dispose(resize);
tf27.dispose(norm);
tf27.dispose(resize);
let objectT;
if (config3.object.enabled)
objectT = model15.execute(transpose);
lastTime15 = now();
tf28.dispose(transpose);
tf27.dispose(transpose);
const obj = await process4(objectT, model15.inputSize, outputSize2, config3);
last9 = obj;
resolve(obj);
@ -10581,7 +10586,7 @@ async function predict16(image29, config3) {
}
// src/body/posenet.ts
var tf29 = __toModule(require_tfjs_esm());
var tf28 = __toModule(require_tfjs_esm());
// src/body/posenetutils.ts
var partNames = [
@ -10892,19 +10897,19 @@ function decode(offsets, scores, displacementsFwd, displacementsBwd, maxDetected
return poses;
}
async function predict17(input, config3) {
const res = tf29.tidy(() => {
const res = tf28.tidy(() => {
if (!model16.inputs[0].shape)
return [];
const resized = tf29.image.resizeBilinear(input, [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]);
const normalized = tf29.sub(tf29.div(tf29.cast(resized, "float32"), 127.5), 1);
const resized = tf28.image.resizeBilinear(input, [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]);
const normalized = tf28.sub(tf28.div(tf28.cast(resized, "float32"), 127.5), 1);
const results = model16.execute(normalized, poseNetOutputs);
const results3d = results.map((y) => tf29.squeeze(y, [0]));
const results3d = results.map((y) => tf28.squeeze(y, [0]));
results3d[1] = results3d[1].sigmoid();
return results3d;
});
const buffers = await Promise.all(res.map((tensor3) => tensor3.buffer()));
for (const t of res)
tf29.dispose(t);
tf28.dispose(t);
const decoded = await decode(buffers[0], buffers[1], buffers[2], buffers[3], config3.body.maxDetected, config3.body.minConfidence);
if (!model16.inputs[0].shape)
return [];
@ -10913,7 +10918,7 @@ async function predict17(input, config3) {
}
async function load17(config3) {
if (!model16 || env.initial) {
model16 = await tf29.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
model16 = await tf28.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
if (!model16 || !model16["modelUrl"])
log("load model failed:", config3.body.modelPath);
else if (config3.debug)
@ -10924,12 +10929,12 @@ async function load17(config3) {
}
// src/segmentation/segmentation.ts
var tf30 = __toModule(require_tfjs_esm());
var tf29 = __toModule(require_tfjs_esm());
var model17;
var busy = false;
async function load18(config3) {
if (!model17 || env.initial) {
model17 = await tf30.loadGraphModel(join(config3.modelBasePath, config3.segmentation.modelPath || ""));
model17 = await tf29.loadGraphModel(join(config3.modelBasePath, config3.segmentation.modelPath || ""));
if (!model17 || !model17["modelUrl"])
log("load model failed:", config3.segmentation.modelPath);
else if (config3.debug)
@ -10951,30 +10956,30 @@ async function process5(input, background, config3) {
if (!inputImage.tensor)
return { data: [], canvas: null, alpha: null };
const t = {};
t.resize = tf30.image.resizeBilinear(inputImage.tensor, [model17.inputs[0].shape ? model17.inputs[0].shape[1] : 0, model17.inputs[0].shape ? model17.inputs[0].shape[2] : 0], false);
tf30.dispose(inputImage.tensor);
t.norm = tf30.div(t.resize, tf255);
t.resize = tf29.image.resizeBilinear(inputImage.tensor, [model17.inputs[0].shape ? model17.inputs[0].shape[1] : 0, model17.inputs[0].shape ? model17.inputs[0].shape[2] : 0], false);
tf29.dispose(inputImage.tensor);
t.norm = tf29.div(t.resize, constants.tf255);
t.res = model17.execute(t.norm);
t.squeeze = tf30.squeeze(t.res, 0);
t.squeeze = tf29.squeeze(t.res, 0);
if (t.squeeze.shape[2] === 2) {
t.softmax = tf30.softmax(t.squeeze);
[t.bg, t.fg] = tf30.unstack(t.softmax, 2);
t.expand = tf30.expandDims(t.fg, 2);
t.pad = tf30.expandDims(t.expand, 0);
t.crop = tf30.image.cropAndResize(t.pad, [[0, 0, 0.5, 0.5]], [0], [width, height]);
t.data = tf30.squeeze(t.crop, 0);
t.softmax = tf29.softmax(t.squeeze);
[t.bg, t.fg] = tf29.unstack(t.softmax, 2);
t.expand = tf29.expandDims(t.fg, 2);
t.pad = tf29.expandDims(t.expand, 0);
t.crop = tf29.image.cropAndResize(t.pad, [[0, 0, 0.5, 0.5]], [0], [width, height]);
t.data = tf29.squeeze(t.crop, 0);
} else {
t.data = tf30.image.resizeBilinear(t.squeeze, [height, width]);
t.data = tf29.image.resizeBilinear(t.squeeze, [height, width]);
}
const data = Array.from(await t.data.data());
if (env.node && !env.Canvas && typeof ImageData === "undefined") {
if (config3.debug)
log("canvas support missing");
Object.keys(t).forEach((tensor3) => tf30.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf29.dispose(t[tensor3]));
return { data, canvas: null, alpha: null };
}
const alphaCanvas = canvas(width, height);
await tf30.browser.toPixels(t.data, alphaCanvas);
await tf29.browser.toPixels(t.data, alphaCanvas);
const alphaCtx = alphaCanvas.getContext("2d");
if (config3.segmentation.blur && config3.segmentation.blur > 0)
alphaCtx.filter = `blur(${config3.segmentation.blur}px)`;
@ -10997,12 +11002,12 @@ async function process5(input, background, config3) {
if (background && compositeCanvas) {
mergedCanvas = canvas(width, height);
const bgImage = await process2(background, config3);
tf30.dispose(bgImage.tensor);
tf29.dispose(bgImage.tensor);
const ctxMerge = mergedCanvas.getContext("2d");
ctxMerge.drawImage(bgImage.canvas, 0, 0, mergedCanvas.width, mergedCanvas.height);
ctxMerge.drawImage(compositeCanvas, 0, 0);
}
Object.keys(t).forEach((tensor3) => tf30.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf29.dispose(t[tensor3]));
busy = false;
return { data, canvas: compositeCanvas, alpha: alphaCanvas };
}
@ -11164,11 +11169,11 @@ async function register(instance) {
var _a;
if (instance.config.backend !== "humangl")
return;
if (config2.name in tf31.engine().registry && (!config2.gl || !config2.gl.getParameter(config2.gl.VERSION))) {
if (config2.name in tf30.engine().registry && (!config2.gl || !config2.gl.getParameter(config2.gl.VERSION))) {
log("error: humangl backend invalid context");
reset(instance);
}
if (!tf31.findBackend(config2.name)) {
if (!tf30.findBackend(config2.name)) {
try {
config2.canvas = await canvas(100, 100);
} catch (err) {
@ -11202,29 +11207,29 @@ async function register(instance) {
return;
}
try {
tf31.setWebGLContext(2, config2.gl);
tf30.setWebGLContext(2, config2.gl);
} catch (err) {
log("error: cannot set WebGL context:", err);
return;
}
try {
const ctx = new tf31.GPGPUContext(config2.gl);
tf31.registerBackend(config2.name, () => new tf31.MathBackendWebGL(ctx), config2.priority);
const ctx = new tf30.GPGPUContext(config2.gl);
tf30.registerBackend(config2.name, () => new tf30.MathBackendWebGL(ctx), config2.priority);
} catch (err) {
log("error: cannot register WebGL backend:", err);
return;
}
try {
const kernels = tf31.getKernelsForBackend("webgl");
const kernels = tf30.getKernelsForBackend("webgl");
kernels.forEach((kernelConfig) => {
const newKernelConfig = { ...kernelConfig, backendName: config2.name };
tf31.registerKernel(newKernelConfig);
tf30.registerKernel(newKernelConfig);
});
} catch (err) {
log("error: cannot update WebGL backend registration:", err);
return;
}
const current = tf31.backend().getGPGPUContext ? tf31.backend().getGPGPUContext().gl : null;
const current = tf30.backend().getGPGPUContext ? tf30.backend().getGPGPUContext().gl : null;
if (current) {
log(`humangl webgl version:${current.getParameter(current.VERSION)} renderer:${current.getParameter(current.RENDERER)}`);
} else {
@ -11232,7 +11237,7 @@ async function register(instance) {
return;
}
try {
tf31.ENV.set("WEBGL_VERSION", 2);
tf30.ENV.set("WEBGL_VERSION", 2);
} catch (err) {
log("error: cannot set WebGL backend flags:", err);
return;
@ -11243,30 +11248,30 @@ async function register(instance) {
}
// src/tfjs/backend.ts
var tf32 = __toModule(require_tfjs_esm());
var tf31 = __toModule(require_tfjs_esm());
function registerCustomOps() {
if (!env.kernels.includes("mod")) {
const kernelMod = {
kernelName: "Mod",
backendName: tf32.getBackend(),
kernelFunc: (op) => tf32.tidy(() => tf32.sub(op.inputs.a, tf32.mul(tf32.div(op.inputs.a, op.inputs.b), op.inputs.b)))
backendName: tf31.getBackend(),
kernelFunc: (op) => tf31.tidy(() => tf31.sub(op.inputs.a, tf31.mul(tf31.div(op.inputs.a, op.inputs.b), op.inputs.b)))
};
tf32.registerKernel(kernelMod);
tf31.registerKernel(kernelMod);
env.kernels.push("mod");
}
if (!env.kernels.includes("floormod")) {
const kernelMod = {
kernelName: "FloorMod",
backendName: tf32.getBackend(),
kernelFunc: (op) => tf32.tidy(() => tf32.floorDiv(op.inputs.a / op.inputs.b) * op.inputs.b + tf32.mod(op.inputs.a, op.inputs.b))
backendName: tf31.getBackend(),
kernelFunc: (op) => tf31.tidy(() => tf31.floorDiv(op.inputs.a / op.inputs.b) * op.inputs.b + tf31.mod(op.inputs.a, op.inputs.b))
};
tf32.registerKernel(kernelMod);
tf31.registerKernel(kernelMod);
env.kernels.push("floormod");
}
}
async function check(instance, force = false) {
instance.state = "backend";
if (force || env.initial || instance.config.backend && instance.config.backend.length > 0 && tf32.getBackend() !== instance.config.backend) {
if (force || env.initial || instance.config.backend && instance.config.backend.length > 0 && tf31.getBackend() !== instance.config.backend) {
const timeStamp = now();
if (instance.config.backend && instance.config.backend.length > 0) {
if (typeof window === "undefined" && typeof WorkerGlobalScope !== "undefined" && instance.config.debug) {
@ -11295,7 +11300,7 @@ async function check(instance, force = false) {
}
if (instance.config.backend === "humangl")
await register(instance);
const available = Object.keys(tf32.engine().registryFactory);
const available = Object.keys(tf31.engine().registryFactory);
if (instance.config.debug)
log("available backends:", available);
if (!available.includes(instance.config.backend)) {
@ -11309,46 +11314,47 @@ async function check(instance, force = false) {
if (instance.config.backend === "wasm") {
if (instance.config.debug)
log("wasm path:", instance.config.wasmPath);
if (typeof (tf32 == null ? void 0 : tf32.setWasmPaths) !== "undefined")
await tf32.setWasmPaths(instance.config.wasmPath);
if (typeof (tf31 == null ? void 0 : tf31.setWasmPaths) !== "undefined")
await tf31.setWasmPaths(instance.config.wasmPath);
else
throw new Error("backend error: attempting to use wasm backend but wasm path is not set");
const simd = await tf32.env().getAsync("WASM_HAS_SIMD_SUPPORT");
const mt = await tf32.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT");
const simd = await tf31.env().getAsync("WASM_HAS_SIMD_SUPPORT");
const mt = await tf31.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT");
if (instance.config.debug)
log(`wasm execution: ${simd ? "SIMD" : "no SIMD"} ${mt ? "multithreaded" : "singlethreaded"}`);
if (instance.config.debug && !simd)
log("warning: wasm simd support is not enabled");
}
try {
await tf32.setBackend(instance.config.backend);
await tf32.ready();
await tf31.setBackend(instance.config.backend);
await tf31.ready();
init();
} catch (err) {
log("error: cannot set backend:", instance.config.backend, err);
return false;
}
}
if (tf32.getBackend() === "humangl") {
tf32.ENV.set("CHECK_COMPUTATION_FOR_ERRORS", false);
tf32.ENV.set("WEBGL_CPU_FORWARD", true);
tf32.ENV.set("WEBGL_USE_SHAPES_UNIFORMS", true);
tf32.ENV.set("CPU_HANDOFF_SIZE_THRESHOLD", 256);
if (tf31.getBackend() === "humangl") {
tf31.ENV.set("CHECK_COMPUTATION_FOR_ERRORS", false);
tf31.ENV.set("WEBGL_CPU_FORWARD", true);
tf31.ENV.set("WEBGL_USE_SHAPES_UNIFORMS", true);
tf31.ENV.set("CPU_HANDOFF_SIZE_THRESHOLD", 256);
if (typeof instance.config["deallocate"] !== "undefined" && instance.config["deallocate"]) {
log("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:", true);
tf32.ENV.set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0);
tf31.ENV.set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0);
}
if (tf32.backend().getGPGPUContext) {
const gl = await tf32.backend().getGPGPUContext().gl;
if (tf31.backend().getGPGPUContext) {
const gl = await tf31.backend().getGPGPUContext().gl;
if (instance.config.debug)
log(`gl version:${gl.getParameter(gl.VERSION)} renderer:${gl.getParameter(gl.RENDERER)}`);
}
}
if (tf32.getBackend() === "webgpu") {
if (tf31.getBackend() === "webgpu") {
}
tf32.enableProdMode();
await tf32.ready();
tf31.enableProdMode();
await tf31.ready();
instance.performance.initBackend = Math.trunc(now() - timeStamp);
instance.config.backend = tf32.getBackend();
instance.config.backend = tf31.getBackend();
await env.updateBackend();
registerCustomOps();
}
@ -11364,9 +11370,9 @@ function fakeOps(kernelNames, config3) {
log("kernelFunc", kernelName, config3.backend);
}
};
tf32.registerKernel(kernelConfig);
tf31.registerKernel(kernelConfig);
}
env.kernels = tf32.getKernelsForBackend(tf32.getBackend()).map((kernel) => kernel.kernelName.toLowerCase());
env.kernels = tf31.getKernelsForBackend(tf31.getBackend()).map((kernel) => kernel.kernelName.toLowerCase());
}
// src/util/draw.ts
@ -11850,10 +11856,10 @@ async function all(inCanvas2, result, drawOptions) {
}
// src/face/face.ts
var tf34 = __toModule(require_tfjs_esm());
var tf33 = __toModule(require_tfjs_esm());
// src/face/mask.ts
var tf33 = __toModule(require_tfjs_esm());
var tf32 = __toModule(require_tfjs_esm());
var expandFact = 0.1;
var alpha = 0.5;
function insidePoly(x, y, polygon) {
@ -11889,7 +11895,7 @@ async function mask(face5) {
}
}
const output = buffer.toTensor();
tf33.dispose(buffer);
tf32.dispose(buffer);
return output;
}
@ -12028,79 +12034,79 @@ var detectFace = async (instance, input) => {
}
if ((_a = instance.config.face.detector) == null ? void 0 : _a.mask) {
const masked = await mask(faces[i]);
tf34.dispose(faces[i].tensor);
tf33.dispose(faces[i].tensor);
faces[i].tensor = masked;
}
const rotation = faces[i].mesh && faces[i].mesh.length > 200 ? calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]) : null;
instance.analyze("Start Emotion:");
if (instance.config.async) {
emotionRes = ((_b = instance.config.face.emotion) == null ? void 0 : _b.enabled) ? predict8(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
emotionRes = ((_b = instance.config.face.emotion) == null ? void 0 : _b.enabled) ? predict8(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:emotion";
timeStamp = now();
emotionRes = ((_c = instance.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict8(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
emotionRes = ((_c = instance.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict8(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.emotion = env.perfadd ? (instance.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End Emotion:");
instance.analyze("Start AntiSpoof:");
if (instance.config.async) {
antispoofRes = ((_d = instance.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict4(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
antispoofRes = ((_d = instance.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict4(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:antispoof";
timeStamp = now();
antispoofRes = ((_e = instance.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict4(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
antispoofRes = ((_e = instance.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict4(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.antispoof = env.perfadd ? (instance.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End AntiSpoof:");
instance.analyze("Start Liveness:");
if (instance.config.async) {
livenessRes = ((_f = instance.config.face.liveness) == null ? void 0 : _f.enabled) ? predict14(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
livenessRes = ((_f = instance.config.face.liveness) == null ? void 0 : _f.enabled) ? predict14(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:liveness";
timeStamp = now();
livenessRes = ((_g = instance.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict14(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
livenessRes = ((_g = instance.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict14(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.liveness = env.perfadd ? (instance.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End Liveness:");
instance.analyze("Start GEAR:");
if (instance.config.async) {
gearRes = ((_h = instance.config.face["gear"]) == null ? void 0 : _h.enabled) ? predict(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
gearRes = ((_h = instance.config.face["gear"]) == null ? void 0 : _h.enabled) ? predict(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
} else {
instance.state = "run:gear";
timeStamp = now();
gearRes = ((_i = instance.config.face["gear"]) == null ? void 0 : _i.enabled) ? await predict(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
gearRes = ((_i = instance.config.face["gear"]) == null ? void 0 : _i.enabled) ? await predict(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
instance.performance.gear = Math.trunc(now() - timeStamp);
}
instance.analyze("End GEAR:");
instance.analyze("Start SSRNet:");
if (instance.config.async) {
ageRes = ((_j = instance.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict2(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_k = instance.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict3(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
ageRes = ((_j = instance.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict2(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_k = instance.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict3(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
} else {
instance.state = "run:ssrnet";
timeStamp = now();
ageRes = ((_l = instance.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict2(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_m = instance.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict3(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
ageRes = ((_l = instance.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict2(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_m = instance.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict3(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
instance.performance.ssrnet = Math.trunc(now() - timeStamp);
}
instance.analyze("End SSRNet:");
instance.analyze("Start MobileFaceNet:");
if (instance.config.async) {
mobilefacenetRes = ((_n = instance.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict9(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
mobilefacenetRes = ((_n = instance.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict9(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
} else {
instance.state = "run:mobilefacenet";
timeStamp = now();
mobilefacenetRes = ((_o = instance.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict9(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
mobilefacenetRes = ((_o = instance.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict9(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
instance.performance.mobilefacenet = Math.trunc(now() - timeStamp);
}
instance.analyze("End MobileFaceNet:");
instance.analyze("Start Description:");
if (instance.config.async) {
descRes = ((_p = instance.config.face.description) == null ? void 0 : _p.enabled) ? predict11(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
descRes = ((_p = instance.config.face.description) == null ? void 0 : _p.enabled) ? predict11(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:description";
timeStamp = now();
descRes = ((_q = instance.config.face.description) == null ? void 0 : _q.enabled) ? await predict11(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
descRes = ((_q = instance.config.face.description) == null ? void 0 : _q.enabled) ? await predict11(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.description = env.perfadd ? (instance.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End Description:");
@ -12119,8 +12125,8 @@ var detectFace = async (instance, input) => {
delete faces[i].annotations.rightEyeIris;
}
const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0;
const tensor3 = ((_z = instance.config.face.detector) == null ? void 0 : _z.return) ? tf34.squeeze(faces[i].tensor) : null;
tf34.dispose(faces[i].tensor);
const tensor3 = ((_z = instance.config.face.detector) == null ? void 0 : _z.return) ? tf33.squeeze(faces[i].tensor) : null;
tf33.dispose(faces[i].tensor);
if (faces[i].tensor)
delete faces[i].tensor;
const res = {
@ -13234,7 +13240,7 @@ lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/
2Q==`;
// src/warmup.ts
var tf35 = __toModule(require_tfjs_esm());
var tf34 = __toModule(require_tfjs_esm());
async function warmupBitmap(instance) {
const b64toBlob = (base64, type = "application/octet-stream") => fetch(`data:${type};base64,${base64}`).then((res2) => res2.blob());
let blob;
@ -13306,8 +13312,8 @@ async function warmupNode(instance) {
if (!img)
return null;
let res;
if (typeof tf35["node"] !== "undefined") {
const data = tf35["node"].decodeJpeg(img);
if (typeof tf34["node"] !== "undefined") {
const data = tf34["node"].decodeJpeg(img);
const expanded = data.expandDims(0);
instance.tf.dispose(data);
res = await instance.detect(expanded, instance.config);
@ -13377,7 +13383,7 @@ var Human = class {
return null;
if (!input)
return "input is not defined";
if (this.env.node && !(input instanceof tf36.Tensor))
if (this.env.node && !(input instanceof tf35.Tensor))
return "input must be a tensor";
try {
this.tf.getBackend();
@ -13395,7 +13401,7 @@ var Human = class {
(_a = this.events) == null ? void 0 : _a.dispatchEvent(new Event(event));
});
this.env = env;
config.wasmPath = tf36.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf36.version_core}/dist/`;
config.wasmPath = tf35.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf35.version_core}/dist/`;
config.modelBasePath = env.browser ? "../models/" : "file://models/";
config.backend = env.browser ? "humangl" : "tensorflow";
this.version = version;
@ -13404,7 +13410,7 @@ var Human = class {
Object.seal(this.config);
if (userConfig)
this.config = mergeDeep(this.config, userConfig);
this.tf = tf36;
this.tf = tf35;
this.state = "idle";
__privateSet(this, _numTensors, 0);
__privateSet(this, _analyzeMemoryLeaks, false);
@ -13470,7 +13476,7 @@ var Human = class {
log(`tfjs version: ${this.tf.version_core}`);
if (!await check(this))
log("error: backend check failed");
await tf36.ready();
await tf35.ready();
if (this.env.browser) {
if (this.config.debug)
log("configuration:", this.config);
@ -13672,7 +13678,7 @@ var Human = class {
return join2(faceRes, bodyRes, handRes, gestureRes, shape);
}
};
tf36.dispose(img.tensor);
tf35.dispose(img.tensor);
this.emit("detect");
this.state = "idle";
resolve(this.result);

390
dist/human.node.js vendored
View File

@ -993,9 +993,9 @@ async function histogramEqualization(inputImage) {
const range = [tf.sub(max4[0], min2[0]), tf.sub(max4[1], min2[1]), tf.sub(max4[2], min2[2])];
const fact = [tf.div(maxValue, range[0]), tf.div(maxValue, range[1]), tf.div(maxValue, range[2])];
const enh = [tf.mul(sub9[0], fact[0]), tf.mul(sub9[1], fact[1]), tf.mul(sub9[2], fact[2])];
const rgb3 = tf.stack([enh[0], enh[1], enh[2]], 2);
const reshape8 = tf.reshape(rgb3, [1, squeeze9.shape[0], squeeze9.shape[1], 3]);
tf.dispose([...channels, ...min2, ...max4, ...sub9, ...range, ...fact, ...enh, rgb3, squeeze9]);
const rgb2 = tf.stack([enh[0], enh[1], enh[2]], 2);
const reshape8 = tf.reshape(rgb2, [1, squeeze9.shape[0], squeeze9.shape[1], 3]);
tf.dispose([...channels, ...min2, ...max4, ...sub9, ...range, ...fact, ...enh, rgb2, squeeze9]);
return reshape8;
}
@ -1058,9 +1058,9 @@ async function process2(input, config3, getTensor = true) {
if (input.shape[2] === 3) {
tensor3 = tf2.expandDims(input, 0);
} else if (input.shape[2] === 4) {
const rgb3 = tf2.slice3d(input, [0, 0, 0], [-1, -1, 3]);
tensor3 = tf2.expandDims(rgb3, 0);
tf2.dispose(rgb3);
const rgb2 = tf2.slice3d(input, [0, 0, 0], [-1, -1, 3]);
tensor3 = tf2.expandDims(rgb2, 0);
tf2.dispose(rgb2);
}
} else if (input.shape.length === 4) {
if (input.shape[3] === 3) {
@ -1209,9 +1209,9 @@ async function process2(input, config3, getTensor = true) {
}
}
if (depth === 4) {
const rgb3 = tf2.slice3d(pixels, [0, 0, 0], [-1, -1, 3]);
const rgb2 = tf2.slice3d(pixels, [0, 0, 0], [-1, -1, 3]);
tf2.dispose(pixels);
pixels = rgb3;
pixels = rgb2;
}
if (!pixels)
throw new Error("input error: cannot create tensor");
@ -1381,13 +1381,13 @@ var Env = class {
var env = new Env();
// src/human.ts
var tf36 = __toModule(require_tfjs_esm());
var tf35 = __toModule(require_tfjs_esm());
// package.json
var version = "2.5.2";
// src/tfjs/humangl.ts
var tf31 = __toModule(require_tfjs_esm());
var tf30 = __toModule(require_tfjs_esm());
// src/gear/gear.ts
var tf4 = __toModule(require_tfjs_esm());
@ -1460,12 +1460,22 @@ var tf6 = __toModule(require_tfjs_esm());
// src/tfjs/constants.ts
var tf5 = __toModule(require_tfjs_esm());
var tf255 = tf5.scalar(255, "float32");
var tf1 = tf5.scalar(1, "float32");
var tf22 = tf5.scalar(2, "float32");
var tf05 = tf5.scalar(0.5, "float32");
var tf127 = tf5.scalar(127.5, "float32");
var rgb = tf5.tensor1d([0.2989, 0.587, 0.114], "float32");
var constants = {
tf255: 255,
tf1: 1,
tf2: 2,
tf05: 0.5,
tf127: 127.5,
rgb: [0.2989, 0.587, 0.114]
};
function init() {
constants.tf255 = tf5.scalar(255, "float32");
constants.tf1 = tf5.scalar(1, "float32");
constants.tf2 = tf5.scalar(2, "float32");
constants.tf05 = tf5.scalar(0.5, "float32");
constants.tf127 = tf5.scalar(127.5, "float32");
constants.rgb = tf5.tensor1d([0.2989, 0.587, 0.114], "float32");
}
// src/gear/ssrnet-age.ts
var model2;
@ -1504,7 +1514,7 @@ async function predict2(image29, config3, idx, count2) {
return;
const t = {};
t.resize = tf6.image.resizeBilinear(image29, [model2.inputs[0].shape[2], model2.inputs[0].shape[1]], false);
t.enhance = tf6.mul(t.resize, tf255);
t.enhance = tf6.mul(t.resize, constants.tf255);
const obj = { age: 0 };
if (config3.face["ssrnet"].enabled)
t.age = model2.execute(t.enhance);
@ -1527,7 +1537,7 @@ var last4 = [];
var lastCount3 = 0;
var lastTime3 = 0;
var skipped3 = Number.MAX_SAFE_INTEGER;
var rgb2 = [0.2989, 0.587, 0.114];
var rgb = [0.2989, 0.587, 0.114];
async function load3(config3) {
if (env.initial)
model3 = null;
@ -1559,11 +1569,11 @@ async function predict3(image29, config3, idx, count2) {
t.resize = tf7.image.resizeBilinear(image29, [model3.inputs[0].shape[2], model3.inputs[0].shape[1]], false);
t.enhance = tf7.tidy(() => {
const [red, green, blue] = tf7.split(t.resize, 3, 3);
const redNorm = tf7.mul(red, rgb2[0]);
const greenNorm = tf7.mul(green, rgb2[1]);
const blueNorm = tf7.mul(blue, rgb2[2]);
const redNorm = tf7.mul(red, rgb[0]);
const greenNorm = tf7.mul(green, rgb[1]);
const blueNorm = tf7.mul(blue, rgb[2]);
const grayscale = tf7.addN([redNorm, greenNorm, blueNorm]);
const normalize = tf7.mul(tf7.sub(grayscale, tf05), 2);
const normalize = tf7.mul(tf7.sub(grayscale, constants.tf05), 2);
return normalize;
});
const obj = { gender: "", genderScore: 0 };
@ -4937,7 +4947,7 @@ var cutBoxFromImageAndResize = (box4, image29, cropSize) => {
const h = image29.shape[1];
const w = image29.shape[2];
const crop2 = tf9.image.cropAndResize(image29, [[box4.startPoint[1] / h, box4.startPoint[0] / w, box4.endPoint[1] / h, box4.endPoint[0] / w]], [0], cropSize);
const norm = tf9.div(crop2, tf255);
const norm = tf9.div(crop2, constants.tf255);
tf9.dispose(crop2);
return norm;
};
@ -5092,7 +5102,7 @@ function decodeBounds(boxOutputs) {
t.boxSizes = tf10.slice(boxOutputs, [0, 3], [-1, 2]);
t.boxSizesNormalized = tf10.div(t.boxSizes, inputSizeT);
t.centersNormalized = tf10.div(t.centers, inputSizeT);
t.halfBoxSize = tf10.div(t.boxSizesNormalized, tf22);
t.halfBoxSize = tf10.div(t.boxSizesNormalized, constants.tf2);
t.starts = tf10.sub(t.centersNormalized, t.halfBoxSize);
t.ends = tf10.add(t.centersNormalized, t.halfBoxSize);
t.startNormalized = tf10.mul(t.starts, inputSizeT);
@ -5107,8 +5117,8 @@ async function getBoxes(inputImage, config3) {
return { boxes: [] };
const t = {};
t.resized = tf10.image.resizeBilinear(inputImage, [inputSize, inputSize]);
t.div = tf10.div(t.resized, tf127);
t.normalized = tf10.sub(t.div, tf05);
t.div = tf10.div(t.resized, constants.tf127);
t.normalized = tf10.sub(t.div, constants.tf05);
const res = model5 == null ? void 0 : model5.execute(t.normalized);
if (Array.isArray(res)) {
const sorted = res.sort((a, b) => a.size - b.size);
@ -5279,7 +5289,7 @@ async function prepareImage(input) {
];
t.pad = tf11.pad(input, padding);
t.resize = tf11.image.resizeBilinear(t.pad, [inputSize2[1][0], inputSize2[1][1]]);
const final = tf11.div(t.resize, tf255);
const final = tf11.div(t.resize, constants.tf255);
Object.keys(t).forEach((tensor3) => tf11.dispose(t[tensor3]));
return final;
}
@ -5463,26 +5473,20 @@ async function load6(config3) {
async function process3(res, outputShape, config3) {
if (!res)
return [];
const t = {};
const results = [];
const detections = await res.array();
const squeezeT = tf12.squeeze(res);
tf12.dispose(res);
const arr = tf12.split(squeezeT, 6, 1);
tf12.dispose(squeezeT);
const stackT = tf12.stack([arr[1], arr[0], arr[3], arr[2]], 1);
const boxesT = tf12.squeeze(stackT);
tf12.dispose(stackT);
const scoresT = tf12.squeeze(arr[4]);
const classesT = tf12.squeeze(arr[5]);
arr.forEach((t) => tf12.dispose(t));
const nmsT = await tf12.image.nonMaxSuppressionAsync(boxesT, scoresT, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
tf12.dispose(boxesT);
tf12.dispose(scoresT);
tf12.dispose(classesT);
const nms = await nmsT.data();
tf12.dispose(nmsT);
t.squeeze = tf12.squeeze(res);
const arr = tf12.split(t.squeeze, 6, 1);
t.stack = tf12.stack([arr[1], arr[0], arr[3], arr[2]], 1);
t.boxes = tf12.squeeze(t.stack);
t.scores = tf12.squeeze(arr[4]);
t.classes = tf12.squeeze(arr[5]);
tf12.dispose([res, ...arr]);
t.nms = await tf12.image.nonMaxSuppressionAsync(t.boxes, t.scores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
const nms = await t.nms.data();
let i = 0;
for (const id of nms) {
for (const id of Array.from(nms)) {
const score = Math.trunc(100 * detections[0][id][4]) / 100;
const classVal = detections[0][id][5];
const label = labels[classVal].label;
@ -5504,6 +5508,7 @@ async function process3(res, outputShape, config3) {
];
results.push({ id: i++, score, class: classVal, label, box: box4, boxRaw });
}
Object.keys(t).forEach((tensor3) => tf12.dispose(t[tensor3]));
return results;
}
async function predict6(input, config3) {
@ -5611,8 +5616,8 @@ async function predict7(image29, config3) {
if (!(model7 == null ? void 0 : model7.inputs[0].shape))
return null;
const resize = tf13.image.resizeBilinear(image29, [model7.inputs[0].shape[2], model7.inputs[0].shape[1]], false);
const enhance3 = tf13.mul(resize, tf22);
const norm = tf13.sub(enhance3, tf1);
const enhance3 = tf13.mul(resize, constants.tf2);
const norm = tf13.sub(enhance3, constants.tf1);
return norm;
});
let resT;
@ -5716,10 +5721,10 @@ async function predict8(image29, config3, idx, count2) {
const t = {};
const inputSize8 = (model8 == null ? void 0 : model8.inputs[0].shape) ? model8.inputs[0].shape[2] : 0;
t.resize = tf14.image.resizeBilinear(image29, [inputSize8, inputSize8], false);
t.channels = tf14.mul(t.resize, rgb);
t.channels = tf14.mul(t.resize, constants.rgb);
t.grayscale = tf14.sum(t.channels, 3, true);
t.grayscaleSub = tf14.sub(t.grayscale, tf05);
t.grayscaleMul = tf14.mul(t.grayscaleSub, tf22);
t.grayscaleSub = tf14.sub(t.grayscale, constants.tf05);
t.grayscaleMul = tf14.mul(t.grayscaleSub, constants.tf2);
t.emotion = model8 == null ? void 0 : model8.execute(t.grayscaleMul);
lastTime8 = now();
const data = await t.emotion.data();
@ -6064,7 +6069,7 @@ function enhance2(input) {
if (!(model12 == null ? void 0 : model12.inputs[0].shape))
return tensor3;
const crop2 = tf18.image.resizeBilinear(tensor3, [model12.inputs[0].shape[2], model12.inputs[0].shape[1]], false);
const norm = tf18.mul(crop2, tf255);
const norm = tf18.mul(crop2, constants.tf255);
tf18.dispose(crop2);
return norm;
}
@ -6117,7 +6122,7 @@ async function predict11(image29, config3, idx, count2) {
}
// src/hand/handpose.ts
var tf23 = __toModule(require_tfjs_esm());
var tf22 = __toModule(require_tfjs_esm());
// src/hand/handposedetector.ts
var tf20 = __toModule(require_tfjs_esm());
@ -9226,8 +9231,8 @@ var HandDetector = class {
async predict(input, config3) {
const t = {};
t.resize = tf20.image.resizeBilinear(input, [this.inputSize, this.inputSize]);
t.div = tf20.div(t.resize, tf127);
t.image = tf20.sub(t.div, tf1);
t.div = tf20.div(t.resize, constants.tf127);
t.image = tf20.sub(t.div, constants.tf1);
t.batched = this.model.execute(t.image);
t.predictions = tf20.squeeze(t.batched);
t.slice = tf20.slice(t.predictions, [0, 0], [-1, 1]);
@ -9358,7 +9363,7 @@ var HandPipeline = class {
const rotationMatrix = buildRotationMatrix2(-angle, palmCenter);
const newBox = useFreshBox ? this.getBoxForPalmLandmarks(currentBox.palmLandmarks, rotationMatrix) : currentBox;
const croppedInput = cutBoxFromImageAndResize2(newBox, rotatedImage, [this.inputSize, this.inputSize]);
const handImage = tf21.div(croppedInput, tf255);
const handImage = tf21.div(croppedInput, constants.tf255);
tf21.dispose(croppedInput);
tf21.dispose(rotatedImage);
const [confidenceT, keypoints] = this.handPoseModel.execute(handImage);
@ -9888,8 +9893,8 @@ async function load13(config3) {
}
if (!handDetectorModel || !handPoseModel) {
[handDetectorModel, handPoseModel] = await Promise.all([
config3.hand.enabled ? tf23.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""), { fromTFHub: (((_b = config3.hand.detector) == null ? void 0 : _b.modelPath) || "").includes("tfhub.dev") }) : null,
config3.hand.landmarks ? tf23.loadGraphModel(join(config3.modelBasePath, ((_c = config3.hand.skeleton) == null ? void 0 : _c.modelPath) || ""), { fromTFHub: (((_d = config3.hand.skeleton) == null ? void 0 : _d.modelPath) || "").includes("tfhub.dev") }) : null
config3.hand.enabled ? tf22.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""), { fromTFHub: (((_b = config3.hand.detector) == null ? void 0 : _b.modelPath) || "").includes("tfhub.dev") }) : null,
config3.hand.landmarks ? tf22.loadGraphModel(join(config3.modelBasePath, ((_c = config3.hand.skeleton) == null ? void 0 : _c.modelPath) || ""), { fromTFHub: (((_d = config3.hand.skeleton) == null ? void 0 : _d.modelPath) || "").includes("tfhub.dev") }) : null
]);
if (config3.hand.enabled) {
if (!handDetectorModel || !handDetectorModel["modelUrl"])
@ -9947,7 +9952,7 @@ function crop(box4) {
}
// src/hand/handtrack.ts
var tf24 = __toModule(require_tfjs_esm());
var tf23 = __toModule(require_tfjs_esm());
var models2 = [null, null];
var modelOutputNodes = ["StatefulPartitionedCall/Postprocessor/Slice", "StatefulPartitionedCall/Postprocessor/ExpandDims_1"];
var inputSize6 = [[0, 0], [0, 0]];
@ -9977,7 +9982,7 @@ async function loadDetect2(config3) {
models2[0] = null;
if (!models2[0]) {
fakeOps(["tensorlistreserve", "enter", "tensorlistfromtensor", "merge", "loopcond", "switch", "exit", "tensorliststack", "nextiteration", "tensorlistsetitem", "tensorlistgetitem", "reciprocal", "shape", "split", "where"], config3);
models2[0] = await tf24.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""));
models2[0] = await tf23.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) || ""));
const inputs = Object.values(models2[0].modelSignature["inputs"]);
inputSize6[0][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;
inputSize6[0][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;
@ -9994,7 +9999,7 @@ async function loadSkeleton(config3) {
if (env.initial)
models2[1] = null;
if (!models2[1]) {
models2[1] = await tf24.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.skeleton) == null ? void 0 : _a.modelPath) || ""));
models2[1] = await tf23.loadGraphModel(join(config3.modelBasePath, ((_a = config3.hand.skeleton) == null ? void 0 : _a.modelPath) || ""));
const inputs = Object.values(models2[1].modelSignature["inputs"]);
inputSize6[1][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;
inputSize6[1][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;
@ -10014,27 +10019,27 @@ async function detectHands(input, config3) {
const ratio = (input.shape[2] || 1) / (input.shape[1] || 1);
const height = Math.min(Math.round((input.shape[1] || 0) / 8) * 8, maxDetectorResolution);
const width = Math.round(height * ratio / 8) * 8;
t.resize = tf24.image.resizeBilinear(input, [height, width]);
t.cast = tf24.cast(t.resize, "int32");
t.resize = tf23.image.resizeBilinear(input, [height, width]);
t.cast = tf23.cast(t.resize, "int32");
[t.rawScores, t.rawBoxes] = await models2[0].executeAsync(t.cast, modelOutputNodes);
t.boxes = tf24.squeeze(t.rawBoxes, [0, 2]);
t.scores = tf24.squeeze(t.rawScores, [0]);
const classScores = tf24.unstack(t.scores, 1);
tf24.dispose(classScores[faceIndex]);
t.boxes = tf23.squeeze(t.rawBoxes, [0, 2]);
t.scores = tf23.squeeze(t.rawScores, [0]);
const classScores = tf23.unstack(t.scores, 1);
tf23.dispose(classScores[faceIndex]);
classScores.splice(faceIndex, 1);
t.filtered = tf24.stack(classScores, 1);
tf24.dispose(classScores);
t.max = tf24.max(t.filtered, 1);
t.argmax = tf24.argMax(t.filtered, 1);
t.filtered = tf23.stack(classScores, 1);
tf23.dispose(classScores);
t.max = tf23.max(t.filtered, 1);
t.argmax = tf23.argMax(t.filtered, 1);
let id = 0;
t.nms = await tf24.image.nonMaxSuppressionAsync(t.boxes, t.max, config3.hand.maxDetected, config3.hand.iouThreshold, config3.hand.minConfidence);
t.nms = await tf23.image.nonMaxSuppressionAsync(t.boxes, t.max, config3.hand.maxDetected, config3.hand.iouThreshold, config3.hand.minConfidence);
const nms = await t.nms.data();
const scores = await t.max.data();
const classNum = await t.argmax.data();
for (const nmsIndex of Array.from(nms)) {
const boxSlice = tf24.slice(t.boxes, nmsIndex, 1);
const boxSlice = tf23.slice(t.boxes, nmsIndex, 1);
const boxYX = await boxSlice.data();
tf24.dispose(boxSlice);
tf23.dispose(boxSlice);
const boxData = [boxYX[1], boxYX[0], boxYX[3] - boxYX[1], boxYX[2] - boxYX[0]];
const boxRaw = scale(boxData, detectorExpandFact);
const boxCrop = crop(boxRaw);
@ -10044,7 +10049,7 @@ async function detectHands(input, config3) {
const hand3 = { id: id++, score, box: boxFull, boxRaw, boxCrop, label };
hands.push(hand3);
}
Object.keys(t).forEach((tensor3) => tf24.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf23.dispose(t[tensor3]));
hands.sort((a, b) => b.score - a.score);
if (hands.length > (config3.hand.maxDetected || 1))
hands.length = config3.hand.maxDetected || 1;
@ -10065,14 +10070,14 @@ async function detectFingers(input, h, config3) {
};
if (input && models2[1] && config3.hand.landmarks && h.score > (config3.hand.minConfidence || 0)) {
const t = {};
t.crop = tf24.image.cropAndResize(input, [h.boxCrop], [0], [inputSize6[1][0], inputSize6[1][1]], "bilinear");
t.div = tf24.div(t.crop, tf255);
t.crop = tf23.image.cropAndResize(input, [h.boxCrop], [0], [inputSize6[1][0], inputSize6[1][1]], "bilinear");
t.div = tf23.div(t.crop, constants.tf255);
[t.score, t.keypoints] = models2[1].execute(t.div, ["Identity_1", "Identity"]);
const rawScore = (await t.score.data())[0];
const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100;
if (score >= (config3.hand.minConfidence || 0)) {
hand3.fingerScore = score;
t.reshaped = tf24.reshape(t.keypoints, [-1, 3]);
t.reshaped = tf23.reshape(t.keypoints, [-1, 3]);
const coordsData = await t.reshaped.array();
const coordsRaw = coordsData.map((kpt4) => [kpt4[0] / inputSize6[1][1], kpt4[1] / inputSize6[1][0], kpt4[2] || 0]);
const coordsNorm = coordsRaw.map((kpt4) => [kpt4[0] * h.boxRaw[2], kpt4[1] * h.boxRaw[3], kpt4[2] || 0]);
@ -10086,7 +10091,7 @@ async function detectFingers(input, h, config3) {
hand3.annotations[key] = fingerMap[key].map((index2) => hand3.landmarks && hand3.keypoints[index2] ? hand3.keypoints[index2] : null);
}
}
Object.keys(t).forEach((tensor3) => tf24.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf23.dispose(t[tensor3]));
}
return hand3;
}
@ -10137,7 +10142,7 @@ async function predict13(input, config3) {
}
// src/face/liveness.ts
var tf25 = __toModule(require_tfjs_esm());
var tf24 = __toModule(require_tfjs_esm());
var model13;
var cached2 = [];
var skipped13 = Number.MAX_SAFE_INTEGER;
@ -10148,7 +10153,7 @@ async function load14(config3) {
if (env.initial)
model13 = null;
if (!model13) {
model13 = await tf25.loadGraphModel(join(config3.modelBasePath, ((_a = config3.face.liveness) == null ? void 0 : _a.modelPath) || ""));
model13 = await tf24.loadGraphModel(join(config3.modelBasePath, ((_a = config3.face.liveness) == null ? void 0 : _a.modelPath) || ""));
if (!model13 || !model13["modelUrl"])
log("load model failed:", (_b = config3.face.liveness) == null ? void 0 : _b.modelPath);
else if (config3.debug)
@ -10169,19 +10174,19 @@ async function predict14(image29, config3, idx, count2) {
}
skipped13 = 0;
return new Promise(async (resolve) => {
const resize = tf25.image.resizeBilinear(image29, [(model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[2] : 0, (model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[1] : 0], false);
const resize = tf24.image.resizeBilinear(image29, [(model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[2] : 0, (model13 == null ? void 0 : model13.inputs[0].shape) ? model13.inputs[0].shape[1] : 0], false);
const res = model13 == null ? void 0 : model13.execute(resize);
const num = (await res.data())[0];
cached2[idx] = Math.round(100 * num) / 100;
lastCount8 = count2;
lastTime14 = now();
tf25.dispose([resize, res]);
tf24.dispose([resize, res]);
resolve(cached2[idx]);
});
}
// src/body/movenet.ts
var tf27 = __toModule(require_tfjs_esm());
var tf26 = __toModule(require_tfjs_esm());
// src/body/movenetcoords.ts
var movenetcoords_exports = {};
@ -10241,7 +10246,7 @@ var connected3 = {
};
// src/body/movenetfix.ts
var tf26 = __toModule(require_tfjs_esm());
var tf25 = __toModule(require_tfjs_esm());
var maxJitter = 5e-3;
var cache4 = {
keypoints: [],
@ -10315,10 +10320,10 @@ function padInput(input, inputSize8) {
[input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0],
[0, 0]
];
t.pad = tf26.pad(input, cache4.padding);
t.resize = tf26.image.resizeBilinear(t.pad, [inputSize8, inputSize8]);
const final = tf26.cast(t.resize, "int32");
Object.keys(t).forEach((tensor3) => tf26.dispose(t[tensor3]));
t.pad = tf25.pad(input, cache4.padding);
t.resize = tf25.image.resizeBilinear(t.pad, [inputSize8, inputSize8]);
const final = tf25.cast(t.resize, "int32");
Object.keys(t).forEach((tensor3) => tf25.dispose(t[tensor3]));
return final;
}
function rescaleBody(body4, outputSize2) {
@ -10353,7 +10358,7 @@ async function load15(config3) {
model14 = null;
if (!model14) {
fakeOps(["size"], config3);
model14 = await tf27.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
model14 = await tf26.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
if (!model14 || !model14["modelUrl"])
log("load model failed:", config3.body.modelPath);
else if (config3.debug)
@ -10465,13 +10470,13 @@ async function predict15(input, config3) {
rescaleBody(body4, [input.shape[2] || 1, input.shape[1] || 1]);
jitter(body4.keypoints);
}
Object.keys(t).forEach((tensor3) => tf27.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf26.dispose(t[tensor3]));
resolve(cache5.bodies);
});
}
// src/object/nanodet.ts
var tf28 = __toModule(require_tfjs_esm());
var tf27 = __toModule(require_tfjs_esm());
var model15;
var last9 = [];
var lastTime15 = 0;
@ -10479,7 +10484,7 @@ var skipped15 = Number.MAX_SAFE_INTEGER;
var scaleBox = 2.5;
async function load16(config3) {
if (!model15 || env.initial) {
model15 = await tf28.loadGraphModel(join(config3.modelBasePath, config3.object.modelPath || ""));
model15 = await tf27.loadGraphModel(join(config3.modelBasePath, config3.object.modelPath || ""));
const inputs = Object.values(model15.modelSignature["inputs"]);
model15.inputSize = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : null;
if (!model15 || !model15.modelUrl)
@ -10494,7 +10499,7 @@ async function process4(res, inputSize8, outputShape, config3) {
let id = 0;
let results = [];
for (const strideSize of [1, 2, 4]) {
tf28.tidy(async () => {
tf27.tidy(async () => {
var _a, _b;
const baseSize = strideSize * 13;
const scoresT = (_a = res.find((a) => a.shape[1] === baseSize ** 2 && a.shape[2] === labels.length)) == null ? void 0 : _a.squeeze();
@ -10539,14 +10544,14 @@ async function process4(res, inputSize8, outputShape, config3) {
}
});
}
res.forEach((t) => tf28.dispose(t));
res.forEach((t) => tf27.dispose(t));
const nmsBoxes = results.map((a) => [a.boxRaw[1], a.boxRaw[0], a.boxRaw[3], a.boxRaw[2]]);
const nmsScores = results.map((a) => a.score);
let nmsIdx = [];
if (nmsBoxes && nmsBoxes.length > 0) {
const nms = await tf28.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
const nms = await tf27.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence);
nmsIdx = await nms.data();
tf28.dispose(nms);
tf27.dispose(nms);
}
results = results.filter((_val, idx) => nmsIdx.includes(idx)).sort((a, b) => b.score - a.score);
return results;
@ -10563,16 +10568,16 @@ async function predict16(image29, config3) {
return last9;
return new Promise(async (resolve) => {
const outputSize2 = [image29.shape[2], image29.shape[1]];
const resize = tf28.image.resizeBilinear(image29, [model15.inputSize, model15.inputSize], false);
const norm = tf28.div(resize, tf255);
const resize = tf27.image.resizeBilinear(image29, [model15.inputSize, model15.inputSize], false);
const norm = tf27.div(resize, constants.tf255);
const transpose = norm.transpose([0, 3, 1, 2]);
tf28.dispose(norm);
tf28.dispose(resize);
tf27.dispose(norm);
tf27.dispose(resize);
let objectT;
if (config3.object.enabled)
objectT = model15.execute(transpose);
lastTime15 = now();
tf28.dispose(transpose);
tf27.dispose(transpose);
const obj = await process4(objectT, model15.inputSize, outputSize2, config3);
last9 = obj;
resolve(obj);
@ -10580,7 +10585,7 @@ async function predict16(image29, config3) {
}
// src/body/posenet.ts
var tf29 = __toModule(require_tfjs_esm());
var tf28 = __toModule(require_tfjs_esm());
// src/body/posenetutils.ts
var partNames = [
@ -10891,19 +10896,19 @@ function decode(offsets, scores, displacementsFwd, displacementsBwd, maxDetected
return poses;
}
async function predict17(input, config3) {
const res = tf29.tidy(() => {
const res = tf28.tidy(() => {
if (!model16.inputs[0].shape)
return [];
const resized = tf29.image.resizeBilinear(input, [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]);
const normalized = tf29.sub(tf29.div(tf29.cast(resized, "float32"), 127.5), 1);
const resized = tf28.image.resizeBilinear(input, [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]);
const normalized = tf28.sub(tf28.div(tf28.cast(resized, "float32"), 127.5), 1);
const results = model16.execute(normalized, poseNetOutputs);
const results3d = results.map((y) => tf29.squeeze(y, [0]));
const results3d = results.map((y) => tf28.squeeze(y, [0]));
results3d[1] = results3d[1].sigmoid();
return results3d;
});
const buffers = await Promise.all(res.map((tensor3) => tensor3.buffer()));
for (const t of res)
tf29.dispose(t);
tf28.dispose(t);
const decoded = await decode(buffers[0], buffers[1], buffers[2], buffers[3], config3.body.maxDetected, config3.body.minConfidence);
if (!model16.inputs[0].shape)
return [];
@ -10912,7 +10917,7 @@ async function predict17(input, config3) {
}
async function load17(config3) {
if (!model16 || env.initial) {
model16 = await tf29.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
model16 = await tf28.loadGraphModel(join(config3.modelBasePath, config3.body.modelPath || ""));
if (!model16 || !model16["modelUrl"])
log("load model failed:", config3.body.modelPath);
else if (config3.debug)
@ -10923,12 +10928,12 @@ async function load17(config3) {
}
// src/segmentation/segmentation.ts
var tf30 = __toModule(require_tfjs_esm());
var tf29 = __toModule(require_tfjs_esm());
var model17;
var busy = false;
async function load18(config3) {
if (!model17 || env.initial) {
model17 = await tf30.loadGraphModel(join(config3.modelBasePath, config3.segmentation.modelPath || ""));
model17 = await tf29.loadGraphModel(join(config3.modelBasePath, config3.segmentation.modelPath || ""));
if (!model17 || !model17["modelUrl"])
log("load model failed:", config3.segmentation.modelPath);
else if (config3.debug)
@ -10950,30 +10955,30 @@ async function process5(input, background, config3) {
if (!inputImage.tensor)
return { data: [], canvas: null, alpha: null };
const t = {};
t.resize = tf30.image.resizeBilinear(inputImage.tensor, [model17.inputs[0].shape ? model17.inputs[0].shape[1] : 0, model17.inputs[0].shape ? model17.inputs[0].shape[2] : 0], false);
tf30.dispose(inputImage.tensor);
t.norm = tf30.div(t.resize, tf255);
t.resize = tf29.image.resizeBilinear(inputImage.tensor, [model17.inputs[0].shape ? model17.inputs[0].shape[1] : 0, model17.inputs[0].shape ? model17.inputs[0].shape[2] : 0], false);
tf29.dispose(inputImage.tensor);
t.norm = tf29.div(t.resize, constants.tf255);
t.res = model17.execute(t.norm);
t.squeeze = tf30.squeeze(t.res, 0);
t.squeeze = tf29.squeeze(t.res, 0);
if (t.squeeze.shape[2] === 2) {
t.softmax = tf30.softmax(t.squeeze);
[t.bg, t.fg] = tf30.unstack(t.softmax, 2);
t.expand = tf30.expandDims(t.fg, 2);
t.pad = tf30.expandDims(t.expand, 0);
t.crop = tf30.image.cropAndResize(t.pad, [[0, 0, 0.5, 0.5]], [0], [width, height]);
t.data = tf30.squeeze(t.crop, 0);
t.softmax = tf29.softmax(t.squeeze);
[t.bg, t.fg] = tf29.unstack(t.softmax, 2);
t.expand = tf29.expandDims(t.fg, 2);
t.pad = tf29.expandDims(t.expand, 0);
t.crop = tf29.image.cropAndResize(t.pad, [[0, 0, 0.5, 0.5]], [0], [width, height]);
t.data = tf29.squeeze(t.crop, 0);
} else {
t.data = tf30.image.resizeBilinear(t.squeeze, [height, width]);
t.data = tf29.image.resizeBilinear(t.squeeze, [height, width]);
}
const data = Array.from(await t.data.data());
if (env.node && !env.Canvas && typeof ImageData === "undefined") {
if (config3.debug)
log("canvas support missing");
Object.keys(t).forEach((tensor3) => tf30.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf29.dispose(t[tensor3]));
return { data, canvas: null, alpha: null };
}
const alphaCanvas = canvas(width, height);
await tf30.browser.toPixels(t.data, alphaCanvas);
await tf29.browser.toPixels(t.data, alphaCanvas);
const alphaCtx = alphaCanvas.getContext("2d");
if (config3.segmentation.blur && config3.segmentation.blur > 0)
alphaCtx.filter = `blur(${config3.segmentation.blur}px)`;
@ -10996,12 +11001,12 @@ async function process5(input, background, config3) {
if (background && compositeCanvas) {
mergedCanvas = canvas(width, height);
const bgImage = await process2(background, config3);
tf30.dispose(bgImage.tensor);
tf29.dispose(bgImage.tensor);
const ctxMerge = mergedCanvas.getContext("2d");
ctxMerge.drawImage(bgImage.canvas, 0, 0, mergedCanvas.width, mergedCanvas.height);
ctxMerge.drawImage(compositeCanvas, 0, 0);
}
Object.keys(t).forEach((tensor3) => tf30.dispose(t[tensor3]));
Object.keys(t).forEach((tensor3) => tf29.dispose(t[tensor3]));
busy = false;
return { data, canvas: compositeCanvas, alpha: alphaCanvas };
}
@ -11163,11 +11168,11 @@ async function register(instance) {
var _a;
if (instance.config.backend !== "humangl")
return;
if (config2.name in tf31.engine().registry && (!config2.gl || !config2.gl.getParameter(config2.gl.VERSION))) {
if (config2.name in tf30.engine().registry && (!config2.gl || !config2.gl.getParameter(config2.gl.VERSION))) {
log("error: humangl backend invalid context");
reset(instance);
}
if (!tf31.findBackend(config2.name)) {
if (!tf30.findBackend(config2.name)) {
try {
config2.canvas = await canvas(100, 100);
} catch (err) {
@ -11201,29 +11206,29 @@ async function register(instance) {
return;
}
try {
tf31.setWebGLContext(2, config2.gl);
tf30.setWebGLContext(2, config2.gl);
} catch (err) {
log("error: cannot set WebGL context:", err);
return;
}
try {
const ctx = new tf31.GPGPUContext(config2.gl);
tf31.registerBackend(config2.name, () => new tf31.MathBackendWebGL(ctx), config2.priority);
const ctx = new tf30.GPGPUContext(config2.gl);
tf30.registerBackend(config2.name, () => new tf30.MathBackendWebGL(ctx), config2.priority);
} catch (err) {
log("error: cannot register WebGL backend:", err);
return;
}
try {
const kernels = tf31.getKernelsForBackend("webgl");
const kernels = tf30.getKernelsForBackend("webgl");
kernels.forEach((kernelConfig) => {
const newKernelConfig = { ...kernelConfig, backendName: config2.name };
tf31.registerKernel(newKernelConfig);
tf30.registerKernel(newKernelConfig);
});
} catch (err) {
log("error: cannot update WebGL backend registration:", err);
return;
}
const current = tf31.backend().getGPGPUContext ? tf31.backend().getGPGPUContext().gl : null;
const current = tf30.backend().getGPGPUContext ? tf30.backend().getGPGPUContext().gl : null;
if (current) {
log(`humangl webgl version:${current.getParameter(current.VERSION)} renderer:${current.getParameter(current.RENDERER)}`);
} else {
@ -11231,7 +11236,7 @@ async function register(instance) {
return;
}
try {
tf31.ENV.set("WEBGL_VERSION", 2);
tf30.ENV.set("WEBGL_VERSION", 2);
} catch (err) {
log("error: cannot set WebGL backend flags:", err);
return;
@ -11242,30 +11247,30 @@ async function register(instance) {
}
// src/tfjs/backend.ts
var tf32 = __toModule(require_tfjs_esm());
var tf31 = __toModule(require_tfjs_esm());
function registerCustomOps() {
if (!env.kernels.includes("mod")) {
const kernelMod = {
kernelName: "Mod",
backendName: tf32.getBackend(),
kernelFunc: (op) => tf32.tidy(() => tf32.sub(op.inputs.a, tf32.mul(tf32.div(op.inputs.a, op.inputs.b), op.inputs.b)))
backendName: tf31.getBackend(),
kernelFunc: (op) => tf31.tidy(() => tf31.sub(op.inputs.a, tf31.mul(tf31.div(op.inputs.a, op.inputs.b), op.inputs.b)))
};
tf32.registerKernel(kernelMod);
tf31.registerKernel(kernelMod);
env.kernels.push("mod");
}
if (!env.kernels.includes("floormod")) {
const kernelMod = {
kernelName: "FloorMod",
backendName: tf32.getBackend(),
kernelFunc: (op) => tf32.tidy(() => tf32.floorDiv(op.inputs.a / op.inputs.b) * op.inputs.b + tf32.mod(op.inputs.a, op.inputs.b))
backendName: tf31.getBackend(),
kernelFunc: (op) => tf31.tidy(() => tf31.floorDiv(op.inputs.a / op.inputs.b) * op.inputs.b + tf31.mod(op.inputs.a, op.inputs.b))
};
tf32.registerKernel(kernelMod);
tf31.registerKernel(kernelMod);
env.kernels.push("floormod");
}
}
async function check(instance, force = false) {
instance.state = "backend";
if (force || env.initial || instance.config.backend && instance.config.backend.length > 0 && tf32.getBackend() !== instance.config.backend) {
if (force || env.initial || instance.config.backend && instance.config.backend.length > 0 && tf31.getBackend() !== instance.config.backend) {
const timeStamp = now();
if (instance.config.backend && instance.config.backend.length > 0) {
if (typeof window === "undefined" && typeof WorkerGlobalScope !== "undefined" && instance.config.debug) {
@ -11294,7 +11299,7 @@ async function check(instance, force = false) {
}
if (instance.config.backend === "humangl")
await register(instance);
const available = Object.keys(tf32.engine().registryFactory);
const available = Object.keys(tf31.engine().registryFactory);
if (instance.config.debug)
log("available backends:", available);
if (!available.includes(instance.config.backend)) {
@ -11308,46 +11313,47 @@ async function check(instance, force = false) {
if (instance.config.backend === "wasm") {
if (instance.config.debug)
log("wasm path:", instance.config.wasmPath);
if (typeof (tf32 == null ? void 0 : tf32.setWasmPaths) !== "undefined")
await tf32.setWasmPaths(instance.config.wasmPath);
if (typeof (tf31 == null ? void 0 : tf31.setWasmPaths) !== "undefined")
await tf31.setWasmPaths(instance.config.wasmPath);
else
throw new Error("backend error: attempting to use wasm backend but wasm path is not set");
const simd = await tf32.env().getAsync("WASM_HAS_SIMD_SUPPORT");
const mt = await tf32.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT");
const simd = await tf31.env().getAsync("WASM_HAS_SIMD_SUPPORT");
const mt = await tf31.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT");
if (instance.config.debug)
log(`wasm execution: ${simd ? "SIMD" : "no SIMD"} ${mt ? "multithreaded" : "singlethreaded"}`);
if (instance.config.debug && !simd)
log("warning: wasm simd support is not enabled");
}
try {
await tf32.setBackend(instance.config.backend);
await tf32.ready();
await tf31.setBackend(instance.config.backend);
await tf31.ready();
init();
} catch (err) {
log("error: cannot set backend:", instance.config.backend, err);
return false;
}
}
if (tf32.getBackend() === "humangl") {
tf32.ENV.set("CHECK_COMPUTATION_FOR_ERRORS", false);
tf32.ENV.set("WEBGL_CPU_FORWARD", true);
tf32.ENV.set("WEBGL_USE_SHAPES_UNIFORMS", true);
tf32.ENV.set("CPU_HANDOFF_SIZE_THRESHOLD", 256);
if (tf31.getBackend() === "humangl") {
tf31.ENV.set("CHECK_COMPUTATION_FOR_ERRORS", false);
tf31.ENV.set("WEBGL_CPU_FORWARD", true);
tf31.ENV.set("WEBGL_USE_SHAPES_UNIFORMS", true);
tf31.ENV.set("CPU_HANDOFF_SIZE_THRESHOLD", 256);
if (typeof instance.config["deallocate"] !== "undefined" && instance.config["deallocate"]) {
log("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:", true);
tf32.ENV.set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0);
tf31.ENV.set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0);
}
if (tf32.backend().getGPGPUContext) {
const gl = await tf32.backend().getGPGPUContext().gl;
if (tf31.backend().getGPGPUContext) {
const gl = await tf31.backend().getGPGPUContext().gl;
if (instance.config.debug)
log(`gl version:${gl.getParameter(gl.VERSION)} renderer:${gl.getParameter(gl.RENDERER)}`);
}
}
if (tf32.getBackend() === "webgpu") {
if (tf31.getBackend() === "webgpu") {
}
tf32.enableProdMode();
await tf32.ready();
tf31.enableProdMode();
await tf31.ready();
instance.performance.initBackend = Math.trunc(now() - timeStamp);
instance.config.backend = tf32.getBackend();
instance.config.backend = tf31.getBackend();
await env.updateBackend();
registerCustomOps();
}
@ -11363,9 +11369,9 @@ function fakeOps(kernelNames, config3) {
log("kernelFunc", kernelName, config3.backend);
}
};
tf32.registerKernel(kernelConfig);
tf31.registerKernel(kernelConfig);
}
env.kernels = tf32.getKernelsForBackend(tf32.getBackend()).map((kernel) => kernel.kernelName.toLowerCase());
env.kernels = tf31.getKernelsForBackend(tf31.getBackend()).map((kernel) => kernel.kernelName.toLowerCase());
}
// src/util/draw.ts
@ -11849,10 +11855,10 @@ async function all(inCanvas2, result, drawOptions) {
}
// src/face/face.ts
var tf34 = __toModule(require_tfjs_esm());
var tf33 = __toModule(require_tfjs_esm());
// src/face/mask.ts
var tf33 = __toModule(require_tfjs_esm());
var tf32 = __toModule(require_tfjs_esm());
var expandFact = 0.1;
var alpha = 0.5;
function insidePoly(x, y, polygon) {
@ -11888,7 +11894,7 @@ async function mask(face5) {
}
}
const output = buffer.toTensor();
tf33.dispose(buffer);
tf32.dispose(buffer);
return output;
}
@ -12027,79 +12033,79 @@ var detectFace = async (instance, input) => {
}
if ((_a = instance.config.face.detector) == null ? void 0 : _a.mask) {
const masked = await mask(faces[i]);
tf34.dispose(faces[i].tensor);
tf33.dispose(faces[i].tensor);
faces[i].tensor = masked;
}
const rotation = faces[i].mesh && faces[i].mesh.length > 200 ? calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]) : null;
instance.analyze("Start Emotion:");
if (instance.config.async) {
emotionRes = ((_b = instance.config.face.emotion) == null ? void 0 : _b.enabled) ? predict8(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
emotionRes = ((_b = instance.config.face.emotion) == null ? void 0 : _b.enabled) ? predict8(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:emotion";
timeStamp = now();
emotionRes = ((_c = instance.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict8(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
emotionRes = ((_c = instance.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict8(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.emotion = env.perfadd ? (instance.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End Emotion:");
instance.analyze("Start AntiSpoof:");
if (instance.config.async) {
antispoofRes = ((_d = instance.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict4(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
antispoofRes = ((_d = instance.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict4(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:antispoof";
timeStamp = now();
antispoofRes = ((_e = instance.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict4(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
antispoofRes = ((_e = instance.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict4(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.antispoof = env.perfadd ? (instance.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End AntiSpoof:");
instance.analyze("Start Liveness:");
if (instance.config.async) {
livenessRes = ((_f = instance.config.face.liveness) == null ? void 0 : _f.enabled) ? predict14(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
livenessRes = ((_f = instance.config.face.liveness) == null ? void 0 : _f.enabled) ? predict14(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:liveness";
timeStamp = now();
livenessRes = ((_g = instance.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict14(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
livenessRes = ((_g = instance.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict14(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.liveness = env.perfadd ? (instance.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End Liveness:");
instance.analyze("Start GEAR:");
if (instance.config.async) {
gearRes = ((_h = instance.config.face["gear"]) == null ? void 0 : _h.enabled) ? predict(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
gearRes = ((_h = instance.config.face["gear"]) == null ? void 0 : _h.enabled) ? predict(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
} else {
instance.state = "run:gear";
timeStamp = now();
gearRes = ((_i = instance.config.face["gear"]) == null ? void 0 : _i.enabled) ? await predict(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
gearRes = ((_i = instance.config.face["gear"]) == null ? void 0 : _i.enabled) ? await predict(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
instance.performance.gear = Math.trunc(now() - timeStamp);
}
instance.analyze("End GEAR:");
instance.analyze("Start SSRNet:");
if (instance.config.async) {
ageRes = ((_j = instance.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict2(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_k = instance.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict3(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
ageRes = ((_j = instance.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict2(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_k = instance.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict3(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
} else {
instance.state = "run:ssrnet";
timeStamp = now();
ageRes = ((_l = instance.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict2(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_m = instance.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict3(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
ageRes = ((_l = instance.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict2(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
genderRes = ((_m = instance.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict3(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
instance.performance.ssrnet = Math.trunc(now() - timeStamp);
}
instance.analyze("End SSRNet:");
instance.analyze("Start MobileFaceNet:");
if (instance.config.async) {
mobilefacenetRes = ((_n = instance.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict9(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
mobilefacenetRes = ((_n = instance.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict9(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
} else {
instance.state = "run:mobilefacenet";
timeStamp = now();
mobilefacenetRes = ((_o = instance.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict9(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : {};
mobilefacenetRes = ((_o = instance.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict9(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : {};
instance.performance.mobilefacenet = Math.trunc(now() - timeStamp);
}
instance.analyze("End MobileFaceNet:");
instance.analyze("Start Description:");
if (instance.config.async) {
descRes = ((_p = instance.config.face.description) == null ? void 0 : _p.enabled) ? predict11(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
descRes = ((_p = instance.config.face.description) == null ? void 0 : _p.enabled) ? predict11(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
} else {
instance.state = "run:description";
timeStamp = now();
descRes = ((_q = instance.config.face.description) == null ? void 0 : _q.enabled) ? await predict11(faces[i].tensor || tf34.tensor([]), instance.config, i, faces.length) : null;
descRes = ((_q = instance.config.face.description) == null ? void 0 : _q.enabled) ? await predict11(faces[i].tensor || tf33.tensor([]), instance.config, i, faces.length) : null;
instance.performance.description = env.perfadd ? (instance.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
}
instance.analyze("End Description:");
@ -12118,8 +12124,8 @@ var detectFace = async (instance, input) => {
delete faces[i].annotations.rightEyeIris;
}
const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0;
const tensor3 = ((_z = instance.config.face.detector) == null ? void 0 : _z.return) ? tf34.squeeze(faces[i].tensor) : null;
tf34.dispose(faces[i].tensor);
const tensor3 = ((_z = instance.config.face.detector) == null ? void 0 : _z.return) ? tf33.squeeze(faces[i].tensor) : null;
tf33.dispose(faces[i].tensor);
if (faces[i].tensor)
delete faces[i].tensor;
const res = {
@ -13233,7 +13239,7 @@ lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/
2Q==`;
// src/warmup.ts
var tf35 = __toModule(require_tfjs_esm());
var tf34 = __toModule(require_tfjs_esm());
async function warmupBitmap(instance) {
const b64toBlob = (base64, type = "application/octet-stream") => fetch(`data:${type};base64,${base64}`).then((res2) => res2.blob());
let blob;
@ -13305,8 +13311,8 @@ async function warmupNode(instance) {
if (!img)
return null;
let res;
if (typeof tf35["node"] !== "undefined") {
const data = tf35["node"].decodeJpeg(img);
if (typeof tf34["node"] !== "undefined") {
const data = tf34["node"].decodeJpeg(img);
const expanded = data.expandDims(0);
instance.tf.dispose(data);
res = await instance.detect(expanded, instance.config);
@ -13376,7 +13382,7 @@ var Human = class {
return null;
if (!input)
return "input is not defined";
if (this.env.node && !(input instanceof tf36.Tensor))
if (this.env.node && !(input instanceof tf35.Tensor))
return "input must be a tensor";
try {
this.tf.getBackend();
@ -13394,7 +13400,7 @@ var Human = class {
(_a = this.events) == null ? void 0 : _a.dispatchEvent(new Event(event));
});
this.env = env;
config.wasmPath = tf36.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf36.version_core}/dist/`;
config.wasmPath = tf35.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf35.version_core}/dist/`;
config.modelBasePath = env.browser ? "../models/" : "file://models/";
config.backend = env.browser ? "humangl" : "tensorflow";
this.version = version;
@ -13403,7 +13409,7 @@ var Human = class {
Object.seal(this.config);
if (userConfig)
this.config = mergeDeep(this.config, userConfig);
this.tf = tf36;
this.tf = tf35;
this.state = "idle";
__privateSet(this, _numTensors, 0);
__privateSet(this, _analyzeMemoryLeaks, false);
@ -13469,7 +13475,7 @@ var Human = class {
log(`tfjs version: ${this.tf.version_core}`);
if (!await check(this))
log("error: backend check failed");
await tf36.ready();
await tf35.ready();
if (this.env.browser) {
if (this.config.debug)
log("configuration:", this.config);
@ -13671,7 +13677,7 @@ var Human = class {
return join2(faceRes, bodyRes, handRes, gestureRes, shape);
}
};
tf36.dispose(img.tensor);
tf35.dispose(img.tensor);
this.emit("detect");
this.state = "idle";
resolve(this.result);

View File

@ -3,7 +3,7 @@
*/
import * as tf from '../../dist/tfjs.esm.js';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
import { log, join, now } from '../util/util';
import type { BodyKeypoint, BodyResult, Box, Point } from '../result';
import type { GraphModel, Tensor } from '../tfjs/types';

View File

@ -7,7 +7,7 @@
import { log, join, now } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js';
import * as coords from './efficientposecoords';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
import type { BodyResult, Point } from '../result';
import type { GraphModel, Tensor } from '../tfjs/types';
import type { Config } from '../config';

View File

@ -6,7 +6,7 @@
import { log, join } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js';
import * as util from './facemeshutil';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
import type { Config } from '../config';
import type { Tensor, GraphModel } from '../tfjs/types';
import { env } from '../util/env';

View File

@ -5,7 +5,7 @@
import * as tf from '../../dist/tfjs.esm.js';
import * as coords from './facemeshcoords';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
import type { Box, Point } from '../result';
import { env } from '../util/env';

View File

@ -10,7 +10,7 @@
import { log, join, now } from '../util/util';
import { env } from '../util/env';
import * as tf from '../../dist/tfjs.esm.js';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
import type { Tensor, GraphModel } from '../tfjs/types';
import type { Config } from '../config';

View File

@ -9,7 +9,7 @@ import type { Config } from '../config';
import type { GraphModel, Tensor } from '../tfjs/types';
import * as tf from '../../dist/tfjs.esm.js';
import { env } from '../util/env';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
const annotations = ['angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral'];
let model: GraphModel | null;

View File

@ -7,7 +7,7 @@
import { log, join, now } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js';
import { env } from '../util/env';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
import type { Config } from '../config';
import type { GraphModel, Tensor } from '../tfjs/types';

View File

@ -6,7 +6,7 @@
import { log, join, now } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
import type { Config } from '../config';
import type { GraphModel, Tensor } from '../tfjs/types';
import { env } from '../util/env';

View File

@ -6,7 +6,7 @@
import * as tf from '../../dist/tfjs.esm.js';
import * as util from './handposeutil';
import * as anchors from './handposeanchors';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
import type { Tensor, GraphModel } from '../tfjs/types';
import type { Point } from '../result';

View File

@ -6,7 +6,7 @@
import * as tf from '../../dist/tfjs.esm.js';
import * as util from './handposeutil';
import type * as detector from './handposedetector';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
import type { Tensor, GraphModel } from '../tfjs/types';
import { env } from '../util/env';
import { now } from '../util/util';

View File

@ -15,7 +15,7 @@ import type { Config } from '../config';
import { env } from '../util/env';
import * as fingerPose from './fingerpose';
import { fakeOps } from '../tfjs/backend';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
const models: [GraphModel | null, GraphModel | null] = [null, null];
const modelOutputNodes = ['StatefulPartitionedCall/Postprocessor/Slice', 'StatefulPartitionedCall/Postprocessor/ExpandDims_1'];

View File

@ -33,26 +33,20 @@ export async function load(config: Config): Promise<GraphModel> {
async function process(res: Tensor | null, outputShape, config: Config) {
if (!res) return [];
const t: Record<string, Tensor> = {};
const results: Array<ObjectResult> = [];
const detections = await res.array();
const squeezeT = tf.squeeze(res);
tf.dispose(res);
const arr = tf.split(squeezeT, 6, 1); // x1, y1, x2, y2, score, class
tf.dispose(squeezeT);
const stackT = tf.stack([arr[1], arr[0], arr[3], arr[2]], 1); // reorder dims as tf.nms expects y, x
const boxesT = tf.squeeze(stackT);
tf.dispose(stackT);
const scoresT = tf.squeeze(arr[4]);
const classesT = tf.squeeze(arr[5]);
arr.forEach((t) => tf.dispose(t));
const nmsT = await tf.image.nonMaxSuppressionAsync(boxesT, scoresT, config.object.maxDetected, config.object.iouThreshold, config.object.minConfidence);
tf.dispose(boxesT);
tf.dispose(scoresT);
tf.dispose(classesT);
const nms = await nmsT.data();
tf.dispose(nmsT);
t.squeeze = tf.squeeze(res);
const arr = tf.split(t.squeeze, 6, 1) as Tensor[]; // x1, y1, x2, y2, score, class
t.stack = tf.stack([arr[1], arr[0], arr[3], arr[2]], 1); // reorder dims as tf.nms expects y, x
t.boxes = tf.squeeze(t.stack);
t.scores = tf.squeeze(arr[4]);
t.classes = tf.squeeze(arr[5]);
tf.dispose([res, ...arr]);
t.nms = await tf.image.nonMaxSuppressionAsync(t.boxes, t.scores, config.object.maxDetected, config.object.iouThreshold, config.object.minConfidence);
const nms = await t.nms.data();
let i = 0;
for (const id of nms) {
for (const id of Array.from(nms)) {
const score = Math.trunc(100 * detections[0][id][4]) / 100;
const classVal = detections[0][id][5];
const label = labels[classVal].label;
@ -74,6 +68,7 @@ async function process(res: Tensor | null, outputShape, config: Config) {
];
results.push({ id: i++, score, class: classVal, label, box, boxRaw });
}
Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));
return results;
}

View File

@ -6,7 +6,7 @@
import { log, join, now } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
import { labels } from './labels';
import type { ObjectResult, Box } from '../result';
import type { GraphModel, Tensor } from '../tfjs/types';

View File

@ -9,7 +9,7 @@
import { log, join } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js';
import * as image from '../image/image';
import * as constants from '../tfjs/constants';
import { constants } from '../tfjs/constants';
import type { GraphModel, Tensor } from '../tfjs/types';
import type { Config } from '../config';
import { env } from '../util/env';

View File

@ -5,6 +5,7 @@ import { log, now } from '../util/util';
import { env } from '../util/env';
import * as humangl from './humangl';
import * as tf from '../../dist/tfjs.esm.js';
import * as constants from './constants';
function registerCustomOps() {
if (!env.kernels.includes('mod')) {
@ -87,6 +88,7 @@ export async function check(instance: Human, force = false) {
try {
await tf.setBackend(instance.config.backend);
await tf.ready();
constants.init();
} catch (err) {
log('error: cannot set backend:', instance.config.backend, err);
return false;

View File

@ -1,9 +1,20 @@
import * as tf from '../../dist/tfjs.esm.js';
import type { Tensor } from './types';
export const tf255: Tensor = tf.scalar(255, 'float32');
export const tf1: Tensor = tf.scalar(1, 'float32');
export const tf2: Tensor = tf.scalar(2, 'float32');
export const tf05: Tensor = tf.scalar(0.5, 'float32');
export const tf127: Tensor = tf.scalar(127.5, 'float32');
export const rgb: Tensor = tf.tensor1d([0.2989, 0.5870, 0.1140], 'float32'); // factors for red/green/blue colors when converting to grayscale
export const constants: Record<string, Tensor | number | number[]> = {
tf255: 255,
tf1: 1,
tf2: 2,
tf05: 0.5,
tf127: 127.5,
rgb: [0.2989, 0.5870, 0.1140],
};
export function init() {
constants.tf255 = tf.scalar(255, 'float32');
constants.tf1 = tf.scalar(1, 'float32');
constants.tf2 = tf.scalar(2, 'float32');
constants.tf05 = tf.scalar(0.5, 'float32');
constants.tf127 = tf.scalar(127.5, 'float32');
constants.rgb = tf.tensor1d([0.2989, 0.5870, 0.1140], 'float32'); // factors for red/green/blue colors when converting to grayscale
}

View File

@ -1,794 +1,26 @@
2021-11-16 12:51:36 INFO:  @vladmandic/human version 2.5.2
2021-11-16 12:51:36 INFO:  User: vlado Platform: linux Arch: x64 Node: v17.0.1
2021-11-16 12:51:36 INFO:  Application: {"name":"@vladmandic/human","version":"2.5.2"}
2021-11-16 12:51:36 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
2021-11-16 12:51:36 INFO:  Toolchain: {"build":"0.6.4","esbuild":"0.13.13","typescript":"4.4.4","typedoc":"0.22.9","eslint":"8.2.0"}
2021-11-16 12:51:36 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
2021-11-16 12:51:36 STATE: Clean: {"locations":["dist/*","types/*","typedoc/*"]}
2021-11-16 12:51:36 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":1275}
2021-11-16 12:51:36 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":61,"inputBytes":545763,"outputBytes":462549}
2021-11-16 12:51:36 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":1283}
2021-11-16 12:51:36 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":61,"inputBytes":545771,"outputBytes":462553}
2021-11-16 12:51:36 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":1350}
2021-11-16 12:51:36 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":61,"inputBytes":545838,"outputBytes":462625}
2021-11-16 12:51:36 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 12:51:36 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 12:51:37 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":61,"inputBytes":545400,"outputBytes":464789}
2021-11-16 12:51:37 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 12:51:37 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":61,"inputBytes":3042268,"outputBytes":1623936}
2021-11-16 12:51:38 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":61,"inputBytes":3042268,"outputBytes":2967931}
2021-11-16 12:52:01 STATE: Typings: {"input":"src/human.ts","output":"types","files":53}
2021-11-16 12:52:08 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":51,"generated":true}
2021-11-16 12:52:08 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 12:52:08 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 12:52:49 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":92,"errors":0,"warnings":0}
2021-11-16 12:52:50 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
2021-11-16 12:52:50 INFO:  Done...
2021-11-16 17:38:28 INFO:  @vladmandic/human version 2.5.2
2021-11-16 17:38:28 INFO:  User: vlado Platform: linux Arch: x64 Node: v17.0.1
2021-11-16 17:38:28 INFO:  Application: {"name":"@vladmandic/human","version":"2.5.2"}
2021-11-16 17:38:28 INFO:  Environment: {"profile":"development","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
2021-11-16 17:38:28 INFO:  Toolchain: {"build":"0.6.4","esbuild":"0.13.13","typescript":"4.4.4","typedoc":"0.22.9","eslint":"8.2.0"}
2021-11-16 17:38:28 INFO:  Build: {"profile":"development","steps":["serve","watch","compile"]}
2021-11-16 17:38:28 STATE: WebServer: {"ssl":false,"port":10030,"root":"."}
2021-11-16 17:38:28 STATE: WebServer: {"ssl":true,"port":10031,"root":".","sslKey":"node_modules/@vladmandic/build/cert/https.key","sslCrt":"node_modules/@vladmandic/build/cert/https.crt"}
2021-11-16 17:38:28 STATE: Watch: {"locations":["src/**","README.md","src/**/*","tfjs/**/*","demo/**/*.ts"]}
2021-11-16 17: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":1275}
2021-11-16 17:38:28 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":545971,"outputBytes":462761}
2021-11-16 17: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":1283}
2021-11-16 17:38:28 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":545979,"outputBytes":462765}
2021-11-16 17: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":1350}
2021-11-16 17:38:28 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546046,"outputBytes":462837}
2021-11-16 17: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":1063,"outputBytes":1652}
2021-11-16 17: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":2326,"outputBytes":912}
2021-11-16 17:38:28 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545608,"outputBytes":464956}
2021-11-16 17:38:29 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:38:29 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042476,"outputBytes":1623976}
2021-11-16 17:38:30 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042476,"outputBytes":2968092}
2021-11-16 17:38:30 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:38:30 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:38:30 INFO:  Listening...
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2968092,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815308,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:38:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:42:39 INFO:  Watch: {"event":"modify","input":"src/body/movenet.ts"}
2021-11-16 17:42:39 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":1275}
2021-11-16 17:42:39 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":545806,"outputBytes":462597}
2021-11-16 17:42:39 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":1283}
2021-11-16 17:42:39 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":545814,"outputBytes":462601}
2021-11-16 17:42:39 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":1350}
2021-11-16 17:42:39 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":545881,"outputBytes":462673}
2021-11-16 17:42:39 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:42:39 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:42:39 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545443,"outputBytes":464792}
2021-11-16 17:42:40 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:42:40 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042311,"outputBytes":1623916}
2021-11-16 17:42:41 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042311,"outputBytes":2967926}
2021-11-16 17:42:41 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:42:41 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:42:53 INFO:  Watch: {"event":"modify","input":"src/body/movenet.ts"}
2021-11-16 17:42:53 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":1275}
2021-11-16 17:42:53 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":545820,"outputBytes":462611}
2021-11-16 17:42:53 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":1283}
2021-11-16 17:42:53 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":545828,"outputBytes":462615}
2021-11-16 17:42:53 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":1350}
2021-11-16 17:42:54 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":545895,"outputBytes":462687}
2021-11-16 17:42:54 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:42:54 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:42:54 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545457,"outputBytes":464806}
2021-11-16 17:42:54 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:42:54 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042325,"outputBytes":1623920}
2021-11-16 17:42:55 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042325,"outputBytes":2967942}
2021-11-16 17:42:55 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:42:55 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:43:14 INFO:  Watch: {"event":"modify","input":"src/body/movenet.ts"}
2021-11-16 17:43:14 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":1275}
2021-11-16 17:43:14 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":545685,"outputBytes":462477}
2021-11-16 17:43:14 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":1283}
2021-11-16 17:43:14 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":545693,"outputBytes":462481}
2021-11-16 17:43:14 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":1350}
2021-11-16 17:43:14 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":545760,"outputBytes":462553}
2021-11-16 17:43:14 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:43:14 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:43:14 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545322,"outputBytes":464672}
2021-11-16 17:43:15 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:43:15 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042190,"outputBytes":1623884}
2021-11-16 17:43:16 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042190,"outputBytes":2967808}
2021-11-16 17:43:16 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:43:16 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:45:03 INFO:  Watch: {"event":"modify","input":"src/face/faceres.ts"}
2021-11-16 17:45:03 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":1275}
2021-11-16 17:45:03 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":545745,"outputBytes":462477}
2021-11-16 17:45:03 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":1283}
2021-11-16 17:45:03 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":545753,"outputBytes":462481}
2021-11-16 17:45:03 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":1350}
2021-11-16 17:45:03 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":545820,"outputBytes":462553}
2021-11-16 17:45:03 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:45:03 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:45:03 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545382,"outputBytes":464674}
2021-11-16 17:45:04 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:45:04 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042250,"outputBytes":1623883}
2021-11-16 17:45:04 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042250,"outputBytes":2967810}
2021-11-16 17:45:04 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:45:04 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:47:41 INFO:  Watch: {"event":"modify","input":"src/tfjs/constants.ts"}
2021-11-16 17:47:41 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":1275}
2021-11-16 17:47:41 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":545850,"outputBytes":462553}
2021-11-16 17:47:41 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":1283}
2021-11-16 17:47:41 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":545858,"outputBytes":462557}
2021-11-16 17:47:41 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":1350}
2021-11-16 17:47:41 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":545925,"outputBytes":462629}
2021-11-16 17:47:41 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:47:41 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:47:41 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545487,"outputBytes":464774}
2021-11-16 17:47:41 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:47:42 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042355,"outputBytes":1623922}
2021-11-16 17:47:42 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042355,"outputBytes":2967876}
2021-11-16 17:47:42 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:47:42 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:48:24 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:48: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":1275}
2021-11-16 17:48:25 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":545921,"outputBytes":462557}
2021-11-16 17:48:25 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":1283}
2021-11-16 17:48:25 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":545929,"outputBytes":462561}
2021-11-16 17:48:25 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":1350}
2021-11-16 17:48:25 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":545996,"outputBytes":462633}
2021-11-16 17:48:25 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:48:25 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:48:25 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545558,"outputBytes":464778}
2021-11-16 17:48: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":307,"outputBytes":2497780}
2021-11-16 17:48:26 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042426,"outputBytes":1623925}
2021-11-16 17:48:26 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042426,"outputBytes":2967880}
2021-11-16 17:48:26 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:48:26 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967880,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815106,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:30 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:31 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:31 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:31 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:31 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:31 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:31 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:31 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:31 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:48:31 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:35 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:50:35 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":1275}
2021-11-16 17:50:35 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":545994,"outputBytes":462633}
2021-11-16 17:50:35 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":1283}
2021-11-16 17:50:35 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546002,"outputBytes":462637}
2021-11-16 17:50:35 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":1350}
2021-11-16 17:50:35 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546069,"outputBytes":462709}
2021-11-16 17:50:35 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:50:35 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:50:35 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545631,"outputBytes":464866}
2021-11-16 17:50:35 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:50:36 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042499,"outputBytes":1623975}
2021-11-16 17:50:36 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042499,"outputBytes":2967951}
2021-11-16 17:50:36 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:50:36 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:50:43 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:50:43 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":1275}
2021-11-16 17:50:43 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546005,"outputBytes":462644}
2021-11-16 17:50:43 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":1283}
2021-11-16 17:50:43 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546013,"outputBytes":462648}
2021-11-16 17:50:43 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":1350}
2021-11-16 17:50:43 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546080,"outputBytes":462720}
2021-11-16 17:50:43 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:50:43 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:50:43 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545642,"outputBytes":464877}
2021-11-16 17:50:44 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:50:44 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042510,"outputBytes":1623985}
2021-11-16 17:50:45 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042510,"outputBytes":2967962}
2021-11-16 17:50:45 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:50:45 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:50:52 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:52 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:52 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:52 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967962,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815269,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:50:53 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:51:30 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:51:30 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":1275}
2021-11-16 17:51:30 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546033,"outputBytes":462674}
2021-11-16 17:51:30 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":1283}
2021-11-16 17:51:30 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546041,"outputBytes":462678}
2021-11-16 17:51:30 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":1350}
2021-11-16 17:51:30 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546108,"outputBytes":462750}
2021-11-16 17:51:30 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:51:30 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:51:30 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545670,"outputBytes":464919}
2021-11-16 17:51:31 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:51:31 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042538,"outputBytes":1623999}
2021-11-16 17:51:32 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042538,"outputBytes":2967988}
2021-11-16 17:51:32 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:51:32 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:51:48 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:51: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":1275}
2021-11-16 17:51:48 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546033,"outputBytes":462674}
2021-11-16 17:51: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":1283}
2021-11-16 17:51:48 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546041,"outputBytes":462678}
2021-11-16 17:51: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":1350}
2021-11-16 17:51:48 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546108,"outputBytes":462750}
2021-11-16 17:51:48 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:51: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":2326,"outputBytes":912}
2021-11-16 17:51:48 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545670,"outputBytes":464919}
2021-11-16 17:51: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":307,"outputBytes":2497780}
2021-11-16 17:51:49 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042538,"outputBytes":1623999}
2021-11-16 17:51:49 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042538,"outputBytes":2967988}
2021-11-16 17:51:49 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:51:49 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:51:54 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:51:54 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":1275}
2021-11-16 17:51:54 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546044,"outputBytes":462685}
2021-11-16 17:51:54 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":1283}
2021-11-16 17:51:54 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546052,"outputBytes":462689}
2021-11-16 17:51:54 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":1350}
2021-11-16 17:51:54 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546119,"outputBytes":462761}
2021-11-16 17:51:54 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:51:54 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:51:54 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545681,"outputBytes":464930}
2021-11-16 17:51:55 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:51:55 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042549,"outputBytes":1624009}
2021-11-16 17:51:56 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042549,"outputBytes":2967999}
2021-11-16 17:51:56 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:51:56 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:52:05 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:05 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:05 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:05 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967999,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815360,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:06 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:47 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:52:47 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":1275}
2021-11-16 17:52:47 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546050,"outputBytes":462691}
2021-11-16 17:52:47 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":1283}
2021-11-16 17:52:47 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546058,"outputBytes":462695}
2021-11-16 17:52:47 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":1350}
2021-11-16 17:52:47 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546125,"outputBytes":462767}
2021-11-16 17:52:47 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:52:47 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:52:47 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545687,"outputBytes":464936}
2021-11-16 17:52: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":307,"outputBytes":2497780}
2021-11-16 17:52:48 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042555,"outputBytes":1624012}
2021-11-16 17:52:48 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042555,"outputBytes":2968005}
2021-11-16 17:52:48 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:52:48 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:52:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2968005,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815371,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:52:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:11 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:53:11 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":1275}
2021-11-16 17:53:11 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546061,"outputBytes":462630}
2021-11-16 17:53:11 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":1283}
2021-11-16 17:53:11 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546069,"outputBytes":462634}
2021-11-16 17:53:11 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":1350}
2021-11-16 17:53:11 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546136,"outputBytes":462706}
2021-11-16 17:53:11 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:53: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":2326,"outputBytes":912}
2021-11-16 17:53:11 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545698,"outputBytes":464863}
2021-11-16 17:53: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":307,"outputBytes":2497780}
2021-11-16 17:53:12 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042566,"outputBytes":1623969}
2021-11-16 17:53:12 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042566,"outputBytes":2967949}
2021-11-16 17:53:12 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:53:12 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:53:16 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:16 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:16 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:16 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967949,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815326,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:17 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:28 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:53: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":1275}
2021-11-16 17:53:28 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546050,"outputBytes":462619}
2021-11-16 17:53: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":1283}
2021-11-16 17:53:28 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546058,"outputBytes":462623}
2021-11-16 17:53: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":1350}
2021-11-16 17:53:28 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546125,"outputBytes":462695}
2021-11-16 17:53:28 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:53: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":2326,"outputBytes":912}
2021-11-16 17:53:28 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545687,"outputBytes":464852}
2021-11-16 17:53: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":307,"outputBytes":2497780}
2021-11-16 17:53:29 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042555,"outputBytes":1623959}
2021-11-16 17:53:30 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042555,"outputBytes":2967938}
2021-11-16 17:53:30 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:53:30 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:53:31 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:53:31 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":1275}
2021-11-16 17:53:31 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546001,"outputBytes":462570}
2021-11-16 17:53:31 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":1283}
2021-11-16 17:53:31 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546009,"outputBytes":462574}
2021-11-16 17:53:31 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":1350}
2021-11-16 17:53:31 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546076,"outputBytes":462646}
2021-11-16 17:53:31 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:53:31 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:53:31 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545638,"outputBytes":464803}
2021-11-16 17:53:31 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:53:32 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042506,"outputBytes":1623918}
2021-11-16 17:53:32 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042506,"outputBytes":2967889}
2021-11-16 17:53:32 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:53:32 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967889,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815209,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:53:45 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:43 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:57:43 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":1275}
2021-11-16 17:57:43 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546069,"outputBytes":462710}
2021-11-16 17:57:43 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":1283}
2021-11-16 17:57:43 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546077,"outputBytes":462714}
2021-11-16 17:57:43 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":1350}
2021-11-16 17:57:43 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546144,"outputBytes":462786}
2021-11-16 17:57:43 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:57:43 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:57:43 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545706,"outputBytes":464955}
2021-11-16 17:57:44 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:57:44 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042574,"outputBytes":1624032}
2021-11-16 17:57:45 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042574,"outputBytes":2968024}
2021-11-16 17:57:45 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:57:45 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2968024,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815375,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:49 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:57:50 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 17:59:14 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:59:14 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":1275}
2021-11-16 17:59:14 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546027,"outputBytes":462385}
2021-11-16 17:59:14 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":1283}
2021-11-16 17:59:14 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546035,"outputBytes":462389}
2021-11-16 17:59:14 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":1350}
2021-11-16 17:59:14 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546102,"outputBytes":462461}
2021-11-16 17:59:14 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:59:14 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:59:14 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545664,"outputBytes":464570}
2021-11-16 17:59:15 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:59:15 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042532,"outputBytes":1623811}
2021-11-16 17:59:16 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042532,"outputBytes":2967724}
2021-11-16 17:59:16 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:59:16 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:59:29 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 17:59:29 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":1275}
2021-11-16 17:59:29 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":545905,"outputBytes":462353}
2021-11-16 17:59:29 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":1283}
2021-11-16 17:59:29 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":545913,"outputBytes":462357}
2021-11-16 17:59:29 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":1350}
2021-11-16 17:59:29 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":545980,"outputBytes":462429}
2021-11-16 17:59:29 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:59:29 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:59:29 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545542,"outputBytes":464538}
2021-11-16 17:59:30 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:59:30 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042410,"outputBytes":1623789}
2021-11-16 17:59:31 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042410,"outputBytes":2967692}
2021-11-16 17:59:31 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:59:31 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 17:59:56 INFO:  Watch: {"event":"modify","input":"src/tfjs/constants.ts"}
2021-11-16 17:59:56 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":1275}
2021-11-16 17:59:56 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546046,"outputBytes":462412}
2021-11-16 17:59:56 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":1283}
2021-11-16 17:59:56 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546054,"outputBytes":462416}
2021-11-16 17:59:56 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":1350}
2021-11-16 17:59:56 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546121,"outputBytes":462488}
2021-11-16 17:59:56 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 17:59:56 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 17:59:56 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545683,"outputBytes":464609}
2021-11-16 17:59:56 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 17:59:57 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042551,"outputBytes":1623825}
2021-11-16 17:59:57 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042551,"outputBytes":2967746}
2021-11-16 17:59:57 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 17:59:57 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 18:00:16 INFO:  Watch: {"event":"modify","input":"src/gear/emotion.ts"}
2021-11-16 18:00: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":1275}
2021-11-16 18:00:16 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546056,"outputBytes":462409}
2021-11-16 18:00: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":1283}
2021-11-16 18:00:16 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546064,"outputBytes":462413}
2021-11-16 18:00: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":1350}
2021-11-16 18:00:16 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546131,"outputBytes":462485}
2021-11-16 18:00:16 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 18:00: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":2326,"outputBytes":912}
2021-11-16 18:00:16 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545693,"outputBytes":464606}
2021-11-16 18:00: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":307,"outputBytes":2497780}
2021-11-16 18:00:17 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042561,"outputBytes":1623825}
2021-11-16 18:00:17 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042561,"outputBytes":2967743}
2021-11-16 18:00:17 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 18:00:17 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 18:00:18 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:18 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:18 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:18 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967743,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:18 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:18 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815089,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:19 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:21 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:21 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:21 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:21 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967743,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:21 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:21 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815089,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:00:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:19 INFO:  Watch: {"event":"modify","input":"src/tfjs/constants.ts"}
2021-11-16 18:01:19 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":1275}
2021-11-16 18:01:19 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546058,"outputBytes":462411}
2021-11-16 18:01:19 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":1283}
2021-11-16 18:01:19 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546066,"outputBytes":462415}
2021-11-16 18:01:19 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":1350}
2021-11-16 18:01:19 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546133,"outputBytes":462487}
2021-11-16 18:01:19 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 18:01:19 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 18:01:19 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545695,"outputBytes":464608}
2021-11-16 18:01:19 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 18:01:20 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042563,"outputBytes":1623825}
2021-11-16 18:01:21 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042563,"outputBytes":2967745}
2021-11-16 18:01:21 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 18:01:21 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967745,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815091,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:01:22 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:12:14 INFO:  Watch: {"event":"modify","input":"src/tfjs/constants.ts"}
2021-11-16 18:12:14 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":1275}
2021-11-16 18:12:14 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546116,"outputBytes":462454}
2021-11-16 18:12:14 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":1283}
2021-11-16 18:12:14 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546124,"outputBytes":462458}
2021-11-16 18:12:14 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":1350}
2021-11-16 18:12:14 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546191,"outputBytes":462530}
2021-11-16 18:12:14 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 18:12:14 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 18:12:14 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545753,"outputBytes":464663}
2021-11-16 18:12:15 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 18:12:15 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042621,"outputBytes":1623849}
2021-11-16 18:12:15 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042621,"outputBytes":2967783}
2021-11-16 18:12:15 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 18:12:15 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 18:16:56 INFO:  Watch: {"event":"modify","input":"src/face/blazeface.ts"}
2021-11-16 18:16:56 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":1275}
2021-11-16 18:16:56 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546393,"outputBytes":462611}
2021-11-16 18:16:56 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":1283}
2021-11-16 18:16:56 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546401,"outputBytes":462615}
2021-11-16 18:16:56 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":1350}
2021-11-16 18:16:56 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546468,"outputBytes":462687}
2021-11-16 18:16:56 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 18:16:56 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 18:16:56 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":546030,"outputBytes":464840}
2021-11-16 18:16:56 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 18:16:57 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042898,"outputBytes":1623903}
2021-11-16 18:16:57 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042898,"outputBytes":2967926}
2021-11-16 18:16:57 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 18:16:57 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 18:16:57 INFO:  Watch: {"event":"modify","input":"src/face/facemesh.ts","skip":true}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967926,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815553,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:27 INFO:  Watch: {"event":"modify","input":"src/face/blazeface.ts"}
2021-11-16 18:17:27 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":1275}
2021-11-16 18:17:27 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546331,"outputBytes":462558}
2021-11-16 18:17:27 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":1283}
2021-11-16 18:17:27 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546339,"outputBytes":462562}
2021-11-16 18:17:27 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":1350}
2021-11-16 18:17:27 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546406,"outputBytes":462634}
2021-11-16 18:17:27 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 18:17:27 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 18:17:27 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545968,"outputBytes":464787}
2021-11-16 18:17: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":307,"outputBytes":2497780}
2021-11-16 18:17:28 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042836,"outputBytes":1623881}
2021-11-16 18:17:29 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042836,"outputBytes":2967873}
2021-11-16 18:17:29 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 18:17:29 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967873,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815456,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:33 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:58 INFO:  Watch: {"event":"modify","input":"src/face/blazeface.ts"}
2021-11-16 18:17: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":1275}
2021-11-16 18:17:58 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546253,"outputBytes":462488}
2021-11-16 18:17: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":1283}
2021-11-16 18:17:58 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546261,"outputBytes":462492}
2021-11-16 18:17: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":1350}
2021-11-16 18:17:58 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546328,"outputBytes":462564}
2021-11-16 18:17:58 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 18:17: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":2326,"outputBytes":912}
2021-11-16 18:17:58 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545890,"outputBytes":464705}
2021-11-16 18:17: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":307,"outputBytes":2497780}
2021-11-16 18:17:59 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042758,"outputBytes":1623858}
2021-11-16 18:17:59 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042758,"outputBytes":2967808}
2021-11-16 18:17:59 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 18:17:59 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 18:17:59 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:59 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:59 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 18:17:59 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967808,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815339,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:18:00 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:19:02 INFO:  Watch: {"event":"modify","input":"src/body/movenet.ts"}
2021-11-16 18:19:02 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":1275}
2021-11-16 18:19:02 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546212,"outputBytes":462441}
2021-11-16 18:19:02 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":1283}
2021-11-16 18:19:02 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546220,"outputBytes":462445}
2021-11-16 18:19:02 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":1350}
2021-11-16 18:19:03 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546287,"outputBytes":462517}
2021-11-16 18:19:03 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 18:19:03 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 18:19:03 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545849,"outputBytes":464658}
2021-11-16 18:19:03 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 18:19:04 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042717,"outputBytes":1623840}
2021-11-16 18:19:04 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042717,"outputBytes":2967761}
2021-11-16 18:19:04 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 18:19:04 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 18:23:09 INFO:  Watch: {"event":"modify","input":"src/tfjs/constants.ts"}
2021-11-16 18:23:09 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":1275}
2021-11-16 18:23:09 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546264,"outputBytes":462477}
2021-11-16 18:23:09 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":1283}
2021-11-16 18:23:09 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546272,"outputBytes":462481}
2021-11-16 18:23:09 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":1350}
2021-11-16 18:23:09 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546339,"outputBytes":462553}
2021-11-16 18:23:09 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 18:23:09 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 18:23:09 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":545901,"outputBytes":464707}
2021-11-16 18:23:10 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 18:23:10 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3042769,"outputBytes":1623860}
2021-11-16 18:23:11 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3042769,"outputBytes":2967793}
2021-11-16 18:23:11 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 18:23:11 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/gear/ssrnet-gender.ts"}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/gear/ssrnet-age.ts","skip":true}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/face/faceres.ts","skip":true}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/body/efficientpose.ts","skip":true}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/face/blazeface.ts","skip":true}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/hand/handposedetector.ts","skip":true}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/face/facemesh.ts","skip":true}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/face/facemeshutil.ts","skip":true}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/hand/handposepipeline.ts","skip":true}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/object/nanodet.ts","skip":true}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/segmentation/segmentation.ts","skip":true}
2021-11-16 18:27:39 INFO:  Watch: {"event":"modify","input":"src/body/blazepose.ts","skip":true}
2021-11-16 18:27:39 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":1275}
2021-11-16 18:27:39 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546837,"outputBytes":462529}
2021-11-16 18:27:39 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":1283}
2021-11-16 18:27:39 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546845,"outputBytes":462533}
2021-11-16 18:27:39 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":1350}
2021-11-16 18:27:39 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":546912,"outputBytes":462605}
2021-11-16 18:27:39 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 18:27:39 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 18:27:39 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":546474,"outputBytes":464732}
2021-11-16 18:27:40 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 18:27:40 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3043342,"outputBytes":1623856}
2021-11-16 18:27:40 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3043342,"outputBytes":2967838}
2021-11-16 18:27:40 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 18:27:40 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3821,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2967838,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8281,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4815947,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":161813,"url":"/models/movenet-lightning.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":79038,"url":"/models/blazeface.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":71432,"url":"/models/faceres.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":17980,"url":"/models/emotion.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":122025,"url":"/models/iris.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":89289,"url":"/models/facemesh.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":602812,"url":"/models/handtrack.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/json","size":82231,"url":"/models/handlandmark-full.json","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4650216,"url":"/models/movenet-lightning.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":538928,"url":"/models/blazeface.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":820516,"url":"/models/emotion.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2599092,"url":"/models/iris.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2955780,"url":"/models/facemesh.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":5431368,"url":"/models/handlandmark-full.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":6978814,"url":"/models/faceres.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 18:30:01 DATA:  HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":2964837,"url":"/models/handtrack.bin","remote":"::ffff:192.168.0.200"}
2021-11-16 20:04:40 INFO:  @vladmandic/human version 2.5.2
2021-11-16 20:04:40 INFO:  User: vlado Platform: linux Arch: x64 Node: v17.0.1
2021-11-16 20:04:40 INFO:  Application: {"name":"@vladmandic/human","version":"2.5.2"}
2021-11-16 20:04:40 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
2021-11-16 20:04:40 INFO:  Toolchain: {"build":"0.6.4","esbuild":"0.13.13","typescript":"4.4.4","typedoc":"0.22.9","eslint":"8.2.0"}
2021-11-16 20:04:40 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
2021-11-16 20:04:40 STATE: Clean: {"locations":["dist/*","types/*","typedoc/*"]}
2021-11-16 20:04:40 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":1275}
2021-11-16 20:04:40 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":62,"inputBytes":546974,"outputBytes":462801}
2021-11-16 20:04:40 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":1283}
2021-11-16 20:04:40 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":62,"inputBytes":546982,"outputBytes":462805}
2021-11-16 20:04:40 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":1350}
2021-11-16 20:04:40 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":62,"inputBytes":547049,"outputBytes":462877}
2021-11-16 20:04:40 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-16 20:04:40 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-16 20:04:41 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":62,"inputBytes":546611,"outputBytes":464932}
2021-11-16 20:04:41 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":307,"outputBytes":2497780}
2021-11-16 20:04:41 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":62,"inputBytes":3043479,"outputBytes":1624122}
2021-11-16 20:04:42 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":62,"inputBytes":3043479,"outputBytes":2968140}
2021-11-16 20:05:02 STATE: Typings: {"input":"src/human.ts","output":"types","files":54}
2021-11-16 20:05:10 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":51,"generated":true}
2021-11-16 20:05:10 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5811,"outputBytes":3821}
2021-11-16 20:05:10 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15166,"outputBytes":11786}
2021-11-16 20:05:50 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":93,"errors":0,"warnings":0}
2021-11-16 20:05:50 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
2021-11-16 20:05:50 INFO:  Done...

File diff suppressed because it is too large Load Diff

3
types/src/tfjs/constants.d.ts vendored Normal file
View File

@ -0,0 +1,3 @@
import type { Tensor } from './types';
export declare const constants: Record<string, Tensor | number | number[]>;
export declare function init(): void;