mirror of https://github.com/vladmandic/human
remove iris coords if iris is disabled
parent
06b7922f62
commit
0417058ff9
|
@ -6,7 +6,7 @@ import GLBench from './gl-bench.js';
|
||||||
const userConfig = {}; // add any user configuration overrides
|
const userConfig = {}; // add any user configuration overrides
|
||||||
/*
|
/*
|
||||||
const userConfig = {
|
const userConfig = {
|
||||||
face: { enabled: false },
|
face: { enabled: true, iris: { enabled: false } },
|
||||||
body: { enabled: true },
|
body: { enabled: true },
|
||||||
hand: { enabled: false },
|
hand: { enabled: false },
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"dist/human.esm.js": {
|
"dist/human.esm.js": {
|
||||||
"bytes": 1905314,
|
"bytes": 1905422,
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"demo/draw.js": {
|
"demo/draw.js": {
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"demo/browser.js": {
|
"demo/browser.js": {
|
||||||
"bytes": 25445,
|
"bytes": 25470,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "dist/human.esm.js"
|
"path": "dist/human.esm.js"
|
||||||
|
@ -38,14 +38,14 @@
|
||||||
"dist/demo-browser-index.js.map": {
|
"dist/demo-browser-index.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 1919207
|
"bytes": 1919447
|
||||||
},
|
},
|
||||||
"dist/demo-browser-index.js": {
|
"dist/demo-browser-index.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"exports": [],
|
"exports": [],
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"dist/human.esm.js": {
|
"dist/human.esm.js": {
|
||||||
"bytesInOutput": 1898780
|
"bytesInOutput": 1898888
|
||||||
},
|
},
|
||||||
"demo/draw.js": {
|
"demo/draw.js": {
|
||||||
"bytesInOutput": 7704
|
"bytesInOutput": 7704
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
"bytesInOutput": 19421
|
"bytesInOutput": 19421
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 1951729
|
"bytes": 1951837
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -362,7 +362,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 17375,
|
"bytes": 17518,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/log.js"
|
"path": "src/log.js"
|
||||||
|
@ -419,7 +419,7 @@
|
||||||
"dist/human.esm.js.map": {
|
"dist/human.esm.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 1825565
|
"bytes": 1825785
|
||||||
},
|
},
|
||||||
"dist/human.esm.js": {
|
"dist/human.esm.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
|
@ -524,7 +524,7 @@
|
||||||
"bytesInOutput": 918
|
"bytesInOutput": 918
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 11144
|
"bytesInOutput": 11252
|
||||||
},
|
},
|
||||||
"src/hand/box.js": {
|
"src/hand/box.js": {
|
||||||
"bytesInOutput": 1420
|
"bytesInOutput": 1420
|
||||||
|
@ -542,7 +542,7 @@
|
||||||
"bytesInOutput": 22
|
"bytesInOutput": 22
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 1905314
|
"bytes": 1905422
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -362,7 +362,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 17375,
|
"bytes": 17518,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/log.js"
|
"path": "src/log.js"
|
||||||
|
@ -419,7 +419,7 @@
|
||||||
"dist/human.js.map": {
|
"dist/human.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 1825572
|
"bytes": 1825792
|
||||||
},
|
},
|
||||||
"dist/human.js": {
|
"dist/human.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
|
@ -513,7 +513,7 @@
|
||||||
"bytesInOutput": 3647
|
"bytesInOutput": 3647
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 11205
|
"bytesInOutput": 11313
|
||||||
},
|
},
|
||||||
"src/log.js": {
|
"src/log.js": {
|
||||||
"bytesInOutput": 266
|
"bytesInOutput": 266
|
||||||
|
@ -540,7 +540,7 @@
|
||||||
"bytesInOutput": 22
|
"bytesInOutput": 22
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 1905388
|
"bytes": 1905496
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,6 +307,10 @@ class Human {
|
||||||
|
|
||||||
// calculate iris distance
|
// calculate iris distance
|
||||||
// iris: array[ center, left, top, right, bottom]
|
// iris: array[ center, left, top, right, bottom]
|
||||||
|
if (!this.config.face.iris.enabled) {
|
||||||
|
delete face.annotations.leftEyeIris;
|
||||||
|
delete face.annotations.rightEyeIris;
|
||||||
|
}
|
||||||
const irisSize = (face.annotations.leftEyeIris && face.annotations.rightEyeIris)
|
const irisSize = (face.annotations.leftEyeIris && face.annotations.rightEyeIris)
|
||||||
/* average human iris size is 11.7mm */
|
/* average human iris size is 11.7mm */
|
||||||
? 11.7 * Math.max(Math.abs(face.annotations.leftEyeIris[3][0] - face.annotations.leftEyeIris[1][0]), Math.abs(face.annotations.rightEyeIris[4][1] - face.annotations.rightEyeIris[2][1]))
|
? 11.7 * Math.max(Math.abs(face.annotations.leftEyeIris[3][0] - face.annotations.leftEyeIris[1][0]), Math.abs(face.annotations.rightEyeIris[4][1] - face.annotations.rightEyeIris[2][1]))
|
||||||
|
|
Loading…
Reference in New Issue