added rawBox and rawMesh

pull/70/head
Vladimir Mandic 2020-12-22 12:34:47 -05:00
parent ad3dd30fa0
commit 71679812ba
25 changed files with 313 additions and 394 deletions

View File

@ -88,6 +88,7 @@ export default {
enabled: true,
modelPath: '../models/facemesh.json',
inputSize: 192, // fixed value
returnRawData: false, // in addition to standard mesh and box values, return raw normalized values as well
},
iris: {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"inputs": {
"dist/human.esm.js": {
"bytes": 1839457,
"bytes": 1839826,
"imports": []
},
"demo/draw.js": {
@ -38,14 +38,14 @@
"dist/demo-browser-index.js.map": {
"imports": [],
"inputs": {},
"bytes": 2199861
"bytes": 1870322
},
"dist/demo-browser-index.js": {
"imports": [],
"exports": [],
"inputs": {
"dist/human.esm.js": {
"bytesInOutput": 1832217
"bytesInOutput": 1832586
},
"demo/draw.js": {
"bytesInOutput": 7726
@ -60,7 +60,7 @@
"bytesInOutput": 19563
}
},
"bytes": 1886077
"bytes": 1886446
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

84
dist/human.esm.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

26
dist/human.esm.json vendored
View File

@ -5,7 +5,7 @@
"imports": []
},
"dist/tfjs.esm.js": {
"bytes": 1526803,
"bytes": 1526705,
"imports": []
},
"src/tfjs/backend.js": {
@ -44,7 +44,7 @@
"imports": []
},
"src/face/facepipeline.js": {
"bytes": 13836,
"bytes": 14062,
"imports": [
{
"path": "dist/tfjs.esm.js"
@ -64,7 +64,7 @@
]
},
"src/face/facemesh.js": {
"bytes": 2816,
"bytes": 3054,
"imports": [
{
"path": "src/log.js"
@ -350,7 +350,7 @@
]
},
"config.js": {
"bytes": 9530,
"bytes": 9644,
"imports": []
},
"src/sample.js": {
@ -362,7 +362,7 @@
"imports": []
},
"src/human.js": {
"bytes": 16644,
"bytes": 16727,
"imports": [
{
"path": "src/log.js"
@ -419,7 +419,7 @@
"dist/human.esm.js.map": {
"imports": [],
"inputs": {},
"bytes": 2106312
"bytes": 1776771
},
"dist/human.esm.js": {
"imports": [],
@ -440,10 +440,10 @@
"bytesInOutput": 30817
},
"src/face/facepipeline.js": {
"bytesInOutput": 9329
"bytesInOutput": 9513
},
"src/face/facemesh.js": {
"bytesInOutput": 2202
"bytesInOutput": 2378
},
"src/profile.js": {
"bytesInOutput": 846
@ -518,13 +518,13 @@
"bytesInOutput": 266
},
"dist/tfjs.esm.js": {
"bytesInOutput": 1525301
"bytesInOutput": 1525250
},
"src/tfjs/backend.js": {
"bytesInOutput": 938
},
"src/human.js": {
"bytesInOutput": 10996
"bytesInOutput": 11039
},
"src/hand/box.js": {
"bytesInOutput": 1473
@ -533,16 +533,16 @@
"bytesInOutput": 1796
},
"config.js": {
"bytesInOutput": 1492
"bytesInOutput": 1509
},
"src/sample.js": {
"bytesInOutput": 55295
},
"package.json": {
"bytesInOutput": 21
"bytesInOutput": 22
}
},
"bytes": 1839457
"bytes": 1839826
}
}
}

84
dist/human.js vendored

File diff suppressed because one or more lines are too long

6
dist/human.js.map vendored

File diff suppressed because one or more lines are too long

26
dist/human.json vendored
View File

@ -5,7 +5,7 @@
"imports": []
},
"dist/tfjs.esm.js": {
"bytes": 1526803,
"bytes": 1526705,
"imports": []
},
"src/tfjs/backend.js": {
@ -44,7 +44,7 @@
"imports": []
},
"src/face/facepipeline.js": {
"bytes": 13836,
"bytes": 14062,
"imports": [
{
"path": "dist/tfjs.esm.js"
@ -64,7 +64,7 @@
]
},
"src/face/facemesh.js": {
"bytes": 2816,
"bytes": 3054,
"imports": [
{
"path": "src/log.js"
@ -350,7 +350,7 @@
]
},
"config.js": {
"bytes": 9530,
"bytes": 9644,
"imports": []
},
"src/sample.js": {
@ -362,7 +362,7 @@
"imports": []
},
"src/human.js": {
"bytes": 16644,
"bytes": 16727,
"imports": [
{
"path": "src/log.js"
@ -419,7 +419,7 @@
"dist/human.js.map": {
"imports": [],
"inputs": {},
"bytes": 2123435
"bytes": 1776778
},
"dist/human.js": {
"imports": [],
@ -438,10 +438,10 @@
"bytesInOutput": 30817
},
"src/face/facepipeline.js": {
"bytesInOutput": 9329
"bytesInOutput": 9513
},
"src/face/facemesh.js": {
"bytesInOutput": 2202
"bytesInOutput": 2378
},
"src/profile.js": {
"bytesInOutput": 846
@ -513,13 +513,13 @@
"bytesInOutput": 4040
},
"src/human.js": {
"bytesInOutput": 11057
"bytesInOutput": 11100
},
"src/log.js": {
"bytesInOutput": 266
},
"dist/tfjs.esm.js": {
"bytesInOutput": 1525301
"bytesInOutput": 1525250
},
"src/tfjs/backend.js": {
"bytesInOutput": 938
@ -531,16 +531,16 @@
"bytesInOutput": 1796
},
"config.js": {
"bytesInOutput": 1492
"bytesInOutput": 1509
},
"src/sample.js": {
"bytesInOutput": 55295
},
"package.json": {
"bytesInOutput": 21
"bytesInOutput": 22
}
},
"bytes": 1839531
"bytes": 1839900
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
dist/human.node.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

20
dist/human.node.json vendored
View File

@ -44,7 +44,7 @@
"imports": []
},
"src/face/facepipeline.js": {
"bytes": 13836,
"bytes": 14062,
"imports": [
{
"path": "dist/tfjs.esm.js"
@ -64,7 +64,7 @@
]
},
"src/face/facemesh.js": {
"bytes": 2816,
"bytes": 3054,
"imports": [
{
"path": "src/log.js"
@ -350,7 +350,7 @@
]
},
"config.js": {
"bytes": 9530,
"bytes": 9644,
"imports": []
},
"src/sample.js": {
@ -362,7 +362,7 @@
"imports": []
},
"src/human.js": {
"bytes": 16644,
"bytes": 16727,
"imports": [
{
"path": "src/log.js"
@ -419,7 +419,7 @@
"dist/human.node-gpu.js.map": {
"imports": [],
"inputs": {},
"bytes": 779986
"bytes": 702698
},
"dist/human.node-gpu.js": {
"imports": [],
@ -441,10 +441,10 @@
"bytesInOutput": 30828
},
"src/face/facepipeline.js": {
"bytesInOutput": 9379
"bytesInOutput": 9563
},
"src/face/facemesh.js": {
"bytesInOutput": 2245
"bytesInOutput": 2421
},
"src/profile.js": {
"bytesInOutput": 846
@ -516,7 +516,7 @@
"bytesInOutput": 4069
},
"src/human.js": {
"bytesInOutput": 11084
"bytesInOutput": 11126
},
"src/log.js": {
"bytesInOutput": 266
@ -531,7 +531,7 @@
"bytesInOutput": 1790
},
"config.js": {
"bytesInOutput": 1492
"bytesInOutput": 1509
},
"src/sample.js": {
"bytesInOutput": 55295
@ -540,7 +540,7 @@
"bytesInOutput": 20
}
},
"bytes": 309780
"bytes": 310199
}
}
}

80
dist/tfjs.esm.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

86
dist/tfjs.esm.json vendored
View File

@ -17869,7 +17869,7 @@
"dist/tfjs.esm.js.map": {
"imports": [],
"inputs": {},
"bytes": 1094244
"bytes": 1087999
},
"dist/tfjs.esm.js": {
"imports": [],
@ -18467,10 +18467,10 @@
"bytesInOutput": 21
},
"node_modules/@tensorflow/tfjs-core/dist/backends/backend.js": {
"bytesInOutput": 9405
"bytesInOutput": 9404
},
"node_modules/@tensorflow/tfjs-core/dist/util_base.js": {
"bytesInOutput": 8572
"bytesInOutput": 8570
},
"node_modules/@tensorflow/tfjs-core/dist/environment.js": {
"bytesInOutput": 2870
@ -18646,9 +18646,6 @@
"node_modules/@tensorflow/tfjs-core/dist/ops/abs.js": {
"bytesInOutput": 225
},
"node_modules/@tensorflow/tfjs-core/dist/ops/ops.js": {
"bytesInOutput": 504
},
"node_modules/@tensorflow/tfjs-core/dist/ops/acos.js": {
"bytesInOutput": 203
},
@ -18809,7 +18806,7 @@
"bytesInOutput": 194
},
"node_modules/@tensorflow/tfjs-core/dist/ops/div_no_nan.js": {
"bytesInOutput": 279
"bytesInOutput": 276
},
"node_modules/@tensorflow/tfjs-core/dist/ops/dot.js": {
"bytesInOutput": 995
@ -18839,10 +18836,10 @@
"bytesInOutput": 154
},
"node_modules/@tensorflow/tfjs-core/dist/ops/floor.js": {
"bytesInOutput": 170
"bytesInOutput": 169
},
"node_modules/@tensorflow/tfjs-core/dist/ops/segment_util.js": {
"bytesInOutput": 1072
"bytesInOutput": 1068
},
"node_modules/@tensorflow/tfjs-core/dist/ops/reduce_util.js": {
"bytesInOutput": 168
@ -19019,10 +19016,10 @@
"bytesInOutput": 650
},
"node_modules/@tensorflow/tfjs-core/dist/ops/rand.js": {
"bytesInOutput": 415
"bytesInOutput": 414
},
"node_modules/@tensorflow/tfjs-core/dist/ops/rand_util.js": {
"bytesInOutput": 2351
"bytesInOutput": 2344
},
"node_modules/@tensorflow/tfjs-core/dist/ops/random_gamma.js": {
"bytesInOutput": 401
@ -19180,6 +19177,9 @@
"node_modules/@tensorflow/tfjs-core/dist/ops/boolean_mask.js": {
"bytesInOutput": 1054
},
"node_modules/@tensorflow/tfjs-core/dist/ops/ops.js": {
"bytesInOutput": 504
},
"node_modules/@tensorflow/tfjs-core/dist/ops/compare.js": {
"bytesInOutput": 2011
},
@ -19793,7 +19793,7 @@
"bytesInOutput": 75
},
"node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/clip_by_value.js": {
"bytesInOutput": 110
"bytesInOutput": 108
},
"node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/concat.js": {
"bytesInOutput": 126
@ -20168,7 +20168,7 @@
"bytesInOutput": 0
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/backend_cpu.js": {
"bytesInOutput": 40242
"bytesInOutput": 40239
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/cpu_util.js": {
"bytesInOutput": 241
@ -20222,7 +20222,7 @@
"bytesInOutput": 155
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Max_impl.js": {
"bytesInOutput": 323
"bytesInOutput": 319
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multiply.js": {
"bytesInOutput": 362
@ -20248,12 +20248,12 @@
"node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unique_impl.js": {
"bytesInOutput": 1319
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/base.js": {
"bytesInOutput": 48
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/version.js": {
"bytesInOutput": 21
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/base.js": {
"bytesInOutput": 48
},
"node_modules/@tensorflow/tfjs-backend-cpu/dist/index.js": {
"bytesInOutput": 0
},
@ -20486,7 +20486,7 @@
"bytesInOutput": 1464
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl_util.js": {
"bytesInOutput": 17037
"bytesInOutput": 17035
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/canvas_util.js": {
"bytesInOutput": 1586
@ -20534,10 +20534,10 @@
"bytesInOutput": 4185
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/clip_gpu.js": {
"bytesInOutput": 666
"bytesInOutput": 664
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/clip_packed_gpu.js": {
"bytesInOutput": 731
"bytesInOutput": 729
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/complex_abs_gpu.js": {
"bytesInOutput": 561
@ -20702,17 +20702,17 @@
"bytesInOutput": 560
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/backend_webgl.js": {
"bytesInOutput": 54421
"bytesInOutput": 54417
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/version.js": {
"bytesInOutput": 21
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/base.js": {
"bytesInOutput": 113
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl.js": {
"bytesInOutput": 67
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/base.js": {
"bytesInOutput": 113
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/index.js": {
"bytesInOutput": 0
},
@ -20720,10 +20720,10 @@
"bytesInOutput": 232
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Complex.js": {
"bytesInOutput": 673
"bytesInOutput": 671
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/kernel_funcs_utils.js": {
"bytesInOutput": 2285
"bytesInOutput": 2284
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Add.js": {
"bytesInOutput": 210
@ -20756,7 +20756,7 @@
"bytesInOutput": 242
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cast.js": {
"bytesInOutput": 1280
"bytesInOutput": 1279
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/concat_gpu.js": {
"bytesInOutput": 839
@ -20774,7 +20774,7 @@
"bytesInOutput": 830
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat_impl.js": {
"bytesInOutput": 1774
"bytesInOutput": 1773
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat.js": {
"bytesInOutput": 637
@ -20789,7 +20789,7 @@
"bytesInOutput": 1517
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FFT_impl.js": {
"bytesInOutput": 1128
"bytesInOutput": 1127
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FFT.js": {
"bytesInOutput": 180
@ -20864,7 +20864,7 @@
"bytesInOutput": 719
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Multiply.js": {
"bytesInOutput": 1781
"bytesInOutput": 1780
},
"node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV3.js": {
"bytesInOutput": 657
@ -20957,7 +20957,7 @@
"bytesInOutput": 1162
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Conv2D.js": {
"bytesInOutput": 1720
"bytesInOutput": 1718
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Conv2DBackpropInput.js": {
"bytesInOutput": 2128
@ -21071,7 +21071,7 @@
"bytesInOutput": 253
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/PadV2.js": {
"bytesInOutput": 950
"bytesInOutput": 948
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Pow.js": {
"bytesInOutput": 95
@ -21140,7 +21140,7 @@
"bytesInOutput": 46
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tile.js": {
"bytesInOutput": 767
"bytesInOutput": 765
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Unpack.js": {
"bytesInOutput": 608
@ -21160,17 +21160,17 @@
"node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js": {
"bytesInOutput": 3425
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/version.js": {
"bytesInOutput": 21
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/base.js": {
"bytesInOutput": 0
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/version.js": {
"bytesInOutput": 22
},
"node_modules/@tensorflow/tfjs-backend-wasm/dist/index.js": {
"bytesInOutput": 0
},
"src/tfjs/tf-browser.js": {
"bytesInOutput": 208
"bytesInOutput": 207
},
"node_modules/@tensorflow/tfjs-layers/dist/exports_constraints.js": {
"bytesInOutput": 353
@ -21209,7 +21209,7 @@
"bytesInOutput": 8999
},
"node_modules/@tensorflow/tfjs-layers/dist/exports_layers.js": {
"bytesInOutput": 5882
"bytesInOutput": 5881
},
"node_modules/@tensorflow/tfjs-layers/dist/backend/state.js": {
"bytesInOutput": 254
@ -21233,7 +21233,7 @@
"bytesInOutput": 577
},
"node_modules/@tensorflow/tfjs-layers/dist/base_callbacks.js": {
"bytesInOutput": 7438
"bytesInOutput": 7436
},
"node_modules/@tensorflow/tfjs-layers/dist/layers/serialization.js": {
"bytesInOutput": 200
@ -21305,7 +21305,7 @@
"bytesInOutput": 29892
},
"node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional_recurrent.js": {
"bytesInOutput": 9235
"bytesInOutput": 9196
},
"node_modules/@tensorflow/tfjs-layers/dist/layers/core.js": {
"bytesInOutput": 9964
@ -21314,7 +21314,7 @@
"bytesInOutput": 2811
},
"node_modules/@tensorflow/tfjs-layers/dist/layers/merge.js": {
"bytesInOutput": 11973
"bytesInOutput": 11970
},
"node_modules/@tensorflow/tfjs-layers/dist/layers/noise.js": {
"bytesInOutput": 2406
@ -21506,7 +21506,7 @@
"bytesInOutput": 4829
},
"node_modules/@tensorflow/tfjs-data/dist/iterators/lazy_iterator.js": {
"bytesInOutput": 11031
"bytesInOutput": 11029
},
"node_modules/@tensorflow/tfjs-data/dist/util/deep_map.js": {
"bytesInOutput": 2470
@ -21563,7 +21563,7 @@
"bytesInOutput": 22
}
},
"bytes": 1526803
"bytes": 1526705
}
}
}

130
package-lock.json generated
View File

@ -506,9 +506,9 @@
}
},
"astral-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
"integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
"integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
"dev": true
},
"asynckit": {
@ -818,9 +818,9 @@
}
},
"esbuild": {
"version": "0.8.23",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.23.tgz",
"integrity": "sha512-LkgCmotGnhVgRGxjDkTBBYrnJ5stcxK+40cEJGtXUS16hcAWy90cn1qjxKCogzLPJ75gW/L6ejly7VKrMstVGQ==",
"version": "0.8.26",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.26.tgz",
"integrity": "sha512-u3MMHOOumdWoAKF+073GHPpzvVB2cM+y9VD4ZwYs1FAQ6atRPISya35dbrbOu/mM68mQ42P+nwPzQVBTfQhkvQ==",
"dev": true
},
"escalade": {
@ -836,9 +836,9 @@
"dev": true
},
"eslint": {
"version": "7.15.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.15.0.tgz",
"integrity": "sha512-Vr64xFDT8w30wFll643e7cGrIkPEU50yIiI36OdSIDoSGguIeaLzBo0vpGvzo9RECUqq7htURfwEtKqwytkqzA==",
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.16.0.tgz",
"integrity": "sha512-iVWPS785RuDA4dWuhhgXTNrGxHHK3a8HLSMBgbbU59ruJDubUraXN8N5rn7kb8tG6sjg74eE0RA3YWT51eusEw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@ -875,7 +875,7 @@
"semver": "^7.2.1",
"strip-ansi": "^6.0.0",
"strip-json-comments": "^3.1.0",
"table": "^5.2.3",
"table": "^6.0.4",
"text-table": "^0.2.0",
"v8-compile-cache": "^2.0.3"
},
@ -1349,9 +1349,9 @@
"dev": true
},
"get-intrinsic": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz",
"integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz",
"integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==",
"dev": true,
"requires": {
"function-bind": "^1.1.1",
@ -1471,9 +1471,9 @@
}
},
"import-fresh": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz",
"integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
"integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
"dev": true,
"requires": {
"parent-module": "^1.0.0",
@ -2304,46 +2304,14 @@
}
},
"slice-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
"integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
"integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.0",
"astral-regex": "^1.0.0",
"is-fullwidth-code-point": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
}
"ansi-styles": "^4.0.0",
"astral-regex": "^2.0.0",
"is-fullwidth-code-point": "^3.0.0"
}
},
"spdx-correct": {
@ -2455,55 +2423,15 @@
}
},
"table": {
"version": "5.4.6",
"resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
"integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/table/-/table-6.0.4.tgz",
"integrity": "sha512-sBT4xRLdALd+NFBvwOz8bw4b15htyythha+q+DVZqy2RS08PPC8O2sZFgJYEY7bJvbCFKccs+WIZ/cd+xxTWCw==",
"dev": true,
"requires": {
"ajv": "^6.10.2",
"lodash": "^4.17.14",
"slice-ansi": "^2.1.0",
"string-width": "^3.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
},
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"ansi-regex": "^4.1.0"
}
}
"ajv": "^6.12.4",
"lodash": "^4.17.20",
"slice-ansi": "^4.0.0",
"string-width": "^4.2.0"
}
},
"tar": {

View File

@ -35,8 +35,8 @@
"@vladmandic/pilogger": "^0.2.10",
"chokidar": "^3.4.3",
"dayjs": "^1.9.7",
"esbuild": "^0.8.23",
"eslint": "^7.15.0",
"esbuild": "^0.8.26",
"eslint": "^7.16.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-json": "^2.1.2",

View File

@ -16,7 +16,6 @@ class MediaPipeFaceMesh {
for (const prediction of (predictions || [])) {
if (prediction.isDisposedInternal) continue; // guard against disposed tensors on long running operations such as pause in middle of processing
const mesh = prediction.coords ? prediction.coords.arraySync() : null;
// AT: mesh_raw
const meshRaw = prediction.rawCoords;
const annotations = {};
if (mesh && mesh.length > 0) {
@ -26,7 +25,6 @@ class MediaPipeFaceMesh {
}
}
}
// AT: raw version of box, the same as the TFJS Facemesh output version (.boundingBox)
const boxRaw = (config.face.mesh.returnRawData && prediction.box) ? { topLeft: prediction.box.startPoint, bottomRight: prediction.box.endPoint } : null;
const box = prediction.box ? [
@ -40,7 +38,6 @@ class MediaPipeFaceMesh {
confidence: prediction.confidence || 0,
box,
mesh,
// AT: boxRaw, meshRaw
boxRaw,
meshRaw,
annotations,

View File

@ -157,13 +157,10 @@ class Pipeline {
for (let i = 0; i < this.storedBoxes.length; i++) {
const scaledBox = bounding.scaleBoxCoordinates({ startPoint: this.storedBoxes[i].startPoint, endPoint: this.storedBoxes[i].endPoint }, detector.scaleFactor);
const enlargedBox = bounding.enlargeBox(scaledBox);
// AT: preserve aspect ratio, pulled from Facemesh upstream (https://github.com/tensorflow/tfjs-models/commit/85e6e487cc4bd21f0707a509e5024484a0798aa0)
const squarifiedBox = bounding.squarifyBox(enlargedBox);
const landmarks = this.storedBoxes[i].landmarks.arraySync();
const confidence = this.storedBoxes[i].confidence;
// AT: preserve aspect ratio, pulled from Facemesh upstream
this.storedBoxes[i] = { ...squarifiedBox, confidence, landmarks };
// this.storedBoxes[i] = { ...enlargedBox, confidence, landmarks };
}
this.runsWithoutFaceDetector = 0;
}
@ -239,7 +236,6 @@ class Pipeline {
const transformedCoordsData = this.transformRawCoords(rawCoords, box, angle, rotationMatrix);
const landmarksBox = bounding.enlargeBox(this.calculateLandmarksBoundingBox(transformedCoordsData));
// AT: preserve aspect ratio, pulled from Facemesh upstream
const squarifiedLandmarksBox = bounding.squarifyBox(landmarksBox);
const transformedCoords = tf.tensor2d(transformedCoordsData);
const prediction = {
@ -249,11 +245,8 @@ class Pipeline {
confidence: box.confidence,
image: face,
};
// AT: rawCoords
if (config.face.mesh.returnRawData) prediction.rawCoords = rawCoords;
// AT: preserve aspect ratio, pulled from Facemesh upstream
this.storedBoxes[i] = { ...squarifiedLandmarksBox, landmarks: transformedCoords.arraySync(), confidence: box.confidence, faceConfidence: confidenceVal };
// this.storedBoxes[i] = { ...landmarksBox, landmarks: transformedCoords.arraySync(), confidence: box.confidence, faceConfidence: confidenceVal };
return prediction;
}));

2
wiki

@ -1 +1 @@
Subproject commit 70b1aadc1b00fe59c454bc73baf413289961f28b
Subproject commit 89996eaa377e4e1c2dc292f540235485272d53bf