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 = {
|
||||
face: { enabled: false },
|
||||
face: { enabled: true, iris: { enabled: false } },
|
||||
body: { enabled: true },
|
||||
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": {
|
||||
"dist/human.esm.js": {
|
||||
"bytes": 1905314,
|
||||
"bytes": 1905422,
|
||||
"imports": []
|
||||
},
|
||||
"demo/draw.js": {
|
||||
|
@ -17,7 +17,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"demo/browser.js": {
|
||||
"bytes": 25445,
|
||||
"bytes": 25470,
|
||||
"imports": [
|
||||
{
|
||||
"path": "dist/human.esm.js"
|
||||
|
@ -38,14 +38,14 @@
|
|||
"dist/demo-browser-index.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 1919207
|
||||
"bytes": 1919447
|
||||
},
|
||||
"dist/demo-browser-index.js": {
|
||||
"imports": [],
|
||||
"exports": [],
|
||||
"inputs": {
|
||||
"dist/human.esm.js": {
|
||||
"bytesInOutput": 1898780
|
||||
"bytesInOutput": 1898888
|
||||
},
|
||||
"demo/draw.js": {
|
||||
"bytesInOutput": 7704
|
||||
|
@ -60,7 +60,7 @@
|
|||
"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": []
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytes": 17375,
|
||||
"bytes": 17518,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/log.js"
|
||||
|
@ -419,7 +419,7 @@
|
|||
"dist/human.esm.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 1825565
|
||||
"bytes": 1825785
|
||||
},
|
||||
"dist/human.esm.js": {
|
||||
"imports": [],
|
||||
|
@ -524,7 +524,7 @@
|
|||
"bytesInOutput": 918
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytesInOutput": 11144
|
||||
"bytesInOutput": 11252
|
||||
},
|
||||
"src/hand/box.js": {
|
||||
"bytesInOutput": 1420
|
||||
|
@ -542,7 +542,7 @@
|
|||
"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": []
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytes": 17375,
|
||||
"bytes": 17518,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/log.js"
|
||||
|
@ -419,7 +419,7 @@
|
|||
"dist/human.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 1825572
|
||||
"bytes": 1825792
|
||||
},
|
||||
"dist/human.js": {
|
||||
"imports": [],
|
||||
|
@ -513,7 +513,7 @@
|
|||
"bytesInOutput": 3647
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytesInOutput": 11205
|
||||
"bytesInOutput": 11313
|
||||
},
|
||||
"src/log.js": {
|
||||
"bytesInOutput": 266
|
||||
|
@ -540,7 +540,7 @@
|
|||
"bytesInOutput": 22
|
||||
}
|
||||
},
|
||||
"bytes": 1905388
|
||||
"bytes": 1905496
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -307,6 +307,10 @@ class Human {
|
|||
|
||||
// calculate iris distance
|
||||
// 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)
|
||||
/* 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]))
|
||||
|
|
Loading…
Reference in New Issue