mirror of https://github.com/vladmandic/human
implement optional face masking
parent
d6f9cc1d39
commit
bf0df7e9f8
|
@ -40,6 +40,7 @@
|
|||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"@typescript-eslint/no-shadow": "error",
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"@typescript-eslint/prefer-as-const": "off",
|
||||
"@typescript-eslint/triple-slash-reference": "off",
|
||||
"@typescript-eslint/no-inferrable-types": "off",
|
||||
"@typescript-eslint/no-empty-interface": ["error", { "allowSingleExtends": true }],
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
### **HEAD -> main** 2021/11/11 mandic00@live.com
|
||||
|
||||
- add similarity score range normalization
|
||||
- add faceid demo
|
||||
- documentation overhaul
|
||||
- auto tensor shape and channels handling
|
||||
- disable use of path2d in node
|
||||
|
|
|
@ -18,14 +18,15 @@
|
|||
html { font-family: 'Lato', 'Segoe UI'; font-size: 16px; font-variant: small-caps; }
|
||||
body { margin: 0; padding: 16px; background: black; color: white; overflow-x: hidden; width: 100vw; height: 100vh; }
|
||||
body::-webkit-scrollbar { display: none; }
|
||||
.button { padding: 2px; cursor: pointer; box-shadow: 2px 2px black; width: 64px; text-align: center; margin-left: 16px; height: 16px; display: none }
|
||||
.button { padding: 2px; cursor: pointer; box-shadow: 2px 2px black; width: 64px; text-align: center; place-content: center; margin-left: 16px; height: 16px; display: none }
|
||||
.ok { position: absolute; top: 64px; right: 20px; width: 100px; background-color: grey; padding: 4px; color: black; font-size: 14px }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="canvas" style="padding: 8px"></canvas>
|
||||
<canvas id="source" style="padding: 8px"></canvas>
|
||||
<video id="video" playsinline style="display: none"></video>
|
||||
<pre id="fps" style="position: absolute; top: 12px; right: 20px; background-color: grey; padding: 8px; box-shadow: 2px 2px black"></pre>
|
||||
<pre id="fps" style="position: absolute; bottom: 16px; right: 20px; background-color: grey; padding: 8px; box-shadow: 2px 2px black"></pre>
|
||||
<pre id="log" style="padding: 8px"></pre>
|
||||
<div id="match" style="display: none; padding: 8px">
|
||||
<label for="name">name:</label>
|
||||
|
@ -33,7 +34,7 @@
|
|||
<span id="save" class="button" style="background-color: royalblue">save</span>
|
||||
<span id="delete" class="button" style="background-color: lightcoral">delete</span>
|
||||
</div>
|
||||
<div id="retry" class="button" style="background-color: darkslategray; width: 350px">retry</div>
|
||||
<div id="status" style="position: absolute; bottom: 0; width: 100%; padding: 8px; font-size: 0.8rem;"></div>
|
||||
<div id="retry" class="button" style="background-color: darkslategray; width: 350px; margin-top: 32px; padding: 4px">retry</div>
|
||||
<div id="ok"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -47,6 +47,15 @@ async function load() {
|
|||
};
|
||||
});
|
||||
}
|
||||
async function count() {
|
||||
if (!db)
|
||||
await open();
|
||||
return new Promise((resolve) => {
|
||||
const store = db.transaction([table], "readwrite").objectStore(table).count();
|
||||
store.onerror = (evt) => log("count error:", evt);
|
||||
store.onsuccess = () => resolve(store.result);
|
||||
});
|
||||
}
|
||||
async function save(faceRecord) {
|
||||
if (!db)
|
||||
await open();
|
||||
|
@ -62,15 +71,12 @@ async function remove(faceRecord) {
|
|||
}
|
||||
|
||||
// demo/faceid/index.ts
|
||||
var db2 = [];
|
||||
var face;
|
||||
var current;
|
||||
var humanConfig = {
|
||||
modelBasePath: "../../models",
|
||||
filter: { equalization: true },
|
||||
face: {
|
||||
enabled: true,
|
||||
detector: { rotation: true, return: true },
|
||||
detector: { rotation: true, return: true, cropFactor: 1.6, mask: false },
|
||||
description: { enabled: true },
|
||||
iris: { enabled: true },
|
||||
emotion: { enabled: false },
|
||||
|
@ -88,19 +94,24 @@ var options = {
|
|||
maxTime: 1e4,
|
||||
blinkMin: 10,
|
||||
blinkMax: 800,
|
||||
threshold: 0.5
|
||||
threshold: 0.5,
|
||||
mask: humanConfig.face.detector.mask,
|
||||
rotation: humanConfig.face.detector.rotation,
|
||||
cropFactor: humanConfig.face.detector.cropFactor
|
||||
};
|
||||
var ok = {
|
||||
faceCount: false,
|
||||
faceConfidence: false,
|
||||
facingCenter: false,
|
||||
lookingCenter: false,
|
||||
blinkDetected: false,
|
||||
faceSize: false,
|
||||
antispoofCheck: false,
|
||||
livenessCheck: false,
|
||||
elapsedMs: 0
|
||||
};
|
||||
var allOk = () => ok.faceCount && ok.faceSize && ok.blinkDetected && ok.facingCenter && ok.faceConfidence && ok.antispoofCheck && ok.livenessCheck;
|
||||
var allOk = () => ok.faceCount && ok.faceSize && ok.blinkDetected && ok.facingCenter && ok.lookingCenter && ok.faceConfidence && ok.antispoofCheck && ok.livenessCheck;
|
||||
var current = { face: null, record: null };
|
||||
var blink = {
|
||||
start: 0,
|
||||
end: 0,
|
||||
|
@ -115,13 +126,13 @@ var dom = {
|
|||
canvas: document.getElementById("canvas"),
|
||||
log: document.getElementById("log"),
|
||||
fps: document.getElementById("fps"),
|
||||
status: document.getElementById("status"),
|
||||
match: document.getElementById("match"),
|
||||
name: document.getElementById("name"),
|
||||
save: document.getElementById("save"),
|
||||
delete: document.getElementById("delete"),
|
||||
retry: document.getElementById("retry"),
|
||||
source: document.getElementById("source")
|
||||
source: document.getElementById("source"),
|
||||
ok: document.getElementById("ok")
|
||||
};
|
||||
var timestamp = { detect: 0, draw: 0 };
|
||||
var fps = { detect: 0, draw: 0 };
|
||||
|
@ -131,7 +142,6 @@ var log2 = (...msg) => {
|
|||
console.log(...msg);
|
||||
};
|
||||
var printFPS = (msg) => dom.fps.innerText = msg;
|
||||
var printStatus = (msg) => dom.status.innerText = "status: " + JSON.stringify(msg).replace(/"|{|}/g, "").replace(/,/g, " | ");
|
||||
async function webCam() {
|
||||
printFPS("starting webcam...");
|
||||
const cameraOptions = { audio: false, video: { facingMode: "user", resizeMode: "none", width: { ideal: document.body.clientWidth } } };
|
||||
|
@ -155,8 +165,8 @@ async function webCam() {
|
|||
}
|
||||
async function detectionLoop() {
|
||||
if (!dom.video.paused) {
|
||||
if (face && face.tensor)
|
||||
human.tf.dispose(face.tensor);
|
||||
if (current.face && current.face.tensor)
|
||||
human.tf.dispose(current.face.tensor);
|
||||
await human.detect(dom.video);
|
||||
const now = human.now();
|
||||
fps.detect = 1e3 / (now - timestamp.detect);
|
||||
|
@ -179,16 +189,32 @@ async function validationLoop() {
|
|||
blink.start = human.now();
|
||||
if (blink.start > 0 && !gestures.includes("blink left eye") && !gestures.includes("blink right eye"))
|
||||
blink.end = human.now();
|
||||
ok.blinkDetected = ok.blinkDetected || blink.end - blink.start > options.blinkMin && blink.end - blink.start < options.blinkMax;
|
||||
ok.blinkDetected = ok.blinkDetected || Math.abs(blink.end - blink.start) > options.blinkMin && Math.abs(blink.end - blink.start) < options.blinkMax;
|
||||
if (ok.blinkDetected && blink.time === 0)
|
||||
blink.time = Math.trunc(blink.end - blink.start);
|
||||
ok.facingCenter = gestures.includes("facing center") && gestures.includes("looking center");
|
||||
ok.facingCenter = gestures.includes("facing center");
|
||||
ok.lookingCenter = gestures.includes("looking center");
|
||||
ok.faceConfidence = (human.result.face[0].boxScore || 0) > options.minConfidence && (human.result.face[0].faceScore || 0) > options.minConfidence && (human.result.face[0].genderScore || 0) > options.minConfidence;
|
||||
ok.antispoofCheck = (human.result.face[0].real || 0) > options.minConfidence;
|
||||
ok.livenessCheck = (human.result.face[0].live || 0) > options.minConfidence;
|
||||
ok.faceSize = human.result.face[0].box[2] >= options.minSize && human.result.face[0].box[3] >= options.minSize;
|
||||
}
|
||||
printStatus(ok);
|
||||
let y = 32;
|
||||
for (const [key, val] of Object.entries(ok)) {
|
||||
let el = document.getElementById(`ok-${key}`);
|
||||
if (!el) {
|
||||
el = document.createElement("div");
|
||||
el.innerText = key;
|
||||
el.className = "ok";
|
||||
el.style.top = `${y}px`;
|
||||
dom.ok.appendChild(el);
|
||||
}
|
||||
if (typeof val === "boolean")
|
||||
el.style.backgroundColor = val ? "lightgreen" : "lightcoral";
|
||||
else
|
||||
el.innerText = `${key}:${val}`;
|
||||
y += 28;
|
||||
}
|
||||
if (allOk()) {
|
||||
dom.video.pause();
|
||||
return human.result.face[0];
|
||||
|
@ -208,46 +234,48 @@ async function validationLoop() {
|
|||
}
|
||||
}
|
||||
async function saveRecords() {
|
||||
var _a;
|
||||
var _a, _b;
|
||||
if (dom.name.value.length > 0) {
|
||||
const image = (_a = dom.canvas.getContext("2d")) == null ? void 0 : _a.getImageData(0, 0, dom.canvas.width, dom.canvas.height);
|
||||
const rec = { id: 0, name: dom.name.value, descriptor: face.embedding, image };
|
||||
const rec = { id: 0, name: dom.name.value, descriptor: (_b = current.face) == null ? void 0 : _b.embedding, image };
|
||||
await save(rec);
|
||||
log2("saved face record:", rec.name);
|
||||
db2.push(rec);
|
||||
} else {
|
||||
log2("invalid name");
|
||||
}
|
||||
}
|
||||
async function deleteRecord() {
|
||||
if (current.id > 0) {
|
||||
await remove(current);
|
||||
if (current.record && current.record.id > 0) {
|
||||
await remove(current.record);
|
||||
}
|
||||
}
|
||||
async function detectFace() {
|
||||
var _a, _b;
|
||||
(_a = dom.canvas.getContext("2d")) == null ? void 0 : _a.clearRect(0, 0, options.minSize, options.minSize);
|
||||
if (!face || !face.tensor || !face.embedding)
|
||||
return 0;
|
||||
human.tf.browser.toPixels(face.tensor, dom.canvas);
|
||||
const descriptors = db2.map((rec) => rec.descriptor);
|
||||
const res = await human.match(face.embedding, descriptors);
|
||||
if (res.index === -1) {
|
||||
log2("no matches");
|
||||
if (!current.face || !current.face.tensor || !current.face.embedding)
|
||||
return false;
|
||||
human.tf.browser.toPixels(current.face.tensor, dom.canvas);
|
||||
if (await count() === 0) {
|
||||
log2("face database is empty");
|
||||
document.body.style.background = "black";
|
||||
dom.delete.style.display = "none";
|
||||
dom.source.style.display = "none";
|
||||
} else {
|
||||
current = db2[res.index];
|
||||
log2(`best match: ${current.name} | id: ${current.id} | similarity: ${Math.round(1e3 * res.similarity) / 10}%`);
|
||||
dom.delete.style.display = "";
|
||||
dom.name.value = current.name;
|
||||
dom.source.style.display = "";
|
||||
(_b = dom.source.getContext("2d")) == null ? void 0 : _b.putImageData(current.image, 0, 0);
|
||||
return false;
|
||||
}
|
||||
const db2 = await load();
|
||||
const descriptors = db2.map((rec) => rec.descriptor);
|
||||
const res = await human.match(current.face.embedding, descriptors);
|
||||
current.record = db2[res.index] || null;
|
||||
if (current.record) {
|
||||
log2(`best match: ${current.record.name} | id: ${current.record.id} | similarity: ${Math.round(1e3 * res.similarity) / 10}%`);
|
||||
dom.name.value = current.record.name;
|
||||
dom.source.style.display = "";
|
||||
(_b = dom.source.getContext("2d")) == null ? void 0 : _b.putImageData(current.record.image, 0, 0);
|
||||
}
|
||||
document.body.style.background = res.similarity > options.threshold ? "darkgreen" : "maroon";
|
||||
return res.similarity > options.threshold;
|
||||
}
|
||||
async function main() {
|
||||
var _a, _b;
|
||||
var _a, _b, _c, _d;
|
||||
ok.faceCount = false;
|
||||
ok.faceConfidence = false;
|
||||
ok.facingCenter = false;
|
||||
|
@ -258,34 +286,33 @@ async function main() {
|
|||
ok.elapsedMs = 0;
|
||||
dom.match.style.display = "none";
|
||||
dom.retry.style.display = "none";
|
||||
dom.source.style.display = "none";
|
||||
document.body.style.background = "black";
|
||||
await webCam();
|
||||
await detectionLoop();
|
||||
startTime = human.now();
|
||||
face = await validationLoop();
|
||||
dom.fps.style.display = "none";
|
||||
dom.canvas.width = ((_a = face == null ? void 0 : face.tensor) == null ? void 0 : _a.shape[1]) || options.minSize;
|
||||
dom.canvas.height = ((_b = face == null ? void 0 : face.tensor) == null ? void 0 : _b.shape[0]) || options.minSize;
|
||||
current.face = await validationLoop();
|
||||
dom.canvas.width = ((_b = (_a = current.face) == null ? void 0 : _a.tensor) == null ? void 0 : _b.shape[1]) || options.minSize;
|
||||
dom.canvas.height = ((_d = (_c = current.face) == null ? void 0 : _c.tensor) == null ? void 0 : _d.shape[0]) || options.minSize;
|
||||
dom.source.width = dom.canvas.width;
|
||||
dom.source.height = dom.canvas.height;
|
||||
dom.canvas.style.width = "";
|
||||
dom.match.style.display = "flex";
|
||||
dom.save.style.display = "flex";
|
||||
dom.delete.style.display = "flex";
|
||||
dom.retry.style.display = "block";
|
||||
if (!allOk()) {
|
||||
log2("did not find valid face");
|
||||
return false;
|
||||
} else {
|
||||
const res = await detectFace();
|
||||
document.body.style.background = res ? "darkgreen" : "maroon";
|
||||
return res;
|
||||
return detectFace();
|
||||
}
|
||||
}
|
||||
async function init() {
|
||||
log2("human version:", human.version, "| tfjs version:", human.tf.version_core);
|
||||
log2("options:", JSON.stringify(options).replace(/{|}|"|\[|\]/g, "").replace(/,/g, " "));
|
||||
printFPS("loading...");
|
||||
db2 = await load();
|
||||
log2("loaded face records:", db2.length);
|
||||
log2("known face records:", await count());
|
||||
await webCam();
|
||||
await human.load();
|
||||
printFPS("initializing...");
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -10,16 +10,12 @@
|
|||
import { Human, TensorLike, FaceResult } from '../../dist/human.esm.js'; // equivalent of @vladmandic/Human
|
||||
import * as indexDb from './indexdb'; // methods to deal with indexdb
|
||||
|
||||
let db: Array<indexDb.FaceRecord> = []; // face descriptor database stored in indexdb
|
||||
let face: FaceResult; // face result from human.detect
|
||||
let current: indexDb.FaceRecord; // currently matched db record
|
||||
|
||||
const humanConfig = { // user configuration for human, used to fine-tune behavior
|
||||
modelBasePath: '../../models',
|
||||
filter: { equalization: true }, // lets run with histogram equilizer
|
||||
face: {
|
||||
enabled: true,
|
||||
detector: { rotation: true, return: true }, // return tensor is used to get detected face image
|
||||
detector: { rotation: true, return: true, cropFactor: 1.6, mask: false }, // return tensor is used to get detected face image
|
||||
description: { enabled: true },
|
||||
iris: { enabled: true }, // needed to determine gaze direction
|
||||
emotion: { enabled: false }, // not needed
|
||||
|
@ -39,19 +35,24 @@ const options = {
|
|||
blinkMin: 10, // minimum duration of a valid blink
|
||||
blinkMax: 800, // maximum duration of a valid blink
|
||||
threshold: 0.5, // minimum similarity
|
||||
mask: humanConfig.face.detector.mask,
|
||||
rotation: humanConfig.face.detector.rotation,
|
||||
cropFactor: humanConfig.face.detector.cropFactor,
|
||||
};
|
||||
|
||||
const ok = { // must meet all rules
|
||||
faceCount: false,
|
||||
faceConfidence: false,
|
||||
facingCenter: false,
|
||||
lookingCenter: false,
|
||||
blinkDetected: false,
|
||||
faceSize: false,
|
||||
antispoofCheck: false,
|
||||
livenessCheck: false,
|
||||
elapsedMs: 0, // total time while waiting for valid face
|
||||
};
|
||||
const allOk = () => ok.faceCount && ok.faceSize && ok.blinkDetected && ok.facingCenter && ok.faceConfidence && ok.antispoofCheck && ok.livenessCheck;
|
||||
const allOk = () => ok.faceCount && ok.faceSize && ok.blinkDetected && ok.facingCenter && ok.lookingCenter && ok.faceConfidence && ok.antispoofCheck && ok.livenessCheck;
|
||||
const current: { face: FaceResult | null, record: indexDb.FaceRecord | null } = { face: null, record: null }; // current face record and matched database record
|
||||
|
||||
const blink = { // internal timers for blink start/end/duration
|
||||
start: 0,
|
||||
|
@ -71,13 +72,13 @@ const dom = { // grab instances of dom objects so we dont have to look them up l
|
|||
canvas: document.getElementById('canvas') as HTMLCanvasElement,
|
||||
log: document.getElementById('log') as HTMLPreElement,
|
||||
fps: document.getElementById('fps') as HTMLPreElement,
|
||||
status: document.getElementById('status') as HTMLPreElement,
|
||||
match: document.getElementById('match') as HTMLDivElement,
|
||||
name: document.getElementById('name') as HTMLInputElement,
|
||||
save: document.getElementById('save') as HTMLSpanElement,
|
||||
delete: document.getElementById('delete') as HTMLSpanElement,
|
||||
retry: document.getElementById('retry') as HTMLDivElement,
|
||||
source: document.getElementById('source') as HTMLCanvasElement,
|
||||
ok: document.getElementById('ok') as HTMLDivElement,
|
||||
};
|
||||
const timestamp = { detect: 0, draw: 0 }; // holds information used to calculate performance and possible memory leaks
|
||||
const fps = { detect: 0, draw: 0 }; // holds calculated fps information for both detect and screen refresh
|
||||
|
@ -89,7 +90,6 @@ const log = (...msg) => { // helper method to output messages
|
|||
console.log(...msg);
|
||||
};
|
||||
const printFPS = (msg) => dom.fps.innerText = msg; // print status element
|
||||
const printStatus = (msg) => dom.status.innerText = 'status: ' + JSON.stringify(msg).replace(/"|{|}/g, '').replace(/,/g, ' | '); // print status element
|
||||
|
||||
async function webCam() { // initialize webcam
|
||||
printFPS('starting webcam...');
|
||||
|
@ -111,7 +111,7 @@ async function webCam() { // initialize webcam
|
|||
|
||||
async function detectionLoop() { // main detection loop
|
||||
if (!dom.video.paused) {
|
||||
if (face && face.tensor) human.tf.dispose(face.tensor); // dispose previous tensor
|
||||
if (current.face && current.face.tensor) human.tf.dispose(current.face.tensor); // dispose previous tensor
|
||||
await human.detect(dom.video); // actual detection; were not capturing output in a local variable as it can also be reached via human.result
|
||||
const now = human.now();
|
||||
fps.detect = 1000 / (now - timestamp.detect);
|
||||
|
@ -133,15 +133,29 @@ async function validationLoop(): Promise<FaceResult> { // main screen refresh lo
|
|||
const gestures: string[] = Object.values(human.result.gesture).map((gesture) => gesture.gesture); // flatten all gestures
|
||||
if (gestures.includes('blink left eye') || gestures.includes('blink right eye')) blink.start = human.now(); // blink starts when eyes get closed
|
||||
if (blink.start > 0 && !gestures.includes('blink left eye') && !gestures.includes('blink right eye')) blink.end = human.now(); // if blink started how long until eyes are back open
|
||||
ok.blinkDetected = ok.blinkDetected || (blink.end - blink.start > options.blinkMin && blink.end - blink.start < options.blinkMax);
|
||||
ok.blinkDetected = ok.blinkDetected || (Math.abs(blink.end - blink.start) > options.blinkMin && Math.abs(blink.end - blink.start) < options.blinkMax);
|
||||
if (ok.blinkDetected && blink.time === 0) blink.time = Math.trunc(blink.end - blink.start);
|
||||
ok.facingCenter = gestures.includes('facing center') && gestures.includes('looking center'); // must face camera and look at camera
|
||||
ok.facingCenter = gestures.includes('facing center');
|
||||
ok.lookingCenter = gestures.includes('looking center'); // must face camera and look at camera
|
||||
ok.faceConfidence = (human.result.face[0].boxScore || 0) > options.minConfidence && (human.result.face[0].faceScore || 0) > options.minConfidence && (human.result.face[0].genderScore || 0) > options.minConfidence;
|
||||
ok.antispoofCheck = (human.result.face[0].real || 0) > options.minConfidence;
|
||||
ok.livenessCheck = (human.result.face[0].live || 0) > options.minConfidence;
|
||||
ok.faceSize = human.result.face[0].box[2] >= options.minSize && human.result.face[0].box[3] >= options.minSize;
|
||||
}
|
||||
printStatus(ok);
|
||||
let y = 32;
|
||||
for (const [key, val] of Object.entries(ok)) {
|
||||
let el = document.getElementById(`ok-${key}`);
|
||||
if (!el) {
|
||||
el = document.createElement('div');
|
||||
el.innerText = key;
|
||||
el.className = 'ok';
|
||||
el.style.top = `${y}px`;
|
||||
dom.ok.appendChild(el);
|
||||
}
|
||||
if (typeof val === 'boolean') el.style.backgroundColor = val ? 'lightgreen' : 'lightcoral';
|
||||
else el.innerText = `${key}:${val}`;
|
||||
y += 28;
|
||||
}
|
||||
if (allOk()) { // all criteria met
|
||||
dom.video.pause();
|
||||
return human.result.face[0];
|
||||
|
@ -163,39 +177,41 @@ async function validationLoop(): Promise<FaceResult> { // main screen refresh lo
|
|||
async function saveRecords() {
|
||||
if (dom.name.value.length > 0) {
|
||||
const image = dom.canvas.getContext('2d')?.getImageData(0, 0, dom.canvas.width, dom.canvas.height) as ImageData;
|
||||
const rec = { id: 0, name: dom.name.value, descriptor: face.embedding as number[], image };
|
||||
const rec = { id: 0, name: dom.name.value, descriptor: current.face?.embedding as number[], image };
|
||||
await indexDb.save(rec);
|
||||
log('saved face record:', rec.name);
|
||||
db.push(rec);
|
||||
} else {
|
||||
log('invalid name');
|
||||
}
|
||||
}
|
||||
|
||||
async function deleteRecord() {
|
||||
if (current.id > 0) {
|
||||
await indexDb.remove(current);
|
||||
if (current.record && current.record.id > 0) {
|
||||
await indexDb.remove(current.record);
|
||||
}
|
||||
}
|
||||
|
||||
async function detectFace() {
|
||||
dom.canvas.getContext('2d')?.clearRect(0, 0, options.minSize, options.minSize);
|
||||
if (!face || !face.tensor || !face.embedding) return 0;
|
||||
human.tf.browser.toPixels(face.tensor as unknown as TensorLike, dom.canvas);
|
||||
const descriptors = db.map((rec) => rec.descriptor);
|
||||
const res = await human.match(face.embedding, descriptors);
|
||||
if (res.index === -1) {
|
||||
log('no matches');
|
||||
if (!current.face || !current.face.tensor || !current.face.embedding) return false;
|
||||
human.tf.browser.toPixels(current.face.tensor as unknown as TensorLike, dom.canvas);
|
||||
if (await indexDb.count() === 0) {
|
||||
log('face database is empty');
|
||||
document.body.style.background = 'black';
|
||||
dom.delete.style.display = 'none';
|
||||
dom.source.style.display = 'none';
|
||||
} else {
|
||||
current = db[res.index];
|
||||
log(`best match: ${current.name} | id: ${current.id} | similarity: ${Math.round(1000 * res.similarity) / 10}%`);
|
||||
dom.delete.style.display = '';
|
||||
dom.name.value = current.name;
|
||||
dom.source.style.display = '';
|
||||
dom.source.getContext('2d')?.putImageData(current.image, 0, 0);
|
||||
return false;
|
||||
}
|
||||
const db = await indexDb.load();
|
||||
const descriptors = db.map((rec) => rec.descriptor);
|
||||
const res = await human.match(current.face.embedding, descriptors);
|
||||
current.record = db[res.index] || null;
|
||||
if (current.record) {
|
||||
log(`best match: ${current.record.name} | id: ${current.record.id} | similarity: ${Math.round(1000 * res.similarity) / 10}%`);
|
||||
dom.name.value = current.record.name;
|
||||
dom.source.style.display = '';
|
||||
dom.source.getContext('2d')?.putImageData(current.record.image, 0, 0);
|
||||
}
|
||||
document.body.style.background = res.similarity > options.threshold ? 'darkgreen' : 'maroon';
|
||||
return res.similarity > options.threshold;
|
||||
}
|
||||
|
||||
|
@ -210,27 +226,26 @@ async function main() { // main entry point
|
|||
ok.elapsedMs = 0;
|
||||
dom.match.style.display = 'none';
|
||||
dom.retry.style.display = 'none';
|
||||
dom.source.style.display = 'none';
|
||||
document.body.style.background = 'black';
|
||||
await webCam();
|
||||
await detectionLoop(); // start detection loop
|
||||
startTime = human.now();
|
||||
face = await validationLoop(); // start validation loop
|
||||
dom.fps.style.display = 'none';
|
||||
dom.canvas.width = face?.tensor?.shape[1] || options.minSize;
|
||||
dom.canvas.height = face?.tensor?.shape[0] || options.minSize;
|
||||
current.face = await validationLoop(); // start validation loop
|
||||
dom.canvas.width = current.face?.tensor?.shape[1] || options.minSize;
|
||||
dom.canvas.height = current.face?.tensor?.shape[0] || options.minSize;
|
||||
dom.source.width = dom.canvas.width;
|
||||
dom.source.height = dom.canvas.height;
|
||||
dom.canvas.style.width = '';
|
||||
dom.match.style.display = 'flex';
|
||||
dom.save.style.display = 'flex';
|
||||
dom.delete.style.display = 'flex';
|
||||
dom.retry.style.display = 'block';
|
||||
if (!allOk()) {
|
||||
if (!allOk()) { // is all criteria met?
|
||||
log('did not find valid face');
|
||||
return false;
|
||||
} else {
|
||||
// log('found valid face');
|
||||
const res = await detectFace();
|
||||
document.body.style.background = res ? 'darkgreen' : 'maroon';
|
||||
return res;
|
||||
return detectFace();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,8 +253,7 @@ async function init() {
|
|||
log('human version:', human.version, '| tfjs version:', human.tf.version_core);
|
||||
log('options:', JSON.stringify(options).replace(/{|}|"|\[|\]/g, '').replace(/,/g, ' '));
|
||||
printFPS('loading...');
|
||||
db = await indexDb.load(); // load face database from indexdb
|
||||
log('loaded face records:', db.length);
|
||||
log('known face records:', await indexDb.count());
|
||||
await webCam(); // start webcam
|
||||
await human.load(); // preload all models
|
||||
printFPS('initializing...');
|
||||
|
|
|
@ -43,6 +43,15 @@ export async function load(): Promise<FaceRecord[]> {
|
|||
});
|
||||
}
|
||||
|
||||
export async function count(): Promise<number> {
|
||||
if (!db) await open(); // open or create if not already done
|
||||
return new Promise((resolve) => {
|
||||
const store: IDBRequest = db.transaction([table], 'readwrite').objectStore(table).count();
|
||||
store.onerror = (evt) => log('count error:', evt);
|
||||
store.onsuccess = () => resolve(store.result);
|
||||
});
|
||||
}
|
||||
|
||||
export async function save(faceRecord: FaceRecord) {
|
||||
if (!db) await open(); // open or create if not already done
|
||||
const newRecord = { name: faceRecord.name, descriptor: faceRecord.descriptor, image: faceRecord.image }; // omit id as its autoincrement
|
||||
|
|
|
@ -135,12 +135,10 @@ async function SelectFaceCanvas(face) {
|
|||
title('Selected Face');
|
||||
}
|
||||
|
||||
function AddFaceCanvas(index, res, fileName) {
|
||||
async function AddFaceCanvas(index, res, fileName) {
|
||||
all[index] = res.face;
|
||||
let ok = false;
|
||||
for (const i in res.face) {
|
||||
if (res.face[i].mesh.length === 0) continue;
|
||||
ok = true;
|
||||
if (res.face[i].mesh.length === 0 || !res.face[i].tensor) continue; // did not get valid results
|
||||
all[index][i].fileName = fileName;
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.tag = { sample: index, face: i, source: fileName };
|
||||
|
@ -155,15 +153,7 @@ function AddFaceCanvas(index, res, fileName) {
|
|||
gender: ${Math.round(100 * res.face[i].genderScore)}% ${res.face[i].gender}
|
||||
emotion: ${emotion}
|
||||
`.replace(/ /g, ' ');
|
||||
// mouse click on any face canvas triggers analysis
|
||||
canvas.addEventListener('click', (evt) => {
|
||||
log('Select:', 'Image:', evt.target.tag.sample, 'Face:', evt.target.tag.face, 'Source:', evt.target.tag.source, all[evt.target.tag.sample][evt.target.tag.face]);
|
||||
SelectFaceCanvas(all[evt.target.tag.sample][evt.target.tag.face]);
|
||||
});
|
||||
// if we actually got face image tensor, draw canvas with that face
|
||||
if (res.face[i].tensor) {
|
||||
human.tf.browser.toPixels(res.face[i].tensor, canvas);
|
||||
document.getElementById('faces').appendChild(canvas);
|
||||
await human.tf.browser.toPixels(res.face[i].tensor, canvas);
|
||||
const ctx = canvas.getContext('2d');
|
||||
if (!ctx) return false;
|
||||
ctx.font = 'small-caps 0.8rem "Lato"';
|
||||
|
@ -173,10 +163,13 @@ function AddFaceCanvas(index, res, fileName) {
|
|||
const result = human.match(res.face[i].embedding, arr);
|
||||
ctx.font = 'small-caps 1rem "Lato"';
|
||||
if (result.similarity && res.similarity > minScore) ctx.fillText(`${(100 * result.similarity).toFixed(1)}% ${db[result.index].name}`, 4, canvas.height - 30);
|
||||
document.getElementById('faces').appendChild(canvas);
|
||||
canvas.addEventListener('click', (evt) => {
|
||||
log('Select:', 'Image:', evt.target.tag.sample, 'Face:', evt.target.tag.face, 'Source:', evt.target.tag.source, all[evt.target.tag.sample][evt.target.tag.face]);
|
||||
SelectFaceCanvas(all[evt.target.tag.sample][evt.target.tag.face]);
|
||||
});
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
async function AddImageElement(index, image, length) {
|
||||
const faces = all.reduce((prev, curr) => prev += curr.length, 0);
|
||||
|
@ -185,8 +178,8 @@ async function AddImageElement(index, image, length) {
|
|||
const img = new Image(128, 128);
|
||||
img.onload = () => { // must wait until image is loaded
|
||||
human.detect(img, userConfig).then((res) => {
|
||||
const ok = AddFaceCanvas(index, res, image); // then wait until image is analyzed
|
||||
if (ok) document.getElementById('images').appendChild(img); // and finally we can add it
|
||||
AddFaceCanvas(index, res, image); // then wait until image is analyzed
|
||||
document.getElementById('images').appendChild(img); // and finally we can add it
|
||||
resolve(true);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -152,6 +152,8 @@ var config = {
|
|||
skipTime: 2500,
|
||||
minConfidence: 0.2,
|
||||
iouThreshold: 0.1,
|
||||
cropFactor: 1.6,
|
||||
mask: false,
|
||||
return: false
|
||||
},
|
||||
mesh: {
|
||||
|
@ -5631,9 +5633,8 @@ var model8 = null;
|
|||
var inputSize5 = 0;
|
||||
var skipped7 = Number.MAX_SAFE_INTEGER;
|
||||
var lastTime6 = 0;
|
||||
var enlargeFact = 1.6;
|
||||
async function predict6(input, config3) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
||||
const skipTime = (((_a = config3.face.detector) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime6;
|
||||
const skipFrame = skipped7 < (((_b = config3.face.detector) == null ? void 0 : _b.skipFrames) || 0);
|
||||
if (!config3.skipAllowed || !skipTime || !skipFrame || boxCache.length === 0) {
|
||||
|
@ -5647,7 +5648,7 @@ async function predict6(input, config3) {
|
|||
landmarks: possible.landmarks,
|
||||
confidence: possible.confidence
|
||||
};
|
||||
boxCache.push(squarifyBox(enlargeBox(scaleBoxCoordinates(box4, possibleBoxes.scaleFactor), Math.sqrt(enlargeFact))));
|
||||
boxCache.push(squarifyBox(enlargeBox(scaleBoxCoordinates(box4, possibleBoxes.scaleFactor), Math.sqrt(((_c = config3.face.detector) == null ? void 0 : _c.cropFactor) || 1.6))));
|
||||
}
|
||||
skipped7 = 0;
|
||||
} else {
|
||||
|
@ -5671,14 +5672,14 @@ async function predict6(input, config3) {
|
|||
faceScore: 0,
|
||||
annotations: {}
|
||||
};
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation(false, box4, input, inputSize5);
|
||||
if ((_d = config3 == null ? void 0 : config3.filter) == null ? void 0 : _d.equalization) {
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation(false, box4, input, ((_e = config3.face.mesh) == null ? void 0 : _e.enabled) ? inputSize5 : size());
|
||||
if ((_f = config3 == null ? void 0 : config3.filter) == null ? void 0 : _f.equalization) {
|
||||
const equilized = await histogramEqualization(face5.tensor);
|
||||
tfjs_esm_exports.dispose(face5.tensor);
|
||||
face5.tensor = equilized;
|
||||
}
|
||||
face5.boxScore = Math.round(100 * box4.confidence) / 100;
|
||||
if (!((_e = config3.face.mesh) == null ? void 0 : _e.enabled)) {
|
||||
if (!((_g = config3.face.mesh) == null ? void 0 : _g.enabled)) {
|
||||
face5.box = getClampedBox(box4, input);
|
||||
face5.boxRaw = getRawBox(box4, input);
|
||||
face5.score = face5.boxScore;
|
||||
|
@ -5699,22 +5700,22 @@ async function predict6(input, config3) {
|
|||
const coordsReshaped = tfjs_esm_exports.reshape(contourCoords, [-1, 3]);
|
||||
let rawCoords = await coordsReshaped.array();
|
||||
tfjs_esm_exports.dispose([contourCoords, coordsReshaped, confidence, contours]);
|
||||
if (face5.faceScore < (((_f = config3.face.detector) == null ? void 0 : _f.minConfidence) || 1)) {
|
||||
if (face5.faceScore < (((_h = config3.face.detector) == null ? void 0 : _h.minConfidence) || 1)) {
|
||||
box4.confidence = face5.faceScore;
|
||||
} else {
|
||||
if ((_g = config3.face.iris) == null ? void 0 : _g.enabled)
|
||||
if ((_i = config3.face.iris) == null ? void 0 : _i.enabled)
|
||||
rawCoords = await augmentIris(rawCoords, face5.tensor, config3, inputSize5);
|
||||
face5.mesh = transformRawCoords(rawCoords, box4, angle, rotationMatrix, inputSize5);
|
||||
face5.meshRaw = face5.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / inputSize5]);
|
||||
for (const key of Object.keys(meshAnnotations))
|
||||
face5.annotations[key] = meshAnnotations[key].map((index2) => face5.mesh[index2]);
|
||||
box4 = squarifyBox({ ...enlargeBox(calculateLandmarksBoundingBox(face5.mesh), enlargeFact), confidence: box4.confidence });
|
||||
box4 = squarifyBox({ ...enlargeBox(calculateLandmarksBoundingBox(face5.mesh), ((_j = config3.face.detector) == null ? void 0 : _j.cropFactor) || 1.6), confidence: box4.confidence });
|
||||
face5.box = getClampedBox(box4, input);
|
||||
face5.boxRaw = getRawBox(box4, input);
|
||||
face5.score = face5.faceScore;
|
||||
newCache.push(box4);
|
||||
tfjs_esm_exports.dispose(face5.tensor);
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation((_h = config3.face.detector) == null ? void 0 : _h.rotation, box4, input, inputSize5);
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation((_k = config3.face.detector) == null ? void 0 : _k.rotation, box4, input, inputSize5);
|
||||
}
|
||||
}
|
||||
faces.push(face5);
|
||||
|
@ -10641,8 +10642,8 @@ async function process5(input, background, config3) {
|
|||
if (!model14)
|
||||
await load15(config3);
|
||||
const inputImage = await process2(input, config3);
|
||||
const width = ((_a = inputImage.canvas) == null ? void 0 : _a.width) || 0;
|
||||
const height = ((_b = inputImage.canvas) == null ? void 0 : _b.height) || 0;
|
||||
const width = ((_a = inputImage.tensor) == null ? void 0 : _a.shape[2]) || 0;
|
||||
const height = ((_b = inputImage.tensor) == null ? void 0 : _b.shape[1]) || 0;
|
||||
if (!inputImage.tensor)
|
||||
return { data: [], canvas: null, alpha: null };
|
||||
const t = {};
|
||||
|
@ -10699,7 +10700,7 @@ async function process5(input, background, config3) {
|
|||
}
|
||||
Object.keys(t).forEach((tensor3) => tfjs_esm_exports.dispose(t[tensor3]));
|
||||
busy = false;
|
||||
return { data, canvas: mergedCanvas || compositeCanvas, alpha: alphaCanvas };
|
||||
return { data, canvas: compositeCanvas, alpha: alphaCanvas };
|
||||
}
|
||||
|
||||
// src/models.ts
|
||||
|
@ -11516,6 +11517,44 @@ async function all(inCanvas2, result, drawOptions) {
|
|||
return promise;
|
||||
}
|
||||
|
||||
// src/face/mask.ts
|
||||
var expandFact = 0.1;
|
||||
var alpha = 0.5;
|
||||
function insidePoly(x, y, polygon) {
|
||||
let inside = false;
|
||||
let j = polygon.length - 1;
|
||||
for (let i = 0; i < polygon.length; j = i++) {
|
||||
if (polygon[i].y > y !== polygon[j].y > y && x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x)
|
||||
inside = !inside;
|
||||
}
|
||||
return inside;
|
||||
}
|
||||
async function mask(face5) {
|
||||
if (!face5.tensor)
|
||||
return face5.tensor;
|
||||
const width = face5.tensor.shape[2] || 0;
|
||||
const height = face5.tensor.shape[1] || 0;
|
||||
const buffer = await face5.tensor.buffer();
|
||||
let silhouette = [];
|
||||
for (const pt of meshAnnotations.silhouette)
|
||||
silhouette.push({ x: (face5.mesh[pt][0] - face5.box[0]) / face5.box[2], y: (face5.mesh[pt][1] - face5.box[1]) / face5.box[3] });
|
||||
if (expandFact && expandFact > 0)
|
||||
silhouette = silhouette.map((pt) => ({ x: pt.x > 0.5 ? pt.x + expandFact : pt.x - expandFact, y: pt.y > 0.5 ? pt.y + expandFact : pt.y - expandFact }));
|
||||
for (let x = 0; x < width; x++) {
|
||||
for (let y = 0; y < height; y++) {
|
||||
const inside = insidePoly(x / width, y / width, silhouette);
|
||||
if (!inside) {
|
||||
buffer.set(alpha * buffer.get(0, y, x, 0), 0, y, x, 0);
|
||||
buffer.set(alpha * buffer.get(0, y, x, 1), 0, y, x, 1);
|
||||
buffer.set(alpha * buffer.get(0, y, x, 2), 0, y, x, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
const output = buffer.toTensor();
|
||||
tfjs_esm_exports.dispose(buffer);
|
||||
return output;
|
||||
}
|
||||
|
||||
// src/face/angles.ts
|
||||
var calculateGaze = (face5) => {
|
||||
const radians = (pt1, pt2) => Math.atan2(pt1[1] - pt2[1], pt1[0] - pt2[0]);
|
||||
|
@ -11624,7 +11663,7 @@ var calculateFaceAngle = (face5, imageSize) => {
|
|||
|
||||
// src/face/face.ts
|
||||
var detectFace = async (parent, input) => {
|
||||
var _a, _b, _c, _d;
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
||||
let timeStamp;
|
||||
let ageRes;
|
||||
let gearRes;
|
||||
|
@ -11649,44 +11688,49 @@ var detectFace = async (parent, input) => {
|
|||
log("Face object is disposed:", faces[i].tensor);
|
||||
continue;
|
||||
}
|
||||
const rotation = calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]);
|
||||
if ((_a = parent.config.face.detector) == null ? void 0 : _a.mask) {
|
||||
const masked = await mask(faces[i]);
|
||||
tfjs_esm_exports.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;
|
||||
parent.analyze("Start Emotion:");
|
||||
if (parent.config.async) {
|
||||
emotionRes = parent.config.face.emotion.enabled ? predict5(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
emotionRes = ((_b = parent.config.face.emotion) == null ? void 0 : _b.enabled) ? predict5(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:emotion";
|
||||
timeStamp = now();
|
||||
emotionRes = parent.config.face.emotion.enabled ? await predict5(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
emotionRes = ((_c = parent.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict5(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.emotion = env.perfadd ? (parent.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Emotion:");
|
||||
parent.analyze("Start AntiSpoof:");
|
||||
if (parent.config.async) {
|
||||
antispoofRes = parent.config.face.antispoof.enabled ? predict(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
antispoofRes = ((_d = parent.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:antispoof";
|
||||
timeStamp = now();
|
||||
antispoofRes = parent.config.face.antispoof.enabled ? await predict(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
antispoofRes = ((_e = parent.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.antispoof = env.perfadd ? (parent.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End AntiSpoof:");
|
||||
parent.analyze("Start Liveness:");
|
||||
if (parent.config.async) {
|
||||
livenessRes = parent.config.face.liveness.enabled ? predict10(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
livenessRes = ((_f = parent.config.face.liveness) == null ? void 0 : _f.enabled) ? predict10(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:liveness";
|
||||
timeStamp = now();
|
||||
livenessRes = parent.config.face.liveness.enabled ? await predict10(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
livenessRes = ((_g = parent.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict10(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.antispoof = env.perfadd ? (parent.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Liveness:");
|
||||
parent.analyze("Start Description:");
|
||||
if (parent.config.async) {
|
||||
descRes = parent.config.face.description.enabled ? predict7(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
descRes = ((_h = parent.config.face.description) == null ? void 0 : _h.enabled) ? predict7(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:description";
|
||||
timeStamp = now();
|
||||
descRes = parent.config.face.description.enabled ? await predict7(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
descRes = ((_i = parent.config.face.description) == null ? void 0 : _i.enabled) ? await predict7(faces[i].tensor || tfjs_esm_exports.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.description = env.perfadd ? (parent.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Description:");
|
||||
|
@ -11694,12 +11738,12 @@ var detectFace = async (parent, input) => {
|
|||
[ageRes, genderRes, emotionRes, embeddingRes, descRes, gearRes, antispoofRes, livenessRes] = await Promise.all([ageRes, genderRes, emotionRes, embeddingRes, descRes, gearRes, antispoofRes, livenessRes]);
|
||||
}
|
||||
parent.analyze("Finish Face:");
|
||||
if (!parent.config.face.iris.enabled && ((_b = (_a = faces[i]) == null ? void 0 : _a.annotations) == null ? void 0 : _b.leftEyeIris) && ((_d = (_c = faces[i]) == null ? void 0 : _c.annotations) == null ? void 0 : _d.rightEyeIris)) {
|
||||
if (!((_j = parent.config.face.iris) == null ? void 0 : _j.enabled) && ((_l = (_k = faces[i]) == null ? void 0 : _k.annotations) == null ? void 0 : _l.leftEyeIris) && ((_n = (_m = faces[i]) == null ? void 0 : _m.annotations) == null ? void 0 : _n.rightEyeIris)) {
|
||||
delete faces[i].annotations.leftEyeIris;
|
||||
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 = parent.config.face.detector.return ? tfjs_esm_exports.squeeze(faces[i].tensor) : null;
|
||||
const tensor3 = ((_o = parent.config.face.detector) == null ? void 0 : _o.return) ? tfjs_esm_exports.squeeze(faces[i].tensor) : null;
|
||||
tfjs_esm_exports.dispose(faces[i].tensor);
|
||||
if (faces[i].tensor)
|
||||
delete faces[i].tensor;
|
||||
|
@ -11762,11 +11806,12 @@ var face2 = (res) => {
|
|||
const gestures = [];
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].mesh && res[i].mesh.length > 450) {
|
||||
const eyeFacing = res[i].mesh[33][2] - res[i].mesh[263][2];
|
||||
if (Math.abs(eyeFacing) < 10)
|
||||
const zDiff = res[i].mesh[33][2] - res[i].mesh[263][2];
|
||||
const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0];
|
||||
if (Math.abs(zDiff / xDiff) <= 0.15)
|
||||
gestures.push({ face: i, gesture: "facing center" });
|
||||
else
|
||||
gestures.push({ face: i, gesture: `facing ${eyeFacing < 0 ? "left" : "right"}` });
|
||||
gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? "left" : "right"}` });
|
||||
const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]);
|
||||
if (openLeft < 0.2)
|
||||
gestures.push({ face: i, gesture: "blink left eye" });
|
||||
|
@ -11930,6 +11975,7 @@ function calc2(newResult, config3) {
|
|||
for (let i = 0; i < newResult.face.length; i++) {
|
||||
const box4 = newResult.face[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor);
|
||||
const boxRaw = newResult.face[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor);
|
||||
if (newResult.face[i].rotation) {
|
||||
const rotation = { matrix: [0, 0, 0, 0, 0, 0, 0, 0, 0], angle: { roll: 0, yaw: 0, pitch: 0 }, gaze: { bearing: 0, strength: 0 } };
|
||||
rotation.matrix = (_g = newResult.face[i].rotation) == null ? void 0 : _g.matrix;
|
||||
rotation.angle = {
|
||||
|
@ -11943,6 +11989,8 @@ function calc2(newResult, config3) {
|
|||
};
|
||||
bufferedResult.face[i] = { ...newResult.face[i], rotation, box: box4, boxRaw };
|
||||
}
|
||||
bufferedResult.face[i] = { ...newResult.face[i], box: box4, boxRaw };
|
||||
}
|
||||
}
|
||||
if (!bufferedResult.object || newResult.object.length !== bufferedResult.object.length) {
|
||||
bufferedResult.object = JSON.parse(JSON.stringify(newResult.object));
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -187,6 +187,8 @@ var config = {
|
|||
skipTime: 2500,
|
||||
minConfidence: 0.2,
|
||||
iouThreshold: 0.1,
|
||||
cropFactor: 1.6,
|
||||
mask: false,
|
||||
return: false
|
||||
},
|
||||
mesh: {
|
||||
|
@ -1341,7 +1343,7 @@ var Env = class {
|
|||
var env = new Env();
|
||||
|
||||
// src/human.ts
|
||||
var tf30 = __toModule(require_tfjs_esm());
|
||||
var tf31 = __toModule(require_tfjs_esm());
|
||||
|
||||
// package.json
|
||||
var version = "2.5.1";
|
||||
|
@ -5669,9 +5671,8 @@ var model8 = null;
|
|||
var inputSize5 = 0;
|
||||
var skipped7 = Number.MAX_SAFE_INTEGER;
|
||||
var lastTime6 = 0;
|
||||
var enlargeFact = 1.6;
|
||||
async function predict6(input, config3) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
||||
const skipTime = (((_a = config3.face.detector) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime6;
|
||||
const skipFrame = skipped7 < (((_b = config3.face.detector) == null ? void 0 : _b.skipFrames) || 0);
|
||||
if (!config3.skipAllowed || !skipTime || !skipFrame || boxCache.length === 0) {
|
||||
|
@ -5685,7 +5686,7 @@ async function predict6(input, config3) {
|
|||
landmarks: possible.landmarks,
|
||||
confidence: possible.confidence
|
||||
};
|
||||
boxCache.push(squarifyBox(enlargeBox(scaleBoxCoordinates(box4, possibleBoxes.scaleFactor), Math.sqrt(enlargeFact))));
|
||||
boxCache.push(squarifyBox(enlargeBox(scaleBoxCoordinates(box4, possibleBoxes.scaleFactor), Math.sqrt(((_c = config3.face.detector) == null ? void 0 : _c.cropFactor) || 1.6))));
|
||||
}
|
||||
skipped7 = 0;
|
||||
} else {
|
||||
|
@ -5709,14 +5710,14 @@ async function predict6(input, config3) {
|
|||
faceScore: 0,
|
||||
annotations: {}
|
||||
};
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation(false, box4, input, inputSize5);
|
||||
if ((_d = config3 == null ? void 0 : config3.filter) == null ? void 0 : _d.equalization) {
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation(false, box4, input, ((_e = config3.face.mesh) == null ? void 0 : _e.enabled) ? inputSize5 : size());
|
||||
if ((_f = config3 == null ? void 0 : config3.filter) == null ? void 0 : _f.equalization) {
|
||||
const equilized = await histogramEqualization(face5.tensor);
|
||||
tf13.dispose(face5.tensor);
|
||||
face5.tensor = equilized;
|
||||
}
|
||||
face5.boxScore = Math.round(100 * box4.confidence) / 100;
|
||||
if (!((_e = config3.face.mesh) == null ? void 0 : _e.enabled)) {
|
||||
if (!((_g = config3.face.mesh) == null ? void 0 : _g.enabled)) {
|
||||
face5.box = getClampedBox(box4, input);
|
||||
face5.boxRaw = getRawBox(box4, input);
|
||||
face5.score = face5.boxScore;
|
||||
|
@ -5737,22 +5738,22 @@ async function predict6(input, config3) {
|
|||
const coordsReshaped = tf13.reshape(contourCoords, [-1, 3]);
|
||||
let rawCoords = await coordsReshaped.array();
|
||||
tf13.dispose([contourCoords, coordsReshaped, confidence, contours]);
|
||||
if (face5.faceScore < (((_f = config3.face.detector) == null ? void 0 : _f.minConfidence) || 1)) {
|
||||
if (face5.faceScore < (((_h = config3.face.detector) == null ? void 0 : _h.minConfidence) || 1)) {
|
||||
box4.confidence = face5.faceScore;
|
||||
} else {
|
||||
if ((_g = config3.face.iris) == null ? void 0 : _g.enabled)
|
||||
if ((_i = config3.face.iris) == null ? void 0 : _i.enabled)
|
||||
rawCoords = await augmentIris(rawCoords, face5.tensor, config3, inputSize5);
|
||||
face5.mesh = transformRawCoords(rawCoords, box4, angle, rotationMatrix, inputSize5);
|
||||
face5.meshRaw = face5.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / inputSize5]);
|
||||
for (const key of Object.keys(meshAnnotations))
|
||||
face5.annotations[key] = meshAnnotations[key].map((index2) => face5.mesh[index2]);
|
||||
box4 = squarifyBox({ ...enlargeBox(calculateLandmarksBoundingBox(face5.mesh), enlargeFact), confidence: box4.confidence });
|
||||
box4 = squarifyBox({ ...enlargeBox(calculateLandmarksBoundingBox(face5.mesh), ((_j = config3.face.detector) == null ? void 0 : _j.cropFactor) || 1.6), confidence: box4.confidence });
|
||||
face5.box = getClampedBox(box4, input);
|
||||
face5.boxRaw = getRawBox(box4, input);
|
||||
face5.score = face5.faceScore;
|
||||
newCache.push(box4);
|
||||
tf13.dispose(face5.tensor);
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation((_h = config3.face.detector) == null ? void 0 : _h.rotation, box4, input, inputSize5);
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation((_k = config3.face.detector) == null ? void 0 : _k.rotation, box4, input, inputSize5);
|
||||
}
|
||||
}
|
||||
faces.push(face5);
|
||||
|
@ -10699,8 +10700,8 @@ async function process5(input, background, config3) {
|
|||
if (!model14)
|
||||
await load15(config3);
|
||||
const inputImage = await process2(input, config3);
|
||||
const width = ((_a = inputImage.canvas) == null ? void 0 : _a.width) || 0;
|
||||
const height = ((_b = inputImage.canvas) == null ? void 0 : _b.height) || 0;
|
||||
const width = ((_a = inputImage.tensor) == null ? void 0 : _a.shape[2]) || 0;
|
||||
const height = ((_b = inputImage.tensor) == null ? void 0 : _b.shape[1]) || 0;
|
||||
if (!inputImage.tensor)
|
||||
return { data: [], canvas: null, alpha: null };
|
||||
const t = {};
|
||||
|
@ -10757,7 +10758,7 @@ async function process5(input, background, config3) {
|
|||
}
|
||||
Object.keys(t).forEach((tensor3) => tf25.dispose(t[tensor3]));
|
||||
busy = false;
|
||||
return { data, canvas: mergedCanvas || compositeCanvas, alpha: alphaCanvas };
|
||||
return { data, canvas: compositeCanvas, alpha: alphaCanvas };
|
||||
}
|
||||
|
||||
// src/models.ts
|
||||
|
@ -11576,7 +11577,46 @@ async function all(inCanvas2, result, drawOptions) {
|
|||
}
|
||||
|
||||
// src/face/face.ts
|
||||
var tf29 = __toModule(require_tfjs_esm());
|
||||
|
||||
// src/face/mask.ts
|
||||
var tf28 = __toModule(require_tfjs_esm());
|
||||
var expandFact = 0.1;
|
||||
var alpha = 0.5;
|
||||
function insidePoly(x, y, polygon) {
|
||||
let inside = false;
|
||||
let j = polygon.length - 1;
|
||||
for (let i = 0; i < polygon.length; j = i++) {
|
||||
if (polygon[i].y > y !== polygon[j].y > y && x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x)
|
||||
inside = !inside;
|
||||
}
|
||||
return inside;
|
||||
}
|
||||
async function mask(face5) {
|
||||
if (!face5.tensor)
|
||||
return face5.tensor;
|
||||
const width = face5.tensor.shape[2] || 0;
|
||||
const height = face5.tensor.shape[1] || 0;
|
||||
const buffer = await face5.tensor.buffer();
|
||||
let silhouette = [];
|
||||
for (const pt of meshAnnotations.silhouette)
|
||||
silhouette.push({ x: (face5.mesh[pt][0] - face5.box[0]) / face5.box[2], y: (face5.mesh[pt][1] - face5.box[1]) / face5.box[3] });
|
||||
if (expandFact && expandFact > 0)
|
||||
silhouette = silhouette.map((pt) => ({ x: pt.x > 0.5 ? pt.x + expandFact : pt.x - expandFact, y: pt.y > 0.5 ? pt.y + expandFact : pt.y - expandFact }));
|
||||
for (let x = 0; x < width; x++) {
|
||||
for (let y = 0; y < height; y++) {
|
||||
const inside = insidePoly(x / width, y / width, silhouette);
|
||||
if (!inside) {
|
||||
buffer.set(alpha * buffer.get(0, y, x, 0), 0, y, x, 0);
|
||||
buffer.set(alpha * buffer.get(0, y, x, 1), 0, y, x, 1);
|
||||
buffer.set(alpha * buffer.get(0, y, x, 2), 0, y, x, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
const output = buffer.toTensor();
|
||||
tf28.dispose(buffer);
|
||||
return output;
|
||||
}
|
||||
|
||||
// src/face/angles.ts
|
||||
var calculateGaze = (face5) => {
|
||||
|
@ -11686,7 +11726,7 @@ var calculateFaceAngle = (face5, imageSize) => {
|
|||
|
||||
// src/face/face.ts
|
||||
var detectFace = async (parent, input) => {
|
||||
var _a, _b, _c, _d;
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
||||
let timeStamp;
|
||||
let ageRes;
|
||||
let gearRes;
|
||||
|
@ -11711,44 +11751,49 @@ var detectFace = async (parent, input) => {
|
|||
log("Face object is disposed:", faces[i].tensor);
|
||||
continue;
|
||||
}
|
||||
const rotation = calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]);
|
||||
if ((_a = parent.config.face.detector) == null ? void 0 : _a.mask) {
|
||||
const masked = await mask(faces[i]);
|
||||
tf29.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;
|
||||
parent.analyze("Start Emotion:");
|
||||
if (parent.config.async) {
|
||||
emotionRes = parent.config.face.emotion.enabled ? predict5(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
emotionRes = ((_b = parent.config.face.emotion) == null ? void 0 : _b.enabled) ? predict5(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:emotion";
|
||||
timeStamp = now();
|
||||
emotionRes = parent.config.face.emotion.enabled ? await predict5(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
emotionRes = ((_c = parent.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict5(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.emotion = env.perfadd ? (parent.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Emotion:");
|
||||
parent.analyze("Start AntiSpoof:");
|
||||
if (parent.config.async) {
|
||||
antispoofRes = parent.config.face.antispoof.enabled ? predict(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
antispoofRes = ((_d = parent.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:antispoof";
|
||||
timeStamp = now();
|
||||
antispoofRes = parent.config.face.antispoof.enabled ? await predict(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
antispoofRes = ((_e = parent.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.antispoof = env.perfadd ? (parent.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End AntiSpoof:");
|
||||
parent.analyze("Start Liveness:");
|
||||
if (parent.config.async) {
|
||||
livenessRes = parent.config.face.liveness.enabled ? predict10(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
livenessRes = ((_f = parent.config.face.liveness) == null ? void 0 : _f.enabled) ? predict10(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:liveness";
|
||||
timeStamp = now();
|
||||
livenessRes = parent.config.face.liveness.enabled ? await predict10(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
livenessRes = ((_g = parent.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict10(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.antispoof = env.perfadd ? (parent.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Liveness:");
|
||||
parent.analyze("Start Description:");
|
||||
if (parent.config.async) {
|
||||
descRes = parent.config.face.description.enabled ? predict7(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
descRes = ((_h = parent.config.face.description) == null ? void 0 : _h.enabled) ? predict7(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:description";
|
||||
timeStamp = now();
|
||||
descRes = parent.config.face.description.enabled ? await predict7(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
descRes = ((_i = parent.config.face.description) == null ? void 0 : _i.enabled) ? await predict7(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.description = env.perfadd ? (parent.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Description:");
|
||||
|
@ -11756,13 +11801,13 @@ var detectFace = async (parent, input) => {
|
|||
[ageRes, genderRes, emotionRes, embeddingRes, descRes, gearRes, antispoofRes, livenessRes] = await Promise.all([ageRes, genderRes, emotionRes, embeddingRes, descRes, gearRes, antispoofRes, livenessRes]);
|
||||
}
|
||||
parent.analyze("Finish Face:");
|
||||
if (!parent.config.face.iris.enabled && ((_b = (_a = faces[i]) == null ? void 0 : _a.annotations) == null ? void 0 : _b.leftEyeIris) && ((_d = (_c = faces[i]) == null ? void 0 : _c.annotations) == null ? void 0 : _d.rightEyeIris)) {
|
||||
if (!((_j = parent.config.face.iris) == null ? void 0 : _j.enabled) && ((_l = (_k = faces[i]) == null ? void 0 : _k.annotations) == null ? void 0 : _l.leftEyeIris) && ((_n = (_m = faces[i]) == null ? void 0 : _m.annotations) == null ? void 0 : _n.rightEyeIris)) {
|
||||
delete faces[i].annotations.leftEyeIris;
|
||||
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 = parent.config.face.detector.return ? tf28.squeeze(faces[i].tensor) : null;
|
||||
tf28.dispose(faces[i].tensor);
|
||||
const tensor3 = ((_o = parent.config.face.detector) == null ? void 0 : _o.return) ? tf29.squeeze(faces[i].tensor) : null;
|
||||
tf29.dispose(faces[i].tensor);
|
||||
if (faces[i].tensor)
|
||||
delete faces[i].tensor;
|
||||
faceRes.push({
|
||||
|
@ -11824,11 +11869,12 @@ var face2 = (res) => {
|
|||
const gestures = [];
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].mesh && res[i].mesh.length > 450) {
|
||||
const eyeFacing = res[i].mesh[33][2] - res[i].mesh[263][2];
|
||||
if (Math.abs(eyeFacing) < 10)
|
||||
const zDiff = res[i].mesh[33][2] - res[i].mesh[263][2];
|
||||
const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0];
|
||||
if (Math.abs(zDiff / xDiff) <= 0.15)
|
||||
gestures.push({ face: i, gesture: "facing center" });
|
||||
else
|
||||
gestures.push({ face: i, gesture: `facing ${eyeFacing < 0 ? "left" : "right"}` });
|
||||
gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? "left" : "right"}` });
|
||||
const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]);
|
||||
if (openLeft < 0.2)
|
||||
gestures.push({ face: i, gesture: "blink left eye" });
|
||||
|
@ -11992,6 +12038,7 @@ function calc2(newResult, config3) {
|
|||
for (let i = 0; i < newResult.face.length; i++) {
|
||||
const box4 = newResult.face[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor);
|
||||
const boxRaw = newResult.face[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor);
|
||||
if (newResult.face[i].rotation) {
|
||||
const rotation = { matrix: [0, 0, 0, 0, 0, 0, 0, 0, 0], angle: { roll: 0, yaw: 0, pitch: 0 }, gaze: { bearing: 0, strength: 0 } };
|
||||
rotation.matrix = (_g = newResult.face[i].rotation) == null ? void 0 : _g.matrix;
|
||||
rotation.angle = {
|
||||
|
@ -12005,6 +12052,8 @@ function calc2(newResult, config3) {
|
|||
};
|
||||
bufferedResult.face[i] = { ...newResult.face[i], rotation, box: box4, boxRaw };
|
||||
}
|
||||
bufferedResult.face[i] = { ...newResult.face[i], box: box4, boxRaw };
|
||||
}
|
||||
}
|
||||
if (!bufferedResult.object || newResult.object.length !== bufferedResult.object.length) {
|
||||
bufferedResult.object = JSON.parse(JSON.stringify(newResult.object));
|
||||
|
@ -12856,7 +12905,7 @@ lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/
|
|||
2Q==`;
|
||||
|
||||
// src/warmup.ts
|
||||
var tf29 = __toModule(require_tfjs_esm());
|
||||
var tf30 = __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;
|
||||
|
@ -12928,8 +12977,8 @@ async function warmupNode(instance) {
|
|||
if (!img)
|
||||
return null;
|
||||
let res;
|
||||
if (typeof tf29["node"] !== "undefined") {
|
||||
const data = tf29["node"].decodeJpeg(img);
|
||||
if (typeof tf30["node"] !== "undefined") {
|
||||
const data = tf30["node"].decodeJpeg(img);
|
||||
const expanded = data.expandDims(0);
|
||||
instance.tf.dispose(data);
|
||||
res = await instance.detect(expanded, instance.config);
|
||||
|
@ -12999,7 +13048,7 @@ var Human = class {
|
|||
return null;
|
||||
if (!input)
|
||||
return "input is not defined";
|
||||
if (this.env.node && !(input instanceof tf30.Tensor))
|
||||
if (this.env.node && !(input instanceof tf31.Tensor))
|
||||
return "input must be a tensor";
|
||||
try {
|
||||
this.tf.getBackend();
|
||||
|
@ -13017,7 +13066,7 @@ var Human = class {
|
|||
(_a = this.events) == null ? void 0 : _a.dispatchEvent(new Event(event));
|
||||
});
|
||||
this.env = env;
|
||||
config.wasmPath = tf30.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf30.version_core}/dist/`;
|
||||
config.wasmPath = tf31.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf31.version_core}/dist/`;
|
||||
config.modelBasePath = env.browser ? "../models/" : "file://models/";
|
||||
config.backend = env.browser ? "humangl" : "tensorflow";
|
||||
this.version = version;
|
||||
|
@ -13026,7 +13075,7 @@ var Human = class {
|
|||
Object.seal(this.config);
|
||||
if (userConfig)
|
||||
this.config = mergeDeep(this.config, userConfig);
|
||||
this.tf = tf30;
|
||||
this.tf = tf31;
|
||||
this.state = "idle";
|
||||
__privateSet(this, _numTensors, 0);
|
||||
__privateSet(this, _analyzeMemoryLeaks, false);
|
||||
|
@ -13092,7 +13141,7 @@ var Human = class {
|
|||
log(`tfjs version: ${this.tf.version_core}`);
|
||||
if (!await check(this))
|
||||
log("error: backend check failed");
|
||||
await tf30.ready();
|
||||
await tf31.ready();
|
||||
if (this.env.browser) {
|
||||
if (this.config.debug)
|
||||
log("configuration:", this.config);
|
||||
|
@ -13291,7 +13340,7 @@ var Human = class {
|
|||
return join2(faceRes, bodyRes, handRes, gestureRes, shape);
|
||||
}
|
||||
};
|
||||
tf30.dispose(img.tensor);
|
||||
tf31.dispose(img.tensor);
|
||||
this.emit("detect");
|
||||
this.state = "idle";
|
||||
resolve(this.result);
|
||||
|
|
|
@ -188,6 +188,8 @@ var config = {
|
|||
skipTime: 2500,
|
||||
minConfidence: 0.2,
|
||||
iouThreshold: 0.1,
|
||||
cropFactor: 1.6,
|
||||
mask: false,
|
||||
return: false
|
||||
},
|
||||
mesh: {
|
||||
|
@ -1342,7 +1344,7 @@ var Env = class {
|
|||
var env = new Env();
|
||||
|
||||
// src/human.ts
|
||||
var tf30 = __toModule(require_tfjs_esm());
|
||||
var tf31 = __toModule(require_tfjs_esm());
|
||||
|
||||
// package.json
|
||||
var version = "2.5.1";
|
||||
|
@ -5670,9 +5672,8 @@ var model8 = null;
|
|||
var inputSize5 = 0;
|
||||
var skipped7 = Number.MAX_SAFE_INTEGER;
|
||||
var lastTime6 = 0;
|
||||
var enlargeFact = 1.6;
|
||||
async function predict6(input, config3) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
||||
const skipTime = (((_a = config3.face.detector) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime6;
|
||||
const skipFrame = skipped7 < (((_b = config3.face.detector) == null ? void 0 : _b.skipFrames) || 0);
|
||||
if (!config3.skipAllowed || !skipTime || !skipFrame || boxCache.length === 0) {
|
||||
|
@ -5686,7 +5687,7 @@ async function predict6(input, config3) {
|
|||
landmarks: possible.landmarks,
|
||||
confidence: possible.confidence
|
||||
};
|
||||
boxCache.push(squarifyBox(enlargeBox(scaleBoxCoordinates(box4, possibleBoxes.scaleFactor), Math.sqrt(enlargeFact))));
|
||||
boxCache.push(squarifyBox(enlargeBox(scaleBoxCoordinates(box4, possibleBoxes.scaleFactor), Math.sqrt(((_c = config3.face.detector) == null ? void 0 : _c.cropFactor) || 1.6))));
|
||||
}
|
||||
skipped7 = 0;
|
||||
} else {
|
||||
|
@ -5710,14 +5711,14 @@ async function predict6(input, config3) {
|
|||
faceScore: 0,
|
||||
annotations: {}
|
||||
};
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation(false, box4, input, inputSize5);
|
||||
if ((_d = config3 == null ? void 0 : config3.filter) == null ? void 0 : _d.equalization) {
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation(false, box4, input, ((_e = config3.face.mesh) == null ? void 0 : _e.enabled) ? inputSize5 : size());
|
||||
if ((_f = config3 == null ? void 0 : config3.filter) == null ? void 0 : _f.equalization) {
|
||||
const equilized = await histogramEqualization(face5.tensor);
|
||||
tf13.dispose(face5.tensor);
|
||||
face5.tensor = equilized;
|
||||
}
|
||||
face5.boxScore = Math.round(100 * box4.confidence) / 100;
|
||||
if (!((_e = config3.face.mesh) == null ? void 0 : _e.enabled)) {
|
||||
if (!((_g = config3.face.mesh) == null ? void 0 : _g.enabled)) {
|
||||
face5.box = getClampedBox(box4, input);
|
||||
face5.boxRaw = getRawBox(box4, input);
|
||||
face5.score = face5.boxScore;
|
||||
|
@ -5738,22 +5739,22 @@ async function predict6(input, config3) {
|
|||
const coordsReshaped = tf13.reshape(contourCoords, [-1, 3]);
|
||||
let rawCoords = await coordsReshaped.array();
|
||||
tf13.dispose([contourCoords, coordsReshaped, confidence, contours]);
|
||||
if (face5.faceScore < (((_f = config3.face.detector) == null ? void 0 : _f.minConfidence) || 1)) {
|
||||
if (face5.faceScore < (((_h = config3.face.detector) == null ? void 0 : _h.minConfidence) || 1)) {
|
||||
box4.confidence = face5.faceScore;
|
||||
} else {
|
||||
if ((_g = config3.face.iris) == null ? void 0 : _g.enabled)
|
||||
if ((_i = config3.face.iris) == null ? void 0 : _i.enabled)
|
||||
rawCoords = await augmentIris(rawCoords, face5.tensor, config3, inputSize5);
|
||||
face5.mesh = transformRawCoords(rawCoords, box4, angle, rotationMatrix, inputSize5);
|
||||
face5.meshRaw = face5.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / inputSize5]);
|
||||
for (const key of Object.keys(meshAnnotations))
|
||||
face5.annotations[key] = meshAnnotations[key].map((index2) => face5.mesh[index2]);
|
||||
box4 = squarifyBox({ ...enlargeBox(calculateLandmarksBoundingBox(face5.mesh), enlargeFact), confidence: box4.confidence });
|
||||
box4 = squarifyBox({ ...enlargeBox(calculateLandmarksBoundingBox(face5.mesh), ((_j = config3.face.detector) == null ? void 0 : _j.cropFactor) || 1.6), confidence: box4.confidence });
|
||||
face5.box = getClampedBox(box4, input);
|
||||
face5.boxRaw = getRawBox(box4, input);
|
||||
face5.score = face5.faceScore;
|
||||
newCache.push(box4);
|
||||
tf13.dispose(face5.tensor);
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation((_h = config3.face.detector) == null ? void 0 : _h.rotation, box4, input, inputSize5);
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation((_k = config3.face.detector) == null ? void 0 : _k.rotation, box4, input, inputSize5);
|
||||
}
|
||||
}
|
||||
faces.push(face5);
|
||||
|
@ -10700,8 +10701,8 @@ async function process5(input, background, config3) {
|
|||
if (!model14)
|
||||
await load15(config3);
|
||||
const inputImage = await process2(input, config3);
|
||||
const width = ((_a = inputImage.canvas) == null ? void 0 : _a.width) || 0;
|
||||
const height = ((_b = inputImage.canvas) == null ? void 0 : _b.height) || 0;
|
||||
const width = ((_a = inputImage.tensor) == null ? void 0 : _a.shape[2]) || 0;
|
||||
const height = ((_b = inputImage.tensor) == null ? void 0 : _b.shape[1]) || 0;
|
||||
if (!inputImage.tensor)
|
||||
return { data: [], canvas: null, alpha: null };
|
||||
const t = {};
|
||||
|
@ -10758,7 +10759,7 @@ async function process5(input, background, config3) {
|
|||
}
|
||||
Object.keys(t).forEach((tensor3) => tf25.dispose(t[tensor3]));
|
||||
busy = false;
|
||||
return { data, canvas: mergedCanvas || compositeCanvas, alpha: alphaCanvas };
|
||||
return { data, canvas: compositeCanvas, alpha: alphaCanvas };
|
||||
}
|
||||
|
||||
// src/models.ts
|
||||
|
@ -11577,7 +11578,46 @@ async function all(inCanvas2, result, drawOptions) {
|
|||
}
|
||||
|
||||
// src/face/face.ts
|
||||
var tf29 = __toModule(require_tfjs_esm());
|
||||
|
||||
// src/face/mask.ts
|
||||
var tf28 = __toModule(require_tfjs_esm());
|
||||
var expandFact = 0.1;
|
||||
var alpha = 0.5;
|
||||
function insidePoly(x, y, polygon) {
|
||||
let inside = false;
|
||||
let j = polygon.length - 1;
|
||||
for (let i = 0; i < polygon.length; j = i++) {
|
||||
if (polygon[i].y > y !== polygon[j].y > y && x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x)
|
||||
inside = !inside;
|
||||
}
|
||||
return inside;
|
||||
}
|
||||
async function mask(face5) {
|
||||
if (!face5.tensor)
|
||||
return face5.tensor;
|
||||
const width = face5.tensor.shape[2] || 0;
|
||||
const height = face5.tensor.shape[1] || 0;
|
||||
const buffer = await face5.tensor.buffer();
|
||||
let silhouette = [];
|
||||
for (const pt of meshAnnotations.silhouette)
|
||||
silhouette.push({ x: (face5.mesh[pt][0] - face5.box[0]) / face5.box[2], y: (face5.mesh[pt][1] - face5.box[1]) / face5.box[3] });
|
||||
if (expandFact && expandFact > 0)
|
||||
silhouette = silhouette.map((pt) => ({ x: pt.x > 0.5 ? pt.x + expandFact : pt.x - expandFact, y: pt.y > 0.5 ? pt.y + expandFact : pt.y - expandFact }));
|
||||
for (let x = 0; x < width; x++) {
|
||||
for (let y = 0; y < height; y++) {
|
||||
const inside = insidePoly(x / width, y / width, silhouette);
|
||||
if (!inside) {
|
||||
buffer.set(alpha * buffer.get(0, y, x, 0), 0, y, x, 0);
|
||||
buffer.set(alpha * buffer.get(0, y, x, 1), 0, y, x, 1);
|
||||
buffer.set(alpha * buffer.get(0, y, x, 2), 0, y, x, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
const output = buffer.toTensor();
|
||||
tf28.dispose(buffer);
|
||||
return output;
|
||||
}
|
||||
|
||||
// src/face/angles.ts
|
||||
var calculateGaze = (face5) => {
|
||||
|
@ -11687,7 +11727,7 @@ var calculateFaceAngle = (face5, imageSize) => {
|
|||
|
||||
// src/face/face.ts
|
||||
var detectFace = async (parent, input) => {
|
||||
var _a, _b, _c, _d;
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
||||
let timeStamp;
|
||||
let ageRes;
|
||||
let gearRes;
|
||||
|
@ -11712,44 +11752,49 @@ var detectFace = async (parent, input) => {
|
|||
log("Face object is disposed:", faces[i].tensor);
|
||||
continue;
|
||||
}
|
||||
const rotation = calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]);
|
||||
if ((_a = parent.config.face.detector) == null ? void 0 : _a.mask) {
|
||||
const masked = await mask(faces[i]);
|
||||
tf29.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;
|
||||
parent.analyze("Start Emotion:");
|
||||
if (parent.config.async) {
|
||||
emotionRes = parent.config.face.emotion.enabled ? predict5(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
emotionRes = ((_b = parent.config.face.emotion) == null ? void 0 : _b.enabled) ? predict5(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:emotion";
|
||||
timeStamp = now();
|
||||
emotionRes = parent.config.face.emotion.enabled ? await predict5(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
emotionRes = ((_c = parent.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict5(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.emotion = env.perfadd ? (parent.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Emotion:");
|
||||
parent.analyze("Start AntiSpoof:");
|
||||
if (parent.config.async) {
|
||||
antispoofRes = parent.config.face.antispoof.enabled ? predict(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
antispoofRes = ((_d = parent.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:antispoof";
|
||||
timeStamp = now();
|
||||
antispoofRes = parent.config.face.antispoof.enabled ? await predict(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
antispoofRes = ((_e = parent.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.antispoof = env.perfadd ? (parent.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End AntiSpoof:");
|
||||
parent.analyze("Start Liveness:");
|
||||
if (parent.config.async) {
|
||||
livenessRes = parent.config.face.liveness.enabled ? predict10(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
livenessRes = ((_f = parent.config.face.liveness) == null ? void 0 : _f.enabled) ? predict10(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:liveness";
|
||||
timeStamp = now();
|
||||
livenessRes = parent.config.face.liveness.enabled ? await predict10(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
livenessRes = ((_g = parent.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict10(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.antispoof = env.perfadd ? (parent.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Liveness:");
|
||||
parent.analyze("Start Description:");
|
||||
if (parent.config.async) {
|
||||
descRes = parent.config.face.description.enabled ? predict7(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
descRes = ((_h = parent.config.face.description) == null ? void 0 : _h.enabled) ? predict7(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:description";
|
||||
timeStamp = now();
|
||||
descRes = parent.config.face.description.enabled ? await predict7(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
descRes = ((_i = parent.config.face.description) == null ? void 0 : _i.enabled) ? await predict7(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.description = env.perfadd ? (parent.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Description:");
|
||||
|
@ -11757,13 +11802,13 @@ var detectFace = async (parent, input) => {
|
|||
[ageRes, genderRes, emotionRes, embeddingRes, descRes, gearRes, antispoofRes, livenessRes] = await Promise.all([ageRes, genderRes, emotionRes, embeddingRes, descRes, gearRes, antispoofRes, livenessRes]);
|
||||
}
|
||||
parent.analyze("Finish Face:");
|
||||
if (!parent.config.face.iris.enabled && ((_b = (_a = faces[i]) == null ? void 0 : _a.annotations) == null ? void 0 : _b.leftEyeIris) && ((_d = (_c = faces[i]) == null ? void 0 : _c.annotations) == null ? void 0 : _d.rightEyeIris)) {
|
||||
if (!((_j = parent.config.face.iris) == null ? void 0 : _j.enabled) && ((_l = (_k = faces[i]) == null ? void 0 : _k.annotations) == null ? void 0 : _l.leftEyeIris) && ((_n = (_m = faces[i]) == null ? void 0 : _m.annotations) == null ? void 0 : _n.rightEyeIris)) {
|
||||
delete faces[i].annotations.leftEyeIris;
|
||||
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 = parent.config.face.detector.return ? tf28.squeeze(faces[i].tensor) : null;
|
||||
tf28.dispose(faces[i].tensor);
|
||||
const tensor3 = ((_o = parent.config.face.detector) == null ? void 0 : _o.return) ? tf29.squeeze(faces[i].tensor) : null;
|
||||
tf29.dispose(faces[i].tensor);
|
||||
if (faces[i].tensor)
|
||||
delete faces[i].tensor;
|
||||
faceRes.push({
|
||||
|
@ -11825,11 +11870,12 @@ var face2 = (res) => {
|
|||
const gestures = [];
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].mesh && res[i].mesh.length > 450) {
|
||||
const eyeFacing = res[i].mesh[33][2] - res[i].mesh[263][2];
|
||||
if (Math.abs(eyeFacing) < 10)
|
||||
const zDiff = res[i].mesh[33][2] - res[i].mesh[263][2];
|
||||
const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0];
|
||||
if (Math.abs(zDiff / xDiff) <= 0.15)
|
||||
gestures.push({ face: i, gesture: "facing center" });
|
||||
else
|
||||
gestures.push({ face: i, gesture: `facing ${eyeFacing < 0 ? "left" : "right"}` });
|
||||
gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? "left" : "right"}` });
|
||||
const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]);
|
||||
if (openLeft < 0.2)
|
||||
gestures.push({ face: i, gesture: "blink left eye" });
|
||||
|
@ -11993,6 +12039,7 @@ function calc2(newResult, config3) {
|
|||
for (let i = 0; i < newResult.face.length; i++) {
|
||||
const box4 = newResult.face[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor);
|
||||
const boxRaw = newResult.face[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor);
|
||||
if (newResult.face[i].rotation) {
|
||||
const rotation = { matrix: [0, 0, 0, 0, 0, 0, 0, 0, 0], angle: { roll: 0, yaw: 0, pitch: 0 }, gaze: { bearing: 0, strength: 0 } };
|
||||
rotation.matrix = (_g = newResult.face[i].rotation) == null ? void 0 : _g.matrix;
|
||||
rotation.angle = {
|
||||
|
@ -12006,6 +12053,8 @@ function calc2(newResult, config3) {
|
|||
};
|
||||
bufferedResult.face[i] = { ...newResult.face[i], rotation, box: box4, boxRaw };
|
||||
}
|
||||
bufferedResult.face[i] = { ...newResult.face[i], box: box4, boxRaw };
|
||||
}
|
||||
}
|
||||
if (!bufferedResult.object || newResult.object.length !== bufferedResult.object.length) {
|
||||
bufferedResult.object = JSON.parse(JSON.stringify(newResult.object));
|
||||
|
@ -12857,7 +12906,7 @@ lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/
|
|||
2Q==`;
|
||||
|
||||
// src/warmup.ts
|
||||
var tf29 = __toModule(require_tfjs_esm());
|
||||
var tf30 = __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;
|
||||
|
@ -12929,8 +12978,8 @@ async function warmupNode(instance) {
|
|||
if (!img)
|
||||
return null;
|
||||
let res;
|
||||
if (typeof tf29["node"] !== "undefined") {
|
||||
const data = tf29["node"].decodeJpeg(img);
|
||||
if (typeof tf30["node"] !== "undefined") {
|
||||
const data = tf30["node"].decodeJpeg(img);
|
||||
const expanded = data.expandDims(0);
|
||||
instance.tf.dispose(data);
|
||||
res = await instance.detect(expanded, instance.config);
|
||||
|
@ -13000,7 +13049,7 @@ var Human = class {
|
|||
return null;
|
||||
if (!input)
|
||||
return "input is not defined";
|
||||
if (this.env.node && !(input instanceof tf30.Tensor))
|
||||
if (this.env.node && !(input instanceof tf31.Tensor))
|
||||
return "input must be a tensor";
|
||||
try {
|
||||
this.tf.getBackend();
|
||||
|
@ -13018,7 +13067,7 @@ var Human = class {
|
|||
(_a = this.events) == null ? void 0 : _a.dispatchEvent(new Event(event));
|
||||
});
|
||||
this.env = env;
|
||||
config.wasmPath = tf30.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf30.version_core}/dist/`;
|
||||
config.wasmPath = tf31.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf31.version_core}/dist/`;
|
||||
config.modelBasePath = env.browser ? "../models/" : "file://models/";
|
||||
config.backend = env.browser ? "humangl" : "tensorflow";
|
||||
this.version = version;
|
||||
|
@ -13027,7 +13076,7 @@ var Human = class {
|
|||
Object.seal(this.config);
|
||||
if (userConfig)
|
||||
this.config = mergeDeep(this.config, userConfig);
|
||||
this.tf = tf30;
|
||||
this.tf = tf31;
|
||||
this.state = "idle";
|
||||
__privateSet(this, _numTensors, 0);
|
||||
__privateSet(this, _analyzeMemoryLeaks, false);
|
||||
|
@ -13093,7 +13142,7 @@ var Human = class {
|
|||
log(`tfjs version: ${this.tf.version_core}`);
|
||||
if (!await check(this))
|
||||
log("error: backend check failed");
|
||||
await tf30.ready();
|
||||
await tf31.ready();
|
||||
if (this.env.browser) {
|
||||
if (this.config.debug)
|
||||
log("configuration:", this.config);
|
||||
|
@ -13292,7 +13341,7 @@ var Human = class {
|
|||
return join2(faceRes, bodyRes, handRes, gestureRes, shape);
|
||||
}
|
||||
};
|
||||
tf30.dispose(img.tensor);
|
||||
tf31.dispose(img.tensor);
|
||||
this.emit("detect");
|
||||
this.state = "idle";
|
||||
resolve(this.result);
|
||||
|
|
|
@ -187,6 +187,8 @@ var config = {
|
|||
skipTime: 2500,
|
||||
minConfidence: 0.2,
|
||||
iouThreshold: 0.1,
|
||||
cropFactor: 1.6,
|
||||
mask: false,
|
||||
return: false
|
||||
},
|
||||
mesh: {
|
||||
|
@ -1341,7 +1343,7 @@ var Env = class {
|
|||
var env = new Env();
|
||||
|
||||
// src/human.ts
|
||||
var tf30 = __toModule(require_tfjs_esm());
|
||||
var tf31 = __toModule(require_tfjs_esm());
|
||||
|
||||
// package.json
|
||||
var version = "2.5.1";
|
||||
|
@ -5669,9 +5671,8 @@ var model8 = null;
|
|||
var inputSize5 = 0;
|
||||
var skipped7 = Number.MAX_SAFE_INTEGER;
|
||||
var lastTime6 = 0;
|
||||
var enlargeFact = 1.6;
|
||||
async function predict6(input, config3) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
||||
const skipTime = (((_a = config3.face.detector) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime6;
|
||||
const skipFrame = skipped7 < (((_b = config3.face.detector) == null ? void 0 : _b.skipFrames) || 0);
|
||||
if (!config3.skipAllowed || !skipTime || !skipFrame || boxCache.length === 0) {
|
||||
|
@ -5685,7 +5686,7 @@ async function predict6(input, config3) {
|
|||
landmarks: possible.landmarks,
|
||||
confidence: possible.confidence
|
||||
};
|
||||
boxCache.push(squarifyBox(enlargeBox(scaleBoxCoordinates(box4, possibleBoxes.scaleFactor), Math.sqrt(enlargeFact))));
|
||||
boxCache.push(squarifyBox(enlargeBox(scaleBoxCoordinates(box4, possibleBoxes.scaleFactor), Math.sqrt(((_c = config3.face.detector) == null ? void 0 : _c.cropFactor) || 1.6))));
|
||||
}
|
||||
skipped7 = 0;
|
||||
} else {
|
||||
|
@ -5709,14 +5710,14 @@ async function predict6(input, config3) {
|
|||
faceScore: 0,
|
||||
annotations: {}
|
||||
};
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation(false, box4, input, inputSize5);
|
||||
if ((_d = config3 == null ? void 0 : config3.filter) == null ? void 0 : _d.equalization) {
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation(false, box4, input, ((_e = config3.face.mesh) == null ? void 0 : _e.enabled) ? inputSize5 : size());
|
||||
if ((_f = config3 == null ? void 0 : config3.filter) == null ? void 0 : _f.equalization) {
|
||||
const equilized = await histogramEqualization(face5.tensor);
|
||||
tf13.dispose(face5.tensor);
|
||||
face5.tensor = equilized;
|
||||
}
|
||||
face5.boxScore = Math.round(100 * box4.confidence) / 100;
|
||||
if (!((_e = config3.face.mesh) == null ? void 0 : _e.enabled)) {
|
||||
if (!((_g = config3.face.mesh) == null ? void 0 : _g.enabled)) {
|
||||
face5.box = getClampedBox(box4, input);
|
||||
face5.boxRaw = getRawBox(box4, input);
|
||||
face5.score = face5.boxScore;
|
||||
|
@ -5737,22 +5738,22 @@ async function predict6(input, config3) {
|
|||
const coordsReshaped = tf13.reshape(contourCoords, [-1, 3]);
|
||||
let rawCoords = await coordsReshaped.array();
|
||||
tf13.dispose([contourCoords, coordsReshaped, confidence, contours]);
|
||||
if (face5.faceScore < (((_f = config3.face.detector) == null ? void 0 : _f.minConfidence) || 1)) {
|
||||
if (face5.faceScore < (((_h = config3.face.detector) == null ? void 0 : _h.minConfidence) || 1)) {
|
||||
box4.confidence = face5.faceScore;
|
||||
} else {
|
||||
if ((_g = config3.face.iris) == null ? void 0 : _g.enabled)
|
||||
if ((_i = config3.face.iris) == null ? void 0 : _i.enabled)
|
||||
rawCoords = await augmentIris(rawCoords, face5.tensor, config3, inputSize5);
|
||||
face5.mesh = transformRawCoords(rawCoords, box4, angle, rotationMatrix, inputSize5);
|
||||
face5.meshRaw = face5.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / inputSize5]);
|
||||
for (const key of Object.keys(meshAnnotations))
|
||||
face5.annotations[key] = meshAnnotations[key].map((index2) => face5.mesh[index2]);
|
||||
box4 = squarifyBox({ ...enlargeBox(calculateLandmarksBoundingBox(face5.mesh), enlargeFact), confidence: box4.confidence });
|
||||
box4 = squarifyBox({ ...enlargeBox(calculateLandmarksBoundingBox(face5.mesh), ((_j = config3.face.detector) == null ? void 0 : _j.cropFactor) || 1.6), confidence: box4.confidence });
|
||||
face5.box = getClampedBox(box4, input);
|
||||
face5.boxRaw = getRawBox(box4, input);
|
||||
face5.score = face5.faceScore;
|
||||
newCache.push(box4);
|
||||
tf13.dispose(face5.tensor);
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation((_h = config3.face.detector) == null ? void 0 : _h.rotation, box4, input, inputSize5);
|
||||
[angle, rotationMatrix, face5.tensor] = correctFaceRotation((_k = config3.face.detector) == null ? void 0 : _k.rotation, box4, input, inputSize5);
|
||||
}
|
||||
}
|
||||
faces.push(face5);
|
||||
|
@ -10699,8 +10700,8 @@ async function process5(input, background, config3) {
|
|||
if (!model14)
|
||||
await load15(config3);
|
||||
const inputImage = await process2(input, config3);
|
||||
const width = ((_a = inputImage.canvas) == null ? void 0 : _a.width) || 0;
|
||||
const height = ((_b = inputImage.canvas) == null ? void 0 : _b.height) || 0;
|
||||
const width = ((_a = inputImage.tensor) == null ? void 0 : _a.shape[2]) || 0;
|
||||
const height = ((_b = inputImage.tensor) == null ? void 0 : _b.shape[1]) || 0;
|
||||
if (!inputImage.tensor)
|
||||
return { data: [], canvas: null, alpha: null };
|
||||
const t = {};
|
||||
|
@ -10757,7 +10758,7 @@ async function process5(input, background, config3) {
|
|||
}
|
||||
Object.keys(t).forEach((tensor3) => tf25.dispose(t[tensor3]));
|
||||
busy = false;
|
||||
return { data, canvas: mergedCanvas || compositeCanvas, alpha: alphaCanvas };
|
||||
return { data, canvas: compositeCanvas, alpha: alphaCanvas };
|
||||
}
|
||||
|
||||
// src/models.ts
|
||||
|
@ -11576,7 +11577,46 @@ async function all(inCanvas2, result, drawOptions) {
|
|||
}
|
||||
|
||||
// src/face/face.ts
|
||||
var tf29 = __toModule(require_tfjs_esm());
|
||||
|
||||
// src/face/mask.ts
|
||||
var tf28 = __toModule(require_tfjs_esm());
|
||||
var expandFact = 0.1;
|
||||
var alpha = 0.5;
|
||||
function insidePoly(x, y, polygon) {
|
||||
let inside = false;
|
||||
let j = polygon.length - 1;
|
||||
for (let i = 0; i < polygon.length; j = i++) {
|
||||
if (polygon[i].y > y !== polygon[j].y > y && x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x)
|
||||
inside = !inside;
|
||||
}
|
||||
return inside;
|
||||
}
|
||||
async function mask(face5) {
|
||||
if (!face5.tensor)
|
||||
return face5.tensor;
|
||||
const width = face5.tensor.shape[2] || 0;
|
||||
const height = face5.tensor.shape[1] || 0;
|
||||
const buffer = await face5.tensor.buffer();
|
||||
let silhouette = [];
|
||||
for (const pt of meshAnnotations.silhouette)
|
||||
silhouette.push({ x: (face5.mesh[pt][0] - face5.box[0]) / face5.box[2], y: (face5.mesh[pt][1] - face5.box[1]) / face5.box[3] });
|
||||
if (expandFact && expandFact > 0)
|
||||
silhouette = silhouette.map((pt) => ({ x: pt.x > 0.5 ? pt.x + expandFact : pt.x - expandFact, y: pt.y > 0.5 ? pt.y + expandFact : pt.y - expandFact }));
|
||||
for (let x = 0; x < width; x++) {
|
||||
for (let y = 0; y < height; y++) {
|
||||
const inside = insidePoly(x / width, y / width, silhouette);
|
||||
if (!inside) {
|
||||
buffer.set(alpha * buffer.get(0, y, x, 0), 0, y, x, 0);
|
||||
buffer.set(alpha * buffer.get(0, y, x, 1), 0, y, x, 1);
|
||||
buffer.set(alpha * buffer.get(0, y, x, 2), 0, y, x, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
const output = buffer.toTensor();
|
||||
tf28.dispose(buffer);
|
||||
return output;
|
||||
}
|
||||
|
||||
// src/face/angles.ts
|
||||
var calculateGaze = (face5) => {
|
||||
|
@ -11686,7 +11726,7 @@ var calculateFaceAngle = (face5, imageSize) => {
|
|||
|
||||
// src/face/face.ts
|
||||
var detectFace = async (parent, input) => {
|
||||
var _a, _b, _c, _d;
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
||||
let timeStamp;
|
||||
let ageRes;
|
||||
let gearRes;
|
||||
|
@ -11711,44 +11751,49 @@ var detectFace = async (parent, input) => {
|
|||
log("Face object is disposed:", faces[i].tensor);
|
||||
continue;
|
||||
}
|
||||
const rotation = calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]);
|
||||
if ((_a = parent.config.face.detector) == null ? void 0 : _a.mask) {
|
||||
const masked = await mask(faces[i]);
|
||||
tf29.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;
|
||||
parent.analyze("Start Emotion:");
|
||||
if (parent.config.async) {
|
||||
emotionRes = parent.config.face.emotion.enabled ? predict5(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
emotionRes = ((_b = parent.config.face.emotion) == null ? void 0 : _b.enabled) ? predict5(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:emotion";
|
||||
timeStamp = now();
|
||||
emotionRes = parent.config.face.emotion.enabled ? await predict5(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
emotionRes = ((_c = parent.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict5(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.emotion = env.perfadd ? (parent.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Emotion:");
|
||||
parent.analyze("Start AntiSpoof:");
|
||||
if (parent.config.async) {
|
||||
antispoofRes = parent.config.face.antispoof.enabled ? predict(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
antispoofRes = ((_d = parent.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:antispoof";
|
||||
timeStamp = now();
|
||||
antispoofRes = parent.config.face.antispoof.enabled ? await predict(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
antispoofRes = ((_e = parent.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.antispoof = env.perfadd ? (parent.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End AntiSpoof:");
|
||||
parent.analyze("Start Liveness:");
|
||||
if (parent.config.async) {
|
||||
livenessRes = parent.config.face.liveness.enabled ? predict10(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
livenessRes = ((_f = parent.config.face.liveness) == null ? void 0 : _f.enabled) ? predict10(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:liveness";
|
||||
timeStamp = now();
|
||||
livenessRes = parent.config.face.liveness.enabled ? await predict10(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
livenessRes = ((_g = parent.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict10(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.antispoof = env.perfadd ? (parent.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Liveness:");
|
||||
parent.analyze("Start Description:");
|
||||
if (parent.config.async) {
|
||||
descRes = parent.config.face.description.enabled ? predict7(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
descRes = ((_h = parent.config.face.description) == null ? void 0 : _h.enabled) ? predict7(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = "run:description";
|
||||
timeStamp = now();
|
||||
descRes = parent.config.face.description.enabled ? await predict7(faces[i].tensor || tf28.tensor([]), parent.config, i, faces.length) : null;
|
||||
descRes = ((_i = parent.config.face.description) == null ? void 0 : _i.enabled) ? await predict7(faces[i].tensor || tf29.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.description = env.perfadd ? (parent.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze("End Description:");
|
||||
|
@ -11756,13 +11801,13 @@ var detectFace = async (parent, input) => {
|
|||
[ageRes, genderRes, emotionRes, embeddingRes, descRes, gearRes, antispoofRes, livenessRes] = await Promise.all([ageRes, genderRes, emotionRes, embeddingRes, descRes, gearRes, antispoofRes, livenessRes]);
|
||||
}
|
||||
parent.analyze("Finish Face:");
|
||||
if (!parent.config.face.iris.enabled && ((_b = (_a = faces[i]) == null ? void 0 : _a.annotations) == null ? void 0 : _b.leftEyeIris) && ((_d = (_c = faces[i]) == null ? void 0 : _c.annotations) == null ? void 0 : _d.rightEyeIris)) {
|
||||
if (!((_j = parent.config.face.iris) == null ? void 0 : _j.enabled) && ((_l = (_k = faces[i]) == null ? void 0 : _k.annotations) == null ? void 0 : _l.leftEyeIris) && ((_n = (_m = faces[i]) == null ? void 0 : _m.annotations) == null ? void 0 : _n.rightEyeIris)) {
|
||||
delete faces[i].annotations.leftEyeIris;
|
||||
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 = parent.config.face.detector.return ? tf28.squeeze(faces[i].tensor) : null;
|
||||
tf28.dispose(faces[i].tensor);
|
||||
const tensor3 = ((_o = parent.config.face.detector) == null ? void 0 : _o.return) ? tf29.squeeze(faces[i].tensor) : null;
|
||||
tf29.dispose(faces[i].tensor);
|
||||
if (faces[i].tensor)
|
||||
delete faces[i].tensor;
|
||||
faceRes.push({
|
||||
|
@ -11824,11 +11869,12 @@ var face2 = (res) => {
|
|||
const gestures = [];
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].mesh && res[i].mesh.length > 450) {
|
||||
const eyeFacing = res[i].mesh[33][2] - res[i].mesh[263][2];
|
||||
if (Math.abs(eyeFacing) < 10)
|
||||
const zDiff = res[i].mesh[33][2] - res[i].mesh[263][2];
|
||||
const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0];
|
||||
if (Math.abs(zDiff / xDiff) <= 0.15)
|
||||
gestures.push({ face: i, gesture: "facing center" });
|
||||
else
|
||||
gestures.push({ face: i, gesture: `facing ${eyeFacing < 0 ? "left" : "right"}` });
|
||||
gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? "left" : "right"}` });
|
||||
const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]);
|
||||
if (openLeft < 0.2)
|
||||
gestures.push({ face: i, gesture: "blink left eye" });
|
||||
|
@ -11992,6 +12038,7 @@ function calc2(newResult, config3) {
|
|||
for (let i = 0; i < newResult.face.length; i++) {
|
||||
const box4 = newResult.face[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor);
|
||||
const boxRaw = newResult.face[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor);
|
||||
if (newResult.face[i].rotation) {
|
||||
const rotation = { matrix: [0, 0, 0, 0, 0, 0, 0, 0, 0], angle: { roll: 0, yaw: 0, pitch: 0 }, gaze: { bearing: 0, strength: 0 } };
|
||||
rotation.matrix = (_g = newResult.face[i].rotation) == null ? void 0 : _g.matrix;
|
||||
rotation.angle = {
|
||||
|
@ -12005,6 +12052,8 @@ function calc2(newResult, config3) {
|
|||
};
|
||||
bufferedResult.face[i] = { ...newResult.face[i], rotation, box: box4, boxRaw };
|
||||
}
|
||||
bufferedResult.face[i] = { ...newResult.face[i], box: box4, boxRaw };
|
||||
}
|
||||
}
|
||||
if (!bufferedResult.object || newResult.object.length !== bufferedResult.object.length) {
|
||||
bufferedResult.object = JSON.parse(JSON.stringify(newResult.object));
|
||||
|
@ -12856,7 +12905,7 @@ lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/
|
|||
2Q==`;
|
||||
|
||||
// src/warmup.ts
|
||||
var tf29 = __toModule(require_tfjs_esm());
|
||||
var tf30 = __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;
|
||||
|
@ -12928,8 +12977,8 @@ async function warmupNode(instance) {
|
|||
if (!img)
|
||||
return null;
|
||||
let res;
|
||||
if (typeof tf29["node"] !== "undefined") {
|
||||
const data = tf29["node"].decodeJpeg(img);
|
||||
if (typeof tf30["node"] !== "undefined") {
|
||||
const data = tf30["node"].decodeJpeg(img);
|
||||
const expanded = data.expandDims(0);
|
||||
instance.tf.dispose(data);
|
||||
res = await instance.detect(expanded, instance.config);
|
||||
|
@ -12999,7 +13048,7 @@ var Human = class {
|
|||
return null;
|
||||
if (!input)
|
||||
return "input is not defined";
|
||||
if (this.env.node && !(input instanceof tf30.Tensor))
|
||||
if (this.env.node && !(input instanceof tf31.Tensor))
|
||||
return "input must be a tensor";
|
||||
try {
|
||||
this.tf.getBackend();
|
||||
|
@ -13017,7 +13066,7 @@ var Human = class {
|
|||
(_a = this.events) == null ? void 0 : _a.dispatchEvent(new Event(event));
|
||||
});
|
||||
this.env = env;
|
||||
config.wasmPath = tf30.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf30.version_core}/dist/`;
|
||||
config.wasmPath = tf31.version_core.includes("-") ? "https://vladmandic.github.io/tfjs/dist/" : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf31.version_core}/dist/`;
|
||||
config.modelBasePath = env.browser ? "../models/" : "file://models/";
|
||||
config.backend = env.browser ? "humangl" : "tensorflow";
|
||||
this.version = version;
|
||||
|
@ -13026,7 +13075,7 @@ var Human = class {
|
|||
Object.seal(this.config);
|
||||
if (userConfig)
|
||||
this.config = mergeDeep(this.config, userConfig);
|
||||
this.tf = tf30;
|
||||
this.tf = tf31;
|
||||
this.state = "idle";
|
||||
__privateSet(this, _numTensors, 0);
|
||||
__privateSet(this, _analyzeMemoryLeaks, false);
|
||||
|
@ -13092,7 +13141,7 @@ var Human = class {
|
|||
log(`tfjs version: ${this.tf.version_core}`);
|
||||
if (!await check(this))
|
||||
log("error: backend check failed");
|
||||
await tf30.ready();
|
||||
await tf31.ready();
|
||||
if (this.env.browser) {
|
||||
if (this.config.debug)
|
||||
log("configuration:", this.config);
|
||||
|
@ -13291,7 +13340,7 @@ var Human = class {
|
|||
return join2(faceRes, bodyRes, handRes, gestureRes, shape);
|
||||
}
|
||||
};
|
||||
tf30.dispose(img.tensor);
|
||||
tf31.dispose(img.tensor);
|
||||
this.emit("detect");
|
||||
this.state = "idle";
|
||||
resolve(this.result);
|
||||
|
|
|
@ -23,6 +23,14 @@ export interface FaceDetectorConfig extends GenericConfig {
|
|||
minConfidence: number,
|
||||
/** @property minimum overlap between two detected faces before one is discarded */
|
||||
iouThreshold: number,
|
||||
/** @property factor used to expand detected face before further analysis
|
||||
* - default: 1.6
|
||||
* - for high-quality inputs can be reduced to increase precision
|
||||
* - for video inputs or low-quality inputs can be increased to allow for more flexible tracking
|
||||
*/
|
||||
cropFactor: number,
|
||||
/** @property should child models perform on masked image of a face */
|
||||
mask: boolean,
|
||||
/** @property should face detection return face tensor to be used in some other extenrnal model? */
|
||||
return: boolean,
|
||||
}
|
||||
|
@ -314,6 +322,8 @@ const config: Config = {
|
|||
skipTime: 2500,
|
||||
minConfidence: 0.2,
|
||||
iouThreshold: 0.1,
|
||||
cropFactor: 1.6,
|
||||
mask: false,
|
||||
return: false,
|
||||
},
|
||||
mesh: {
|
||||
|
|
|
@ -17,7 +17,6 @@ let anchorsData: [number, number][] = [];
|
|||
let anchors: Tensor | null = null;
|
||||
let inputSize = 0;
|
||||
|
||||
// export const size = () => (model && model.inputs[0].shape ? model.inputs[0].shape[2] : 0);
|
||||
export const size = () => inputSize;
|
||||
|
||||
export async function load(config: Config): Promise<GraphModel> {
|
||||
|
|
|
@ -9,13 +9,15 @@ import * as tf from '../../dist/tfjs.esm.js';
|
|||
import * as facemesh from './facemesh';
|
||||
import * as emotion from '../gear/emotion';
|
||||
import * as faceres from './faceres';
|
||||
import * as mask from './mask';
|
||||
import * as antispoof from './antispoof';
|
||||
import * as liveness from './liveness';
|
||||
import type { FaceResult } from '../result';
|
||||
import type { Tensor } from '../tfjs/types';
|
||||
import type { Human } from '../human';
|
||||
import { calculateFaceAngle } from './angles';
|
||||
|
||||
export const detectFace = async (parent /* instance of human */, input: Tensor): Promise<FaceResult[]> => {
|
||||
export const detectFace = async (parent: Human /* instance of human */, input: Tensor): Promise<FaceResult[]> => {
|
||||
// run facemesh, includes blazeface and iris
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
let timeStamp;
|
||||
|
@ -46,16 +48,24 @@ export const detectFace = async (parent /* instance of human */, input: Tensor):
|
|||
continue;
|
||||
}
|
||||
|
||||
const rotation = calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]);
|
||||
// optional face mask
|
||||
if (parent.config.face.detector?.mask) {
|
||||
const masked = await mask.mask(faces[i]);
|
||||
tf.dispose(faces[i].tensor);
|
||||
faces[i].tensor = masked as Tensor;
|
||||
}
|
||||
|
||||
// calculate face angles
|
||||
const rotation = faces[i].mesh && (faces[i].mesh.length > 200) ? calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]) : null;
|
||||
|
||||
// run emotion, inherits face from blazeface
|
||||
parent.analyze('Start Emotion:');
|
||||
if (parent.config.async) {
|
||||
emotionRes = parent.config.face.emotion.enabled ? emotion.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
emotionRes = parent.config.face.emotion?.enabled ? emotion.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = 'run:emotion';
|
||||
timeStamp = now();
|
||||
emotionRes = parent.config.face.emotion.enabled ? await emotion.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
emotionRes = parent.config.face.emotion?.enabled ? await emotion.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.emotion = env.perfadd ? (parent.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze('End Emotion:');
|
||||
|
@ -63,11 +73,11 @@ export const detectFace = async (parent /* instance of human */, input: Tensor):
|
|||
// run antispoof, inherits face from blazeface
|
||||
parent.analyze('Start AntiSpoof:');
|
||||
if (parent.config.async) {
|
||||
antispoofRes = parent.config.face.antispoof.enabled ? antispoof.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
antispoofRes = parent.config.face.antispoof?.enabled ? antispoof.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = 'run:antispoof';
|
||||
timeStamp = now();
|
||||
antispoofRes = parent.config.face.antispoof.enabled ? await antispoof.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
antispoofRes = parent.config.face.antispoof?.enabled ? await antispoof.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.antispoof = env.perfadd ? (parent.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze('End AntiSpoof:');
|
||||
|
@ -75,11 +85,11 @@ export const detectFace = async (parent /* instance of human */, input: Tensor):
|
|||
// run liveness, inherits face from blazeface
|
||||
parent.analyze('Start Liveness:');
|
||||
if (parent.config.async) {
|
||||
livenessRes = parent.config.face.liveness.enabled ? liveness.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
livenessRes = parent.config.face.liveness?.enabled ? liveness.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = 'run:liveness';
|
||||
timeStamp = now();
|
||||
livenessRes = parent.config.face.liveness.enabled ? await liveness.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
livenessRes = parent.config.face.liveness?.enabled ? await liveness.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.antispoof = env.perfadd ? (parent.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze('End Liveness:');
|
||||
|
@ -101,11 +111,11 @@ export const detectFace = async (parent /* instance of human */, input: Tensor):
|
|||
// run emotion, inherits face from blazeface
|
||||
parent.analyze('Start Description:');
|
||||
if (parent.config.async) {
|
||||
descRes = parent.config.face.description.enabled ? faceres.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
descRes = parent.config.face.description?.enabled ? faceres.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
} else {
|
||||
parent.state = 'run:description';
|
||||
timeStamp = now();
|
||||
descRes = parent.config.face.description.enabled ? await faceres.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
descRes = parent.config.face.description?.enabled ? await faceres.predict(faces[i].tensor || tf.tensor([]), parent.config, i, faces.length) : null;
|
||||
parent.performance.description = env.perfadd ? (parent.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);
|
||||
}
|
||||
parent.analyze('End Description:');
|
||||
|
@ -119,7 +129,7 @@ export const detectFace = async (parent /* instance of human */, input: Tensor):
|
|||
|
||||
// calculate iris distance
|
||||
// iris: array[ center, left, top, right, bottom]
|
||||
if (!parent.config.face.iris.enabled && faces[i]?.annotations?.leftEyeIris && faces[i]?.annotations?.rightEyeIris) {
|
||||
if (!parent.config.face.iris?.enabled && faces[i]?.annotations?.leftEyeIris && faces[i]?.annotations?.rightEyeIris) {
|
||||
delete faces[i].annotations.leftEyeIris;
|
||||
delete faces[i].annotations.rightEyeIris;
|
||||
}
|
||||
|
@ -130,7 +140,7 @@ export const detectFace = async (parent /* instance of human */, input: Tensor):
|
|||
: 0; // note: average human iris size is 11.7mm
|
||||
|
||||
// optionally return tensor
|
||||
const tensor = parent.config.face.detector.return ? tf.squeeze(faces[i].tensor) : null;
|
||||
const tensor = parent.config.face.detector?.return ? tf.squeeze(faces[i].tensor) : null;
|
||||
// dispose original face tensor
|
||||
tf.dispose(faces[i].tensor);
|
||||
// delete temp face image
|
||||
|
|
|
@ -25,11 +25,9 @@ let model: GraphModel | null = null;
|
|||
let inputSize = 0;
|
||||
let skipped = Number.MAX_SAFE_INTEGER;
|
||||
let lastTime = 0;
|
||||
const enlargeFact = 1.6;
|
||||
|
||||
export async function predict(input: Tensor, config: Config): Promise<FaceResult[]> {
|
||||
// reset cached boxes
|
||||
|
||||
const skipTime = (config.face.detector?.skipTime || 0) > (now() - lastTime);
|
||||
const skipFrame = skipped < (config.face.detector?.skipFrames || 0);
|
||||
if (!config.skipAllowed || !skipTime || !skipFrame || boxCache.length === 0) {
|
||||
|
@ -43,7 +41,7 @@ export async function predict(input: Tensor, config: Config): Promise<FaceResult
|
|||
landmarks: possible.landmarks,
|
||||
confidence: possible.confidence,
|
||||
};
|
||||
boxCache.push(util.squarifyBox(util.enlargeBox(util.scaleBoxCoordinates(box, possibleBoxes.scaleFactor), Math.sqrt(enlargeFact))));
|
||||
boxCache.push(util.squarifyBox(util.enlargeBox(util.scaleBoxCoordinates(box, possibleBoxes.scaleFactor), Math.sqrt(config.face.detector?.cropFactor || 1.6))));
|
||||
}
|
||||
skipped = 0;
|
||||
} else {
|
||||
|
@ -68,7 +66,7 @@ export async function predict(input: Tensor, config: Config): Promise<FaceResult
|
|||
annotations: {},
|
||||
};
|
||||
|
||||
[angle, rotationMatrix, face.tensor] = util.correctFaceRotation(false && config.face.detector?.rotation, box, input, inputSize); // optional rotate based on detector data // disabled
|
||||
[angle, rotationMatrix, face.tensor] = util.correctFaceRotation(false && config.face.detector?.rotation, box, input, config.face.mesh?.enabled ? inputSize : blazeface.size()); // optional rotate based on detector data
|
||||
if (config?.filter?.equalization) {
|
||||
const equilized = await histogramEqualization(face.tensor as Tensor);
|
||||
tf.dispose(face.tensor);
|
||||
|
@ -101,7 +99,7 @@ export async function predict(input: Tensor, config: Config): Promise<FaceResult
|
|||
face.mesh = util.transformRawCoords(rawCoords, box, angle, rotationMatrix, inputSize); // get processed mesh
|
||||
face.meshRaw = face.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / inputSize]);
|
||||
for (const key of Object.keys(coords.meshAnnotations)) face.annotations[key] = coords.meshAnnotations[key].map((index) => face.mesh[index]); // add annotations
|
||||
box = util.squarifyBox({ ...util.enlargeBox(util.calculateLandmarksBoundingBox(face.mesh), enlargeFact), confidence: box.confidence }); // redefine box with mesh calculated one
|
||||
box = util.squarifyBox({ ...util.enlargeBox(util.calculateLandmarksBoundingBox(face.mesh), (config.face.detector?.cropFactor || 1.6)), confidence: box.confidence }); // redefine box with mesh calculated one
|
||||
face.box = util.getClampedBox(box, input); // update detected box with box around the face mesh
|
||||
face.boxRaw = util.getRawBox(box, input);
|
||||
face.score = face.faceScore;
|
||||
|
|
|
@ -39,22 +39,17 @@ export async function load(config: Config): Promise<GraphModel> {
|
|||
export function enhance(input): Tensor {
|
||||
const tensor = (input.image || input.tensor || input) as Tensor; // input received from detector is already normalized to 0..1, input is also assumed to be straightened
|
||||
if (!model?.inputs[0].shape) return tensor; // model has no shape so no point continuing
|
||||
// do a tight crop of image and resize it to fit the model
|
||||
const crop = tf.image.resizeBilinear(tensor, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false);
|
||||
const norm = tf.mul(crop, 255);
|
||||
tf.dispose(crop);
|
||||
return norm;
|
||||
/*
|
||||
// do a tight crop of image and resize it to fit the model
|
||||
const box = [[0.05, 0.15, 0.85, 0.85]]; // empyrical values for top, left, bottom, right
|
||||
const crop = (tensor.shape.length === 3)
|
||||
? tf.image.cropAndResize(tf.expandDims(tensor, 0), box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]) // add batch dimension if missing
|
||||
: tf.image.cropAndResize(tensor, box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]);
|
||||
*/
|
||||
/*
|
||||
// just resize to fit the embedding model instead of cropping
|
||||
const crop = tf.image.resizeBilinear(tensor, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false);
|
||||
*/
|
||||
|
||||
/*
|
||||
// convert to black&white to avoid colorization impact
|
||||
const rgb = [0.2989, 0.5870, 0.1140]; // factors for red/green/blue colors when converting to grayscale: https://www.mathworks.com/help/matlab/ref/rgb2gray.html
|
||||
|
@ -65,22 +60,6 @@ export function enhance(input): Tensor {
|
|||
const grayscale = tf.addN([redNorm, greenNorm, blueNorm]);
|
||||
const merge = tf.stack([grayscale, grayscale, grayscale], 3).squeeze(4);
|
||||
*/
|
||||
|
||||
/*
|
||||
// increase image pseudo-contrast 100%
|
||||
// (or do it per-channel so mean is done on each channel)
|
||||
// (or calculate histogram and do it based on histogram)
|
||||
const mean = merge.mean();
|
||||
const factor = 2;
|
||||
const contrast = merge.sub(mean).mul(factor).add(mean);
|
||||
*/
|
||||
|
||||
/*
|
||||
// normalize brightness from 0..1
|
||||
// silly way of creating pseudo-hdr of image
|
||||
const darken = crop.sub(crop.min());
|
||||
const lighten = darken.div(darken.max());
|
||||
*/
|
||||
}
|
||||
|
||||
export async function predict(image: Tensor, config: Config, idx, count) {
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
import type { Tensor } from '../tfjs/types';
|
||||
import type { FaceResult } from '../result';
|
||||
import * as tf from '../../dist/tfjs.esm.js';
|
||||
import { meshAnnotations } from './facemeshcoords';
|
||||
|
||||
const expandFact = 0.1;
|
||||
const alpha = 0.5;
|
||||
|
||||
// point inclusion in polygon based on https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html
|
||||
function insidePoly(x: number, y: number, polygon: Array<{ x: number, y: number }>): boolean {
|
||||
let inside = false;
|
||||
let j = polygon.length - 1;
|
||||
for (let i = 0; i < polygon.length; j = i++) {
|
||||
if (((polygon[i].y > y) !== (polygon[j].y > y)) && (x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x)) inside = !inside;
|
||||
}
|
||||
return inside;
|
||||
}
|
||||
|
||||
export async function mask(face: FaceResult): Promise<Tensor | undefined> {
|
||||
if (!face.tensor) return face.tensor;
|
||||
const width = face.tensor.shape[2] || 0;
|
||||
const height = face.tensor.shape[1] || 0;
|
||||
const buffer = await face.tensor.buffer();
|
||||
let silhouette: Array<{ x: number, y: number }> = [];
|
||||
for (const pt of meshAnnotations.silhouette) silhouette.push({ x: (face.mesh[pt][0] - face.box[0]) / face.box[2], y: (face.mesh[pt][1] - face.box[1]) / face.box[3] }); // add all silhouette points scaled to local box
|
||||
if (expandFact && expandFact > 0) silhouette = silhouette.map((pt) => ({ x: pt.x > 0.5 ? pt.x + expandFact : pt.x - expandFact, y: pt.y > 0.5 ? pt.y + expandFact : pt.y - expandFact })); // expand silhouette
|
||||
for (let x = 0; x < width; x++) {
|
||||
for (let y = 0; y < height; y++) {
|
||||
const inside = insidePoly(x / width, y / width, silhouette);
|
||||
if (!inside) {
|
||||
buffer.set(alpha * buffer.get(0, y, x, 0), 0, y, x, 0);
|
||||
buffer.set(alpha * buffer.get(0, y, x, 1), 0, y, x, 1);
|
||||
buffer.set(alpha * buffer.get(0, y, x, 2), 0, y, x, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
const output = buffer.toTensor();
|
||||
tf.dispose(buffer);
|
||||
return output;
|
||||
}
|
|
@ -66,9 +66,10 @@ export const face = (res): GestureResult[] => {
|
|||
const gestures: Array<{ face: number, gesture: FaceGesture }> = [];
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].mesh && res[i].mesh.length > 450) {
|
||||
const eyeFacing = res[i].mesh[33][2] - res[i].mesh[263][2];
|
||||
if (Math.abs(eyeFacing) < 10) gestures.push({ face: i, gesture: 'facing center' });
|
||||
else gestures.push({ face: i, gesture: `facing ${eyeFacing < 0 ? 'left' : 'right'}` });
|
||||
const zDiff = res[i].mesh[33][2] - res[i].mesh[263][2];
|
||||
const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0];
|
||||
if (Math.abs(zDiff / xDiff) <= 0.15) gestures.push({ face: i, gesture: 'facing center' });
|
||||
else gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? 'left' : 'right'}` });
|
||||
const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]); // center of eye inner lid y coord div center of wider eye border y coord
|
||||
if (openLeft < 0.2) gestures.push({ face: i, gesture: 'blink left eye' });
|
||||
const openRight = Math.abs(res[i].mesh[145][1] - res[i].mesh[159][1]) / Math.abs(res[i].mesh[223][1] - res[i].mesh[230][1]); // center of eye inner lid y coord div center of wider eye border y coord
|
||||
|
|
|
@ -253,7 +253,7 @@ export class Human {
|
|||
* - `canvas` as canvas which is input image filtered with segementation data and optionally merged with background image. canvas alpha values are set to segmentation values for easy merging
|
||||
* - `alpha` as grayscale canvas that represents segmentation alpha values
|
||||
*/
|
||||
async segmentation(input: Input, background?: Input): Promise<{ data: number[], canvas: HTMLCanvasElement | OffscreenCanvas | null, alpha: HTMLCanvasElement | OffscreenCanvas | null }> {
|
||||
async segmentation(input: Input, background?: Input): Promise<{ data: number[] | Tensor, canvas: HTMLCanvasElement | OffscreenCanvas | null, alpha: HTMLCanvasElement | OffscreenCanvas | null }> {
|
||||
return segmentation.process(input, background, this.config);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ export interface FaceResult {
|
|||
angle: { roll: number, yaw: number, pitch: number },
|
||||
matrix: [number, number, number, number, number, number, number, number, number],
|
||||
gaze: { bearing: number, strength: number },
|
||||
}
|
||||
} | null,
|
||||
/** detected face as tensor that can be used in further pipelines */
|
||||
tensor?: Tensor,
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import * as image from '../image/image';
|
|||
import type { GraphModel, Tensor } from '../tfjs/types';
|
||||
import type { Config } from '../config';
|
||||
import { env } from '../util/env';
|
||||
import type { Input } from '../exports';
|
||||
import type { Input, AnyCanvas } from '../exports';
|
||||
|
||||
let model: GraphModel;
|
||||
let busy = false;
|
||||
|
@ -27,13 +27,13 @@ export async function load(config: Config): Promise<GraphModel> {
|
|||
}
|
||||
|
||||
export async function process(input: Input, background: Input | undefined, config: Config)
|
||||
: Promise<{ data: Array<number>, canvas: HTMLCanvasElement | OffscreenCanvas | null, alpha: HTMLCanvasElement | OffscreenCanvas | null }> {
|
||||
: Promise<{ data: Array<number> | Tensor, canvas: AnyCanvas | null, alpha: AnyCanvas | null }> {
|
||||
if (busy) return { data: [], canvas: null, alpha: null };
|
||||
busy = true;
|
||||
if (!model) await load(config);
|
||||
const inputImage = await image.process(input, config);
|
||||
const width = inputImage.canvas?.width || 0;
|
||||
const height = inputImage.canvas?.height || 0;
|
||||
const width = inputImage.tensor?.shape[2] || 0;
|
||||
const height = inputImage.tensor?.shape[1] || 0;
|
||||
if (!inputImage.tensor) return { data: [], canvas: null, alpha: null };
|
||||
const t: Record<string, Tensor> = {};
|
||||
|
||||
|
@ -94,6 +94,6 @@ export async function process(input: Input, background: Input | undefined, confi
|
|||
|
||||
Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));
|
||||
busy = false;
|
||||
|
||||
return { data, canvas: mergedCanvas || compositeCanvas, alpha: alphaCanvas };
|
||||
// return { data, canvas: mergedCanvas || compositeCanvas, alpha: alphaCanvas };
|
||||
return { data, canvas: compositeCanvas, alpha: alphaCanvas };
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/** TFJS backend initialization and customization */
|
||||
|
||||
import type { Human } from '../human';
|
||||
import { log, now } from '../util/util';
|
||||
import { env } from '../util/env';
|
||||
import * as humangl from './humangl';
|
||||
|
@ -26,7 +27,7 @@ function registerCustomOps() {
|
|||
}
|
||||
}
|
||||
|
||||
export async function check(instance, force = false) {
|
||||
export async function check(instance: Human, force = false) {
|
||||
instance.state = 'backend';
|
||||
if (force || env.initial || (instance.config.backend && (instance.config.backend.length > 0) && (tf.getBackend() !== instance.config.backend))) {
|
||||
const timeStamp = now();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/** TFJS custom backend registration */
|
||||
|
||||
import type { Human } from '../human';
|
||||
import { log } from '../util/util';
|
||||
import * as tf from '../../dist/tfjs.esm.js';
|
||||
import * as image from '../image/image';
|
||||
|
@ -40,7 +41,7 @@ function extensions(): void {
|
|||
*
|
||||
* @returns void
|
||||
*/
|
||||
export async function register(instance): Promise<void> {
|
||||
export async function register(instance: Human): Promise<void> {
|
||||
// force backend reload if gl context is not valid
|
||||
if (instance.config.backend !== 'humangl') return;
|
||||
if ((config.name in tf.engine().registry) && (!config.gl || !config.gl.getParameter(config.gl.VERSION))) {
|
||||
|
|
|
@ -114,6 +114,7 @@ export function calc(newResult: Result, config: Config): Result {
|
|||
.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor)) as Box;
|
||||
const boxRaw = (newResult.face[i].boxRaw // update boxRaw
|
||||
.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor)) as Box;
|
||||
if (newResult.face[i].rotation) {
|
||||
const rotation: {
|
||||
matrix: [number, number, number, number, number, number, number, number, number],
|
||||
angle: { roll: number, yaw: number, pitch: number },
|
||||
|
@ -132,6 +133,8 @@ export function calc(newResult: Result, config: Config): Result {
|
|||
};
|
||||
bufferedResult.face[i] = { ...newResult.face[i], rotation, box, boxRaw }; // shallow clone plus updated values
|
||||
}
|
||||
bufferedResult.face[i] = { ...newResult.face[i], box, boxRaw }; // shallow clone plus updated values
|
||||
}
|
||||
}
|
||||
|
||||
// interpolate object detection results
|
||||
|
|
|
@ -8,9 +8,11 @@ import * as tf from '../dist/tfjs.esm.js';
|
|||
import * as image from './image/image';
|
||||
import type { Config } from './config';
|
||||
import type { Result } from './result';
|
||||
import type { Human } from './human';
|
||||
import type { Tensor } from './tfjs/types';
|
||||
import { env } from './util/env';
|
||||
|
||||
async function warmupBitmap(instance) {
|
||||
async function warmupBitmap(instance: Human) {
|
||||
const b64toBlob = (base64: string, type = 'application/octet-stream') => fetch(`data:${type};base64,${base64}`).then((res) => res.blob());
|
||||
let blob;
|
||||
let res;
|
||||
|
@ -28,7 +30,7 @@ async function warmupBitmap(instance) {
|
|||
return res;
|
||||
}
|
||||
|
||||
async function warmupCanvas(instance) {
|
||||
async function warmupCanvas(instance: Human) {
|
||||
return new Promise((resolve) => {
|
||||
let src;
|
||||
// let size = 0;
|
||||
|
@ -60,7 +62,7 @@ async function warmupCanvas(instance) {
|
|||
if (ctx) ctx.drawImage(img, 0, 0);
|
||||
// const data = ctx?.getImageData(0, 0, canvas.height, canvas.width);
|
||||
const tensor = await instance.image(canvas);
|
||||
const res = await instance.detect(tensor.tensor, instance.config);
|
||||
const res = await instance.detect(tensor.tensor as Tensor, instance.config);
|
||||
resolve(res);
|
||||
}
|
||||
};
|
||||
|
@ -69,7 +71,7 @@ async function warmupCanvas(instance) {
|
|||
});
|
||||
}
|
||||
|
||||
async function warmupNode(instance) {
|
||||
async function warmupNode(instance: Human) {
|
||||
const atob = (str: string) => Buffer.from(str, 'base64');
|
||||
let img;
|
||||
if (instance.config.warmup === 'face') img = atob(sample.face);
|
||||
|
@ -101,7 +103,7 @@ async function warmupNode(instance) {
|
|||
* - only used for `webgl` and `humangl` backends
|
||||
* @param userConfig?: Config
|
||||
*/
|
||||
export async function warmup(instance, userConfig?: Partial<Config>): Promise<Result | { error }> {
|
||||
export async function warmup(instance: Human, userConfig?: Partial<Config>): Promise<Result | { error }> {
|
||||
const t0 = now();
|
||||
instance.state = 'warmup';
|
||||
if (userConfig) instance.config = mergeDeep(instance.config, userConfig) as Config;
|
||||
|
|
468
test/build.log
468
test/build.log
|
@ -1,26 +1,442 @@
|
|||
2021-11-11 16:47:37 [36mINFO: [39m @vladmandic/human version 2.5.1
|
||||
2021-11-11 16:47:37 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v17.0.1
|
||||
2021-11-11 16:47:37 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.5.1"}
|
||||
2021-11-11 16:47:37 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2021-11-11 16:47:37 [36mINFO: [39m Toolchain: {"build":"0.6.3","esbuild":"0.13.13","typescript":"4.4.4","typedoc":"0.22.8","eslint":"8.2.0"}
|
||||
2021-11-11 16:47:37 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2021-11-11 16:47:37 [35mSTATE:[39m Clean: {"locations":["dist/*","types/*","typedoc/*"]}
|
||||
2021-11-11 16:47:37 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-11 16:47:37 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":57,"inputBytes":528202,"outputBytes":445886}
|
||||
2021-11-11 16:47:37 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-11 16:47:38 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":57,"inputBytes":528210,"outputBytes":445890}
|
||||
2021-11-11 16:47:38 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-11 16:47:38 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":57,"inputBytes":528277,"outputBytes":445962}
|
||||
2021-11-11 16:47:38 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
|
||||
2021-11-11 16:47:38 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-11 16:47:38 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":57,"inputBytes":527839,"outputBytes":447984}
|
||||
2021-11-11 16:47:38 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-11 16:47:39 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":57,"inputBytes":3024579,"outputBytes":1614926}
|
||||
2021-11-11 16:47:39 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":57,"inputBytes":3024579,"outputBytes":2951207}
|
||||
2021-11-11 16:48:01 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types","files":50}
|
||||
2021-11-11 16:48:08 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":50,"generated":true}
|
||||
2021-11-11 16:48:08 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5801,"outputBytes":3822}
|
||||
2021-11-11 16:48:08 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":13584,"outputBytes":10354}
|
||||
2021-11-11 16:48:46 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":90,"errors":0,"warnings":0}
|
||||
2021-11-11 16:48:47 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2021-11-11 16:48:47 [36mINFO: [39m Done...
|
||||
2021-11-12 14:30:03 [36mINFO: [39m @vladmandic/human version 2.5.1
|
||||
2021-11-12 14:30:03 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v17.0.1
|
||||
2021-11-12 14:30:03 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.5.1"}
|
||||
2021-11-12 14:30:03 [36mINFO: [39m Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2021-11-12 14:30:03 [36mINFO: [39m Toolchain: {"build":"0.6.3","esbuild":"0.13.13","typescript":"4.4.4","typedoc":"0.22.8","eslint":"8.2.0"}
|
||||
2021-11-12 14:30:03 [36mINFO: [39m Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
|
||||
2021-11-12 14:30:03 [35mSTATE:[39m Clean: {"locations":["dist/*","types/*","typedoc/*"]}
|
||||
2021-11-12 14:30:03 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:30:03 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530476,"outputBytes":448124}
|
||||
2021-11-12 14:30:03 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:30:03 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530484,"outputBytes":448128}
|
||||
2021-11-12 14:30:03 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:30:03 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530551,"outputBytes":448200}
|
||||
2021-11-12 14:30:03 [35mSTATE:[39m 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-12 14:30:03 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:30:03 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530113,"outputBytes":450203}
|
||||
2021-11-12 14:30:04 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:30:04 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026853,"outputBytes":1616094}
|
||||
2021-11-12 14:30:05 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026853,"outputBytes":2953742}
|
||||
2021-11-12 14:30:26 [35mSTATE:[39m Typings: {"input":"src/human.ts","output":"types","files":50}
|
||||
2021-11-12 14:30:33 [35mSTATE:[39m TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":50,"generated":true}
|
||||
2021-11-12 14:30:33 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5801,"outputBytes":3822}
|
||||
2021-11-12 14:30:33 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:31:12 [35mSTATE:[39m Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":91,"errors":0,"warnings":0}
|
||||
2021-11-12 14:31:13 [35mSTATE:[39m ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
|
||||
2021-11-12 14:31:13 [36mINFO: [39m Done...
|
||||
2021-11-12 14:46:41 [36mINFO: [39m @vladmandic/human version 2.5.1
|
||||
2021-11-12 14:46:41 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v17.0.1
|
||||
2021-11-12 14:46:41 [36mINFO: [39m Application: {"name":"@vladmandic/human","version":"2.5.1"}
|
||||
2021-11-12 14:46:41 [36mINFO: [39m Environment: {"profile":"development","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
|
||||
2021-11-12 14:46:41 [36mINFO: [39m Toolchain: {"build":"0.6.3","esbuild":"0.13.13","typescript":"4.4.4","typedoc":"0.22.8","eslint":"8.2.0"}
|
||||
2021-11-12 14:46:41 [36mINFO: [39m Build: {"profile":"development","steps":["serve","watch","compile"]}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m WebServer: {"ssl":false,"port":10030,"root":"."}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m WebServer: {"ssl":true,"port":10031,"root":".","sslKey":"node_modules/@vladmandic/build/cert/https.key","sslCrt":"node_modules/@vladmandic/build/cert/https.crt"}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m Watch: {"locations":["src/**","README.md","src/**/*","tfjs/**/*","demo/**/*.ts"]}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530476,"outputBytes":448124}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530484,"outputBytes":448128}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530551,"outputBytes":448200}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m 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-12 14:46:41 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530113,"outputBytes":450203}
|
||||
2021-11-12 14:46:41 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:46:42 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026853,"outputBytes":1616094}
|
||||
2021-11-12 14:46:42 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026853,"outputBytes":2953742}
|
||||
2021-11-12 14:46:42 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5801,"outputBytes":3822}
|
||||
2021-11-12 14:46:42 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:46:42 [36mINFO: [39m Listening...
|
||||
2021-11-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3822,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953742,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:46:52 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8271,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:46:52 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790781,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m 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-12 14:46:52 [32mDATA: [39m 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-12 14:46:53 [32mDATA: [39m 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-12 14:46:53 [32mDATA: [39m 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-12 14:46:53 [32mDATA: [39m 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-12 14:46:53 [32mDATA: [39m 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-12 14:48:47 [36mINFO: [39m Watch: {"event":"modify","input":"demo/typescript/index.ts"}
|
||||
2021-11-12 14:48:47 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:48:47 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530476,"outputBytes":448124}
|
||||
2021-11-12 14:48:47 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:48:48 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530484,"outputBytes":448128}
|
||||
2021-11-12 14:48:48 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:48:48 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530551,"outputBytes":448200}
|
||||
2021-11-12 14:48:48 [35mSTATE:[39m 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-12 14:48:48 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:48:48 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530113,"outputBytes":450203}
|
||||
2021-11-12 14:48:48 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:48:49 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026853,"outputBytes":1616094}
|
||||
2021-11-12 14:48:49 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026853,"outputBytes":2953742}
|
||||
2021-11-12 14:48:49 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 14:48:49 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:48:52 [32mDATA: [39m 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-12 14:48:52 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:48:52 [32mDATA: [39m 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-12 14:48:52 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953742,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:48:53 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:48:53 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790781,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:48:53 [32mDATA: [39m 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-12 14:51:48 [36mINFO: [39m Watch: {"event":"modify","input":"src/face/facemesh.ts"}
|
||||
2021-11-12 14:51:48 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:51:48 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530466,"outputBytes":448126}
|
||||
2021-11-12 14:51:48 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:51:48 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530474,"outputBytes":448130}
|
||||
2021-11-12 14:51:48 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:51:48 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530541,"outputBytes":448202}
|
||||
2021-11-12 14:51:48 [35mSTATE:[39m 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-12 14:51:48 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:51:48 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530103,"outputBytes":450205}
|
||||
2021-11-12 14:51:49 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:51:49 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026843,"outputBytes":1616094}
|
||||
2021-11-12 14:51:49 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026843,"outputBytes":2953744}
|
||||
2021-11-12 14:51:49 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 14:51:49 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:51:50 [32mDATA: [39m 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-12 14:51:50 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:51:50 [32mDATA: [39m 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-12 14:51:50 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953744,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:51:50 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:51:50 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790771,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:51:50 [32mDATA: [39m 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-12 14:54:07 [36mINFO: [39m Watch: {"event":"modify","input":"src/face/facemesh.ts"}
|
||||
2021-11-12 14:54:07 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:54:07 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530492,"outputBytes":448153}
|
||||
2021-11-12 14:54:07 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:54:08 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530500,"outputBytes":448157}
|
||||
2021-11-12 14:54:08 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:54:08 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530567,"outputBytes":448229}
|
||||
2021-11-12 14:54:08 [35mSTATE:[39m 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-12 14:54:08 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:54:08 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530129,"outputBytes":450232}
|
||||
2021-11-12 14:54:08 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:54:09 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026869,"outputBytes":1616110}
|
||||
2021-11-12 14:54:09 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026869,"outputBytes":2953771}
|
||||
2021-11-12 14:54:09 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 14:54:09 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:54:09 [32mDATA: [39m 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-12 14:54:09 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:54:09 [32mDATA: [39m 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-12 14:54:09 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953771,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:54:09 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:54:09 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790813,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:54:10 [32mDATA: [39m 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-12 14:54:27 [36mINFO: [39m Watch: {"event":"modify","input":"src/face/facemesh.ts"}
|
||||
2021-11-12 14:54:27 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:54:27 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530471,"outputBytes":448120}
|
||||
2021-11-12 14:54:27 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:54:27 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530479,"outputBytes":448124}
|
||||
2021-11-12 14:54:27 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:54:27 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530546,"outputBytes":448196}
|
||||
2021-11-12 14:54:27 [35mSTATE:[39m 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-12 14:54:27 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:54:27 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530108,"outputBytes":450199}
|
||||
2021-11-12 14:54:27 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:54:28 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026848,"outputBytes":1616096}
|
||||
2021-11-12 14:54:28 [32mDATA: [39m 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-12 14:54:28 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:54:28 [32mDATA: [39m 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-12 14:54:28 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953771,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:54:28 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026848,"outputBytes":2953738}
|
||||
2021-11-12 14:54:28 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 14:54:28 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:54:28 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:54:29 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790781,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:54:29 [32mDATA: [39m 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-12 14:57:12 [36mINFO: [39m Watch: {"event":"modify","input":"src/face/face.ts"}
|
||||
2021-11-12 14:57:12 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:57:13 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530494,"outputBytes":448143}
|
||||
2021-11-12 14:57:13 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:57:13 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530502,"outputBytes":448147}
|
||||
2021-11-12 14:57:13 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:57:13 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530569,"outputBytes":448219}
|
||||
2021-11-12 14:57:13 [35mSTATE:[39m 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-12 14:57:13 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:57:13 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530131,"outputBytes":450222}
|
||||
2021-11-12 14:57:13 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:57:14 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026871,"outputBytes":1616111}
|
||||
2021-11-12 14:57:14 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026871,"outputBytes":2953761}
|
||||
2021-11-12 14:57:14 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 14:57:14 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:57:45 [36mINFO: [39m Watch: {"event":"modify","input":"src/result.ts"}
|
||||
2021-11-12 14:57:45 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:57:45 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530502,"outputBytes":448143}
|
||||
2021-11-12 14:57:45 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:57:45 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530510,"outputBytes":448147}
|
||||
2021-11-12 14:57:45 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:57:45 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530577,"outputBytes":448219}
|
||||
2021-11-12 14:57:45 [35mSTATE:[39m 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-12 14:57:45 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:57:45 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530139,"outputBytes":450222}
|
||||
2021-11-12 14:57:46 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:57:46 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026879,"outputBytes":1616111}
|
||||
2021-11-12 14:57:47 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026879,"outputBytes":2953761}
|
||||
2021-11-12 14:57:47 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 14:57:47 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:57:47 [32mDATA: [39m 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-12 14:57:47 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:57:47 [32mDATA: [39m 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-12 14:57:47 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953761,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:57:48 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:57:48 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790824,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:57:48 [32mDATA: [39m 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-12 14:57:56 [32mDATA: [39m 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-12 14:57:56 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:57:56 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953761,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:57:56 [32mDATA: [39m 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-12 14:57:56 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:57:56 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790824,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:57:56 [32mDATA: [39m 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-12 14:58:23 [36mINFO: [39m Watch: {"event":"modify","input":"src/face/face.ts"}
|
||||
2021-11-12 14:58:23 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:58:23 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530534,"outputBytes":448175}
|
||||
2021-11-12 14:58:23 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:58:23 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530542,"outputBytes":448179}
|
||||
2021-11-12 14:58:23 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:58:23 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530609,"outputBytes":448251}
|
||||
2021-11-12 14:58:23 [35mSTATE:[39m 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-12 14:58:23 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:58:23 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530171,"outputBytes":450254}
|
||||
2021-11-12 14:58:24 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:58:24 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026911,"outputBytes":1616134}
|
||||
2021-11-12 14:58:25 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026911,"outputBytes":2953793}
|
||||
2021-11-12 14:58:25 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 14:58:25 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:58:27 [36mINFO: [39m Watch: {"event":"modify","input":"src/face/face.ts"}
|
||||
2021-11-12 14:58:27 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:58:27 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530542,"outputBytes":448183}
|
||||
2021-11-12 14:58:27 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:58:27 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530550,"outputBytes":448187}
|
||||
2021-11-12 14:58:27 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:58:27 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530617,"outputBytes":448259}
|
||||
2021-11-12 14:58:27 [35mSTATE:[39m 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-12 14:58:27 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:58:27 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530179,"outputBytes":450262}
|
||||
2021-11-12 14:58:28 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:58:28 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026919,"outputBytes":1616141}
|
||||
2021-11-12 14:58:28 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026919,"outputBytes":2953801}
|
||||
2021-11-12 14:58:28 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 14:58:28 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:58:29 [32mDATA: [39m 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-12 14:58:29 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:58:29 [32mDATA: [39m 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-12 14:58:29 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953801,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:58:30 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:58:30 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790896,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:58:30 [32mDATA: [39m 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-12 14:58:55 [36mINFO: [39m Watch: {"event":"modify","input":"src/face/face.ts"}
|
||||
2021-11-12 14:58:55 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:58:55 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530532,"outputBytes":448173}
|
||||
2021-11-12 14:58:55 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:58:55 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530540,"outputBytes":448177}
|
||||
2021-11-12 14:58:55 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:58:55 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530607,"outputBytes":448249}
|
||||
2021-11-12 14:58:55 [35mSTATE:[39m 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-12 14:58:55 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:58:55 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530169,"outputBytes":450252}
|
||||
2021-11-12 14:58:55 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:58:56 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026909,"outputBytes":1616133}
|
||||
2021-11-12 14:58:56 [32mDATA: [39m 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-12 14:58:56 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:58:56 [32mDATA: [39m 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-12 14:58:56 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953801,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:58:56 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:58:56 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790896,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:58:56 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026909,"outputBytes":2953791}
|
||||
2021-11-12 14:58:56 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 14:58:56 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:58:56 [32mDATA: [39m 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-12 14:59:06 [32mDATA: [39m 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-12 14:59:06 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:59:06 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953791,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:59:06 [32mDATA: [39m 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-12 14:59:06 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:59:06 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790879,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:59:06 [32mDATA: [39m 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-12 14:59:29 [36mINFO: [39m Watch: {"event":"modify","input":"src/face/face.ts"}
|
||||
2021-11-12 14:59:29 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:59:29 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530532,"outputBytes":448173}
|
||||
2021-11-12 14:59:29 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:59:29 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530540,"outputBytes":448177}
|
||||
2021-11-12 14:59:29 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:59:29 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530607,"outputBytes":448249}
|
||||
2021-11-12 14:59:29 [35mSTATE:[39m 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-12 14:59:29 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:59:29 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530169,"outputBytes":450252}
|
||||
2021-11-12 14:59:29 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:59:30 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026909,"outputBytes":1616133}
|
||||
2021-11-12 14:59:30 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026909,"outputBytes":2953791}
|
||||
2021-11-12 14:59:30 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 14:59:30 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:59:33 [36mINFO: [39m Watch: {"event":"modify","input":"src/face/face.ts"}
|
||||
2021-11-12 14:59:33 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 14:59:33 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530534,"outputBytes":448173}
|
||||
2021-11-12 14:59:33 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 14:59:33 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530542,"outputBytes":448177}
|
||||
2021-11-12 14:59:33 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 14:59:34 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530609,"outputBytes":448249}
|
||||
2021-11-12 14:59:34 [35mSTATE:[39m 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-12 14:59:34 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 14:59:34 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530171,"outputBytes":450252}
|
||||
2021-11-12 14:59:34 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 14:59:34 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026911,"outputBytes":1616133}
|
||||
2021-11-12 14:59:35 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026911,"outputBytes":2953791}
|
||||
2021-11-12 14:59:35 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 14:59:35 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 14:59:36 [32mDATA: [39m 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-12 14:59:36 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:59:36 [32mDATA: [39m 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-12 14:59:36 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953791,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:59:36 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:59:36 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790881,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 14:59:36 [32mDATA: [39m 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-12 15:02:08 [36mINFO: [39m Watch: {"event":"modify","input":"src/util/draw.ts"}
|
||||
2021-11-12 15:02:08 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 15:02:08 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530585,"outputBytes":448256}
|
||||
2021-11-12 15:02:08 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 15:02:08 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530593,"outputBytes":448260}
|
||||
2021-11-12 15:02:08 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 15:02:08 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530660,"outputBytes":448332}
|
||||
2021-11-12 15:02:08 [35mSTATE:[39m 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-12 15:02:08 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 15:02:08 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530222,"outputBytes":450335}
|
||||
2021-11-12 15:02:09 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 15:02:09 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3026962,"outputBytes":1616192}
|
||||
2021-11-12 15:02:10 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3026962,"outputBytes":2953874}
|
||||
2021-11-12 15:02:10 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 15:02:10 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 15:02:11 [32mDATA: [39m 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-12 15:02:11 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:02:11 [32mDATA: [39m 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-12 15:02:11 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2953874,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:02:12 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:02:12 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4790971,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:02:12 [32mDATA: [39m 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-12 15:04:19 [36mINFO: [39m Watch: {"event":"modify","input":"src/util/interpolate.ts"}
|
||||
2021-11-12 15:04:19 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 15:04:19 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530774,"outputBytes":448404}
|
||||
2021-11-12 15:04:19 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 15:04:19 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530782,"outputBytes":448408}
|
||||
2021-11-12 15:04:19 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 15:04:19 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530849,"outputBytes":448480}
|
||||
2021-11-12 15:04:19 [35mSTATE:[39m 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-12 15:04:19 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 15:04:19 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530411,"outputBytes":450483}
|
||||
2021-11-12 15:04:20 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 15:04:20 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3027151,"outputBytes":1616256}
|
||||
2021-11-12 15:04:21 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3027151,"outputBytes":2954022}
|
||||
2021-11-12 15:04:21 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":6537,"outputBytes":4437}
|
||||
2021-11-12 15:04:21 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 15:04:30 [32mDATA: [39m 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-12 15:04:30 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":4437,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:04:30 [32mDATA: [39m 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-12 15:04:30 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2954022,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:04:30 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":9507,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:04:30 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4791249,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:04:30 [32mDATA: [39m 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-12 15:05:01 [36mINFO: [39m Watch: {"event":"modify","input":"demo/typescript/index.ts"}
|
||||
2021-11-12 15:05:01 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 15:05:01 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530774,"outputBytes":448404}
|
||||
2021-11-12 15:05:01 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 15:05:01 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530782,"outputBytes":448408}
|
||||
2021-11-12 15:05:01 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 15:05:01 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530849,"outputBytes":448480}
|
||||
2021-11-12 15:05:01 [35mSTATE:[39m 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-12 15:05:01 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 15:05:01 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530411,"outputBytes":450483}
|
||||
2021-11-12 15:05:02 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 15:05:03 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3027151,"outputBytes":1616256}
|
||||
2021-11-12 15:05:03 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3027151,"outputBytes":2954022}
|
||||
2021-11-12 15:05:03 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5801,"outputBytes":3822}
|
||||
2021-11-12 15:05:03 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3822,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2954022,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:05:18 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8271,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:05:18 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4791249,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:05:18 [32mDATA: [39m 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-12 15:06:22 [36mINFO: [39m Watch: {"event":"modify","input":"src/face/facemesh.ts"}
|
||||
2021-11-12 15:06:22 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 15:06:22 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530814,"outputBytes":448480}
|
||||
2021-11-12 15:06:22 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 15:06:22 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530822,"outputBytes":448484}
|
||||
2021-11-12 15:06:22 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 15:06:22 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530889,"outputBytes":448556}
|
||||
2021-11-12 15:06:22 [35mSTATE:[39m Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
|
||||
2021-11-12 15:06:22 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 15:06:22 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530451,"outputBytes":450559}
|
||||
2021-11-12 15:06:23 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 15:06:23 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3027191,"outputBytes":1616314}
|
||||
2021-11-12 15:06:24 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3027191,"outputBytes":2954098}
|
||||
2021-11-12 15:06:24 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5801,"outputBytes":3822}
|
||||
2021-11-12 15:06:24 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
2021-11-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":3822,"url":"/demo/typescript/index.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"text/javascript","size":2954098,"url":"/dist/human.esm.js","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:06:29 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":8271,"url":"/demo/typescript/index.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:06:29 [32mDATA: [39m HTTP: {"method":"GET","ver":"1.1","status":200,"mime":"application/octet-stream","size":4791321,"url":"/dist/human.esm.js.map","remote":"::ffff:192.168.0.200"}
|
||||
2021-11-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:29 [32mDATA: [39m 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-12 15:06:51 [36mINFO: [39m Watch: {"event":"modify","input":"src/util/draw.ts"}
|
||||
2021-11-12 15:06:51 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
|
||||
2021-11-12 15:06:51 [35mSTATE:[39m Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":58,"inputBytes":530763,"outputBytes":448397}
|
||||
2021-11-12 15:06:51 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
|
||||
2021-11-12 15:06:52 [35mSTATE:[39m Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":58,"inputBytes":530771,"outputBytes":448401}
|
||||
2021-11-12 15:06:52 [35mSTATE:[39m Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
|
||||
2021-11-12 15:06:52 [35mSTATE:[39m Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":58,"inputBytes":530838,"outputBytes":448473}
|
||||
2021-11-12 15:06:52 [35mSTATE:[39m 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-12 15:06:52 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
|
||||
2021-11-12 15:06:52 [35mSTATE:[39m Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":58,"inputBytes":530400,"outputBytes":450476}
|
||||
2021-11-12 15:06:52 [35mSTATE:[39m Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2562703,"outputBytes":2497652}
|
||||
2021-11-12 15:06:53 [35mSTATE:[39m Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":58,"inputBytes":3027140,"outputBytes":1616255}
|
||||
2021-11-12 15:06:53 [35mSTATE:[39m Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":58,"inputBytes":3027140,"outputBytes":2954015}
|
||||
2021-11-12 15:06:53 [35mSTATE:[39m Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5801,"outputBytes":3822}
|
||||
2021-11-12 15:06:53 [35mSTATE:[39m Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":14654,"outputBytes":11518}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -139,13 +139,13 @@ Interpolation is based on time since last known result so can be called independ
|
|||
</ul>
|
||||
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <a href="../index.html#Input" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> userConfig: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/Config.html" class="tsd-signature-type" data-tsd-kind="Interface">Config</a><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="reset" class="tsd-anchor"></a><h3>reset</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">reset<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/human.ts#L212">src/human.ts:212</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Reset configuration to default values</p>
|
||||
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="segmentation" class="tsd-anchor"></a><h3>segmentation</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">segmentation<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><a href="../index.html#Input" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a>, background<span class="tsd-signature-symbol">?: </span><a href="../index.html#Input" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>alpha<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">OffscreenCanvas</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol">; </span>canvas<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">OffscreenCanvas</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol">; </span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/human.ts#L256">src/human.ts:256</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="segmentation" class="tsd-anchor"></a><h3>segmentation</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">segmentation<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><a href="../index.html#Input" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a>, background<span class="tsd-signature-symbol">?: </span><a href="../index.html#Input" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>alpha<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">OffscreenCanvas</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol">; </span>canvas<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">OffscreenCanvas</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol">; </span>data<span class="tsd-signature-symbol">: </span><a href="Tensor.html" class="tsd-signature-type" data-tsd-kind="Class">Tensor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Rank</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/human.ts#L256">src/human.ts:256</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Segmentation method takes any input and returns processed canvas with body segmentation</p>
|
||||
<ul>
|
||||
<li>Segmentation is not triggered as part of detect process</li>
|
||||
</ul>
|
||||
</div><div><p> Returns:</p>
|
||||
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <a href="../index.html#Input" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> background: <a href="../index.html#Input" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>alpha<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">OffscreenCanvas</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol">; </span>canvas<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">OffscreenCanvas</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol">; </span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></h4><div><ul>
|
||||
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <a href="../index.html#Input" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> background: <a href="../index.html#Input" class="tsd-signature-type" data-tsd-kind="Type alias">Input</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>alpha<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">OffscreenCanvas</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol">; </span>canvas<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">OffscreenCanvas</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol">; </span>data<span class="tsd-signature-symbol">: </span><a href="Tensor.html" class="tsd-signature-type" data-tsd-kind="Class">Tensor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Rank</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></h4><div><ul>
|
||||
<li><code>data</code> as raw data array with per-pixel segmentation values</li>
|
||||
<li><code>canvas</code> as canvas which is input image filtered with segementation data and optionally merged with background image. canvas alpha values are set to segmentation values for easy merging</li>
|
||||
<li><code>alpha</code> as grayscale canvas that represents segmentation alpha values</li>
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
</ul>
|
||||
</div><dl class="tsd-comment-tags"><dt>external</dt><dd><p><a href="https://js.tensorflow.org/api/latest/">API</a></p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="TensorLike" class="tsd-anchor"></a><h3>Tensor<wbr/>Like</h3><div class="tsd-signature tsd-kind-icon">Tensor<wbr/>Like<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">TypedArray</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">RecursiveArray</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">TypedArray</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">RecursiveArray</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">RecursiveArray</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.11.0/node_modules/@tensorflow/tfjs-core/dist/types.d.ts:78</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>docalias</dt><dd><p>TypedArray|Array</p>
|
||||
</dd></dl></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Variables</h2><section class="tsd-panel tsd-member tsd-kind-variable"><a id="defaults" class="tsd-anchor"></a><h3>defaults</h3><div class="tsd-signature tsd-kind-icon">defaults<span class="tsd-signature-symbol">:</span> <a href="interfaces/Config.html" class="tsd-signature-type" data-tsd-kind="Interface">Config</a><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L273">src/config.ts:273</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</dd></dl></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Variables</h2><section class="tsd-panel tsd-member tsd-kind-variable"><a id="defaults" class="tsd-anchor"></a><h3>defaults</h3><div class="tsd-signature tsd-kind-icon">defaults<span class="tsd-signature-symbol">:</span> <a href="interfaces/Config.html" class="tsd-signature-type" data-tsd-kind="Interface">Config</a><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L281">src/config.ts:281</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<ul>
|
||||
<li><a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L262">See all default Config values...</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BodyConfig | @vladmandic/human - v2.5.1</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.1</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.1</a></li><li><a href="BodyConfig.html">BodyConfig</a></li></ul><h1>Interface BodyConfig</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Configures all body detection specific options</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="GenericConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GenericConfig</a><ul class="tsd-hierarchy"><li><span class="target">BodyConfig</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyConfig.html#detector" class="tsd-kind-icon">detector</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="BodyConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyConfig.html#maxDetected" class="tsd-kind-icon">max<wbr/>Detected</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="BodyConfig.html#modelPath-1" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="BodyConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="BodyConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="detector" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> detector</h3><div class="tsd-signature tsd-kind-icon">detector<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{ </span>modelPath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L73">src/config.ts:73</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>model<wbr/>Path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to optional body detector model json file</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="GenericConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GenericConfig</a><ul class="tsd-hierarchy"><li><span class="target">BodyConfig</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyConfig.html#detector" class="tsd-kind-icon">detector</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="BodyConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyConfig.html#maxDetected" class="tsd-kind-icon">max<wbr/>Detected</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="BodyConfig.html#modelPath-1" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="BodyConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="BodyConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="detector" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> detector</h3><div class="tsd-signature tsd-kind-icon">detector<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{ </span>modelPath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L81">src/config.ts:81</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>model<wbr/>Path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to optional body detector model json file</p>
|
||||
</dd></dl></div></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#enabled">enabled</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L7">src/config.ts:7</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>is module enabled?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="maxDetected" class="tsd-anchor"></a><h3>max<wbr/>Detected</h3><div class="tsd-signature tsd-kind-icon">max<wbr/>Detected<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L70">src/config.ts:70</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>maximum numboer of detected bodies</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="minConfidence" class="tsd-anchor"></a><h3>min<wbr/>Confidence</h3><div class="tsd-signature tsd-kind-icon">min<wbr/>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L72">src/config.ts:72</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum confidence for a detected body before results are discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="maxDetected" class="tsd-anchor"></a><h3>max<wbr/>Detected</h3><div class="tsd-signature tsd-kind-icon">max<wbr/>Detected<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L78">src/config.ts:78</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>maximum numboer of detected bodies</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="minConfidence" class="tsd-anchor"></a><h3>min<wbr/>Confidence</h3><div class="tsd-signature tsd-kind-icon">min<wbr/>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L80">src/config.ts:80</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum confidence for a detected body before results are discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="modelPath-1" class="tsd-anchor"></a><h3>model<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">model<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#modelPath">modelPath</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L9">src/config.ts:9</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to model json file</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipFrames" class="tsd-anchor"></a><h3>skip<wbr/>Frames</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Frames<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipFrames">skipFrames</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L11">src/config.ts:11</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max frames to go without re-running model if cached results are acceptable</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipTime" class="tsd-anchor"></a><h3>skip<wbr/>Time</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipTime">skipTime</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L13">src/config.ts:13</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max miliseconds to go without re-running model if cached results are acceptable</p>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Config | @vladmandic/human - v2.5.1</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.1</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.1</a></li><li><a href="Config.html">Config</a></li></ul><h1>Interface Config</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Configuration interface definition for <strong>Human</strong> library</p>
|
||||
</div><div><p>Contains all configurable parameters</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Config</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#async" class="tsd-kind-icon">async</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#backend" class="tsd-kind-icon">backend</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#cacheSensitivity" class="tsd-kind-icon">cache<wbr/>Sensitivity</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#deallocate" class="tsd-kind-icon">deallocate</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#debug" class="tsd-kind-icon">debug</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#face" class="tsd-kind-icon">face</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#filter" class="tsd-kind-icon">filter</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#gesture" class="tsd-kind-icon">gesture</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#hand" class="tsd-kind-icon">hand</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#modelBasePath" class="tsd-kind-icon">model<wbr/>Base<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#object" class="tsd-kind-icon">object</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#segmentation" class="tsd-kind-icon">segmentation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#skipAllowed" class="tsd-kind-icon">skip<wbr/>Allowed</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#warmup" class="tsd-kind-icon">warmup</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#wasmPath" class="tsd-kind-icon">wasm<wbr/>Path</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="async" class="tsd-anchor"></a><h3>async</h3><div class="tsd-signature tsd-kind-icon">async<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L218">src/config.ts:218</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Config</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#async" class="tsd-kind-icon">async</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#backend" class="tsd-kind-icon">backend</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#cacheSensitivity" class="tsd-kind-icon">cache<wbr/>Sensitivity</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#deallocate" class="tsd-kind-icon">deallocate</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#debug" class="tsd-kind-icon">debug</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#face" class="tsd-kind-icon">face</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#filter" class="tsd-kind-icon">filter</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#gesture" class="tsd-kind-icon">gesture</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#hand" class="tsd-kind-icon">hand</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#modelBasePath" class="tsd-kind-icon">model<wbr/>Base<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#object" class="tsd-kind-icon">object</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#segmentation" class="tsd-kind-icon">segmentation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#skipAllowed" class="tsd-kind-icon">skip<wbr/>Allowed</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#warmup" class="tsd-kind-icon">warmup</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#wasmPath" class="tsd-kind-icon">wasm<wbr/>Path</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="async" class="tsd-anchor"></a><h3>async</h3><div class="tsd-signature tsd-kind-icon">async<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L226">src/config.ts:226</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Perform model loading and inference concurrently or sequentially</p>
|
||||
</div><div><p>default: <code>true</code></p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="backend" class="tsd-anchor"></a><h3>backend</h3><div class="tsd-signature tsd-kind-icon">backend<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">""</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"cpu"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"wasm"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"webgl"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"humangl"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"tensorflow"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"webgpu"</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L200">src/config.ts:200</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="backend" class="tsd-anchor"></a><h3>backend</h3><div class="tsd-signature tsd-kind-icon">backend<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">""</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"cpu"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"wasm"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"webgl"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"humangl"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"tensorflow"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"webgpu"</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L208">src/config.ts:208</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Backend used for TFJS operations
|
||||
valid build-in backends are:</p>
|
||||
<ul>
|
||||
|
@ -12,48 +12,48 @@ valid build-in backends are:</p>
|
|||
<li>NodeJS: <code>cpu</code>, <code>wasm</code>, <code>tensorflow</code>
|
||||
default: <code>humangl</code> for browser and <code>tensorflow</code> for nodejs</li>
|
||||
</ul>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="body" class="tsd-anchor"></a><h3>body</h3><div class="tsd-signature tsd-kind-icon">body<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="BodyConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">BodyConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L260">src/config.ts:260</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="body" class="tsd-anchor"></a><h3>body</h3><div class="tsd-signature tsd-kind-icon">body<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="BodyConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">BodyConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L268">src/config.ts:268</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p><a href="BodyConfig.html">BodyConfig</a></p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="cacheSensitivity" class="tsd-anchor"></a><h3>cache<wbr/>Sensitivity</h3><div class="tsd-signature tsd-kind-icon">cache<wbr/>Sensitivity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L242">src/config.ts:242</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="cacheSensitivity" class="tsd-anchor"></a><h3>cache<wbr/>Sensitivity</h3><div class="tsd-signature tsd-kind-icon">cache<wbr/>Sensitivity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L250">src/config.ts:250</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Cache sensitivity</p>
|
||||
<ul>
|
||||
<li>values 0..1 where 0.01 means reset cache if input changed more than 1%</li>
|
||||
<li>set to 0 to disable caching</li>
|
||||
</ul>
|
||||
</div><div><p>default: 0.7</p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="deallocate" class="tsd-anchor"></a><h3>deallocate</h3><div class="tsd-signature tsd-kind-icon">deallocate<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L245">src/config.ts:245</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="deallocate" class="tsd-anchor"></a><h3>deallocate</h3><div class="tsd-signature tsd-kind-icon">deallocate<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L253">src/config.ts:253</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Perform immediate garbage collection on deallocated tensors instead of caching them</p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="debug" class="tsd-anchor"></a><h3>debug</h3><div class="tsd-signature tsd-kind-icon">debug<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L212">src/config.ts:212</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="debug" class="tsd-anchor"></a><h3>debug</h3><div class="tsd-signature tsd-kind-icon">debug<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L220">src/config.ts:220</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Print debug statements to console</p>
|
||||
</div><div><p>default: <code>true</code></p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="face" class="tsd-anchor"></a><h3>face</h3><div class="tsd-signature tsd-kind-icon">face<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="FaceConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">FaceConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L257">src/config.ts:257</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="face" class="tsd-anchor"></a><h3>face</h3><div class="tsd-signature tsd-kind-icon">face<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="FaceConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">FaceConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L265">src/config.ts:265</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p><a href="FaceConfig.html">FaceConfig</a></p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="filter" class="tsd-anchor"></a><h3>filter</h3><div class="tsd-signature tsd-kind-icon">filter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="FilterConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">FilterConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L251">src/config.ts:251</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="filter" class="tsd-anchor"></a><h3>filter</h3><div class="tsd-signature tsd-kind-icon">filter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="FilterConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">FilterConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L259">src/config.ts:259</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p><a href="FilterConfig.html">FilterConfig</a></p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gesture" class="tsd-anchor"></a><h3>gesture</h3><div class="tsd-signature tsd-kind-icon">gesture<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="GestureConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GestureConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L254">src/config.ts:254</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gesture" class="tsd-anchor"></a><h3>gesture</h3><div class="tsd-signature tsd-kind-icon">gesture<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="GestureConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GestureConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L262">src/config.ts:262</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p><a href="GestureConfig.html">GestureConfig</a></p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="hand" class="tsd-anchor"></a><h3>hand</h3><div class="tsd-signature tsd-kind-icon">hand<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="HandConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">HandConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L263">src/config.ts:263</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="hand" class="tsd-anchor"></a><h3>hand</h3><div class="tsd-signature tsd-kind-icon">hand<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="HandConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">HandConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L271">src/config.ts:271</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p><a href="HandConfig.html">HandConfig</a></p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="modelBasePath" class="tsd-anchor"></a><h3>model<wbr/>Base<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">model<wbr/>Base<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L234">src/config.ts:234</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="modelBasePath" class="tsd-anchor"></a><h3>model<wbr/>Base<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">model<wbr/>Base<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L242">src/config.ts:242</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Base model path (typically starting with file://, http:// or https://) for all models</p>
|
||||
<ul>
|
||||
<li>individual modelPath values are relative to this path</li>
|
||||
</ul>
|
||||
</div><div><p>default: <code>../models/</code> for browsers and <code>file://models/</code> for nodejs</p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="object" class="tsd-anchor"></a><h3>object</h3><div class="tsd-signature tsd-kind-icon">object<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="ObjectConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L266">src/config.ts:266</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="object" class="tsd-anchor"></a><h3>object</h3><div class="tsd-signature tsd-kind-icon">object<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="ObjectConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L274">src/config.ts:274</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p><a href="ObjectConfig.html">ObjectConfig</a></p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="segmentation" class="tsd-anchor"></a><h3>segmentation</h3><div class="tsd-signature tsd-kind-icon">segmentation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="SegmentationConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">SegmentationConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L269">src/config.ts:269</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="segmentation" class="tsd-anchor"></a><h3>segmentation</h3><div class="tsd-signature tsd-kind-icon">segmentation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="SegmentationConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">SegmentationConfig</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L277">src/config.ts:277</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p><a href="SegmentationConfig.html">SegmentationConfig</a></p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="skipAllowed" class="tsd-anchor"></a><h3>skip<wbr/>Allowed</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Allowed<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L248">src/config.ts:248</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="skipAllowed" class="tsd-anchor"></a><h3>skip<wbr/>Allowed</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Allowed<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L256">src/config.ts:256</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Internal Variable</p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="warmup" class="tsd-anchor"></a><h3>warmup</h3><div class="tsd-signature tsd-kind-icon">warmup<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"face"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"body"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"none"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"full"</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L226">src/config.ts:226</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="warmup" class="tsd-anchor"></a><h3>warmup</h3><div class="tsd-signature tsd-kind-icon">warmup<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"face"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"body"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"none"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"full"</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L234">src/config.ts:234</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>What to use for <code>human.warmup()</code></p>
|
||||
<ul>
|
||||
<li>warmup pre-initializes all models for faster inference but can take significant time on startup</li>
|
||||
<li>used by <code>webgl</code>, <code>humangl</code> and <code>webgpu</code> backends</li>
|
||||
</ul>
|
||||
</div><div><p>default: <code>full</code></p>
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="wasmPath" class="tsd-anchor"></a><h3>wasm<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">wasm<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L206">src/config.ts:206</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="wasmPath" class="tsd-anchor"></a><h3>wasm<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">wasm<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L214">src/config.ts:214</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Path to *.wasm files if backend is set to <code>wasm</code></p>
|
||||
</div><div><p>default: auto-detects to link to CDN <code>jsdelivr</code> when running in browser</p>
|
||||
</div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="Config.html" class="tsd-kind-icon">Config</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#async" class="tsd-kind-icon">async</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#backend" class="tsd-kind-icon">backend</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#cacheSensitivity" class="tsd-kind-icon">cache<wbr/>Sensitivity</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#deallocate" class="tsd-kind-icon">deallocate</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#debug" class="tsd-kind-icon">debug</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#face" class="tsd-kind-icon">face</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#filter" class="tsd-kind-icon">filter</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#gesture" class="tsd-kind-icon">gesture</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#hand" class="tsd-kind-icon">hand</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#modelBasePath" class="tsd-kind-icon">model<wbr/>Base<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#object" class="tsd-kind-icon">object</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#segmentation" class="tsd-kind-icon">segmentation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#skipAllowed" class="tsd-kind-icon">skip<wbr/>Allowed</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#warmup" class="tsd-kind-icon">warmup</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Config.html#wasmPath" class="tsd-kind-icon">wasm<wbr/>Path</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
<li>also used by age and gender detection</li>
|
||||
</ul>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="GenericConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GenericConfig</a><ul class="tsd-hierarchy"><li><span class="target">FaceDescriptionConfig</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDescriptionConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDescriptionConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDescriptionConfig.html#modelPath" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDescriptionConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDescriptionConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#enabled">enabled</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L7">src/config.ts:7</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>is module enabled?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="minConfidence" class="tsd-anchor"></a><h3>min<wbr/>Confidence</h3><div class="tsd-signature tsd-kind-icon">min<wbr/>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L41">src/config.ts:41</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum confidence for a detected face before results are discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="minConfidence" class="tsd-anchor"></a><h3>min<wbr/>Confidence</h3><div class="tsd-signature tsd-kind-icon">min<wbr/>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L49">src/config.ts:49</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum confidence for a detected face before results are discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="modelPath" class="tsd-anchor"></a><h3>model<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">model<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#modelPath">modelPath</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L9">src/config.ts:9</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to model json file</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipFrames" class="tsd-anchor"></a><h3>skip<wbr/>Frames</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Frames<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipFrames">skipFrames</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L11">src/config.ts:11</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max frames to go without re-running model if cached results are acceptable</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipTime" class="tsd-anchor"></a><h3>skip<wbr/>Time</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipTime">skipTime</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L13">src/config.ts:13</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max miliseconds to go without re-running model if cached results are acceptable</p>
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>FaceDetectorConfig | @vladmandic/human - v2.5.1</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.1</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.1</a></li><li><a href="FaceDetectorConfig.html">FaceDetectorConfig</a></li></ul><h1>Interface FaceDetectorConfig</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Dectector part of face configuration</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="GenericConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GenericConfig</a><ul class="tsd-hierarchy"><li><span class="target">FaceDetectorConfig</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#iouThreshold" class="tsd-kind-icon">iou<wbr/>Threshold</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#maxDetected" class="tsd-kind-icon">max<wbr/>Detected</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#modelPath" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#return" class="tsd-kind-icon">return</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#rotation" class="tsd-kind-icon">rotation</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#enabled">enabled</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L7">src/config.ts:7</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>is module enabled?</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="GenericConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GenericConfig</a><ul class="tsd-hierarchy"><li><span class="target">FaceDetectorConfig</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#cropFactor" class="tsd-kind-icon">crop<wbr/>Factor</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#iouThreshold" class="tsd-kind-icon">iou<wbr/>Threshold</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#mask" class="tsd-kind-icon">mask</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#maxDetected" class="tsd-kind-icon">max<wbr/>Detected</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#modelPath" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#return" class="tsd-kind-icon">return</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#rotation" class="tsd-kind-icon">rotation</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="cropFactor" class="tsd-anchor"></a><h3>crop<wbr/>Factor</h3><div class="tsd-signature tsd-kind-icon">crop<wbr/>Factor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L31">src/config.ts:31</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>factor used to expand detected face before further analysis</p>
|
||||
<ul>
|
||||
<li>default: 1.6</li>
|
||||
<li>for high-quality inputs can be reduced to increase precision</li>
|
||||
<li>for video inputs or low-quality inputs can be increased to allow for more flexible tracking</li>
|
||||
</ul>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#enabled">enabled</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L7">src/config.ts:7</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>is module enabled?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="iouThreshold" class="tsd-anchor"></a><h3>iou<wbr/>Threshold</h3><div class="tsd-signature tsd-kind-icon">iou<wbr/>Threshold<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L25">src/config.ts:25</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum overlap between two detected faces before one is discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="mask" class="tsd-anchor"></a><h3>mask</h3><div class="tsd-signature tsd-kind-icon">mask<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L33">src/config.ts:33</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>should child models perform on masked image of a face</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="maxDetected" class="tsd-anchor"></a><h3>max<wbr/>Detected</h3><div class="tsd-signature tsd-kind-icon">max<wbr/>Detected<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L21">src/config.ts:21</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>maximum number of detected faces</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="minConfidence" class="tsd-anchor"></a><h3>min<wbr/>Confidence</h3><div class="tsd-signature tsd-kind-icon">min<wbr/>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L23">src/config.ts:23</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum confidence for a detected face before results are discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="modelPath" class="tsd-anchor"></a><h3>model<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">model<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#modelPath">modelPath</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L9">src/config.ts:9</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to model json file</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="return" class="tsd-anchor"></a><h3>return</h3><div class="tsd-signature tsd-kind-icon">return<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L27">src/config.ts:27</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>should face detection return face tensor to be used in some other extenrnal model?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="return" class="tsd-anchor"></a><h3>return</h3><div class="tsd-signature tsd-kind-icon">return<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L35">src/config.ts:35</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>should face detection return face tensor to be used in some other extenrnal model?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="rotation" class="tsd-anchor"></a><h3>rotation</h3><div class="tsd-signature tsd-kind-icon">rotation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L19">src/config.ts:19</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>is face rotation correction performed after detecting face?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipFrames" class="tsd-anchor"></a><h3>skip<wbr/>Frames</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Frames<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipFrames">skipFrames</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L11">src/config.ts:11</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max frames to go without re-running model if cached results are acceptable</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipTime" class="tsd-anchor"></a><h3>skip<wbr/>Time</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipTime">skipTime</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L13">src/config.ts:13</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max miliseconds to go without re-running model if cached results are acceptable</p>
|
||||
</dd></dl></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="FaceDetectorConfig.html" class="tsd-kind-icon">Face<wbr/>Detector<wbr/>Config</a><ul><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#iouThreshold" class="tsd-kind-icon">iou<wbr/>Threshold</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#maxDetected" class="tsd-kind-icon">max<wbr/>Detected</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#modelPath" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#return" class="tsd-kind-icon">return</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#rotation" class="tsd-kind-icon">rotation</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
||||
</dd></dl></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="FaceDetectorConfig.html" class="tsd-kind-icon">Face<wbr/>Detector<wbr/>Config</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#cropFactor" class="tsd-kind-icon">crop<wbr/>Factor</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#iouThreshold" class="tsd-kind-icon">iou<wbr/>Threshold</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#mask" class="tsd-kind-icon">mask</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#maxDetected" class="tsd-kind-icon">max<wbr/>Detected</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#modelPath" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#return" class="tsd-kind-icon">return</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceDetectorConfig.html#rotation" class="tsd-kind-icon">rotation</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceDetectorConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>FaceEmotionConfig | @vladmandic/human - v2.5.1</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.1</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.1</a></li><li><a href="FaceEmotionConfig.html">FaceEmotionConfig</a></li></ul><h1>Interface FaceEmotionConfig</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Emotion part of face configuration</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="GenericConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GenericConfig</a><ul class="tsd-hierarchy"><li><span class="target">FaceEmotionConfig</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceEmotionConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceEmotionConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceEmotionConfig.html#modelPath" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceEmotionConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="FaceEmotionConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#enabled">enabled</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L7">src/config.ts:7</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>is module enabled?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="minConfidence" class="tsd-anchor"></a><h3>min<wbr/>Confidence</h3><div class="tsd-signature tsd-kind-icon">min<wbr/>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L47">src/config.ts:47</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum confidence for a detected face before results are discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="minConfidence" class="tsd-anchor"></a><h3>min<wbr/>Confidence</h3><div class="tsd-signature tsd-kind-icon">min<wbr/>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L55">src/config.ts:55</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum confidence for a detected face before results are discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="modelPath" class="tsd-anchor"></a><h3>model<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">model<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#modelPath">modelPath</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L9">src/config.ts:9</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to model json file</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipFrames" class="tsd-anchor"></a><h3>skip<wbr/>Frames</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Frames<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipFrames">skipFrames</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L11">src/config.ts:11</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max frames to go without re-running model if cached results are acceptable</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipTime" class="tsd-anchor"></a><h3>skip<wbr/>Time</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipTime">skipTime</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L13">src/config.ts:13</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max miliseconds to go without re-running model if cached results are acceptable</p>
|
||||
|
|
|
@ -4,34 +4,34 @@
|
|||
<li>available only in Browser environments</li>
|
||||
<li>image filters run with near-zero latency as they are executed on the GPU using WebGL</li>
|
||||
</ul>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">FilterConfig</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#blur" class="tsd-kind-icon">blur</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#brightness" class="tsd-kind-icon">brightness</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#contrast" class="tsd-kind-icon">contrast</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#equalization" class="tsd-kind-icon">equalization</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#flip" class="tsd-kind-icon">flip</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#height" class="tsd-kind-icon">height</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#hue" class="tsd-kind-icon">hue</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#kodachrome" class="tsd-kind-icon">kodachrome</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#negative" class="tsd-kind-icon">negative</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#pixelate" class="tsd-kind-icon">pixelate</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#polaroid" class="tsd-kind-icon">polaroid</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#return" class="tsd-kind-icon">return</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#saturation" class="tsd-kind-icon">saturation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#sepia" class="tsd-kind-icon">sepia</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#sharpness" class="tsd-kind-icon">sharpness</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#technicolor" class="tsd-kind-icon">technicolor</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#vintage" class="tsd-kind-icon">vintage</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#width" class="tsd-kind-icon">width</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="blur" class="tsd-anchor"></a><h3>blur</h3><div class="tsd-signature tsd-kind-icon">blur<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L158">src/config.ts:158</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: 0 (no blur) to N (blur radius in pixels)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="brightness" class="tsd-anchor"></a><h3>brightness</h3><div class="tsd-signature tsd-kind-icon">brightness<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L152">src/config.ts:152</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: -1 (darken) to 1 (lighten)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="contrast" class="tsd-anchor"></a><h3>contrast</h3><div class="tsd-signature tsd-kind-icon">contrast<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L154">src/config.ts:154</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: -1 (reduce contrast) to 1 (increase contrast)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L128">src/config.ts:128</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>are image filters enabled?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="equalization" class="tsd-anchor"></a><h3>equalization</h3><div class="tsd-signature tsd-kind-icon">equalization<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L132">src/config.ts:132</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>perform image histogram equalization</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">FilterConfig</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#blur" class="tsd-kind-icon">blur</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#brightness" class="tsd-kind-icon">brightness</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#contrast" class="tsd-kind-icon">contrast</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#equalization" class="tsd-kind-icon">equalization</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#flip" class="tsd-kind-icon">flip</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#height" class="tsd-kind-icon">height</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#hue" class="tsd-kind-icon">hue</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#kodachrome" class="tsd-kind-icon">kodachrome</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#negative" class="tsd-kind-icon">negative</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#pixelate" class="tsd-kind-icon">pixelate</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#polaroid" class="tsd-kind-icon">polaroid</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#return" class="tsd-kind-icon">return</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#saturation" class="tsd-kind-icon">saturation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#sepia" class="tsd-kind-icon">sepia</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#sharpness" class="tsd-kind-icon">sharpness</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#technicolor" class="tsd-kind-icon">technicolor</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#vintage" class="tsd-kind-icon">vintage</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FilterConfig.html#width" class="tsd-kind-icon">width</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="blur" class="tsd-anchor"></a><h3>blur</h3><div class="tsd-signature tsd-kind-icon">blur<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L166">src/config.ts:166</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: 0 (no blur) to N (blur radius in pixels)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="brightness" class="tsd-anchor"></a><h3>brightness</h3><div class="tsd-signature tsd-kind-icon">brightness<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L160">src/config.ts:160</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: -1 (darken) to 1 (lighten)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="contrast" class="tsd-anchor"></a><h3>contrast</h3><div class="tsd-signature tsd-kind-icon">contrast<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L162">src/config.ts:162</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: -1 (reduce contrast) to 1 (increase contrast)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L136">src/config.ts:136</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>are image filters enabled?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="equalization" class="tsd-anchor"></a><h3>equalization</h3><div class="tsd-signature tsd-kind-icon">equalization<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L140">src/config.ts:140</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>perform image histogram equalization</p>
|
||||
<ul>
|
||||
<li>equalization is performed on input as a whole and detected face before its passed for further analysis</li>
|
||||
</ul>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="flip" class="tsd-anchor"></a><h3>flip</h3><div class="tsd-signature tsd-kind-icon">flip<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L150">src/config.ts:150</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>flip input as mirror image</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="height" class="tsd-anchor"></a><h3>height</h3><div class="tsd-signature tsd-kind-icon">height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L146">src/config.ts:146</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="flip" class="tsd-anchor"></a><h3>flip</h3><div class="tsd-signature tsd-kind-icon">flip<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L158">src/config.ts:158</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>flip input as mirror image</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="height" class="tsd-anchor"></a><h3>height</h3><div class="tsd-signature tsd-kind-icon">height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L154">src/config.ts:154</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>resize input height</p>
|
||||
<ul>
|
||||
<li>if both width and height are set to 0, there is no resizing</li>
|
||||
<li>if just one is set, second one is scaled automatically</li>
|
||||
<li>if both are set, values are used as-is</li>
|
||||
</ul>
|
||||
</div><dl class="tsd-comment-tags"><dt>property</dt><dd></dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="hue" class="tsd-anchor"></a><h3>hue</h3><div class="tsd-signature tsd-kind-icon">hue<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L162">src/config.ts:162</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: 0 (no change) to 360 (hue rotation in degrees)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="kodachrome" class="tsd-anchor"></a><h3>kodachrome</h3><div class="tsd-signature tsd-kind-icon">kodachrome<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L170">src/config.ts:170</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image kodachrome colors</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="negative" class="tsd-anchor"></a><h3>negative</h3><div class="tsd-signature tsd-kind-icon">negative<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L164">src/config.ts:164</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image negative</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="pixelate" class="tsd-anchor"></a><h3>pixelate</h3><div class="tsd-signature tsd-kind-icon">pixelate<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L176">src/config.ts:176</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: 0 (no pixelate) to N (number of pixels to pixelate)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="polaroid" class="tsd-anchor"></a><h3>polaroid</h3><div class="tsd-signature tsd-kind-icon">polaroid<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L174">src/config.ts:174</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image polaroid camera effect</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="return" class="tsd-anchor"></a><h3>return</h3><div class="tsd-signature tsd-kind-icon">return<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L148">src/config.ts:148</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>return processed canvas imagedata in result</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="saturation" class="tsd-anchor"></a><h3>saturation</h3><div class="tsd-signature tsd-kind-icon">saturation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L160">src/config.ts:160</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: -1 (reduce saturation) to 1 (increase saturation)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="sepia" class="tsd-anchor"></a><h3>sepia</h3><div class="tsd-signature tsd-kind-icon">sepia<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L166">src/config.ts:166</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image sepia colors</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="sharpness" class="tsd-anchor"></a><h3>sharpness</h3><div class="tsd-signature tsd-kind-icon">sharpness<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L156">src/config.ts:156</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: 0 (no sharpening) to 1 (maximum sharpening)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="technicolor" class="tsd-anchor"></a><h3>technicolor</h3><div class="tsd-signature tsd-kind-icon">technicolor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L172">src/config.ts:172</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image technicolor colors</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="vintage" class="tsd-anchor"></a><h3>vintage</h3><div class="tsd-signature tsd-kind-icon">vintage<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L168">src/config.ts:168</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image vintage colors</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="width" class="tsd-anchor"></a><h3>width</h3><div class="tsd-signature tsd-kind-icon">width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L139">src/config.ts:139</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
</div><dl class="tsd-comment-tags"><dt>property</dt><dd></dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="hue" class="tsd-anchor"></a><h3>hue</h3><div class="tsd-signature tsd-kind-icon">hue<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L170">src/config.ts:170</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: 0 (no change) to 360 (hue rotation in degrees)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="kodachrome" class="tsd-anchor"></a><h3>kodachrome</h3><div class="tsd-signature tsd-kind-icon">kodachrome<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L178">src/config.ts:178</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image kodachrome colors</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="negative" class="tsd-anchor"></a><h3>negative</h3><div class="tsd-signature tsd-kind-icon">negative<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L172">src/config.ts:172</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image negative</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="pixelate" class="tsd-anchor"></a><h3>pixelate</h3><div class="tsd-signature tsd-kind-icon">pixelate<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L184">src/config.ts:184</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: 0 (no pixelate) to N (number of pixels to pixelate)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="polaroid" class="tsd-anchor"></a><h3>polaroid</h3><div class="tsd-signature tsd-kind-icon">polaroid<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L182">src/config.ts:182</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image polaroid camera effect</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="return" class="tsd-anchor"></a><h3>return</h3><div class="tsd-signature tsd-kind-icon">return<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L156">src/config.ts:156</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>return processed canvas imagedata in result</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="saturation" class="tsd-anchor"></a><h3>saturation</h3><div class="tsd-signature tsd-kind-icon">saturation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L168">src/config.ts:168</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: -1 (reduce saturation) to 1 (increase saturation)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="sepia" class="tsd-anchor"></a><h3>sepia</h3><div class="tsd-signature tsd-kind-icon">sepia<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L174">src/config.ts:174</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image sepia colors</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="sharpness" class="tsd-anchor"></a><h3>sharpness</h3><div class="tsd-signature tsd-kind-icon">sharpness<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L164">src/config.ts:164</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>range: 0 (no sharpening) to 1 (maximum sharpening)</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="technicolor" class="tsd-anchor"></a><h3>technicolor</h3><div class="tsd-signature tsd-kind-icon">technicolor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L180">src/config.ts:180</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image technicolor colors</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="vintage" class="tsd-anchor"></a><h3>vintage</h3><div class="tsd-signature tsd-kind-icon">vintage<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L176">src/config.ts:176</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>image vintage colors</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="width" class="tsd-anchor"></a><h3>width</h3><div class="tsd-signature tsd-kind-icon">width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L147">src/config.ts:147</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>resize input width</p>
|
||||
<ul>
|
||||
<li>if both width and height are set to 0, there is no resizing</li>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>GestureConfig | @vladmandic/human - v2.5.1</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.1</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.1</a></li><li><a href="GestureConfig.html">GestureConfig</a></li></ul><h1>Interface GestureConfig</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Controlls gesture detection</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">GestureConfig</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="GestureConfig.html#enabled" class="tsd-kind-icon">enabled</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L182">src/config.ts:182</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>is gesture detection enabled?</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">GestureConfig</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="GestureConfig.html#enabled" class="tsd-kind-icon">enabled</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L190">src/config.ts:190</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>is gesture detection enabled?</p>
|
||||
</dd></dl></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="GestureConfig.html" class="tsd-kind-icon">Gesture<wbr/>Config</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="GestureConfig.html#enabled" class="tsd-kind-icon">enabled</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@ -1,14 +1,14 @@
|
|||
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>HandConfig | @vladmandic/human - v2.5.1</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.1</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.1</a></li><li><a href="HandConfig.html">HandConfig</a></li></ul><h1>Interface HandConfig</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Configures all hand detection specific options</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="GenericConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GenericConfig</a><ul class="tsd-hierarchy"><li><span class="target">HandConfig</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#detector" class="tsd-kind-icon">detector</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#iouThreshold" class="tsd-kind-icon">iou<wbr/>Threshold</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#landmarks" class="tsd-kind-icon">landmarks</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#maxDetected" class="tsd-kind-icon">max<wbr/>Detected</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#modelPath-1" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#rotation" class="tsd-kind-icon">rotation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#skeleton" class="tsd-kind-icon">skeleton</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="detector" class="tsd-anchor"></a><h3>detector</h3><div class="tsd-signature tsd-kind-icon">detector<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>modelPath<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L91">src/config.ts:91</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> model<wbr/>Path<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to hand detector model json</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="GenericConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GenericConfig</a><ul class="tsd-hierarchy"><li><span class="target">HandConfig</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#detector" class="tsd-kind-icon">detector</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#iouThreshold" class="tsd-kind-icon">iou<wbr/>Threshold</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#landmarks" class="tsd-kind-icon">landmarks</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#maxDetected" class="tsd-kind-icon">max<wbr/>Detected</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#modelPath-1" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#rotation" class="tsd-kind-icon">rotation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#skeleton" class="tsd-kind-icon">skeleton</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="detector" class="tsd-anchor"></a><h3>detector</h3><div class="tsd-signature tsd-kind-icon">detector<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>modelPath<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L99">src/config.ts:99</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> model<wbr/>Path<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to hand detector model json</p>
|
||||
</dd></dl></div></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#enabled">enabled</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L7">src/config.ts:7</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>is module enabled?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="iouThreshold" class="tsd-anchor"></a><h3>iou<wbr/>Threshold</h3><div class="tsd-signature tsd-kind-icon">iou<wbr/>Threshold<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L86">src/config.ts:86</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum overlap between two detected hands before one is discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="landmarks" class="tsd-anchor"></a><h3>landmarks</h3><div class="tsd-signature tsd-kind-icon">landmarks<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L90">src/config.ts:90</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>should hand landmarks be detected or just return detected hand box</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="maxDetected" class="tsd-anchor"></a><h3>max<wbr/>Detected</h3><div class="tsd-signature tsd-kind-icon">max<wbr/>Detected<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L88">src/config.ts:88</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>maximum number of detected hands</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="minConfidence" class="tsd-anchor"></a><h3>min<wbr/>Confidence</h3><div class="tsd-signature tsd-kind-icon">min<wbr/>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L84">src/config.ts:84</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum confidence for a detected hand before results are discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="iouThreshold" class="tsd-anchor"></a><h3>iou<wbr/>Threshold</h3><div class="tsd-signature tsd-kind-icon">iou<wbr/>Threshold<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L94">src/config.ts:94</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum overlap between two detected hands before one is discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="landmarks" class="tsd-anchor"></a><h3>landmarks</h3><div class="tsd-signature tsd-kind-icon">landmarks<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L98">src/config.ts:98</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>should hand landmarks be detected or just return detected hand box</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="maxDetected" class="tsd-anchor"></a><h3>max<wbr/>Detected</h3><div class="tsd-signature tsd-kind-icon">max<wbr/>Detected<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L96">src/config.ts:96</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>maximum number of detected hands</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="minConfidence" class="tsd-anchor"></a><h3>min<wbr/>Confidence</h3><div class="tsd-signature tsd-kind-icon">min<wbr/>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L92">src/config.ts:92</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum confidence for a detected hand before results are discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="modelPath-1" class="tsd-anchor"></a><h3>model<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">model<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#modelPath">modelPath</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L9">src/config.ts:9</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to model json file</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="rotation" class="tsd-anchor"></a><h3>rotation</h3><div class="tsd-signature tsd-kind-icon">rotation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L82">src/config.ts:82</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>should hand rotation correction be performed after hand detection?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="skeleton" class="tsd-anchor"></a><h3>skeleton</h3><div class="tsd-signature tsd-kind-icon">skeleton<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>modelPath<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L95">src/config.ts:95</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> model<wbr/>Path<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to hand skeleton model json</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="rotation" class="tsd-anchor"></a><h3>rotation</h3><div class="tsd-signature tsd-kind-icon">rotation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L90">src/config.ts:90</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>should hand rotation correction be performed after hand detection?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="skeleton" class="tsd-anchor"></a><h3>skeleton</h3><div class="tsd-signature tsd-kind-icon">skeleton<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>modelPath<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L103">src/config.ts:103</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> model<wbr/>Path<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to hand skeleton model json</p>
|
||||
</dd></dl></div></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipFrames" class="tsd-anchor"></a><h3>skip<wbr/>Frames</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Frames<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipFrames">skipFrames</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L11">src/config.ts:11</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max frames to go without re-running model if cached results are acceptable</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipTime" class="tsd-anchor"></a><h3>skip<wbr/>Time</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipTime">skipTime</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L13">src/config.ts:13</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max miliseconds to go without re-running model if cached results are acceptable</p>
|
||||
</dd></dl></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="HandConfig.html" class="tsd-kind-icon">Hand<wbr/>Config</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#detector" class="tsd-kind-icon">detector</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#iouThreshold" class="tsd-kind-icon">iou<wbr/>Threshold</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#landmarks" class="tsd-kind-icon">landmarks</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#maxDetected" class="tsd-kind-icon">max<wbr/>Detected</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#modelPath-1" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#rotation" class="tsd-kind-icon">rotation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandConfig.html#skeleton" class="tsd-kind-icon">skeleton</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="HandConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ObjectConfig | @vladmandic/human - v2.5.1</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.1</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.1</a></li><li><a href="ObjectConfig.html">ObjectConfig</a></li></ul><h1>Interface ObjectConfig</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
||||
<p>Configures all object detection specific options</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="GenericConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GenericConfig</a><ul class="tsd-hierarchy"><li><span class="target">ObjectConfig</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="ObjectConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectConfig.html#iouThreshold" class="tsd-kind-icon">iou<wbr/>Threshold</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectConfig.html#maxDetected" class="tsd-kind-icon">max<wbr/>Detected</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectConfig.html#minConfidence" class="tsd-kind-icon">min<wbr/>Confidence</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="ObjectConfig.html#modelPath" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="ObjectConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="ObjectConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#enabled">enabled</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L7">src/config.ts:7</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>is module enabled?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="iouThreshold" class="tsd-anchor"></a><h3>iou<wbr/>Threshold</h3><div class="tsd-signature tsd-kind-icon">iou<wbr/>Threshold<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L106">src/config.ts:106</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum overlap between two detected objects before one is discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="maxDetected" class="tsd-anchor"></a><h3>max<wbr/>Detected</h3><div class="tsd-signature tsd-kind-icon">max<wbr/>Detected<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L108">src/config.ts:108</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>maximum number of detected objects</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="minConfidence" class="tsd-anchor"></a><h3>min<wbr/>Confidence</h3><div class="tsd-signature tsd-kind-icon">min<wbr/>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L104">src/config.ts:104</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum confidence for a detected objects before results are discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="iouThreshold" class="tsd-anchor"></a><h3>iou<wbr/>Threshold</h3><div class="tsd-signature tsd-kind-icon">iou<wbr/>Threshold<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L114">src/config.ts:114</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum overlap between two detected objects before one is discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="maxDetected" class="tsd-anchor"></a><h3>max<wbr/>Detected</h3><div class="tsd-signature tsd-kind-icon">max<wbr/>Detected<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L116">src/config.ts:116</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>maximum number of detected objects</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="minConfidence" class="tsd-anchor"></a><h3>min<wbr/>Confidence</h3><div class="tsd-signature tsd-kind-icon">min<wbr/>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L112">src/config.ts:112</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>minimum confidence for a detected objects before results are discarded</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="modelPath" class="tsd-anchor"></a><h3>model<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">model<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#modelPath">modelPath</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L9">src/config.ts:9</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to model json file</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipFrames" class="tsd-anchor"></a><h3>skip<wbr/>Frames</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Frames<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipFrames">skipFrames</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L11">src/config.ts:11</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max frames to go without re-running model if cached results are acceptable</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipTime" class="tsd-anchor"></a><h3>skip<wbr/>Time</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Time<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipTime">skipTime</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L13">src/config.ts:13</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max miliseconds to go without re-running model if cached results are acceptable</p>
|
||||
|
|
|
@ -4,7 +4,7 @@ removes background from input containing person
|
|||
if segmentation is enabled it will run as preprocessing task before any other model
|
||||
alternatively leave it disabled and use it on-demand using human.segmentation method which can
|
||||
remove background or replace it with user-provided background</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="GenericConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GenericConfig</a><ul class="tsd-hierarchy"><li><span class="target">SegmentationConfig</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="SegmentationConfig.html#blur" class="tsd-kind-icon">blur</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="SegmentationConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="SegmentationConfig.html#modelPath" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="SegmentationConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="SegmentationConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="blur" class="tsd-anchor"></a><h3>blur</h3><div class="tsd-signature tsd-kind-icon">blur<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L119">src/config.ts:119</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>blur segmentation output by <number> pixels for more realistic image</p>
|
||||
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="GenericConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GenericConfig</a><ul class="tsd-hierarchy"><li><span class="target">SegmentationConfig</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="SegmentationConfig.html#blur" class="tsd-kind-icon">blur</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="SegmentationConfig.html#enabled" class="tsd-kind-icon">enabled</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="SegmentationConfig.html#modelPath" class="tsd-kind-icon">model<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="SegmentationConfig.html#skipFrames" class="tsd-kind-icon">skip<wbr/>Frames</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="SegmentationConfig.html#skipTime" class="tsd-kind-icon">skip<wbr/>Time</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="blur" class="tsd-anchor"></a><h3>blur</h3><div class="tsd-signature tsd-kind-icon">blur<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L127">src/config.ts:127</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>blur segmentation output by <number> pixels for more realistic image</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="enabled" class="tsd-anchor"></a><h3>enabled</h3><div class="tsd-signature tsd-kind-icon">enabled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#enabled">enabled</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L7">src/config.ts:7</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>is module enabled?</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="modelPath" class="tsd-anchor"></a><h3>model<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">model<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#modelPath">modelPath</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L9">src/config.ts:9</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>path to model json file</p>
|
||||
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="skipFrames" class="tsd-anchor"></a><h3>skip<wbr/>Frames</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Frames<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="GenericConfig.html">GenericConfig</a>.<a href="GenericConfig.html#skipFrames">skipFrames</a></p><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L11">src/config.ts:11</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>property</dt><dd><p>how many max frames to go without re-running model if cached results are acceptable</p>
|
||||
|
|
|
@ -19,6 +19,14 @@ export interface FaceDetectorConfig extends GenericConfig {
|
|||
minConfidence: number;
|
||||
/** @property minimum overlap between two detected faces before one is discarded */
|
||||
iouThreshold: number;
|
||||
/** @property factor used to expand detected face before further analysis
|
||||
* - default: 1.6
|
||||
* - for high-quality inputs can be reduced to increase precision
|
||||
* - for video inputs or low-quality inputs can be increased to allow for more flexible tracking
|
||||
*/
|
||||
cropFactor: number;
|
||||
/** @property should child models perform on masked image of a face */
|
||||
mask: boolean;
|
||||
/** @property should face detection return face tensor to be used in some other extenrnal model? */
|
||||
return: boolean;
|
||||
}
|
||||
|
|
|
@ -4,4 +4,5 @@
|
|||
*/
|
||||
import type { FaceResult } from '../result';
|
||||
import type { Tensor } from '../tfjs/types';
|
||||
export declare const detectFace: (parent: any, input: Tensor) => Promise<FaceResult[]>;
|
||||
import type { Human } from '../human';
|
||||
export declare const detectFace: (parent: Human, input: Tensor) => Promise<FaceResult[]>;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
import type { Tensor } from '../tfjs/types';
|
||||
import type { FaceResult } from '../result';
|
||||
export declare function mask(face: FaceResult): Promise<Tensor | undefined>;
|
|
@ -150,7 +150,7 @@ export declare class Human {
|
|||
* - `alpha` as grayscale canvas that represents segmentation alpha values
|
||||
*/
|
||||
segmentation(input: Input, background?: Input): Promise<{
|
||||
data: number[];
|
||||
data: number[] | Tensor;
|
||||
canvas: HTMLCanvasElement | OffscreenCanvas | null;
|
||||
alpha: HTMLCanvasElement | OffscreenCanvas | null;
|
||||
}>;
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
* - [**MediaPipe Meet**](https://drive.google.com/file/d/1lnP1bRi9CSqQQXUHa13159vLELYDgDu0/preview)
|
||||
* - [**MediaPipe Selfie**](https://drive.google.com/file/d/1dCfozqknMa068vVsO2j_1FgZkW_e3VWv/preview)
|
||||
*/
|
||||
import type { GraphModel } from '../tfjs/types';
|
||||
import type { GraphModel, Tensor } from '../tfjs/types';
|
||||
import type { Config } from '../config';
|
||||
import type { Input } from '../exports';
|
||||
import type { Input, AnyCanvas } from '../exports';
|
||||
export declare function load(config: Config): Promise<GraphModel>;
|
||||
export declare function process(input: Input, background: Input | undefined, config: Config): Promise<{
|
||||
data: Array<number>;
|
||||
canvas: HTMLCanvasElement | OffscreenCanvas | null;
|
||||
alpha: HTMLCanvasElement | OffscreenCanvas | null;
|
||||
data: Array<number> | Tensor;
|
||||
canvas: AnyCanvas | null;
|
||||
alpha: AnyCanvas | null;
|
||||
}>;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/** TFJS backend initialization and customization */
|
||||
export declare function check(instance: any, force?: boolean): Promise<boolean>;
|
||||
import type { Human } from '../human';
|
||||
export declare function check(instance: Human, force?: boolean): Promise<boolean>;
|
||||
export declare function fakeOps(kernelNames: Array<string>, config: any): void;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/** TFJS custom backend registration */
|
||||
import type { Human } from '../human';
|
||||
export declare const config: {
|
||||
name: string;
|
||||
priority: number;
|
||||
|
@ -21,4 +22,4 @@ export declare const config: {
|
|||
*
|
||||
* @returns void
|
||||
*/
|
||||
export declare function register(instance: any): Promise<void>;
|
||||
export declare function register(instance: Human): Promise<void>;
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
*/
|
||||
import type { Config } from './config';
|
||||
import type { Result } from './result';
|
||||
import type { Human } from './human';
|
||||
/** Warmup method pre-initializes all configured models for faster inference
|
||||
* - can take significant time on startup
|
||||
* - only used for `webgl` and `humangl` backends
|
||||
* @param userConfig?: Config
|
||||
*/
|
||||
export declare function warmup(instance: any, userConfig?: Partial<Config>): Promise<Result | {
|
||||
export declare function warmup(instance: Human, userConfig?: Partial<Config>): Promise<Result | {
|
||||
error: any;
|
||||
}>;
|
||||
|
|
Loading…
Reference in New Issue