mirror of https://github.com/vladmandic/human
release candidate
parent
6d31b16bde
commit
1f4863a09d
|
@ -9,8 +9,15 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
### **HEAD -> main** 2021/05/30 mandic00@live.com
|
### **HEAD -> main** 2021/06/01 mandic00@live.com
|
||||||
|
|
||||||
|
- breaking changes to results.object output properties
|
||||||
|
- breaking changes to results.hand output properties
|
||||||
|
- breaking changes to results.body output properties
|
||||||
|
|
||||||
|
### **origin/main** 2021/05/31 mandic00@live.com
|
||||||
|
|
||||||
|
- implemented human.next global interpolation method
|
||||||
- finished draw buffering and smoothing and enabled by default
|
- finished draw buffering and smoothing and enabled by default
|
||||||
- implemented service worker
|
- implemented service worker
|
||||||
- quantized centernet
|
- quantized centernet
|
||||||
|
|
8
TODO.md
8
TODO.md
|
@ -4,18 +4,13 @@
|
||||||
|
|
||||||
N/A
|
N/A
|
||||||
|
|
||||||
## Exploring Features
|
|
||||||
|
|
||||||
- Switch to TypeScript 4.3
|
|
||||||
- Unify score/confidence variables
|
|
||||||
|
|
||||||
## Explore Models
|
## Explore Models
|
||||||
|
|
||||||
- InsightFace: RetinaFace detector and ArcFace recognition: <https://github.com/deepinsight/insightface>
|
- InsightFace: RetinaFace detector and ArcFace recognition: <https://github.com/deepinsight/insightface>
|
||||||
|
|
||||||
## In Progress
|
## In Progress
|
||||||
|
|
||||||
N/A
|
- Switch to TypeScript 4.3
|
||||||
|
|
||||||
## Known Issues
|
## Known Issues
|
||||||
|
|
||||||
|
@ -23,3 +18,4 @@ N/A
|
||||||
- NanoDet with WASM: <https://github.com/tensorflow/tfjs/issues/4824>
|
- NanoDet with WASM: <https://github.com/tensorflow/tfjs/issues/4824>
|
||||||
- BlazeFace and HandPose rotation in NodeJS: <https://github.com/tensorflow/tfjs/issues/4066>
|
- BlazeFace and HandPose rotation in NodeJS: <https://github.com/tensorflow/tfjs/issues/4066>
|
||||||
- TypeDoc with TypeScript 4.3: <https://github.com/TypeStrong/typedoc/issues/1589>
|
- TypeDoc with TypeScript 4.3: <https://github.com/TypeStrong/typedoc/issues/1589>
|
||||||
|
- HandPose lower precision with WASM
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -101,7 +101,7 @@ async function analyze(face) {
|
||||||
ctx.fillStyle = 'rgba(255, 255, 255, 1)';
|
ctx.fillStyle = 'rgba(255, 255, 255, 1)';
|
||||||
ctx.fillText(`${(100 * similarity).toFixed(1)}%`, 4, 24);
|
ctx.fillText(`${(100 * similarity).toFixed(1)}%`, 4, 24);
|
||||||
ctx.font = 'small-caps 0.8rem "Lato"';
|
ctx.font = 'small-caps 0.8rem "Lato"';
|
||||||
ctx.fillText(`${current.age}y ${(100 * (current.genderConfidence || 0)).toFixed(1)}% ${current.gender}`, 4, canvas.height - 6);
|
ctx.fillText(`${current.age}y ${(100 * (current.genderScore || 0)).toFixed(1)}% ${current.gender}`, 4, canvas.height - 6);
|
||||||
// identify person
|
// identify person
|
||||||
ctx.font = 'small-caps 1rem "Lato"';
|
ctx.font = 'small-caps 1rem "Lato"';
|
||||||
const person = await human.match(current.embedding, db);
|
const person = await human.match(current.embedding, db);
|
||||||
|
@ -136,7 +136,7 @@ async function faces(index, res, fileName) {
|
||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
ctx.font = 'small-caps 0.8rem "Lato"';
|
ctx.font = 'small-caps 0.8rem "Lato"';
|
||||||
ctx.fillStyle = 'rgba(255, 255, 255, 1)';
|
ctx.fillStyle = 'rgba(255, 255, 255, 1)';
|
||||||
ctx.fillText(`${res.face[i].age}y ${(100 * (res.face[i].genderConfidence || 0)).toFixed(1)}% ${res.face[i].gender}`, 4, canvas.height - 6);
|
ctx.fillText(`${res.face[i].age}y ${(100 * (res.face[i].genderScore || 0)).toFixed(1)}% ${res.face[i].gender}`, 4, canvas.height - 6);
|
||||||
const person = await human.match(res.face[i].embedding, db);
|
const person = await human.match(res.face[i].embedding, db);
|
||||||
ctx.font = 'small-caps 1rem "Lato"';
|
ctx.font = 'small-caps 1rem "Lato"';
|
||||||
if (person.similarity && person.similarity > minScore && res.face[i].confidence > minConfidence) ctx.fillText(`${(100 * person.similarity).toFixed(1)}% ${person.name}`, 4, canvas.height - 30);
|
if (person.similarity && person.similarity > minScore && res.face[i].confidence > minConfidence) ctx.fillText(`${(100 * person.similarity).toFixed(1)}% ${person.name}`, 4, canvas.height - 30);
|
||||||
|
|
|
@ -475,7 +475,7 @@ async function processImage(input) {
|
||||||
thumb.width = window.innerWidth / (ui.columns + 0.1);
|
thumb.width = window.innerWidth / (ui.columns + 0.1);
|
||||||
thumb.height = thumb.width * canvas.height / canvas.width;
|
thumb.height = thumb.width * canvas.height / canvas.width;
|
||||||
if (result.face && result.face.length > 0) {
|
if (result.face && result.face.length > 0) {
|
||||||
thumb.title = result.face.map((a, i) => `#${i} face: ${Math.trunc(100 * a.faceConfidence)}% box: ${Math.trunc(100 * a.boxConfidence)}% age: ${Math.trunc(a.age)} gender: ${Math.trunc(100 * a.genderConfidence)}% ${a.gender}`).join(' | ');
|
thumb.title = result.face.map((a, i) => `#${i} face: ${Math.trunc(100 * a.faceScore)}% box: ${Math.trunc(100 * a.boxScore)}% age: ${Math.trunc(a.age)} gender: ${Math.trunc(100 * a.genderScore)}% ${a.gender}`).join(' | ');
|
||||||
} else {
|
} else {
|
||||||
thumb.title = 'no face detected';
|
thumb.title = 'no face detected';
|
||||||
}
|
}
|
||||||
|
|
18
demo/node.js
18
demo/node.js
|
@ -105,7 +105,7 @@ async function detect(input) {
|
||||||
for (let i = 0; i < result.face.length; i++) {
|
for (let i = 0; i < result.face.length; i++) {
|
||||||
const face = result.face[i];
|
const face = result.face[i];
|
||||||
const emotion = face.emotion.reduce((prev, curr) => (prev.score > curr.score ? prev : curr));
|
const emotion = face.emotion.reduce((prev, curr) => (prev.score > curr.score ? prev : curr));
|
||||||
log.data(` Face: #${i} boxConfidence:${face.boxConfidence} faceConfidence:${face.faceConfidence} age:${face.age} genderConfidence:${face.genderConfidence} gender:${face.gender} emotionScore:${emotion.score} emotion:${emotion.emotion} iris:${face.iris}`);
|
log.data(` Face: #${i} boxScore:${face.boxScore} faceScore:${face.faceScore} age:${face.age} genderScore:${face.genderScore} gender:${face.gender} emotionScore:${emotion.score} emotion:${emotion.emotion} iris:${face.iris}`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.data(' Face: N/A');
|
log.data(' Face: N/A');
|
||||||
|
@ -113,7 +113,7 @@ async function detect(input) {
|
||||||
if (result && result.body && result.body.length > 0) {
|
if (result && result.body && result.body.length > 0) {
|
||||||
for (let i = 0; i < result.body.length; i++) {
|
for (let i = 0; i < result.body.length; i++) {
|
||||||
const body = result.body[i];
|
const body = result.body[i];
|
||||||
log.data(` Body: #${i} score:${body.score} landmarks:${body.keypoints?.length || body.landmarks?.length}`);
|
log.data(` Body: #${i} score:${body.score} keypoints:${body.keypoints?.length}`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.data(' Body: N/A');
|
log.data(' Body: N/A');
|
||||||
|
@ -121,7 +121,7 @@ async function detect(input) {
|
||||||
if (result && result.hand && result.hand.length > 0) {
|
if (result && result.hand && result.hand.length > 0) {
|
||||||
for (let i = 0; i < result.hand.length; i++) {
|
for (let i = 0; i < result.hand.length; i++) {
|
||||||
const hand = result.hand[i];
|
const hand = result.hand[i];
|
||||||
log.data(` Hand: #${i} confidence:${hand.confidence}`);
|
log.data(` Hand: #${i} score:${hand.score}`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.data(' Hand: N/A');
|
log.data(' Hand: N/A');
|
||||||
|
@ -143,16 +143,20 @@ async function detect(input) {
|
||||||
log.data(' Object: N/A');
|
log.data(' Object: N/A');
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.writeFileSync('result.json', JSON.stringify(result, null, 2));
|
|
||||||
// print data to console
|
// print data to console
|
||||||
if (result) {
|
if (result) {
|
||||||
log.data('Persons:');
|
// invoke persons getter
|
||||||
const persons = result.persons;
|
const persons = result.persons;
|
||||||
|
|
||||||
|
// write result objects to file
|
||||||
|
// fs.writeFileSync('result.json', JSON.stringify(result, null, 2));
|
||||||
|
|
||||||
|
log.data('Persons:');
|
||||||
for (let i = 0; i < persons.length; i++) {
|
for (let i = 0; i < persons.length; i++) {
|
||||||
const face = persons[i].face;
|
const face = persons[i].face;
|
||||||
const faceTxt = face ? `confidence:${face.confidence} age:${face.age} gender:${face.gender} iris:${face.iris}` : null;
|
const faceTxt = face ? `score:${face.score} age:${face.age} gender:${face.gender} iris:${face.iris}` : null;
|
||||||
const body = persons[i].body;
|
const body = persons[i].body;
|
||||||
const bodyTxt = body ? `confidence:${body.score} landmarks:${body.keypoints?.length}` : null;
|
const bodyTxt = body ? `score:${body.score} keypoints:${body.keypoints?.length}` : null;
|
||||||
log.data(` #${i}: Face:${faceTxt} Body:${bodyTxt} LeftHand:${persons[i].hands.left ? 'yes' : 'no'} RightHand:${persons[i].hands.right ? 'yes' : 'no'} Gestures:${persons[i].gestures.length}`);
|
log.data(` #${i}: Face:${faceTxt} Body:${bodyTxt} LeftHand:${persons[i].hands.left ? 'yes' : 'no'} RightHand:${persons[i].hands.right ? 'yes' : 'no'} Gestures:${persons[i].gestures.length}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -4094,10 +4094,10 @@ async function predict(input, config3) {
|
||||||
annotations3[key] = MESH_ANNOTATIONS[key].map((index) => prediction.mesh[index]);
|
annotations3[key] = MESH_ANNOTATIONS[key].map((index) => prediction.mesh[index]);
|
||||||
}
|
}
|
||||||
const clampedBox = prediction.box ? [
|
const clampedBox = prediction.box ? [
|
||||||
Math.max(0, prediction.box.startPoint[0]),
|
Math.trunc(Math.max(0, prediction.box.startPoint[0])),
|
||||||
Math.max(0, prediction.box.startPoint[1]),
|
Math.trunc(Math.max(0, prediction.box.startPoint[1])),
|
||||||
Math.min(input.shape[2], prediction.box.endPoint[0]) - Math.max(0, prediction.box.startPoint[0]),
|
Math.trunc(Math.min(input.shape[2], prediction.box.endPoint[0]) - Math.max(0, prediction.box.startPoint[0])),
|
||||||
Math.min(input.shape[1], prediction.box.endPoint[1]) - Math.max(0, prediction.box.startPoint[1])
|
Math.trunc(Math.min(input.shape[1], prediction.box.endPoint[1]) - Math.max(0, prediction.box.startPoint[1]))
|
||||||
] : [0, 0, 0, 0];
|
] : [0, 0, 0, 0];
|
||||||
const boxRaw3 = prediction.box ? [
|
const boxRaw3 = prediction.box ? [
|
||||||
prediction.box.startPoint[0] / input.shape[2],
|
prediction.box.startPoint[0] / input.shape[2],
|
||||||
|
@ -4292,7 +4292,7 @@ async function predict3(image15, config3, idx, count2) {
|
||||||
return null;
|
return null;
|
||||||
if (skipped2 < config3.face.description.skipFrames && config3.skipFrame && lastCount2 === count2 && ((_a = last2[idx]) == null ? void 0 : _a.age) && ((_b = last2[idx]) == null ? void 0 : _b.age) > 0) {
|
if (skipped2 < config3.face.description.skipFrames && config3.skipFrame && lastCount2 === count2 && ((_a = last2[idx]) == null ? void 0 : _a.age) && ((_b = last2[idx]) == null ? void 0 : _b.age) > 0) {
|
||||||
skipped2++;
|
skipped2++;
|
||||||
return last2;
|
return last2[idx];
|
||||||
}
|
}
|
||||||
skipped2 = 0;
|
skipped2 = 0;
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
|
@ -4301,7 +4301,7 @@ async function predict3(image15, config3, idx, count2) {
|
||||||
const obj = {
|
const obj = {
|
||||||
age: 0,
|
age: 0,
|
||||||
gender: "unknown",
|
gender: "unknown",
|
||||||
genderConfidence: 0,
|
genderScore: 0,
|
||||||
descriptor: []
|
descriptor: []
|
||||||
};
|
};
|
||||||
if (config3.face.description.enabled)
|
if (config3.face.description.enabled)
|
||||||
|
@ -4313,7 +4313,7 @@ async function predict3(image15, config3, idx, count2) {
|
||||||
const confidence = Math.trunc(200 * Math.abs(gender[0] - 0.5)) / 100;
|
const confidence = Math.trunc(200 * Math.abs(gender[0] - 0.5)) / 100;
|
||||||
if (confidence > config3.face.description.minConfidence) {
|
if (confidence > config3.face.description.minConfidence) {
|
||||||
obj.gender = gender[0] <= 0.5 ? "female" : "male";
|
obj.gender = gender[0] <= 0.5 ? "female" : "male";
|
||||||
obj.genderConfidence = Math.min(0.99, confidence);
|
obj.genderScore = Math.min(0.99, confidence);
|
||||||
}
|
}
|
||||||
const age = resT.find((t) => t.shape[1] === 100).argMax(1).dataSync()[0];
|
const age = resT.find((t) => t.shape[1] === 100).argMax(1).dataSync()[0];
|
||||||
const all2 = resT.find((t) => t.shape[1] === 100).dataSync();
|
const all2 = resT.find((t) => t.shape[1] === 100).dataSync();
|
||||||
|
@ -4479,12 +4479,14 @@ var detectFace = async (parent, input) => {
|
||||||
delete faces[i].annotations.rightEyeIris;
|
delete faces[i].annotations.rightEyeIris;
|
||||||
}
|
}
|
||||||
const irisSize = ((_e = faces[i].annotations) == null ? void 0 : _e.leftEyeIris) && ((_f = faces[i].annotations) == null ? void 0 : _f.rightEyeIris) ? 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 irisSize = ((_e = faces[i].annotations) == null ? void 0 : _e.leftEyeIris) && ((_f = faces[i].annotations) == null ? void 0 : _f.rightEyeIris) ? 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;
|
||||||
|
if (faces[i].image)
|
||||||
|
delete faces[i].image;
|
||||||
faceRes.push({
|
faceRes.push({
|
||||||
...faces[i],
|
...faces[i],
|
||||||
id: i,
|
id: i,
|
||||||
age: descRes.age,
|
age: descRes.age,
|
||||||
gender: descRes.gender,
|
gender: descRes.gender,
|
||||||
genderScore: descRes.genderConfidence,
|
genderScore: descRes.genderScore,
|
||||||
embedding: descRes.descriptor,
|
embedding: descRes.descriptor,
|
||||||
emotion: emotionRes,
|
emotion: emotionRes,
|
||||||
iris: irisSize !== 0 ? Math.trunc(500 / irisSize / 11.7) / 100 : 0,
|
iris: irisSize !== 0 ? Math.trunc(500 / irisSize / 11.7) / 100 : 0,
|
||||||
|
@ -8068,9 +8070,9 @@ var HandPipeline = class {
|
||||||
dot2(boxCenter, inverseRotationMatrix[1])
|
dot2(boxCenter, inverseRotationMatrix[1])
|
||||||
];
|
];
|
||||||
return coordsRotated.map((coord) => [
|
return coordsRotated.map((coord) => [
|
||||||
coord[0] + originalBoxCenter[0],
|
Math.trunc(coord[0] + originalBoxCenter[0]),
|
||||||
coord[1] + originalBoxCenter[1],
|
Math.trunc(coord[1] + originalBoxCenter[1]),
|
||||||
coord[2]
|
Math.trunc(coord[2])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
async estimateHands(image15, config3) {
|
async estimateHands(image15, config3) {
|
||||||
|
@ -8184,10 +8186,10 @@ async function predict5(input, config3) {
|
||||||
boxRaw3 = [box6[0] / input.shape[2], box6[1] / input.shape[1], box6[2] / input.shape[2], box6[3] / input.shape[1]];
|
boxRaw3 = [box6[0] / input.shape[2], box6[1] / input.shape[1], box6[2] / input.shape[2], box6[3] / input.shape[1]];
|
||||||
} else {
|
} else {
|
||||||
box6 = predictions[i].box ? [
|
box6 = predictions[i].box ? [
|
||||||
Math.max(0, predictions[i].box.topLeft[0]),
|
Math.trunc(Math.max(0, predictions[i].box.topLeft[0])),
|
||||||
Math.max(0, predictions[i].box.topLeft[1]),
|
Math.trunc(Math.max(0, predictions[i].box.topLeft[1])),
|
||||||
Math.min(input.shape[2], predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0]),
|
Math.trunc(Math.min(input.shape[2], predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0])),
|
||||||
Math.min(input.shape[1], predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1])
|
Math.trunc(Math.min(input.shape[1], predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1]))
|
||||||
] : [0, 0, 0, 0];
|
] : [0, 0, 0, 0];
|
||||||
boxRaw3 = [
|
boxRaw3 = [
|
||||||
predictions[i].box.topLeft[0] / input.shape[2],
|
predictions[i].box.topLeft[0] / input.shape[2],
|
||||||
|
@ -8440,30 +8442,30 @@ async function predict7(image15, config3) {
|
||||||
keypoints.push({
|
keypoints.push({
|
||||||
score: Math.round(100 * partScore) / 100,
|
score: Math.round(100 * partScore) / 100,
|
||||||
part: bodyParts[id],
|
part: bodyParts[id],
|
||||||
positionRaw: {
|
positionRaw: [
|
||||||
x: x2 / model5.inputs[0].shape[2],
|
x2 / model5.inputs[0].shape[2],
|
||||||
y: y2 / model5.inputs[0].shape[1]
|
y2 / model5.inputs[0].shape[1]
|
||||||
},
|
],
|
||||||
position: {
|
position: [
|
||||||
x: Math.round(image15.shape[2] * x2 / model5.inputs[0].shape[2]),
|
Math.round(image15.shape[2] * x2 / model5.inputs[0].shape[2]),
|
||||||
y: Math.round(image15.shape[1] * y2 / model5.inputs[0].shape[1])
|
Math.round(image15.shape[1] * y2 / model5.inputs[0].shape[1])
|
||||||
}
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stack2.forEach((s) => tf15.dispose(s));
|
stack2.forEach((s) => tf15.dispose(s));
|
||||||
}
|
}
|
||||||
score = keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0);
|
score = keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0);
|
||||||
const x = keypoints.map((a) => a.position.x);
|
const x = keypoints.map((a) => a.position[0]);
|
||||||
const y = keypoints.map((a) => a.position.y);
|
const y = keypoints.map((a) => a.position[1]);
|
||||||
box4 = [
|
box4 = [
|
||||||
Math.min(...x),
|
Math.min(...x),
|
||||||
Math.min(...y),
|
Math.min(...y),
|
||||||
Math.max(...x) - Math.min(...x),
|
Math.max(...x) - Math.min(...x),
|
||||||
Math.max(...y) - Math.min(...y)
|
Math.max(...y) - Math.min(...y)
|
||||||
];
|
];
|
||||||
const xRaw = keypoints.map((a) => a.positionRaw.x);
|
const xRaw = keypoints.map((a) => a.positionRaw[0]);
|
||||||
const yRaw = keypoints.map((a) => a.positionRaw.y);
|
const yRaw = keypoints.map((a) => a.positionRaw[1]);
|
||||||
boxRaw = [
|
boxRaw = [
|
||||||
Math.min(...xRaw),
|
Math.min(...xRaw),
|
||||||
Math.min(...yRaw),
|
Math.min(...yRaw),
|
||||||
|
@ -9933,15 +9935,17 @@ async function face2(inCanvas2, result, drawOptions) {
|
||||||
if (localOptions.drawBoxes)
|
if (localOptions.drawBoxes)
|
||||||
rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], localOptions);
|
rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], localOptions);
|
||||||
const labels2 = [];
|
const labels2 = [];
|
||||||
labels2.push(`face confidence: ${Math.trunc(100 * f.score)}%`);
|
labels2.push(`face: ${Math.trunc(100 * f.score)}%`);
|
||||||
if (f.genderScore)
|
if (f.genderScore)
|
||||||
labels2.push(`${f.gender || ""} ${Math.trunc(100 * f.genderScore)}% confident`);
|
labels2.push(`${f.gender || ""} ${Math.trunc(100 * f.genderScore)}%`);
|
||||||
if (f.age)
|
if (f.age)
|
||||||
labels2.push(`age: ${f.age || ""}`);
|
labels2.push(`age: ${f.age || ""}`);
|
||||||
if (f.iris)
|
if (f.iris)
|
||||||
labels2.push(`distance: ${f.iris}`);
|
labels2.push(`distance: ${f.iris}`);
|
||||||
if (f.emotion && f.emotion.length > 0) {
|
if (f.emotion && f.emotion.length > 0) {
|
||||||
const emotion2 = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`);
|
const emotion2 = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`);
|
||||||
|
if (emotion2.length > 3)
|
||||||
|
emotion2.length = 3;
|
||||||
labels2.push(emotion2.join(" "));
|
labels2.push(emotion2.join(" "));
|
||||||
}
|
}
|
||||||
if (f.rotation && f.rotation.angle && f.rotation.gaze) {
|
if (f.rotation && f.rotation.angle && f.rotation.gaze) {
|
||||||
|
|
|
@ -4095,10 +4095,10 @@ async function predict(input, config3) {
|
||||||
annotations3[key] = MESH_ANNOTATIONS[key].map((index) => prediction.mesh[index]);
|
annotations3[key] = MESH_ANNOTATIONS[key].map((index) => prediction.mesh[index]);
|
||||||
}
|
}
|
||||||
const clampedBox = prediction.box ? [
|
const clampedBox = prediction.box ? [
|
||||||
Math.max(0, prediction.box.startPoint[0]),
|
Math.trunc(Math.max(0, prediction.box.startPoint[0])),
|
||||||
Math.max(0, prediction.box.startPoint[1]),
|
Math.trunc(Math.max(0, prediction.box.startPoint[1])),
|
||||||
Math.min(input.shape[2], prediction.box.endPoint[0]) - Math.max(0, prediction.box.startPoint[0]),
|
Math.trunc(Math.min(input.shape[2], prediction.box.endPoint[0]) - Math.max(0, prediction.box.startPoint[0])),
|
||||||
Math.min(input.shape[1], prediction.box.endPoint[1]) - Math.max(0, prediction.box.startPoint[1])
|
Math.trunc(Math.min(input.shape[1], prediction.box.endPoint[1]) - Math.max(0, prediction.box.startPoint[1]))
|
||||||
] : [0, 0, 0, 0];
|
] : [0, 0, 0, 0];
|
||||||
const boxRaw3 = prediction.box ? [
|
const boxRaw3 = prediction.box ? [
|
||||||
prediction.box.startPoint[0] / input.shape[2],
|
prediction.box.startPoint[0] / input.shape[2],
|
||||||
|
@ -4293,7 +4293,7 @@ async function predict3(image15, config3, idx, count2) {
|
||||||
return null;
|
return null;
|
||||||
if (skipped2 < config3.face.description.skipFrames && config3.skipFrame && lastCount2 === count2 && ((_a = last2[idx]) == null ? void 0 : _a.age) && ((_b = last2[idx]) == null ? void 0 : _b.age) > 0) {
|
if (skipped2 < config3.face.description.skipFrames && config3.skipFrame && lastCount2 === count2 && ((_a = last2[idx]) == null ? void 0 : _a.age) && ((_b = last2[idx]) == null ? void 0 : _b.age) > 0) {
|
||||||
skipped2++;
|
skipped2++;
|
||||||
return last2;
|
return last2[idx];
|
||||||
}
|
}
|
||||||
skipped2 = 0;
|
skipped2 = 0;
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
|
@ -4302,7 +4302,7 @@ async function predict3(image15, config3, idx, count2) {
|
||||||
const obj = {
|
const obj = {
|
||||||
age: 0,
|
age: 0,
|
||||||
gender: "unknown",
|
gender: "unknown",
|
||||||
genderConfidence: 0,
|
genderScore: 0,
|
||||||
descriptor: []
|
descriptor: []
|
||||||
};
|
};
|
||||||
if (config3.face.description.enabled)
|
if (config3.face.description.enabled)
|
||||||
|
@ -4314,7 +4314,7 @@ async function predict3(image15, config3, idx, count2) {
|
||||||
const confidence = Math.trunc(200 * Math.abs(gender[0] - 0.5)) / 100;
|
const confidence = Math.trunc(200 * Math.abs(gender[0] - 0.5)) / 100;
|
||||||
if (confidence > config3.face.description.minConfidence) {
|
if (confidence > config3.face.description.minConfidence) {
|
||||||
obj.gender = gender[0] <= 0.5 ? "female" : "male";
|
obj.gender = gender[0] <= 0.5 ? "female" : "male";
|
||||||
obj.genderConfidence = Math.min(0.99, confidence);
|
obj.genderScore = Math.min(0.99, confidence);
|
||||||
}
|
}
|
||||||
const age = resT.find((t) => t.shape[1] === 100).argMax(1).dataSync()[0];
|
const age = resT.find((t) => t.shape[1] === 100).argMax(1).dataSync()[0];
|
||||||
const all2 = resT.find((t) => t.shape[1] === 100).dataSync();
|
const all2 = resT.find((t) => t.shape[1] === 100).dataSync();
|
||||||
|
@ -4480,12 +4480,14 @@ var detectFace = async (parent, input) => {
|
||||||
delete faces[i].annotations.rightEyeIris;
|
delete faces[i].annotations.rightEyeIris;
|
||||||
}
|
}
|
||||||
const irisSize = ((_e = faces[i].annotations) == null ? void 0 : _e.leftEyeIris) && ((_f = faces[i].annotations) == null ? void 0 : _f.rightEyeIris) ? 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 irisSize = ((_e = faces[i].annotations) == null ? void 0 : _e.leftEyeIris) && ((_f = faces[i].annotations) == null ? void 0 : _f.rightEyeIris) ? 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;
|
||||||
|
if (faces[i].image)
|
||||||
|
delete faces[i].image;
|
||||||
faceRes.push({
|
faceRes.push({
|
||||||
...faces[i],
|
...faces[i],
|
||||||
id: i,
|
id: i,
|
||||||
age: descRes.age,
|
age: descRes.age,
|
||||||
gender: descRes.gender,
|
gender: descRes.gender,
|
||||||
genderScore: descRes.genderConfidence,
|
genderScore: descRes.genderScore,
|
||||||
embedding: descRes.descriptor,
|
embedding: descRes.descriptor,
|
||||||
emotion: emotionRes,
|
emotion: emotionRes,
|
||||||
iris: irisSize !== 0 ? Math.trunc(500 / irisSize / 11.7) / 100 : 0,
|
iris: irisSize !== 0 ? Math.trunc(500 / irisSize / 11.7) / 100 : 0,
|
||||||
|
@ -8069,9 +8071,9 @@ var HandPipeline = class {
|
||||||
dot2(boxCenter, inverseRotationMatrix[1])
|
dot2(boxCenter, inverseRotationMatrix[1])
|
||||||
];
|
];
|
||||||
return coordsRotated.map((coord) => [
|
return coordsRotated.map((coord) => [
|
||||||
coord[0] + originalBoxCenter[0],
|
Math.trunc(coord[0] + originalBoxCenter[0]),
|
||||||
coord[1] + originalBoxCenter[1],
|
Math.trunc(coord[1] + originalBoxCenter[1]),
|
||||||
coord[2]
|
Math.trunc(coord[2])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
async estimateHands(image15, config3) {
|
async estimateHands(image15, config3) {
|
||||||
|
@ -8185,10 +8187,10 @@ async function predict5(input, config3) {
|
||||||
boxRaw3 = [box6[0] / input.shape[2], box6[1] / input.shape[1], box6[2] / input.shape[2], box6[3] / input.shape[1]];
|
boxRaw3 = [box6[0] / input.shape[2], box6[1] / input.shape[1], box6[2] / input.shape[2], box6[3] / input.shape[1]];
|
||||||
} else {
|
} else {
|
||||||
box6 = predictions[i].box ? [
|
box6 = predictions[i].box ? [
|
||||||
Math.max(0, predictions[i].box.topLeft[0]),
|
Math.trunc(Math.max(0, predictions[i].box.topLeft[0])),
|
||||||
Math.max(0, predictions[i].box.topLeft[1]),
|
Math.trunc(Math.max(0, predictions[i].box.topLeft[1])),
|
||||||
Math.min(input.shape[2], predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0]),
|
Math.trunc(Math.min(input.shape[2], predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0])),
|
||||||
Math.min(input.shape[1], predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1])
|
Math.trunc(Math.min(input.shape[1], predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1]))
|
||||||
] : [0, 0, 0, 0];
|
] : [0, 0, 0, 0];
|
||||||
boxRaw3 = [
|
boxRaw3 = [
|
||||||
predictions[i].box.topLeft[0] / input.shape[2],
|
predictions[i].box.topLeft[0] / input.shape[2],
|
||||||
|
@ -8441,30 +8443,30 @@ async function predict7(image15, config3) {
|
||||||
keypoints.push({
|
keypoints.push({
|
||||||
score: Math.round(100 * partScore) / 100,
|
score: Math.round(100 * partScore) / 100,
|
||||||
part: bodyParts[id],
|
part: bodyParts[id],
|
||||||
positionRaw: {
|
positionRaw: [
|
||||||
x: x2 / model5.inputs[0].shape[2],
|
x2 / model5.inputs[0].shape[2],
|
||||||
y: y2 / model5.inputs[0].shape[1]
|
y2 / model5.inputs[0].shape[1]
|
||||||
},
|
],
|
||||||
position: {
|
position: [
|
||||||
x: Math.round(image15.shape[2] * x2 / model5.inputs[0].shape[2]),
|
Math.round(image15.shape[2] * x2 / model5.inputs[0].shape[2]),
|
||||||
y: Math.round(image15.shape[1] * y2 / model5.inputs[0].shape[1])
|
Math.round(image15.shape[1] * y2 / model5.inputs[0].shape[1])
|
||||||
}
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stack2.forEach((s) => tf15.dispose(s));
|
stack2.forEach((s) => tf15.dispose(s));
|
||||||
}
|
}
|
||||||
score = keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0);
|
score = keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0);
|
||||||
const x = keypoints.map((a) => a.position.x);
|
const x = keypoints.map((a) => a.position[0]);
|
||||||
const y = keypoints.map((a) => a.position.y);
|
const y = keypoints.map((a) => a.position[1]);
|
||||||
box4 = [
|
box4 = [
|
||||||
Math.min(...x),
|
Math.min(...x),
|
||||||
Math.min(...y),
|
Math.min(...y),
|
||||||
Math.max(...x) - Math.min(...x),
|
Math.max(...x) - Math.min(...x),
|
||||||
Math.max(...y) - Math.min(...y)
|
Math.max(...y) - Math.min(...y)
|
||||||
];
|
];
|
||||||
const xRaw = keypoints.map((a) => a.positionRaw.x);
|
const xRaw = keypoints.map((a) => a.positionRaw[0]);
|
||||||
const yRaw = keypoints.map((a) => a.positionRaw.y);
|
const yRaw = keypoints.map((a) => a.positionRaw[1]);
|
||||||
boxRaw = [
|
boxRaw = [
|
||||||
Math.min(...xRaw),
|
Math.min(...xRaw),
|
||||||
Math.min(...yRaw),
|
Math.min(...yRaw),
|
||||||
|
@ -9934,15 +9936,17 @@ async function face2(inCanvas2, result, drawOptions) {
|
||||||
if (localOptions.drawBoxes)
|
if (localOptions.drawBoxes)
|
||||||
rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], localOptions);
|
rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], localOptions);
|
||||||
const labels2 = [];
|
const labels2 = [];
|
||||||
labels2.push(`face confidence: ${Math.trunc(100 * f.score)}%`);
|
labels2.push(`face: ${Math.trunc(100 * f.score)}%`);
|
||||||
if (f.genderScore)
|
if (f.genderScore)
|
||||||
labels2.push(`${f.gender || ""} ${Math.trunc(100 * f.genderScore)}% confident`);
|
labels2.push(`${f.gender || ""} ${Math.trunc(100 * f.genderScore)}%`);
|
||||||
if (f.age)
|
if (f.age)
|
||||||
labels2.push(`age: ${f.age || ""}`);
|
labels2.push(`age: ${f.age || ""}`);
|
||||||
if (f.iris)
|
if (f.iris)
|
||||||
labels2.push(`distance: ${f.iris}`);
|
labels2.push(`distance: ${f.iris}`);
|
||||||
if (f.emotion && f.emotion.length > 0) {
|
if (f.emotion && f.emotion.length > 0) {
|
||||||
const emotion2 = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`);
|
const emotion2 = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`);
|
||||||
|
if (emotion2.length > 3)
|
||||||
|
emotion2.length = 3;
|
||||||
labels2.push(emotion2.join(" "));
|
labels2.push(emotion2.join(" "));
|
||||||
}
|
}
|
||||||
if (f.rotation && f.rotation.angle && f.rotation.gaze) {
|
if (f.rotation && f.rotation.angle && f.rotation.gaze) {
|
||||||
|
|
|
@ -4094,10 +4094,10 @@ async function predict(input, config3) {
|
||||||
annotations3[key] = MESH_ANNOTATIONS[key].map((index) => prediction.mesh[index]);
|
annotations3[key] = MESH_ANNOTATIONS[key].map((index) => prediction.mesh[index]);
|
||||||
}
|
}
|
||||||
const clampedBox = prediction.box ? [
|
const clampedBox = prediction.box ? [
|
||||||
Math.max(0, prediction.box.startPoint[0]),
|
Math.trunc(Math.max(0, prediction.box.startPoint[0])),
|
||||||
Math.max(0, prediction.box.startPoint[1]),
|
Math.trunc(Math.max(0, prediction.box.startPoint[1])),
|
||||||
Math.min(input.shape[2], prediction.box.endPoint[0]) - Math.max(0, prediction.box.startPoint[0]),
|
Math.trunc(Math.min(input.shape[2], prediction.box.endPoint[0]) - Math.max(0, prediction.box.startPoint[0])),
|
||||||
Math.min(input.shape[1], prediction.box.endPoint[1]) - Math.max(0, prediction.box.startPoint[1])
|
Math.trunc(Math.min(input.shape[1], prediction.box.endPoint[1]) - Math.max(0, prediction.box.startPoint[1]))
|
||||||
] : [0, 0, 0, 0];
|
] : [0, 0, 0, 0];
|
||||||
const boxRaw3 = prediction.box ? [
|
const boxRaw3 = prediction.box ? [
|
||||||
prediction.box.startPoint[0] / input.shape[2],
|
prediction.box.startPoint[0] / input.shape[2],
|
||||||
|
@ -4292,7 +4292,7 @@ async function predict3(image15, config3, idx, count2) {
|
||||||
return null;
|
return null;
|
||||||
if (skipped2 < config3.face.description.skipFrames && config3.skipFrame && lastCount2 === count2 && ((_a = last2[idx]) == null ? void 0 : _a.age) && ((_b = last2[idx]) == null ? void 0 : _b.age) > 0) {
|
if (skipped2 < config3.face.description.skipFrames && config3.skipFrame && lastCount2 === count2 && ((_a = last2[idx]) == null ? void 0 : _a.age) && ((_b = last2[idx]) == null ? void 0 : _b.age) > 0) {
|
||||||
skipped2++;
|
skipped2++;
|
||||||
return last2;
|
return last2[idx];
|
||||||
}
|
}
|
||||||
skipped2 = 0;
|
skipped2 = 0;
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
|
@ -4301,7 +4301,7 @@ async function predict3(image15, config3, idx, count2) {
|
||||||
const obj = {
|
const obj = {
|
||||||
age: 0,
|
age: 0,
|
||||||
gender: "unknown",
|
gender: "unknown",
|
||||||
genderConfidence: 0,
|
genderScore: 0,
|
||||||
descriptor: []
|
descriptor: []
|
||||||
};
|
};
|
||||||
if (config3.face.description.enabled)
|
if (config3.face.description.enabled)
|
||||||
|
@ -4313,7 +4313,7 @@ async function predict3(image15, config3, idx, count2) {
|
||||||
const confidence = Math.trunc(200 * Math.abs(gender[0] - 0.5)) / 100;
|
const confidence = Math.trunc(200 * Math.abs(gender[0] - 0.5)) / 100;
|
||||||
if (confidence > config3.face.description.minConfidence) {
|
if (confidence > config3.face.description.minConfidence) {
|
||||||
obj.gender = gender[0] <= 0.5 ? "female" : "male";
|
obj.gender = gender[0] <= 0.5 ? "female" : "male";
|
||||||
obj.genderConfidence = Math.min(0.99, confidence);
|
obj.genderScore = Math.min(0.99, confidence);
|
||||||
}
|
}
|
||||||
const age = resT.find((t) => t.shape[1] === 100).argMax(1).dataSync()[0];
|
const age = resT.find((t) => t.shape[1] === 100).argMax(1).dataSync()[0];
|
||||||
const all2 = resT.find((t) => t.shape[1] === 100).dataSync();
|
const all2 = resT.find((t) => t.shape[1] === 100).dataSync();
|
||||||
|
@ -4479,12 +4479,14 @@ var detectFace = async (parent, input) => {
|
||||||
delete faces[i].annotations.rightEyeIris;
|
delete faces[i].annotations.rightEyeIris;
|
||||||
}
|
}
|
||||||
const irisSize = ((_e = faces[i].annotations) == null ? void 0 : _e.leftEyeIris) && ((_f = faces[i].annotations) == null ? void 0 : _f.rightEyeIris) ? 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 irisSize = ((_e = faces[i].annotations) == null ? void 0 : _e.leftEyeIris) && ((_f = faces[i].annotations) == null ? void 0 : _f.rightEyeIris) ? 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;
|
||||||
|
if (faces[i].image)
|
||||||
|
delete faces[i].image;
|
||||||
faceRes.push({
|
faceRes.push({
|
||||||
...faces[i],
|
...faces[i],
|
||||||
id: i,
|
id: i,
|
||||||
age: descRes.age,
|
age: descRes.age,
|
||||||
gender: descRes.gender,
|
gender: descRes.gender,
|
||||||
genderScore: descRes.genderConfidence,
|
genderScore: descRes.genderScore,
|
||||||
embedding: descRes.descriptor,
|
embedding: descRes.descriptor,
|
||||||
emotion: emotionRes,
|
emotion: emotionRes,
|
||||||
iris: irisSize !== 0 ? Math.trunc(500 / irisSize / 11.7) / 100 : 0,
|
iris: irisSize !== 0 ? Math.trunc(500 / irisSize / 11.7) / 100 : 0,
|
||||||
|
@ -8068,9 +8070,9 @@ var HandPipeline = class {
|
||||||
dot2(boxCenter, inverseRotationMatrix[1])
|
dot2(boxCenter, inverseRotationMatrix[1])
|
||||||
];
|
];
|
||||||
return coordsRotated.map((coord) => [
|
return coordsRotated.map((coord) => [
|
||||||
coord[0] + originalBoxCenter[0],
|
Math.trunc(coord[0] + originalBoxCenter[0]),
|
||||||
coord[1] + originalBoxCenter[1],
|
Math.trunc(coord[1] + originalBoxCenter[1]),
|
||||||
coord[2]
|
Math.trunc(coord[2])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
async estimateHands(image15, config3) {
|
async estimateHands(image15, config3) {
|
||||||
|
@ -8184,10 +8186,10 @@ async function predict5(input, config3) {
|
||||||
boxRaw3 = [box6[0] / input.shape[2], box6[1] / input.shape[1], box6[2] / input.shape[2], box6[3] / input.shape[1]];
|
boxRaw3 = [box6[0] / input.shape[2], box6[1] / input.shape[1], box6[2] / input.shape[2], box6[3] / input.shape[1]];
|
||||||
} else {
|
} else {
|
||||||
box6 = predictions[i].box ? [
|
box6 = predictions[i].box ? [
|
||||||
Math.max(0, predictions[i].box.topLeft[0]),
|
Math.trunc(Math.max(0, predictions[i].box.topLeft[0])),
|
||||||
Math.max(0, predictions[i].box.topLeft[1]),
|
Math.trunc(Math.max(0, predictions[i].box.topLeft[1])),
|
||||||
Math.min(input.shape[2], predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0]),
|
Math.trunc(Math.min(input.shape[2], predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0])),
|
||||||
Math.min(input.shape[1], predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1])
|
Math.trunc(Math.min(input.shape[1], predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1]))
|
||||||
] : [0, 0, 0, 0];
|
] : [0, 0, 0, 0];
|
||||||
boxRaw3 = [
|
boxRaw3 = [
|
||||||
predictions[i].box.topLeft[0] / input.shape[2],
|
predictions[i].box.topLeft[0] / input.shape[2],
|
||||||
|
@ -8440,30 +8442,30 @@ async function predict7(image15, config3) {
|
||||||
keypoints.push({
|
keypoints.push({
|
||||||
score: Math.round(100 * partScore) / 100,
|
score: Math.round(100 * partScore) / 100,
|
||||||
part: bodyParts[id],
|
part: bodyParts[id],
|
||||||
positionRaw: {
|
positionRaw: [
|
||||||
x: x2 / model5.inputs[0].shape[2],
|
x2 / model5.inputs[0].shape[2],
|
||||||
y: y2 / model5.inputs[0].shape[1]
|
y2 / model5.inputs[0].shape[1]
|
||||||
},
|
],
|
||||||
position: {
|
position: [
|
||||||
x: Math.round(image15.shape[2] * x2 / model5.inputs[0].shape[2]),
|
Math.round(image15.shape[2] * x2 / model5.inputs[0].shape[2]),
|
||||||
y: Math.round(image15.shape[1] * y2 / model5.inputs[0].shape[1])
|
Math.round(image15.shape[1] * y2 / model5.inputs[0].shape[1])
|
||||||
}
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stack2.forEach((s) => tf15.dispose(s));
|
stack2.forEach((s) => tf15.dispose(s));
|
||||||
}
|
}
|
||||||
score = keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0);
|
score = keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0);
|
||||||
const x = keypoints.map((a) => a.position.x);
|
const x = keypoints.map((a) => a.position[0]);
|
||||||
const y = keypoints.map((a) => a.position.y);
|
const y = keypoints.map((a) => a.position[1]);
|
||||||
box4 = [
|
box4 = [
|
||||||
Math.min(...x),
|
Math.min(...x),
|
||||||
Math.min(...y),
|
Math.min(...y),
|
||||||
Math.max(...x) - Math.min(...x),
|
Math.max(...x) - Math.min(...x),
|
||||||
Math.max(...y) - Math.min(...y)
|
Math.max(...y) - Math.min(...y)
|
||||||
];
|
];
|
||||||
const xRaw = keypoints.map((a) => a.positionRaw.x);
|
const xRaw = keypoints.map((a) => a.positionRaw[0]);
|
||||||
const yRaw = keypoints.map((a) => a.positionRaw.y);
|
const yRaw = keypoints.map((a) => a.positionRaw[1]);
|
||||||
boxRaw = [
|
boxRaw = [
|
||||||
Math.min(...xRaw),
|
Math.min(...xRaw),
|
||||||
Math.min(...yRaw),
|
Math.min(...yRaw),
|
||||||
|
@ -9933,15 +9935,17 @@ async function face2(inCanvas2, result, drawOptions) {
|
||||||
if (localOptions.drawBoxes)
|
if (localOptions.drawBoxes)
|
||||||
rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], localOptions);
|
rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], localOptions);
|
||||||
const labels2 = [];
|
const labels2 = [];
|
||||||
labels2.push(`face confidence: ${Math.trunc(100 * f.score)}%`);
|
labels2.push(`face: ${Math.trunc(100 * f.score)}%`);
|
||||||
if (f.genderScore)
|
if (f.genderScore)
|
||||||
labels2.push(`${f.gender || ""} ${Math.trunc(100 * f.genderScore)}% confident`);
|
labels2.push(`${f.gender || ""} ${Math.trunc(100 * f.genderScore)}%`);
|
||||||
if (f.age)
|
if (f.age)
|
||||||
labels2.push(`age: ${f.age || ""}`);
|
labels2.push(`age: ${f.age || ""}`);
|
||||||
if (f.iris)
|
if (f.iris)
|
||||||
labels2.push(`distance: ${f.iris}`);
|
labels2.push(`distance: ${f.iris}`);
|
||||||
if (f.emotion && f.emotion.length > 0) {
|
if (f.emotion && f.emotion.length > 0) {
|
||||||
const emotion2 = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`);
|
const emotion2 = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`);
|
||||||
|
if (emotion2.length > 3)
|
||||||
|
emotion2.length = 3;
|
||||||
labels2.push(emotion2.join(" "));
|
labels2.push(emotion2.join(" "));
|
||||||
}
|
}
|
||||||
if (f.rotation && f.rotation.angle && f.rotation.gaze) {
|
if (f.rotation && f.rotation.angle && f.rotation.gaze) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -63,8 +63,8 @@
|
||||||
"@tensorflow/tfjs-node": "^3.6.1",
|
"@tensorflow/tfjs-node": "^3.6.1",
|
||||||
"@tensorflow/tfjs-node-gpu": "^3.6.1",
|
"@tensorflow/tfjs-node-gpu": "^3.6.1",
|
||||||
"@types/node": "^15.6.1",
|
"@types/node": "^15.6.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.25.0",
|
"@typescript-eslint/eslint-plugin": "^4.26.0",
|
||||||
"@typescript-eslint/parser": "^4.25.0",
|
"@typescript-eslint/parser": "^4.26.0",
|
||||||
"@vladmandic/pilogger": "^0.2.17",
|
"@vladmandic/pilogger": "^0.2.17",
|
||||||
"canvas": "^2.8.0",
|
"canvas": "^2.8.0",
|
||||||
"chokidar": "^3.5.1",
|
"chokidar": "^3.5.1",
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
2021-05-31 10:37:01 [36mINFO: [39m @vladmandic/human version 2.0.0
|
2021-06-01 08:56:45 [36mINFO: [39m @vladmandic/human version 2.0.0
|
||||||
2021-05-31 10:37:01 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
2021-06-01 08:56:45 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||||
2021-05-31 10:37:01 [36mINFO: [39m Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true}
|
2021-06-01 08:56:45 [36mINFO: [39m Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true}
|
||||||
2021-05-31 10:37:01 [35mSTATE:[39m Build for: node type: tfjs: {"imports":1,"importBytes":102,"outputBytes":1292,"outputFiles":"dist/tfjs.esm.js"}
|
2021-06-01 08:56:45 [35mSTATE:[39m Build for: node type: tfjs: {"imports":1,"importBytes":102,"outputBytes":1292,"outputFiles":"dist/tfjs.esm.js"}
|
||||||
2021-05-31 10:37:01 [35mSTATE:[39m Build for: node type: node: {"imports":40,"importBytes":416611,"outputBytes":369640,"outputFiles":"dist/human.node.js"}
|
2021-06-01 08:56:45 [35mSTATE:[39m Build for: node type: node: {"imports":40,"importBytes":418566,"outputBytes":371338,"outputFiles":"dist/human.node.js"}
|
||||||
2021-05-31 10:37:01 [35mSTATE:[39m Build for: nodeGPU type: tfjs: {"imports":1,"importBytes":110,"outputBytes":1300,"outputFiles":"dist/tfjs.esm.js"}
|
2021-06-01 08:56:45 [35mSTATE:[39m Build for: nodeGPU type: tfjs: {"imports":1,"importBytes":110,"outputBytes":1300,"outputFiles":"dist/tfjs.esm.js"}
|
||||||
2021-05-31 10:37:01 [35mSTATE:[39m Build for: nodeGPU type: node: {"imports":40,"importBytes":416619,"outputBytes":369644,"outputFiles":"dist/human.node-gpu.js"}
|
2021-06-01 08:56:46 [35mSTATE:[39m Build for: nodeGPU type: node: {"imports":40,"importBytes":418574,"outputBytes":371342,"outputFiles":"dist/human.node-gpu.js"}
|
||||||
2021-05-31 10:37:01 [35mSTATE:[39m Build for: nodeWASM type: tfjs: {"imports":1,"importBytes":149,"outputBytes":1367,"outputFiles":"dist/tfjs.esm.js"}
|
2021-06-01 08:56:46 [35mSTATE:[39m Build for: nodeWASM type: tfjs: {"imports":1,"importBytes":149,"outputBytes":1367,"outputFiles":"dist/tfjs.esm.js"}
|
||||||
2021-05-31 10:37:02 [35mSTATE:[39m Build for: nodeWASM type: node: {"imports":40,"importBytes":416686,"outputBytes":369716,"outputFiles":"dist/human.node-wasm.js"}
|
2021-06-01 08:56:46 [35mSTATE:[39m Build for: nodeWASM type: node: {"imports":40,"importBytes":418641,"outputBytes":371414,"outputFiles":"dist/human.node-wasm.js"}
|
||||||
2021-05-31 10:37:02 [35mSTATE:[39m Build for: browserNoBundle type: tfjs: {"imports":1,"importBytes":2478,"outputBytes":1394,"outputFiles":"dist/tfjs.esm.js"}
|
2021-06-01 08:56:46 [35mSTATE:[39m Build for: browserNoBundle type: tfjs: {"imports":1,"importBytes":2478,"outputBytes":1394,"outputFiles":"dist/tfjs.esm.js"}
|
||||||
2021-05-31 10:37:02 [35mSTATE:[39m Build for: browserNoBundle type: esm: {"imports":40,"importBytes":416713,"outputBytes":243751,"outputFiles":"dist/human.esm-nobundle.js"}
|
2021-06-01 08:56:46 [35mSTATE:[39m Build for: browserNoBundle type: esm: {"imports":40,"importBytes":418668,"outputBytes":244745,"outputFiles":"dist/human.esm-nobundle.js"}
|
||||||
2021-05-31 10:37:02 [35mSTATE:[39m Build for: browserBundle type: tfjs: {"modules":1274,"moduleBytes":4114813,"imports":7,"importBytes":2478,"outputBytes":1111418,"outputFiles":"dist/tfjs.esm.js"}
|
2021-06-01 08:56:46 [35mSTATE:[39m Build for: browserBundle type: tfjs: {"modules":1274,"moduleBytes":4114813,"imports":7,"importBytes":2478,"outputBytes":1111418,"outputFiles":"dist/tfjs.esm.js"}
|
||||||
2021-05-31 10:37:03 [35mSTATE:[39m Build for: browserBundle type: iife: {"imports":40,"importBytes":1526737,"outputBytes":1351575,"outputFiles":"dist/human.js"}
|
2021-06-01 08:56:47 [35mSTATE:[39m Build for: browserBundle type: iife: {"imports":40,"importBytes":1528692,"outputBytes":1352544,"outputFiles":"dist/human.js"}
|
||||||
2021-05-31 10:37:03 [35mSTATE:[39m Build for: browserBundle type: esm: {"imports":40,"importBytes":1526737,"outputBytes":1351567,"outputFiles":"dist/human.esm.js"}
|
2021-06-01 08:56:47 [35mSTATE:[39m Build for: browserBundle type: esm: {"imports":40,"importBytes":1528692,"outputBytes":1352536,"outputFiles":"dist/human.esm.js"}
|
||||||
2021-05-31 10:37:03 [36mINFO: [39m Generate types: ["src/human.ts"]
|
2021-06-01 08:56:47 [36mINFO: [39m Generate types: ["src/human.ts"]
|
||||||
2021-05-31 10:37:08 [36mINFO: [39m Update Change log: ["/home/vlado/dev/human/CHANGELOG.md"]
|
2021-06-01 08:56:52 [36mINFO: [39m Update Change log: ["/home/vlado/dev/human/CHANGELOG.md"]
|
||||||
2021-05-31 10:37:08 [36mINFO: [39m Generate TypeDocs: ["src/human.ts"]
|
2021-06-01 08:56:52 [36mINFO: [39m Generate TypeDocs: ["src/human.ts"]
|
||||||
|
|
|
@ -13,7 +13,6 @@ import { Face } from '../result';
|
||||||
let faceModels: [blazeface.BlazeFaceModel | null, GraphModel | null, GraphModel | null] = [null, null, null];
|
let faceModels: [blazeface.BlazeFaceModel | null, GraphModel | null, GraphModel | null] = [null, null, null];
|
||||||
let facePipeline;
|
let facePipeline;
|
||||||
|
|
||||||
// export async function predict(input, config): Promise<{ confidence, boxConfidence, faceConfidence, box, mesh, boxRaw, meshRaw, annotations, image }[]> {
|
|
||||||
export async function predict(input, config): Promise<Face[]> {
|
export async function predict(input, config): Promise<Face[]> {
|
||||||
const predictions = await facePipeline.predict(input, config);
|
const predictions = await facePipeline.predict(input, config);
|
||||||
const results: Array<Face> = [];
|
const results: Array<Face> = [];
|
||||||
|
@ -30,10 +29,10 @@ export async function predict(input, config): Promise<Face[]> {
|
||||||
for (const key of Object.keys(coords.MESH_ANNOTATIONS)) annotations[key] = coords.MESH_ANNOTATIONS[key].map((index) => prediction.mesh[index]);
|
for (const key of Object.keys(coords.MESH_ANNOTATIONS)) annotations[key] = coords.MESH_ANNOTATIONS[key].map((index) => prediction.mesh[index]);
|
||||||
}
|
}
|
||||||
const clampedBox: [number, number, number, number] = prediction.box ? [
|
const clampedBox: [number, number, number, number] = prediction.box ? [
|
||||||
Math.max(0, prediction.box.startPoint[0]),
|
Math.trunc(Math.max(0, prediction.box.startPoint[0])),
|
||||||
Math.max(0, prediction.box.startPoint[1]),
|
Math.trunc(Math.max(0, prediction.box.startPoint[1])),
|
||||||
Math.min(input.shape[2], prediction.box.endPoint[0]) - Math.max(0, prediction.box.startPoint[0]),
|
Math.trunc(Math.min(input.shape[2], prediction.box.endPoint[0]) - Math.max(0, prediction.box.startPoint[0])),
|
||||||
Math.min(input.shape[1], prediction.box.endPoint[1]) - Math.max(0, prediction.box.startPoint[1]),
|
Math.trunc(Math.min(input.shape[1], prediction.box.endPoint[1]) - Math.max(0, prediction.box.startPoint[1])),
|
||||||
] : [0, 0, 0, 0];
|
] : [0, 0, 0, 0];
|
||||||
const boxRaw: [number, number, number, number] = prediction.box ? [
|
const boxRaw: [number, number, number, number] = prediction.box ? [
|
||||||
prediction.box.startPoint[0] / input.shape[2],
|
prediction.box.startPoint[0] / input.shape[2],
|
||||||
|
|
|
@ -174,13 +174,13 @@ export async function face(inCanvas: HTMLCanvasElement, result: Array<Face>, dra
|
||||||
if (localOptions.drawBoxes) rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], localOptions);
|
if (localOptions.drawBoxes) rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], localOptions);
|
||||||
// silly hack since fillText does not suport new line
|
// silly hack since fillText does not suport new line
|
||||||
const labels:string[] = [];
|
const labels:string[] = [];
|
||||||
labels.push(`face confidence: ${Math.trunc(100 * f.score)}%`);
|
labels.push(`face: ${Math.trunc(100 * f.score)}%`);
|
||||||
if (f.genderScore) labels.push(`${f.gender || ''} ${Math.trunc(100 * f.genderScore)}% confident`);
|
if (f.genderScore) labels.push(`${f.gender || ''} ${Math.trunc(100 * f.genderScore)}%`);
|
||||||
// if (f.genderConfidence) labels.push(f.gender);
|
|
||||||
if (f.age) labels.push(`age: ${f.age || ''}`);
|
if (f.age) labels.push(`age: ${f.age || ''}`);
|
||||||
if (f.iris) labels.push(`distance: ${f.iris}`);
|
if (f.iris) labels.push(`distance: ${f.iris}`);
|
||||||
if (f.emotion && f.emotion.length > 0) {
|
if (f.emotion && f.emotion.length > 0) {
|
||||||
const emotion = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`);
|
const emotion = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`);
|
||||||
|
if (emotion.length > 3) emotion.length = 3;
|
||||||
labels.push(emotion.join(' '));
|
labels.push(emotion.join(' '));
|
||||||
}
|
}
|
||||||
if (f.rotation && f.rotation.angle && f.rotation.gaze) {
|
if (f.rotation && f.rotation.angle && f.rotation.gaze) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { GraphModel } from '../tfjs/types';
|
||||||
|
|
||||||
let model: GraphModel;
|
let model: GraphModel;
|
||||||
|
|
||||||
type Keypoints = { score: number, part: string, position: { x: number, y: number }, positionRaw: { x: number, y: number } };
|
type Keypoints = { score: number, part: string, position: [number, number], positionRaw: [number, number] };
|
||||||
|
|
||||||
const keypoints: Array<Keypoints> = [];
|
const keypoints: Array<Keypoints> = [];
|
||||||
let box: [number, number, number, number] = [0, 0, 0, 0];
|
let box: [number, number, number, number] = [0, 0, 0, 0];
|
||||||
|
@ -84,30 +84,30 @@ export async function predict(image, config): Promise<Body[]> {
|
||||||
keypoints.push({
|
keypoints.push({
|
||||||
score: Math.round(100 * partScore) / 100,
|
score: Math.round(100 * partScore) / 100,
|
||||||
part: bodyParts[id],
|
part: bodyParts[id],
|
||||||
positionRaw: { // normalized to 0..1
|
positionRaw: [ // normalized to 0..1
|
||||||
// @ts-ignore model is not undefined here
|
// @ts-ignore model is not undefined here
|
||||||
x: x / model.inputs[0].shape[2], y: y / model.inputs[0].shape[1],
|
x / model.inputs[0].shape[2], y / model.inputs[0].shape[1],
|
||||||
},
|
],
|
||||||
position: { // normalized to input image size
|
position: [ // normalized to input image size
|
||||||
// @ts-ignore model is not undefined here
|
// @ts-ignore model is not undefined here
|
||||||
x: Math.round(image.shape[2] * x / model.inputs[0].shape[2]), y: Math.round(image.shape[1] * y / model.inputs[0].shape[1]),
|
Math.round(image.shape[2] * x / model.inputs[0].shape[2]), Math.round(image.shape[1] * y / model.inputs[0].shape[1]),
|
||||||
},
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stack.forEach((s) => tf.dispose(s));
|
stack.forEach((s) => tf.dispose(s));
|
||||||
}
|
}
|
||||||
score = keypoints.reduce((prev, curr) => (curr.score > prev ? curr.score : prev), 0);
|
score = keypoints.reduce((prev, curr) => (curr.score > prev ? curr.score : prev), 0);
|
||||||
const x = keypoints.map((a) => a.position.x);
|
const x = keypoints.map((a) => a.position[0]);
|
||||||
const y = keypoints.map((a) => a.position.y);
|
const y = keypoints.map((a) => a.position[1]);
|
||||||
box = [
|
box = [
|
||||||
Math.min(...x),
|
Math.min(...x),
|
||||||
Math.min(...y),
|
Math.min(...y),
|
||||||
Math.max(...x) - Math.min(...x),
|
Math.max(...x) - Math.min(...x),
|
||||||
Math.max(...y) - Math.min(...y),
|
Math.max(...y) - Math.min(...y),
|
||||||
];
|
];
|
||||||
const xRaw = keypoints.map((a) => a.positionRaw.x);
|
const xRaw = keypoints.map((a) => a.positionRaw[0]);
|
||||||
const yRaw = keypoints.map((a) => a.positionRaw.y);
|
const yRaw = keypoints.map((a) => a.positionRaw[1]);
|
||||||
boxRaw = [
|
boxRaw = [
|
||||||
Math.min(...xRaw),
|
Math.min(...xRaw),
|
||||||
Math.min(...yRaw),
|
Math.min(...yRaw),
|
||||||
|
|
|
@ -160,6 +160,7 @@ export const detectFace = async (parent /* instance of human */, input: Tensor):
|
||||||
parent.analyze('Get Face');
|
parent.analyze('Get Face');
|
||||||
|
|
||||||
// is something went wrong, skip the face
|
// is something went wrong, skip the face
|
||||||
|
// @ts-ignore possibly undefined
|
||||||
if (!faces[i].image || faces[i].image['isDisposedInternal']) {
|
if (!faces[i].image || faces[i].image['isDisposedInternal']) {
|
||||||
log('Face object is disposed:', faces[i].image);
|
log('Face object is disposed:', faces[i].image);
|
||||||
continue;
|
continue;
|
||||||
|
@ -210,12 +211,13 @@ export const detectFace = async (parent /* instance of human */, input: Tensor):
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
// combine results
|
// combine results
|
||||||
|
if (faces[i].image) delete faces[i].image;
|
||||||
faceRes.push({
|
faceRes.push({
|
||||||
...faces[i],
|
...faces[i],
|
||||||
id: i,
|
id: i,
|
||||||
age: descRes.age,
|
age: descRes.age,
|
||||||
gender: descRes.gender,
|
gender: descRes.gender,
|
||||||
genderScore: descRes.genderConfidence,
|
genderScore: descRes.genderScore,
|
||||||
embedding: descRes.descriptor,
|
embedding: descRes.descriptor,
|
||||||
emotion: emotionRes,
|
emotion: emotionRes,
|
||||||
iris: irisSize !== 0 ? Math.trunc(500 / irisSize / 11.7) / 100 : 0,
|
iris: irisSize !== 0 ? Math.trunc(500 / irisSize / 11.7) / 100 : 0,
|
||||||
|
|
|
@ -9,7 +9,13 @@ import * as tf from '../../dist/tfjs.esm.js';
|
||||||
import { Tensor, GraphModel } from '../tfjs/types';
|
import { Tensor, GraphModel } from '../tfjs/types';
|
||||||
|
|
||||||
let model: GraphModel;
|
let model: GraphModel;
|
||||||
const last: Array<{ age: number}> = [];
|
const last: Array<{
|
||||||
|
age: number,
|
||||||
|
gender: string,
|
||||||
|
genderScore: number,
|
||||||
|
descriptor: number[],
|
||||||
|
}> = [];
|
||||||
|
|
||||||
let lastCount = 0;
|
let lastCount = 0;
|
||||||
let skipped = Number.MAX_SAFE_INTEGER;
|
let skipped = Number.MAX_SAFE_INTEGER;
|
||||||
|
|
||||||
|
@ -108,7 +114,7 @@ export async function predict(image, config, idx, count) {
|
||||||
if (!model) return null;
|
if (!model) return null;
|
||||||
if ((skipped < config.face.description.skipFrames) && config.skipFrame && (lastCount === count) && last[idx]?.age && (last[idx]?.age > 0)) {
|
if ((skipped < config.face.description.skipFrames) && config.skipFrame && (lastCount === count) && last[idx]?.age && (last[idx]?.age > 0)) {
|
||||||
skipped++;
|
skipped++;
|
||||||
return last;
|
return last[idx];
|
||||||
}
|
}
|
||||||
skipped = 0;
|
skipped = 0;
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
|
@ -118,8 +124,9 @@ export async function predict(image, config, idx, count) {
|
||||||
const obj = {
|
const obj = {
|
||||||
age: <number>0,
|
age: <number>0,
|
||||||
gender: <string>'unknown',
|
gender: <string>'unknown',
|
||||||
genderConfidence: <number>0,
|
genderScore: <number>0,
|
||||||
descriptor: <number[]>[] };
|
descriptor: <number[]>[],
|
||||||
|
};
|
||||||
|
|
||||||
if (config.face.description.enabled) resT = await model.predict(enhanced);
|
if (config.face.description.enabled) resT = await model.predict(enhanced);
|
||||||
tf.dispose(enhanced);
|
tf.dispose(enhanced);
|
||||||
|
@ -130,7 +137,7 @@ export async function predict(image, config, idx, count) {
|
||||||
const confidence = Math.trunc(200 * Math.abs((gender[0] - 0.5))) / 100;
|
const confidence = Math.trunc(200 * Math.abs((gender[0] - 0.5))) / 100;
|
||||||
if (confidence > config.face.description.minConfidence) {
|
if (confidence > config.face.description.minConfidence) {
|
||||||
obj.gender = gender[0] <= 0.5 ? 'female' : 'male';
|
obj.gender = gender[0] <= 0.5 ? 'female' : 'male';
|
||||||
obj.genderConfidence = Math.min(0.99, confidence);
|
obj.genderScore = Math.min(0.99, confidence);
|
||||||
}
|
}
|
||||||
const age = resT.find((t) => t.shape[1] === 100).argMax(1).dataSync()[0];
|
const age = resT.find((t) => t.shape[1] === 100).argMax(1).dataSync()[0];
|
||||||
const all = resT.find((t) => t.shape[1] === 100).dataSync();
|
const all = resT.find((t) => t.shape[1] === 100).dataSync();
|
||||||
|
|
|
@ -73,9 +73,9 @@ export class HandPipeline {
|
||||||
util.dot(boxCenter, inverseRotationMatrix[1]),
|
util.dot(boxCenter, inverseRotationMatrix[1]),
|
||||||
];
|
];
|
||||||
return coordsRotated.map((coord) => [
|
return coordsRotated.map((coord) => [
|
||||||
coord[0] + originalBoxCenter[0],
|
Math.trunc(coord[0] + originalBoxCenter[0]),
|
||||||
coord[1] + originalBoxCenter[1],
|
Math.trunc(coord[1] + originalBoxCenter[1]),
|
||||||
coord[2],
|
Math.trunc(coord[2]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,10 +51,10 @@ export async function predict(input, config): Promise<Hand[]> {
|
||||||
boxRaw = [box[0] / input.shape[2], box[1] / input.shape[1], box[2] / input.shape[2], box[3] / input.shape[1]];
|
boxRaw = [box[0] / input.shape[2], box[1] / input.shape[1], box[2] / input.shape[2], box[3] / input.shape[1]];
|
||||||
} else { // otherwise use box from prediction
|
} else { // otherwise use box from prediction
|
||||||
box = predictions[i].box ? [
|
box = predictions[i].box ? [
|
||||||
Math.max(0, predictions[i].box.topLeft[0]),
|
Math.trunc(Math.max(0, predictions[i].box.topLeft[0])),
|
||||||
Math.max(0, predictions[i].box.topLeft[1]),
|
Math.trunc(Math.max(0, predictions[i].box.topLeft[1])),
|
||||||
Math.min(input.shape[2], predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0]),
|
Math.trunc(Math.min(input.shape[2], predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0])),
|
||||||
Math.min(input.shape[1], predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1]),
|
Math.trunc(Math.min(input.shape[1], predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1])),
|
||||||
] : [0, 0, 0, 0];
|
] : [0, 0, 0, 0];
|
||||||
boxRaw = [
|
boxRaw = [
|
||||||
(predictions[i].box.topLeft[0]) / input.shape[2],
|
(predictions[i].box.topLeft[0]) / input.shape[2],
|
||||||
|
|
|
@ -52,7 +52,7 @@ export interface Face {
|
||||||
matrix: [number, number, number, number, number, number, number, number, number],
|
matrix: [number, number, number, number, number, number, number, number, number],
|
||||||
gaze: { bearing: number, strength: number },
|
gaze: { bearing: number, strength: number },
|
||||||
}
|
}
|
||||||
image: typeof Tensor;
|
image?: typeof Tensor;
|
||||||
tensor: typeof Tensor,
|
tensor: typeof Tensor,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
338
test/test.log
338
test/test.log
|
@ -1,169 +1,169 @@
|
||||||
2021-05-31 10:37:36 [36mINFO: [39m @vladmandic/human version 2.0.0
|
2021-06-01 08:57:45 [36mINFO: [39m @vladmandic/human version 2.0.0
|
||||||
2021-05-31 10:37:36 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
2021-06-01 08:57:45 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||||
2021-05-31 10:37:36 [36mINFO: [39m tests: ["test-node.js","test-node-gpu.js","test-node-wasm.js"]
|
2021-06-01 08:57:45 [36mINFO: [39m tests: ["test-node.js","test-node-gpu.js","test-node-wasm.js"]
|
||||||
2021-05-31 10:37:36 [36mINFO: [39m test-node.js start
|
2021-06-01 08:57:45 [36mINFO: [39m test-node.js start
|
||||||
2021-05-31 10:37:37 [35mSTATE:[39m test-node.js passed: create human
|
2021-06-01 08:57:45 [35mSTATE:[39m test-node.js passed: create human
|
||||||
2021-05-31 10:37:37 [36mINFO: [39m test-node.js human version: 2.0.0
|
2021-06-01 08:57:45 [36mINFO: [39m test-node.js human version: 2.0.0
|
||||||
2021-05-31 10:37:37 [36mINFO: [39m test-node.js platform: linux x64 agent: NodeJS v16.0.0
|
2021-06-01 08:57:45 [36mINFO: [39m test-node.js platform: linux x64 agent: NodeJS v16.0.0
|
||||||
2021-05-31 10:37:37 [36mINFO: [39m test-node.js tfjs version: 3.6.0
|
2021-06-01 08:57:45 [36mINFO: [39m test-node.js tfjs version: 3.6.0
|
||||||
2021-05-31 10:37:37 [35mSTATE:[39m test-node.js passed: set backend: tensorflow
|
2021-06-01 08:57:46 [35mSTATE:[39m test-node.js passed: set backend: tensorflow
|
||||||
2021-05-31 10:37:37 [35mSTATE:[39m test-node.js passed: load models
|
2021-06-01 08:57:46 [35mSTATE:[39m test-node.js passed: load models
|
||||||
2021-05-31 10:37:37 [35mSTATE:[39m test-node.js result: defined models: 13 loaded models: 6
|
2021-06-01 08:57:46 [35mSTATE:[39m test-node.js result: defined models: 13 loaded models: 6
|
||||||
2021-05-31 10:37:37 [35mSTATE:[39m test-node.js passed: warmup: none default
|
2021-06-01 08:57:46 [35mSTATE:[39m test-node.js passed: warmup: none default
|
||||||
2021-05-31 10:37:39 [35mSTATE:[39m test-node.js passed: warmup: face default
|
2021-06-01 08:57:47 [35mSTATE:[39m test-node.js passed: warmup: face default
|
||||||
2021-05-31 10:37:39 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":5}
|
2021-06-01 08:57:47 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":5}
|
||||||
2021-05-31 10:37:39 [32mDATA: [39m test-node.js result: performance: load: 341 total: 1576
|
2021-06-01 08:57:47 [32mDATA: [39m test-node.js result: performance: load: 334 total: 1463
|
||||||
2021-05-31 10:37:41 [35mSTATE:[39m test-node.js passed: warmup: body default
|
2021-06-01 08:57:49 [35mSTATE:[39m test-node.js passed: warmup: body default
|
||||||
2021-05-31 10:37:41 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
2021-06-01 08:57:49 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||||
2021-05-31 10:37:41 [32mDATA: [39m test-node.js result: performance: load: 341 total: 1531
|
2021-06-01 08:57:49 [32mDATA: [39m test-node.js result: performance: load: 334 total: 1665
|
||||||
2021-05-31 10:37:41 [36mINFO: [39m test-node.js test body variants
|
2021-06-01 08:57:49 [36mINFO: [39m test-node.js test body variants
|
||||||
2021-05-31 10:37:42 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:57:50 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:37:43 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg posenet
|
2021-06-01 08:57:51 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg posenet
|
||||||
2021-05-31 10:37:43 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.72,"class":"person"} {"score":0.96,"keypoints":16}
|
2021-06-01 08:57:51 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.96,"keypoints":16}
|
||||||
2021-05-31 10:37:43 [32mDATA: [39m test-node.js result: performance: load: 341 total: 1023
|
2021-06-01 08:57:51 [32mDATA: [39m test-node.js result: performance: load: 334 total: 1015
|
||||||
2021-05-31 10:37:44 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:57:52 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:37:44 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg movenet
|
2021-06-01 08:57:52 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg movenet
|
||||||
2021-05-31 10:37:44 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
2021-06-01 08:57:52 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||||
2021-05-31 10:37:44 [32mDATA: [39m test-node.js result: performance: load: 341 total: 305
|
2021-06-01 08:57:52 [32mDATA: [39m test-node.js result: performance: load: 334 total: 376
|
||||||
2021-05-31 10:37:45 [35mSTATE:[39m test-node.js passed: detect: random default
|
2021-06-01 08:57:53 [35mSTATE:[39m test-node.js passed: detect: random default
|
||||||
2021-05-31 10:37:45 [32mDATA: [39m test-node.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0}
|
2021-06-01 08:57:53 [32mDATA: [39m test-node.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0}
|
||||||
2021-05-31 10:37:45 [32mDATA: [39m test-node.js result: performance: load: 341 total: 817
|
2021-06-01 08:57:53 [32mDATA: [39m test-node.js result: performance: load: 334 total: 882
|
||||||
2021-05-31 10:37:45 [36mINFO: [39m test-node.js test: first instance
|
2021-06-01 08:57:53 [36mINFO: [39m test-node.js test: first instance
|
||||||
2021-05-31 10:37:45 [35mSTATE:[39m test-node.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
2021-06-01 08:57:53 [35mSTATE:[39m test-node.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||||
2021-05-31 10:37:47 [35mSTATE:[39m test-node.js passed: detect: assets/sample-me.jpg default
|
2021-06-01 08:57:55 [35mSTATE:[39m test-node.js passed: detect: assets/sample-me.jpg default
|
||||||
2021-05-31 10:37:47 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {"score":0.68,"class":"person"} {"score":0.67,"keypoints":7}
|
2021-06-01 08:57:55 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"age":39.2,"gender":"male"} {"score":0.68,"class":"person"} {"score":0.67,"keypoints":7}
|
||||||
2021-05-31 10:37:47 [32mDATA: [39m test-node.js result: performance: load: 341 total: 1502
|
2021-06-01 08:57:55 [32mDATA: [39m test-node.js result: performance: load: 334 total: 1387
|
||||||
2021-05-31 10:37:47 [36mINFO: [39m test-node.js test: second instance
|
2021-06-01 08:57:55 [36mINFO: [39m test-node.js test: second instance
|
||||||
2021-05-31 10:37:47 [35mSTATE:[39m test-node.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
2021-06-01 08:57:55 [35mSTATE:[39m test-node.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||||
2021-05-31 10:37:48 [35mSTATE:[39m test-node.js passed: detect: assets/sample-me.jpg default
|
2021-06-01 08:57:57 [35mSTATE:[39m test-node.js passed: detect: assets/sample-me.jpg default
|
||||||
2021-05-31 10:37:48 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {"score":0.68,"class":"person"} {"score":0.67,"keypoints":7}
|
2021-06-01 08:57:57 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"age":39.2,"gender":"male"} {"score":0.68,"class":"person"} {"score":0.67,"keypoints":7}
|
||||||
2021-05-31 10:37:48 [32mDATA: [39m test-node.js result: performance: load: 5 total: 1518
|
2021-06-01 08:57:57 [32mDATA: [39m test-node.js result: performance: load: 2 total: 1339
|
||||||
2021-05-31 10:37:48 [36mINFO: [39m test-node.js test: concurrent
|
2021-06-01 08:57:57 [36mINFO: [39m test-node.js test: concurrent
|
||||||
2021-05-31 10:37:49 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
2021-06-01 08:57:57 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||||
2021-05-31 10:37:49 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
2021-06-01 08:57:57 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||||
2021-05-31 10:37:50 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:57:58 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:37:51 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:57:59 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:37:56 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-face.jpg default
|
2021-06-01 08:58:04 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-face.jpg default
|
||||||
2021-05-31 10:37:56 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
2021-06-01 08:58:04 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
||||||
2021-05-31 10:37:56 [32mDATA: [39m test-node.js result: performance: load: 341 total: 5470
|
2021-06-01 08:58:04 [32mDATA: [39m test-node.js result: performance: load: 334 total: 5263
|
||||||
2021-05-31 10:37:56 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-face.jpg default
|
2021-06-01 08:58:04 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-face.jpg default
|
||||||
2021-05-31 10:37:56 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
2021-06-01 08:58:04 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
||||||
2021-05-31 10:37:56 [32mDATA: [39m test-node.js result: performance: load: 5 total: 5470
|
2021-06-01 08:58:04 [32mDATA: [39m test-node.js result: performance: load: 2 total: 5263
|
||||||
2021-05-31 10:37:56 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg default
|
2021-06-01 08:58:04 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg default
|
||||||
2021-05-31 10:37:56 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
2021-06-01 08:58:04 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||||
2021-05-31 10:37:56 [32mDATA: [39m test-node.js result: performance: load: 341 total: 5470
|
2021-06-01 08:58:04 [32mDATA: [39m test-node.js result: performance: load: 334 total: 5263
|
||||||
2021-05-31 10:37:56 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg default
|
2021-06-01 08:58:04 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg default
|
||||||
2021-05-31 10:37:56 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
2021-06-01 08:58:04 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||||
2021-05-31 10:37:56 [32mDATA: [39m test-node.js result: performance: load: 5 total: 5470
|
2021-06-01 08:58:04 [32mDATA: [39m test-node.js result: performance: load: 2 total: 5263
|
||||||
2021-05-31 10:37:56 [36mINFO: [39m test-node.js test complete: 19120 ms
|
2021-06-01 08:58:04 [36mINFO: [39m test-node.js test complete: 18675 ms
|
||||||
2021-05-31 10:37:56 [36mINFO: [39m test-node-gpu.js start
|
2021-06-01 08:58:04 [36mINFO: [39m test-node-gpu.js start
|
||||||
2021-05-31 10:37:57 [33mWARN: [39m test-node-gpu.js stderr: 2021-05-31 10:37:57.184324: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
|
2021-06-01 08:58:04 [33mWARN: [39m test-node-gpu.js stderr: 2021-06-01 08:58:04.942701: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
|
||||||
2021-05-31 10:37:57 [33mWARN: [39m test-node-gpu.js stderr: 2021-05-31 10:37:57.237012: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
|
2021-06-01 08:58:04 [33mWARN: [39m test-node-gpu.js stderr: 2021-06-01 08:58:04.994440: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
|
||||||
2021-05-31 10:37:57 [33mWARN: [39m test-node-gpu.js stderr: 2021-05-31 10:37:57.237106: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (wyse): /proc/driver/nvidia/version does not exist
|
2021-06-01 08:58:04 [33mWARN: [39m test-node-gpu.js stderr: 2021-06-01 08:58:04.994476: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (wyse): /proc/driver/nvidia/version does not exist
|
||||||
2021-05-31 10:37:57 [35mSTATE:[39m test-node-gpu.js passed: create human
|
2021-06-01 08:58:05 [35mSTATE:[39m test-node-gpu.js passed: create human
|
||||||
2021-05-31 10:37:57 [36mINFO: [39m test-node-gpu.js human version: 2.0.0
|
2021-06-01 08:58:05 [36mINFO: [39m test-node-gpu.js human version: 2.0.0
|
||||||
2021-05-31 10:37:57 [36mINFO: [39m test-node-gpu.js platform: linux x64 agent: NodeJS v16.0.0
|
2021-06-01 08:58:05 [36mINFO: [39m test-node-gpu.js platform: linux x64 agent: NodeJS v16.0.0
|
||||||
2021-05-31 10:37:57 [36mINFO: [39m test-node-gpu.js tfjs version: 3.6.0
|
2021-06-01 08:58:05 [36mINFO: [39m test-node-gpu.js tfjs version: 3.6.0
|
||||||
2021-05-31 10:37:57 [35mSTATE:[39m test-node-gpu.js passed: set backend: tensorflow
|
2021-06-01 08:58:05 [35mSTATE:[39m test-node-gpu.js passed: set backend: tensorflow
|
||||||
2021-05-31 10:37:57 [35mSTATE:[39m test-node-gpu.js passed: load models
|
2021-06-01 08:58:05 [35mSTATE:[39m test-node-gpu.js passed: load models
|
||||||
2021-05-31 10:37:57 [35mSTATE:[39m test-node-gpu.js result: defined models: 13 loaded models: 6
|
2021-06-01 08:58:05 [35mSTATE:[39m test-node-gpu.js result: defined models: 13 loaded models: 6
|
||||||
2021-05-31 10:37:57 [35mSTATE:[39m test-node-gpu.js passed: warmup: none default
|
2021-06-01 08:58:05 [35mSTATE:[39m test-node-gpu.js passed: warmup: none default
|
||||||
2021-05-31 10:37:59 [35mSTATE:[39m test-node-gpu.js passed: warmup: face default
|
2021-06-01 08:58:06 [35mSTATE:[39m test-node-gpu.js passed: warmup: face default
|
||||||
2021-05-31 10:37:59 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":5}
|
2021-06-01 08:58:06 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":5}
|
||||||
2021-05-31 10:37:59 [32mDATA: [39m test-node-gpu.js result: performance: load: 336 total: 1872
|
2021-06-01 08:58:06 [32mDATA: [39m test-node-gpu.js result: performance: load: 333 total: 1468
|
||||||
2021-05-31 10:38:01 [35mSTATE:[39m test-node-gpu.js passed: warmup: body default
|
2021-06-01 08:58:08 [35mSTATE:[39m test-node-gpu.js passed: warmup: body default
|
||||||
2021-05-31 10:38:01 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
2021-06-01 08:58:08 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||||
2021-05-31 10:38:01 [32mDATA: [39m test-node-gpu.js result: performance: load: 336 total: 1592
|
2021-06-01 08:58:08 [32mDATA: [39m test-node-gpu.js result: performance: load: 333 total: 1521
|
||||||
2021-05-31 10:38:01 [36mINFO: [39m test-node-gpu.js test body variants
|
2021-06-01 08:58:08 [36mINFO: [39m test-node-gpu.js test body variants
|
||||||
2021-05-31 10:38:02 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:58:09 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:38:03 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg posenet
|
2021-06-01 08:58:10 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg posenet
|
||||||
2021-05-31 10:38:03 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.72,"class":"person"} {"score":0.96,"keypoints":16}
|
2021-06-01 08:58:10 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.96,"keypoints":16}
|
||||||
2021-05-31 10:38:03 [32mDATA: [39m test-node-gpu.js result: performance: load: 336 total: 945
|
2021-06-01 08:58:10 [32mDATA: [39m test-node-gpu.js result: performance: load: 333 total: 977
|
||||||
2021-05-31 10:38:04 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:58:11 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:38:04 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg movenet
|
2021-06-01 08:58:11 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg movenet
|
||||||
2021-05-31 10:38:04 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
2021-06-01 08:58:11 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||||
2021-05-31 10:38:04 [32mDATA: [39m test-node-gpu.js result: performance: load: 336 total: 337
|
2021-06-01 08:58:11 [32mDATA: [39m test-node-gpu.js result: performance: load: 333 total: 270
|
||||||
2021-05-31 10:38:05 [35mSTATE:[39m test-node-gpu.js passed: detect: random default
|
2021-06-01 08:58:12 [35mSTATE:[39m test-node-gpu.js passed: detect: random default
|
||||||
2021-05-31 10:38:05 [32mDATA: [39m test-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0}
|
2021-06-01 08:58:12 [32mDATA: [39m test-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 1 person: 0 {} {"score":0.72,"class":"person"} {"score":0,"keypoints":0}
|
||||||
2021-05-31 10:38:05 [32mDATA: [39m test-node-gpu.js result: performance: load: 336 total: 778
|
2021-06-01 08:58:12 [32mDATA: [39m test-node-gpu.js result: performance: load: 333 total: 167
|
||||||
2021-05-31 10:38:05 [36mINFO: [39m test-node-gpu.js test: first instance
|
2021-06-01 08:58:12 [36mINFO: [39m test-node-gpu.js test: first instance
|
||||||
2021-05-31 10:38:05 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
2021-06-01 08:58:12 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||||
2021-05-31 10:38:07 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/sample-me.jpg default
|
2021-06-01 08:58:12 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/sample-me.jpg default
|
||||||
2021-05-31 10:38:07 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {"score":0.68,"class":"person"} {"score":0.67,"keypoints":7}
|
2021-06-01 08:58:12 [32mDATA: [39m test-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 1 person: 0 {} {"score":0.72,"class":"person"} {"score":0.67,"keypoints":7}
|
||||||
2021-05-31 10:38:07 [32mDATA: [39m test-node-gpu.js result: performance: load: 336 total: 1591
|
2021-06-01 08:58:12 [32mDATA: [39m test-node-gpu.js result: performance: load: 333 total: 93
|
||||||
2021-05-31 10:38:07 [36mINFO: [39m test-node-gpu.js test: second instance
|
2021-06-01 08:58:12 [36mINFO: [39m test-node-gpu.js test: second instance
|
||||||
2021-05-31 10:38:07 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
2021-06-01 08:58:12 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||||
2021-05-31 10:38:08 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/sample-me.jpg default
|
2021-06-01 08:58:14 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/sample-me.jpg default
|
||||||
2021-05-31 10:38:08 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {"score":0.68,"class":"person"} {"score":0.67,"keypoints":7}
|
2021-06-01 08:58:14 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"age":39.2,"gender":"male"} {"score":0.68,"class":"person"} {"score":0.67,"keypoints":7}
|
||||||
2021-05-31 10:38:08 [32mDATA: [39m test-node-gpu.js result: performance: load: 3 total: 1345
|
2021-06-01 08:58:14 [32mDATA: [39m test-node-gpu.js result: performance: load: 5 total: 1460
|
||||||
2021-05-31 10:38:08 [36mINFO: [39m test-node-gpu.js test: concurrent
|
2021-06-01 08:58:14 [36mINFO: [39m test-node-gpu.js test: concurrent
|
||||||
2021-05-31 10:38:09 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
2021-06-01 08:58:14 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||||
2021-05-31 10:38:09 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
2021-06-01 08:58:14 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||||
2021-05-31 10:38:10 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:58:15 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:38:11 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:58:16 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:38:16 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-face.jpg default
|
2021-06-01 08:58:21 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-face.jpg default
|
||||||
2021-05-31 10:38:16 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
2021-06-01 08:58:21 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
||||||
2021-05-31 10:38:16 [32mDATA: [39m test-node-gpu.js result: performance: load: 336 total: 5204
|
2021-06-01 08:58:21 [32mDATA: [39m test-node-gpu.js result: performance: load: 333 total: 5282
|
||||||
2021-05-31 10:38:16 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-face.jpg default
|
2021-06-01 08:58:21 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-face.jpg default
|
||||||
2021-05-31 10:38:16 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
2021-06-01 08:58:21 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
||||||
2021-05-31 10:38:16 [32mDATA: [39m test-node-gpu.js result: performance: load: 3 total: 5203
|
2021-06-01 08:58:21 [32mDATA: [39m test-node-gpu.js result: performance: load: 5 total: 5282
|
||||||
2021-05-31 10:38:16 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg default
|
2021-06-01 08:58:21 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg default
|
||||||
2021-05-31 10:38:16 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
2021-06-01 08:58:21 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||||
2021-05-31 10:38:16 [32mDATA: [39m test-node-gpu.js result: performance: load: 336 total: 5204
|
2021-06-01 08:58:21 [32mDATA: [39m test-node-gpu.js result: performance: load: 333 total: 5282
|
||||||
2021-05-31 10:38:16 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg default
|
2021-06-01 08:58:21 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg default
|
||||||
2021-05-31 10:38:16 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
2021-06-01 08:58:21 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||||
2021-05-31 10:38:16 [32mDATA: [39m test-node-gpu.js result: performance: load: 3 total: 5203
|
2021-06-01 08:58:21 [32mDATA: [39m test-node-gpu.js result: performance: load: 5 total: 5282
|
||||||
2021-05-31 10:38:16 [36mINFO: [39m test-node-gpu.js test complete: 19021 ms
|
2021-06-01 08:58:21 [36mINFO: [39m test-node-gpu.js test complete: 16736 ms
|
||||||
2021-05-31 10:38:16 [36mINFO: [39m test-node-wasm.js start
|
2021-06-01 08:58:21 [36mINFO: [39m test-node-wasm.js start
|
||||||
2021-05-31 10:38:16 [35mSTATE:[39m test-node-wasm.js passed: model server: http://localhost:10030/models/
|
2021-06-01 08:58:22 [35mSTATE:[39m test-node-wasm.js passed: model server: http://localhost:10030/models/
|
||||||
2021-05-31 10:38:16 [35mSTATE:[39m test-node-wasm.js passed: create human
|
2021-06-01 08:58:22 [35mSTATE:[39m test-node-wasm.js passed: create human
|
||||||
2021-05-31 10:38:16 [36mINFO: [39m test-node-wasm.js human version: 2.0.0
|
2021-06-01 08:58:22 [36mINFO: [39m test-node-wasm.js human version: 2.0.0
|
||||||
2021-05-31 10:38:16 [36mINFO: [39m test-node-wasm.js platform: linux x64 agent: NodeJS v16.0.0
|
2021-06-01 08:58:22 [36mINFO: [39m test-node-wasm.js platform: linux x64 agent: NodeJS v16.0.0
|
||||||
2021-05-31 10:38:16 [36mINFO: [39m test-node-wasm.js tfjs version: 3.6.0
|
2021-06-01 08:58:22 [36mINFO: [39m test-node-wasm.js tfjs version: 3.6.0
|
||||||
2021-05-31 10:38:17 [35mSTATE:[39m test-node-wasm.js passed: set backend: wasm
|
2021-06-01 08:58:22 [35mSTATE:[39m test-node-wasm.js passed: set backend: wasm
|
||||||
2021-05-31 10:38:17 [35mSTATE:[39m test-node-wasm.js passed: load models
|
2021-06-01 08:58:22 [35mSTATE:[39m test-node-wasm.js passed: load models
|
||||||
2021-05-31 10:38:17 [35mSTATE:[39m test-node-wasm.js result: defined models: 13 loaded models: 5
|
2021-06-01 08:58:22 [35mSTATE:[39m test-node-wasm.js result: defined models: 13 loaded models: 5
|
||||||
2021-05-31 10:38:17 [35mSTATE:[39m test-node-wasm.js passed: warmup: none default
|
2021-06-01 08:58:22 [35mSTATE:[39m test-node-wasm.js passed: warmup: none default
|
||||||
2021-05-31 10:38:17 [31mERROR:[39m test-node-wasm.js failed: warmup: face default
|
2021-06-01 08:58:22 [31mERROR:[39m test-node-wasm.js failed: warmup: face default
|
||||||
2021-05-31 10:38:17 [31mERROR:[39m test-node-wasm.js failed: warmup: body default
|
2021-06-01 08:58:22 [31mERROR:[39m test-node-wasm.js failed: warmup: body default
|
||||||
2021-05-31 10:38:17 [36mINFO: [39m test-node-wasm.js test body variants
|
2021-06-01 08:58:22 [36mINFO: [39m test-node-wasm.js test body variants
|
||||||
2021-05-31 10:38:19 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:58:24 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:38:22 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-body.jpg posenet
|
2021-06-01 08:58:28 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-body.jpg posenet
|
||||||
2021-05-31 10:38:22 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {} {"score":0.96,"keypoints":16}
|
2021-06-01 08:58:28 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.96,"keypoints":16}
|
||||||
2021-05-31 10:38:22 [32mDATA: [39m test-node-wasm.js result: performance: load: 650 total: 3248
|
2021-06-01 08:58:28 [32mDATA: [39m test-node-wasm.js result: performance: load: 666 total: 3243
|
||||||
2021-05-31 10:38:24 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:58:30 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:38:26 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-body.jpg movenet
|
2021-06-01 08:58:32 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-body.jpg movenet
|
||||||
2021-05-31 10:38:26 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"confidence":1} {} {"score":0.93,"keypoints":17}
|
2021-06-01 08:58:32 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.93,"keypoints":17}
|
||||||
2021-05-31 10:38:26 [32mDATA: [39m test-node-wasm.js result: performance: load: 650 total: 1942
|
2021-06-01 08:58:32 [32mDATA: [39m test-node-wasm.js result: performance: load: 666 total: 1979
|
||||||
2021-05-31 10:38:28 [35mSTATE:[39m test-node-wasm.js passed: detect: random default
|
2021-06-01 08:58:32 [35mSTATE:[39m test-node-wasm.js passed: detect: random default
|
||||||
2021-05-31 10:38:28 [32mDATA: [39m test-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0}
|
2021-06-01 08:58:32 [32mDATA: [39m test-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0}
|
||||||
2021-05-31 10:38:28 [32mDATA: [39m test-node-wasm.js result: performance: load: 650 total: 1631
|
2021-06-01 08:58:32 [32mDATA: [39m test-node-wasm.js result: performance: load: 666 total: 232
|
||||||
2021-05-31 10:38:28 [36mINFO: [39m test-node-wasm.js test: first instance
|
2021-06-01 08:58:32 [36mINFO: [39m test-node-wasm.js test: first instance
|
||||||
2021-05-31 10:38:29 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
2021-06-01 08:58:33 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||||
2021-05-31 10:38:31 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/sample-me.jpg default
|
2021-06-01 08:58:33 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/sample-me.jpg default
|
||||||
2021-05-31 10:38:31 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {} {"score":0.67,"keypoints":7}
|
2021-06-01 08:58:33 [32mDATA: [39m test-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 0 person: 0 {} {} {"score":0.67,"keypoints":7}
|
||||||
2021-05-31 10:38:31 [32mDATA: [39m test-node-wasm.js result: performance: load: 650 total: 2284
|
2021-06-01 08:58:33 [32mDATA: [39m test-node-wasm.js result: performance: load: 666 total: 239
|
||||||
2021-05-31 10:38:31 [36mINFO: [39m test-node-wasm.js test: second instance
|
2021-06-01 08:58:33 [36mINFO: [39m test-node-wasm.js test: second instance
|
||||||
2021-05-31 10:38:32 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
2021-06-01 08:58:33 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||||
2021-05-31 10:38:34 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/sample-me.jpg default
|
2021-06-01 08:58:36 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/sample-me.jpg default
|
||||||
2021-05-31 10:38:34 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {} {"score":0.67,"keypoints":7}
|
2021-06-01 08:58:36 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"age":39.2,"gender":"male"} {} {"score":0.67,"keypoints":7}
|
||||||
2021-05-31 10:38:34 [32mDATA: [39m test-node-wasm.js result: performance: load: 4 total: 2287
|
2021-06-01 08:58:36 [32mDATA: [39m test-node-wasm.js result: performance: load: 4 total: 2370
|
||||||
2021-05-31 10:38:34 [36mINFO: [39m test-node-wasm.js test: concurrent
|
2021-06-01 08:58:36 [36mINFO: [39m test-node-wasm.js test: concurrent
|
||||||
2021-05-31 10:38:34 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
2021-06-01 08:58:36 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||||
2021-05-31 10:38:34 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
2021-06-01 08:58:36 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||||
2021-05-31 10:38:36 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:58:38 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:38:38 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
2021-06-01 08:58:40 [35mSTATE:[39m test-node-wasm.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||||
2021-05-31 10:38:47 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-face.jpg default
|
2021-06-01 08:58:49 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-face.jpg default
|
||||||
2021-05-31 10:38:47 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {} {"score":0.73,"keypoints":17}
|
2021-06-01 08:58:49 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"age":23.6,"gender":"female"} {} {"score":0.73,"keypoints":17}
|
||||||
2021-05-31 10:38:47 [32mDATA: [39m test-node-wasm.js result: performance: load: 650 total: 9230
|
2021-06-01 08:58:49 [32mDATA: [39m test-node-wasm.js result: performance: load: 666 total: 9077
|
||||||
2021-05-31 10:38:47 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-face.jpg default
|
2021-06-01 08:58:49 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-face.jpg default
|
||||||
2021-05-31 10:38:47 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {} {"score":0.73,"keypoints":17}
|
2021-06-01 08:58:49 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"age":23.6,"gender":"female"} {} {"score":0.73,"keypoints":17}
|
||||||
2021-05-31 10:38:47 [32mDATA: [39m test-node-wasm.js result: performance: load: 4 total: 9230
|
2021-06-01 08:58:49 [32mDATA: [39m test-node-wasm.js result: performance: load: 4 total: 9077
|
||||||
2021-05-31 10:38:47 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-body.jpg default
|
2021-06-01 08:58:49 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-body.jpg default
|
||||||
2021-05-31 10:38:47 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {} {"score":0.93,"keypoints":17}
|
2021-06-01 08:58:49 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.93,"keypoints":17}
|
||||||
2021-05-31 10:38:47 [32mDATA: [39m test-node-wasm.js result: performance: load: 650 total: 9230
|
2021-06-01 08:58:49 [32mDATA: [39m test-node-wasm.js result: performance: load: 666 total: 9077
|
||||||
2021-05-31 10:38:47 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-body.jpg default
|
2021-06-01 08:58:49 [35mSTATE:[39m test-node-wasm.js passed: detect: assets/human-sample-body.jpg default
|
||||||
2021-05-31 10:38:47 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {} {"score":0.93,"keypoints":17}
|
2021-06-01 08:58:49 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.93,"keypoints":17}
|
||||||
2021-05-31 10:38:47 [32mDATA: [39m test-node-wasm.js result: performance: load: 4 total: 9230
|
2021-06-01 08:58:49 [32mDATA: [39m test-node-wasm.js result: performance: load: 4 total: 9077
|
||||||
2021-05-31 10:38:47 [36mINFO: [39m test-node-wasm.js test complete: 30664 ms
|
2021-06-01 08:58:49 [36mINFO: [39m test-node-wasm.js test complete: 27096 ms
|
||||||
2021-05-31 10:38:47 [36mINFO: [39m status: {"passed":68,"failed":2}
|
2021-06-01 08:58:49 [36mINFO: [39m status: {"passed":68,"failed":2}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -112,14 +112,14 @@
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="box" class="tsd-anchor"></a>
|
<a name="box" class="tsd-anchor"></a>
|
||||||
<h3>box</h3>
|
<h3>box</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">[</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></div>
|
<div class="tsd-signature tsd-kind-icon">box<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-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-type">number</span><span class="tsd-signature-symbol">]</span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="boxraw" class="tsd-anchor"></a>
|
<a name="boxraw" class="tsd-anchor"></a>
|
||||||
<h3>box<wbr>Raw</h3>
|
<h3>box<wbr>Raw</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">box<wbr>Raw<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">[</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></div>
|
<div class="tsd-signature tsd-kind-icon">box<wbr>Raw<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-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-type">number</span><span class="tsd-signature-symbol">]</span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="keypoints" class="tsd-anchor"></a>
|
<a name="keypoints" class="tsd-anchor"></a>
|
||||||
<h3>keypoints</h3>
|
<h3>keypoints</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">keypoints<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>part<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>position<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>z<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>positionRaw<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>z<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>presence<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>score<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></div>
|
<div class="tsd-signature tsd-kind-icon">keypoints<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>part<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>position<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-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-symbol">; </span>positionRaw<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-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-symbol">; </span>presence<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>score<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></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -73,9 +73,9 @@
|
||||||
<p>Each result has:</p>
|
<p>Each result has:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>id: face id number</li>
|
<li>id: face id number</li>
|
||||||
<li>confidence: overal detection confidence value</li>
|
<li>score: overal detection confidence score value</li>
|
||||||
<li>boxConfidence: face box detection confidence value</li>
|
<li>boxScore: face box detection confidence score value</li>
|
||||||
<li>faceConfidence: face keypoints detection confidence value</li>
|
<li>faceScore: face keypoints detection confidence score value</li>
|
||||||
<li>box: face bounding box as array of [x, y, width, height], normalized to image resolution</li>
|
<li>box: face bounding box as array of [x, y, width, height], normalized to image resolution</li>
|
||||||
<li>boxRaw: face bounding box as array of [x, y, width, height], normalized to range 0..1</li>
|
<li>boxRaw: face bounding box as array of [x, y, width, height], normalized to range 0..1</li>
|
||||||
<li>mesh: face keypoints as array of [x, y, z] points of face mesh, normalized to image resolution</li>
|
<li>mesh: face keypoints as array of [x, y, z] points of face mesh, normalized to image resolution</li>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
<li>annotations: annotated face keypoints as array of annotated face mesh points</li>
|
<li>annotations: annotated face keypoints as array of annotated face mesh points</li>
|
||||||
<li>age: age as value</li>
|
<li>age: age as value</li>
|
||||||
<li>gender: gender as value</li>
|
<li>gender: gender as value</li>
|
||||||
<li>genderConfidence: gender detection confidence as value</li>
|
<li>genderScore: gender detection confidence score as value</li>
|
||||||
<li>emotion: emotions as array of possible emotions with their individual scores</li>
|
<li>emotion: emotions as array of possible emotions with their individual scores</li>
|
||||||
<li>embedding: facial descriptor as array of numerical elements</li>
|
<li>embedding: facial descriptor as array of numerical elements</li>
|
||||||
<li>iris: iris distance from current viewpoint as distance value in centimeters for a typical camera
|
<li>iris: iris distance from current viewpoint as distance value in centimeters for a typical camera
|
||||||
|
@ -114,19 +114,20 @@
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#age" class="tsd-kind-icon">age</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#age" class="tsd-kind-icon">age</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#annotations" class="tsd-kind-icon">annotations</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#annotations" class="tsd-kind-icon">annotations</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#box" class="tsd-kind-icon">box</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#box" class="tsd-kind-icon">box</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#boxconfidence" class="tsd-kind-icon">box<wbr>Confidence</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#confidence" class="tsd-kind-icon">confidence</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#boxscore" class="tsd-kind-icon">box<wbr>Score</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#embedding" class="tsd-kind-icon">embedding</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#embedding" class="tsd-kind-icon">embedding</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#emotion" class="tsd-kind-icon">emotion</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#emotion" class="tsd-kind-icon">emotion</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#faceconfidence" class="tsd-kind-icon">face<wbr>Confidence</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#facescore" class="tsd-kind-icon">face<wbr>Score</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#gender" class="tsd-kind-icon">gender</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#gender" class="tsd-kind-icon">gender</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#genderconfidence" class="tsd-kind-icon">gender<wbr>Confidence</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#genderscore" class="tsd-kind-icon">gender<wbr>Score</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#id" class="tsd-kind-icon">id</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#id" class="tsd-kind-icon">id</a></li>
|
||||||
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#image" class="tsd-kind-icon">image</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#iris" class="tsd-kind-icon">iris</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#iris" class="tsd-kind-icon">iris</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#mesh" class="tsd-kind-icon">mesh</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#mesh" class="tsd-kind-icon">mesh</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#meshraw" class="tsd-kind-icon">mesh<wbr>Raw</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#meshraw" class="tsd-kind-icon">mesh<wbr>Raw</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#rotation" class="tsd-kind-icon">rotation</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#rotation" class="tsd-kind-icon">rotation</a></li>
|
||||||
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#score" class="tsd-kind-icon">score</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#tensor" class="tsd-kind-icon">tensor</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="face.html#tensor" class="tsd-kind-icon">tensor</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
@ -137,7 +138,7 @@
|
||||||
<h2>Properties</h2>
|
<h2>Properties</h2>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="age" class="tsd-anchor"></a>
|
<a name="age" class="tsd-anchor"></a>
|
||||||
<h3>age</h3>
|
<h3><span class="tsd-flag ts-flagOptional">Optional</span> age</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">age<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
<div class="tsd-signature tsd-kind-icon">age<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
|
@ -145,7 +146,7 @@
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="annotations" class="tsd-anchor"></a>
|
<a name="annotations" class="tsd-anchor"></a>
|
||||||
<h3>annotations</h3>
|
<h3>annotations</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">annotations<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>part<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>points<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-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-symbol">[]</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span></div>
|
<div class="tsd-signature tsd-kind-icon">annotations<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-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-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
|
@ -156,13 +157,6 @@
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
||||||
<a name="boxconfidence" class="tsd-anchor"></a>
|
|
||||||
<h3>box<wbr>Confidence</h3>
|
|
||||||
<div class="tsd-signature tsd-kind-icon">box<wbr>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
|
||||||
<aside class="tsd-sources">
|
|
||||||
</aside>
|
|
||||||
</section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="boxraw" class="tsd-anchor"></a>
|
<a name="boxraw" class="tsd-anchor"></a>
|
||||||
<h3>box<wbr>Raw</h3>
|
<h3>box<wbr>Raw</h3>
|
||||||
|
@ -171,44 +165,44 @@
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="confidence" class="tsd-anchor"></a>
|
<a name="boxscore" class="tsd-anchor"></a>
|
||||||
<h3>confidence</h3>
|
<h3>box<wbr>Score</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
<div class="tsd-signature tsd-kind-icon">box<wbr>Score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="embedding" class="tsd-anchor"></a>
|
<a name="embedding" class="tsd-anchor"></a>
|
||||||
<h3>embedding</h3>
|
<h3><span class="tsd-flag ts-flagOptional">Optional</span> embedding</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">embedding<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div>
|
<div class="tsd-signature tsd-kind-icon">embedding<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="emotion" class="tsd-anchor"></a>
|
<a name="emotion" class="tsd-anchor"></a>
|
||||||
<h3>emotion</h3>
|
<h3><span class="tsd-flag ts-flagOptional">Optional</span> emotion</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">emotion<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>emotion<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>score<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></div>
|
<div class="tsd-signature tsd-kind-icon">emotion<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>emotion<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>score<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></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="faceconfidence" class="tsd-anchor"></a>
|
<a name="facescore" class="tsd-anchor"></a>
|
||||||
<h3>face<wbr>Confidence</h3>
|
<h3>face<wbr>Score</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">face<wbr>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
<div class="tsd-signature tsd-kind-icon">face<wbr>Score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="gender" class="tsd-anchor"></a>
|
<a name="gender" class="tsd-anchor"></a>
|
||||||
<h3>gender</h3>
|
<h3><span class="tsd-flag ts-flagOptional">Optional</span> gender</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">gender<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
<div class="tsd-signature tsd-kind-icon">gender<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="genderconfidence" class="tsd-anchor"></a>
|
<a name="genderscore" class="tsd-anchor"></a>
|
||||||
<h3>gender<wbr>Confidence</h3>
|
<h3><span class="tsd-flag ts-flagOptional">Optional</span> gender<wbr>Score</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">gender<wbr>Confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
<div class="tsd-signature tsd-kind-icon">gender<wbr>Score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
|
@ -219,9 +213,16 @@
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
|
<a name="image" class="tsd-anchor"></a>
|
||||||
|
<h3><span class="tsd-flag ts-flagOptional">Optional</span> image</h3>
|
||||||
|
<div class="tsd-signature tsd-kind-icon">image<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">__class</span></div>
|
||||||
|
<aside class="tsd-sources">
|
||||||
|
</aside>
|
||||||
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="iris" class="tsd-anchor"></a>
|
<a name="iris" class="tsd-anchor"></a>
|
||||||
<h3>iris</h3>
|
<h3><span class="tsd-flag ts-flagOptional">Optional</span> iris</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">iris<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
<div class="tsd-signature tsd-kind-icon">iris<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
|
@ -242,7 +243,7 @@
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="rotation" class="tsd-anchor"></a>
|
<a name="rotation" class="tsd-anchor"></a>
|
||||||
<h3>rotation</h3>
|
<h3><span class="tsd-flag ts-flagOptional">Optional</span> rotation</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">rotation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>angle<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>pitch<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>roll<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>yaw<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>gaze<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>bearing<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>strength<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>matrix<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-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-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-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-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></div>
|
<div class="tsd-signature tsd-kind-icon">rotation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>angle<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>pitch<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>roll<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>yaw<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>gaze<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>bearing<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>strength<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>matrix<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-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-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-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-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></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
|
@ -280,6 +281,13 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
|
<a name="score" class="tsd-anchor"></a>
|
||||||
|
<h3>score</h3>
|
||||||
|
<div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||||
|
<aside class="tsd-sources">
|
||||||
|
</aside>
|
||||||
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="tensor" class="tsd-anchor"></a>
|
<a name="tensor" class="tsd-anchor"></a>
|
||||||
<h3>tensor</h3>
|
<h3>tensor</h3>
|
||||||
|
@ -328,14 +336,11 @@
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="face.html#box" class="tsd-kind-icon">box</a>
|
<a href="face.html#box" class="tsd-kind-icon">box</a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
||||||
<a href="face.html#boxconfidence" class="tsd-kind-icon">box<wbr>Confidence</a>
|
|
||||||
</li>
|
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="face.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a>
|
<a href="face.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="face.html#confidence" class="tsd-kind-icon">confidence</a>
|
<a href="face.html#boxscore" class="tsd-kind-icon">box<wbr>Score</a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="face.html#embedding" class="tsd-kind-icon">embedding</a>
|
<a href="face.html#embedding" class="tsd-kind-icon">embedding</a>
|
||||||
|
@ -344,17 +349,20 @@
|
||||||
<a href="face.html#emotion" class="tsd-kind-icon">emotion</a>
|
<a href="face.html#emotion" class="tsd-kind-icon">emotion</a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="face.html#faceconfidence" class="tsd-kind-icon">face<wbr>Confidence</a>
|
<a href="face.html#facescore" class="tsd-kind-icon">face<wbr>Score</a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="face.html#gender" class="tsd-kind-icon">gender</a>
|
<a href="face.html#gender" class="tsd-kind-icon">gender</a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="face.html#genderconfidence" class="tsd-kind-icon">gender<wbr>Confidence</a>
|
<a href="face.html#genderscore" class="tsd-kind-icon">gender<wbr>Score</a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="face.html#id" class="tsd-kind-icon">id</a>
|
<a href="face.html#id" class="tsd-kind-icon">id</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
|
<a href="face.html#image" class="tsd-kind-icon">image</a>
|
||||||
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="face.html#iris" class="tsd-kind-icon">iris</a>
|
<a href="face.html#iris" class="tsd-kind-icon">iris</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -367,6 +375,9 @@
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="face.html#rotation" class="tsd-kind-icon">rotation</a>
|
<a href="face.html#rotation" class="tsd-kind-icon">rotation</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
|
<a href="face.html#score" class="tsd-kind-icon">score</a>
|
||||||
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="face.html#tensor" class="tsd-kind-icon">tensor</a>
|
<a href="face.html#tensor" class="tsd-kind-icon">tensor</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
<p>Each result has:</p>
|
<p>Each result has:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>id: hand id number</li>
|
<li>id: hand id number</li>
|
||||||
<li>confidence: detection confidence score as value</li>
|
<li>score: detection confidence score as value</li>
|
||||||
<li>box: bounding box: x, y, width, height normalized to input image resolution</li>
|
<li>box: bounding box: x, y, width, height normalized to input image resolution</li>
|
||||||
<li>boxRaw: bounding box: x, y, width, height normalized to 0..1</li>
|
<li>boxRaw: bounding box: x, y, width, height normalized to 0..1</li>
|
||||||
<li>landmarks: landmarks as array of [x, y, z] points of hand, normalized to image resolution</li>
|
<li>landmarks: landmarks as array of [x, y, z] points of hand, normalized to image resolution</li>
|
||||||
|
@ -97,9 +97,9 @@
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#annotations" class="tsd-kind-icon">annotations</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#annotations" class="tsd-kind-icon">annotations</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#box" class="tsd-kind-icon">box</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#box" class="tsd-kind-icon">box</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#confidence" class="tsd-kind-icon">confidence</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#id" class="tsd-kind-icon">id</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#id" class="tsd-kind-icon">id</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#landmarks" class="tsd-kind-icon">landmarks</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#keypoints" class="tsd-kind-icon">keypoints</a></li>
|
||||||
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="hand.html#score" class="tsd-kind-icon">score</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
@ -128,13 +128,6 @@
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
||||||
<a name="confidence" class="tsd-anchor"></a>
|
|
||||||
<h3>confidence</h3>
|
|
||||||
<div class="tsd-signature tsd-kind-icon">confidence<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
|
||||||
<aside class="tsd-sources">
|
|
||||||
</aside>
|
|
||||||
</section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="id" class="tsd-anchor"></a>
|
<a name="id" class="tsd-anchor"></a>
|
||||||
<h3>id</h3>
|
<h3>id</h3>
|
||||||
|
@ -143,9 +136,16 @@
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="landmarks" class="tsd-anchor"></a>
|
<a name="keypoints" class="tsd-anchor"></a>
|
||||||
<h3>landmarks</h3>
|
<h3>keypoints</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">landmarks<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-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></div>
|
<div class="tsd-signature tsd-kind-icon">keypoints<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-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></div>
|
||||||
|
<aside class="tsd-sources">
|
||||||
|
</aside>
|
||||||
|
</section>
|
||||||
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
|
<a name="score" class="tsd-anchor"></a>
|
||||||
|
<h3>score</h3>
|
||||||
|
<div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
|
@ -193,14 +193,14 @@
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="hand.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a>
|
<a href="hand.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
||||||
<a href="hand.html#confidence" class="tsd-kind-icon">confidence</a>
|
|
||||||
</li>
|
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="hand.html#id" class="tsd-kind-icon">id</a>
|
<a href="hand.html#id" class="tsd-kind-icon">id</a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="hand.html#landmarks" class="tsd-kind-icon">landmarks</a>
|
<a href="hand.html#keypoints" class="tsd-kind-icon">keypoints</a>
|
||||||
|
</li>
|
||||||
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
|
<a href="hand.html#score" class="tsd-kind-icon">score</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -98,13 +98,10 @@
|
||||||
<ul class="tsd-index-list">
|
<ul class="tsd-index-list">
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#box" class="tsd-kind-icon">box</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#box" class="tsd-kind-icon">box</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#center" class="tsd-kind-icon">center</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#centerraw" class="tsd-kind-icon">center<wbr>Raw</a></li>
|
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#class" class="tsd-kind-icon">class</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#class" class="tsd-kind-icon">class</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#id" class="tsd-kind-icon">id</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#id" class="tsd-kind-icon">id</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#label" class="tsd-kind-icon">label</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#label" class="tsd-kind-icon">label</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#score" class="tsd-kind-icon">score</a></li>
|
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#score" class="tsd-kind-icon">score</a></li>
|
||||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="item.html#stridesize" class="tsd-kind-icon">stride<wbr>Size</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
@ -115,28 +112,14 @@
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="box" class="tsd-anchor"></a>
|
<a name="box" class="tsd-anchor"></a>
|
||||||
<h3>box</h3>
|
<h3>box</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div>
|
<div class="tsd-signature tsd-kind-icon">box<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-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-type">number</span><span class="tsd-signature-symbol">]</span></div>
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a name="boxraw" class="tsd-anchor"></a>
|
<a name="boxraw" class="tsd-anchor"></a>
|
||||||
<h3>box<wbr>Raw</h3>
|
<h3>box<wbr>Raw</h3>
|
||||||
<div class="tsd-signature tsd-kind-icon">box<wbr>Raw<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div>
|
<div class="tsd-signature tsd-kind-icon">box<wbr>Raw<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-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-type">number</span><span class="tsd-signature-symbol">]</span></div>
|
||||||
<aside class="tsd-sources">
|
|
||||||
</aside>
|
|
||||||
</section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
||||||
<a name="center" class="tsd-anchor"></a>
|
|
||||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> center</h3>
|
|
||||||
<div class="tsd-signature tsd-kind-icon">center<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div>
|
|
||||||
<aside class="tsd-sources">
|
|
||||||
</aside>
|
|
||||||
</section>
|
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
||||||
<a name="centerraw" class="tsd-anchor"></a>
|
|
||||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> center<wbr>Raw</h3>
|
|
||||||
<div class="tsd-signature tsd-kind-icon">center<wbr>Raw<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div>
|
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
|
@ -168,13 +151,6 @@
|
||||||
<aside class="tsd-sources">
|
<aside class="tsd-sources">
|
||||||
</aside>
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
||||||
<a name="stridesize" class="tsd-anchor"></a>
|
|
||||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> stride<wbr>Size</h3>
|
|
||||||
<div class="tsd-signature tsd-kind-icon">stride<wbr>Size<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
|
||||||
<aside class="tsd-sources">
|
|
||||||
</aside>
|
|
||||||
</section>
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||||
|
@ -219,12 +195,6 @@
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="item.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a>
|
<a href="item.html#boxraw" class="tsd-kind-icon">box<wbr>Raw</a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
||||||
<a href="item.html#center" class="tsd-kind-icon">center</a>
|
|
||||||
</li>
|
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
||||||
<a href="item.html#centerraw" class="tsd-kind-icon">center<wbr>Raw</a>
|
|
||||||
</li>
|
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="item.html#class" class="tsd-kind-icon">class</a>
|
<a href="item.html#class" class="tsd-kind-icon">class</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -237,9 +207,6 @@
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||||
<a href="item.html#score" class="tsd-kind-icon">score</a>
|
<a href="item.html#score" class="tsd-kind-icon">score</a>
|
||||||
</li>
|
</li>
|
||||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
|
||||||
<a href="item.html#stridesize" class="tsd-kind-icon">stride<wbr>Size</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,17 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* FaceMesh & BlazeFace Module entry point
|
* FaceMesh & BlazeFace Module entry point
|
||||||
*/
|
*/
|
||||||
export declare function predict(input: any, config: any): Promise<{
|
import { Face } from '../result';
|
||||||
confidence: any;
|
export declare function predict(input: any, config: any): Promise<Face[]>;
|
||||||
boxConfidence: any;
|
|
||||||
faceConfidence: any;
|
|
||||||
box: any;
|
|
||||||
mesh: any;
|
|
||||||
boxRaw: any;
|
|
||||||
meshRaw: any;
|
|
||||||
annotations: any;
|
|
||||||
image: any;
|
|
||||||
}[]>;
|
|
||||||
export declare function load(config: any): Promise<[unknown, unknown, unknown]>;
|
export declare function load(config: any): Promise<[unknown, unknown, unknown]>;
|
||||||
export declare const triangulation: number[];
|
export declare const triangulation: number[];
|
||||||
export declare const uvmap: number[][];
|
export declare const uvmap: number[][];
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
import { Body } from '../result';
|
||||||
export declare function eitherPointDoesntMeetConfidence(a: any, b: any, minConfidence: any): boolean;
|
export declare function eitherPointDoesntMeetConfidence(a: any, b: any, minConfidence: any): boolean;
|
||||||
export declare function getAdjacentKeyPoints(keypoints: any, minConfidence: any): any[];
|
export declare function getAdjacentKeyPoints(keypoints: any, minConfidence: any): any[];
|
||||||
export declare function getBoundingBox(keypoints: any): [number, number, number, number];
|
export declare function getBoundingBox(keypoints: any): [number, number, number, number];
|
||||||
export declare function scalePoses(poses: any, [height, width]: [any, any], [inputResolutionHeight, inputResolutionWidth]: [any, any]): any;
|
export declare function scalePoses(poses: any, [height, width]: [any, any], [inputResolutionHeight, inputResolutionWidth]: [any, any]): Array<Body>;
|
||||||
export declare class MaxHeap {
|
export declare class MaxHeap {
|
||||||
priorityQueue: Array<unknown>;
|
priorityQueue: Array<unknown>;
|
||||||
numberOfElements: number;
|
numberOfElements: number;
|
||||||
|
|
|
@ -8,9 +8,9 @@ import { Tensor } from '../dist/tfjs.esm.js';
|
||||||
*
|
*
|
||||||
* Each result has:
|
* Each result has:
|
||||||
* - id: face id number
|
* - id: face id number
|
||||||
* - confidence: overal detection confidence value
|
* - score: overal detection confidence score value
|
||||||
* - boxConfidence: face box detection confidence value
|
* - boxScore: face box detection confidence score value
|
||||||
* - faceConfidence: face keypoints detection confidence value
|
* - faceScore: face keypoints detection confidence score value
|
||||||
* - box: face bounding box as array of [x, y, width, height], normalized to image resolution
|
* - box: face bounding box as array of [x, y, width, height], normalized to image resolution
|
||||||
* - boxRaw: face bounding box as array of [x, y, width, height], normalized to range 0..1
|
* - boxRaw: face bounding box as array of [x, y, width, height], normalized to range 0..1
|
||||||
* - mesh: face keypoints as array of [x, y, z] points of face mesh, normalized to image resolution
|
* - mesh: face keypoints as array of [x, y, z] points of face mesh, normalized to image resolution
|
||||||
|
@ -18,7 +18,7 @@ import { Tensor } from '../dist/tfjs.esm.js';
|
||||||
* - annotations: annotated face keypoints as array of annotated face mesh points
|
* - annotations: annotated face keypoints as array of annotated face mesh points
|
||||||
* - age: age as value
|
* - age: age as value
|
||||||
* - gender: gender as value
|
* - gender: gender as value
|
||||||
* - genderConfidence: gender detection confidence as value
|
* - genderScore: gender detection confidence score as value
|
||||||
* - emotion: emotions as array of possible emotions with their individual scores
|
* - emotion: emotions as array of possible emotions with their individual scores
|
||||||
* - embedding: facial descriptor as array of numerical elements
|
* - embedding: facial descriptor as array of numerical elements
|
||||||
* - iris: iris distance from current viewpoint as distance value in centimeters for a typical camera
|
* - iris: iris distance from current viewpoint as distance value in centimeters for a typical camera
|
||||||
|
@ -31,27 +31,24 @@ import { Tensor } from '../dist/tfjs.esm.js';
|
||||||
*/
|
*/
|
||||||
export interface Face {
|
export interface Face {
|
||||||
id: number;
|
id: number;
|
||||||
confidence: number;
|
score: number;
|
||||||
boxConfidence: number;
|
boxScore: number;
|
||||||
faceConfidence: number;
|
faceScore: number;
|
||||||
box: [number, number, number, number];
|
box: [number, number, number, number];
|
||||||
boxRaw: [number, number, number, number];
|
boxRaw: [number, number, number, number];
|
||||||
mesh: Array<[number, number, number]>;
|
mesh: Array<[number, number, number]>;
|
||||||
meshRaw: Array<[number, number, number]>;
|
meshRaw: Array<[number, number, number]>;
|
||||||
annotations: Array<{
|
annotations: Record<string, Array<[number, number, number]>>;
|
||||||
part: string;
|
age?: number;
|
||||||
points: Array<[number, number, number]>[];
|
gender?: string;
|
||||||
}>;
|
genderScore?: number;
|
||||||
age: number;
|
emotion?: Array<{
|
||||||
gender: string;
|
|
||||||
genderConfidence: number;
|
|
||||||
emotion: Array<{
|
|
||||||
score: number;
|
score: number;
|
||||||
emotion: string;
|
emotion: string;
|
||||||
}>;
|
}>;
|
||||||
embedding: Array<number>;
|
embedding?: Array<number>;
|
||||||
iris: number;
|
iris?: number;
|
||||||
rotation: {
|
rotation?: {
|
||||||
angle: {
|
angle: {
|
||||||
roll: number;
|
roll: number;
|
||||||
yaw: number;
|
yaw: number;
|
||||||
|
@ -63,6 +60,7 @@ export interface Face {
|
||||||
strength: number;
|
strength: number;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
image?: typeof Tensor;
|
||||||
tensor: typeof Tensor;
|
tensor: typeof Tensor;
|
||||||
}
|
}
|
||||||
/** Body results
|
/** Body results
|
||||||
|
@ -81,20 +79,12 @@ export interface Face {
|
||||||
export interface Body {
|
export interface Body {
|
||||||
id: number;
|
id: number;
|
||||||
score: number;
|
score: number;
|
||||||
box: [x: number, y: number, width: number, height: number];
|
box: [number, number, number, number];
|
||||||
boxRaw: [x: number, y: number, width: number, height: number];
|
boxRaw: [number, number, number, number];
|
||||||
keypoints: Array<{
|
keypoints: Array<{
|
||||||
part: string;
|
part: string;
|
||||||
position: {
|
position: [number, number, number?];
|
||||||
x: number;
|
positionRaw: [number, number, number?];
|
||||||
y: number;
|
|
||||||
z?: number;
|
|
||||||
};
|
|
||||||
positionRaw?: {
|
|
||||||
x: number;
|
|
||||||
y: number;
|
|
||||||
z?: number;
|
|
||||||
};
|
|
||||||
score: number;
|
score: number;
|
||||||
presence?: number;
|
presence?: number;
|
||||||
}>;
|
}>;
|
||||||
|
@ -103,7 +93,7 @@ export interface Body {
|
||||||
*
|
*
|
||||||
* Each result has:
|
* Each result has:
|
||||||
* - id: hand id number
|
* - id: hand id number
|
||||||
* - confidence: detection confidence score as value
|
* - score: detection confidence score as value
|
||||||
* - box: bounding box: x, y, width, height normalized to input image resolution
|
* - box: bounding box: x, y, width, height normalized to input image resolution
|
||||||
* - boxRaw: bounding box: x, y, width, height normalized to 0..1
|
* - boxRaw: bounding box: x, y, width, height normalized to 0..1
|
||||||
* - landmarks: landmarks as array of [x, y, z] points of hand, normalized to image resolution
|
* - landmarks: landmarks as array of [x, y, z] points of hand, normalized to image resolution
|
||||||
|
@ -111,10 +101,10 @@ export interface Body {
|
||||||
*/
|
*/
|
||||||
export interface Hand {
|
export interface Hand {
|
||||||
id: number;
|
id: number;
|
||||||
confidence: number;
|
score: number;
|
||||||
box: [number, number, number, number];
|
box: [number, number, number, number];
|
||||||
boxRaw: [number, number, number, number];
|
boxRaw: [number, number, number, number];
|
||||||
landmarks: Array<[number, number, number]>;
|
keypoints: Array<[number, number, number]>;
|
||||||
annotations: Record<string, Array<[number, number, number]>>;
|
annotations: Record<string, Array<[number, number, number]>>;
|
||||||
}
|
}
|
||||||
/** Object results
|
/** Object results
|
||||||
|
@ -132,13 +122,10 @@ export interface Hand {
|
||||||
export interface Item {
|
export interface Item {
|
||||||
id: number;
|
id: number;
|
||||||
score: number;
|
score: number;
|
||||||
strideSize?: number;
|
|
||||||
class: number;
|
class: number;
|
||||||
label: string;
|
label: string;
|
||||||
center?: number[];
|
box: [number, number, number, number];
|
||||||
centerRaw?: number[];
|
boxRaw: [number, number, number, number];
|
||||||
box: number[];
|
|
||||||
boxRaw: number[];
|
|
||||||
}
|
}
|
||||||
/** Gesture results
|
/** Gesture results
|
||||||
*
|
*
|
||||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
||||||
Subproject commit f0b3ba9432ba6ca2ed35c09b6193fa685cb3bced
|
Subproject commit bc7cb66846f150664df61777dea298bdc99492b2
|
Loading…
Reference in New Issue