update for node v15

pull/50/head
Vladimir Mandic 2020-11-25 09:13:19 -05:00
parent e59bf8f04a
commit bef5619d5d
25 changed files with 2317 additions and 2336 deletions

View File

@ -62,17 +62,17 @@ function str(...msg) {
}
// helper function: wrapper around console output
const log = (...msg) => {
function log(...msg) {
const dt = new Date();
const ts = `${dt.getHours().toString().padStart(2, '0')}:${dt.getMinutes().toString().padStart(2, '0')}:${dt.getSeconds().toString().padStart(2, '0')}.${dt.getMilliseconds().toString().padStart(3, '0')}`;
// eslint-disable-next-line no-console
if (ui.console) console.log(ts, ...msg);
};
}
const status = (msg) => {
function status(msg) {
// eslint-disable-next-line no-console
document.getElementById('status').innerText = msg;
};
}
let original;
async function calcSimmilariry(result) {

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": {
"demo/browser.js": {
"bytes": 25186,
"bytes": 25178,
"imports": [
{
"path": "dist/human.esm.js"
@ -30,7 +30,7 @@
"imports": []
},
"dist/human.esm.js": {
"bytes": 1784464,
"bytes": 1774850,
"imports": []
}
},
@ -38,29 +38,29 @@
"dist/demo-browser-index.js.map": {
"imports": [],
"inputs": {},
"bytes": 2679237
"bytes": 2678894
},
"dist/demo-browser-index.js": {
"imports": [],
"exports": [],
"inputs": {
"dist/human.esm.js": {
"bytesInOutput": 1777219
"bytesInOutput": 1767609
},
"demo/draw.js": {
"bytesInOutput": 7773
"bytesInOutput": 7724
},
"demo/menu.js": {
"bytesInOutput": 11838
"bytesInOutput": 11788
},
"demo/gl-bench.js": {
"bytesInOutput": 7436
"bytesInOutput": 7382
},
"demo/browser.js": {
"bytesInOutput": 19407
"bytesInOutput": 19345
}
},
"bytes": 1831059
"bytes": 1821237
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

378
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

96
dist/human.esm.json vendored
View File

@ -5,7 +5,7 @@
"imports": []
},
"dist/tfjs.esm.js": {
"bytes": 1531180,
"bytes": 1522251,
"imports": []
},
"package.json": {
@ -357,7 +357,7 @@
"dist/human.esm.js.map": {
"imports": [],
"inputs": {},
"bytes": 2583632
"bytes": 2583292
},
"dist/human.esm.js": {
"imports": [],
@ -366,112 +366,112 @@
],
"inputs": {
"src/face/blazeface.js": {
"bytesInOutput": 5152
"bytesInOutput": 5109
},
"src/face/box.js": {
"bytesInOutput": 1586
"bytesInOutput": 1578
},
"src/face/util.js": {
"bytesInOutput": 2423
"bytesInOutput": 2413
},
"src/face/coords.js": {
"bytesInOutput": 30819
"bytesInOutput": 30817
},
"src/face/facepipeline.js": {
"bytesInOutput": 9453
"bytesInOutput": 9391
},
"src/face/facemesh.js": {
"bytesInOutput": 2123
"bytesInOutput": 2108
},
"src/profile.js": {
"bytesInOutput": 860
"bytesInOutput": 854
},
"src/age/age.js": {
"bytesInOutput": 1156
},
"src/gender/gender.js": {
"bytesInOutput": 1920
},
"src/emotion/emotion.js": {
"bytesInOutput": 1790
},
"src/embedding/embedding.js": {
"bytesInOutput": 1347
},
"src/body/modelBase.js": {
"bytesInOutput": 612
},
"src/body/modelMobileNet.js": {
"bytesInOutput": 378
},
"src/body/heapSort.js": {
"bytesInOutput": 1138
},
"src/gender/gender.js": {
"bytesInOutput": 1886
},
"src/emotion/emotion.js": {
"bytesInOutput": 1764
},
"src/embedding/embedding.js": {
"bytesInOutput": 1333
},
"src/body/modelBase.js": {
"bytesInOutput": 615
},
"src/body/modelMobileNet.js": {
"bytesInOutput": 375
},
"src/body/heapSort.js": {
"bytesInOutput": 1139
},
"src/body/buildParts.js": {
"bytesInOutput": 1313
"bytesInOutput": 1293
},
"src/body/keypoints.js": {
"bytesInOutput": 1810
"bytesInOutput": 1808
},
"src/body/vectors.js": {
"bytesInOutput": 1058
"bytesInOutput": 1050
},
"src/body/decodePose.js": {
"bytesInOutput": 3131
"bytesInOutput": 3111
},
"src/body/decodeMultiple.js": {
"bytesInOutput": 1682
"bytesInOutput": 1668
},
"src/body/util.js": {
"bytesInOutput": 1923
"bytesInOutput": 1913
},
"src/body/modelPoseNet.js": {
"bytesInOutput": 1589
"bytesInOutput": 1584
},
"src/body/posenet.js": {
"bytesInOutput": 834
"bytesInOutput": 832
},
"src/hand/handdetector.js": {
"bytesInOutput": 2784
"bytesInOutput": 2765
},
"src/hand/handpipeline.js": {
"bytesInOutput": 4726
"bytesInOutput": 4691
},
"src/hand/anchors.js": {
"bytesInOutput": 127032
},
"src/hand/handpose.js": {
"bytesInOutput": 1929
"bytesInOutput": 1914
},
"src/gesture/gesture.js": {
"bytesInOutput": 2459
"bytesInOutput": 2427
},
"src/imagefx.js": {
"bytesInOutput": 13638
"bytesInOutput": 13576
},
"src/image.js": {
"bytesInOutput": 4079
"bytesInOutput": 4048
},
"dist/tfjs.esm.js": {
"bytesInOutput": 1529574
"bytesInOutput": 1520547
},
"src/human.js": {
"bytesInOutput": 10598
"bytesInOutput": 10548
},
"src/hand/box.js": {
"bytesInOutput": 1880
"bytesInOutput": 1868
},
"src/hand/util.js": {
"bytesInOutput": 1808
"bytesInOutput": 1796
},
"config.js": {
"bytesInOutput": 1368
"bytesInOutput": 1364
},
"package.json": {
"bytesInOutput": 22
"bytesInOutput": 21
}
},
"bytes": 1784464
"bytes": 1774850
}
}
}

380
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

96
dist/human.json vendored
View File

@ -5,7 +5,7 @@
"imports": []
},
"dist/tfjs.esm.js": {
"bytes": 1531180,
"bytes": 1522251,
"imports": []
},
"package.json": {
@ -357,119 +357,119 @@
"dist/human.js.map": {
"imports": [],
"inputs": {},
"bytes": 2550600
"bytes": 2599797
},
"dist/human.js": {
"imports": [],
"exports": [],
"inputs": {
"src/face/blazeface.js": {
"bytesInOutput": 5128
"bytesInOutput": 5109
},
"src/face/box.js": {
"bytesInOutput": 1586
"bytesInOutput": 1578
},
"src/face/util.js": {
"bytesInOutput": 2423
"bytesInOutput": 2413
},
"src/face/coords.js": {
"bytesInOutput": 30819
"bytesInOutput": 30817
},
"src/face/facepipeline.js": {
"bytesInOutput": 9431
"bytesInOutput": 9391
},
"src/face/facemesh.js": {
"bytesInOutput": 2101
"bytesInOutput": 2108
},
"src/profile.js": {
"bytesInOutput": 850
"bytesInOutput": 854
},
"src/age/age.js": {
"bytesInOutput": 1139
},
"src/gender/gender.js": {
"bytesInOutput": 1896
},
"src/emotion/emotion.js": {
"bytesInOutput": 1769
},
"src/embedding/embedding.js": {
"bytesInOutput": 1325
},
"src/body/modelBase.js": {
"bytesInOutput": 612
},
"src/body/modelMobileNet.js": {
"bytesInOutput": 378
},
"src/body/heapSort.js": {
"bytesInOutput": 1138
},
"src/gender/gender.js": {
"bytesInOutput": 1886
},
"src/emotion/emotion.js": {
"bytesInOutput": 1764
},
"src/embedding/embedding.js": {
"bytesInOutput": 1333
},
"src/body/modelBase.js": {
"bytesInOutput": 615
},
"src/body/modelMobileNet.js": {
"bytesInOutput": 375
},
"src/body/heapSort.js": {
"bytesInOutput": 1139
},
"src/body/buildParts.js": {
"bytesInOutput": 1313
"bytesInOutput": 1293
},
"src/body/keypoints.js": {
"bytesInOutput": 1810
"bytesInOutput": 1808
},
"src/body/vectors.js": {
"bytesInOutput": 1058
"bytesInOutput": 1050
},
"src/body/decodePose.js": {
"bytesInOutput": 3131
"bytesInOutput": 3111
},
"src/body/decodeMultiple.js": {
"bytesInOutput": 1682
"bytesInOutput": 1668
},
"src/body/util.js": {
"bytesInOutput": 1923
"bytesInOutput": 1913
},
"src/body/modelPoseNet.js": {
"bytesInOutput": 1576
"bytesInOutput": 1584
},
"src/body/posenet.js": {
"bytesInOutput": 834
"bytesInOutput": 832
},
"src/hand/handdetector.js": {
"bytesInOutput": 2773
"bytesInOutput": 2765
},
"src/hand/handpipeline.js": {
"bytesInOutput": 4717
"bytesInOutput": 4691
},
"src/hand/anchors.js": {
"bytesInOutput": 127032
},
"src/hand/handpose.js": {
"bytesInOutput": 1910
"bytesInOutput": 1914
},
"src/gesture/gesture.js": {
"bytesInOutput": 2459
"bytesInOutput": 2427
},
"src/imagefx.js": {
"bytesInOutput": 13638
"bytesInOutput": 13576
},
"src/image.js": {
"bytesInOutput": 4044
"bytesInOutput": 4048
},
"src/human.js": {
"bytesInOutput": 10662
"bytesInOutput": 10609
},
"dist/tfjs.esm.js": {
"bytesInOutput": 1529065
"bytesInOutput": 1520551
},
"src/hand/box.js": {
"bytesInOutput": 1880
"bytesInOutput": 1868
},
"src/hand/util.js": {
"bytesInOutput": 1808
"bytesInOutput": 1796
},
"config.js": {
"bytesInOutput": 1368
"bytesInOutput": 1364
},
"package.json": {
"bytesInOutput": 22
"bytesInOutput": 21
}
},
"bytes": 1783786
"bytes": 1774928
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

12
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

70
dist/human.node.json vendored
View File

@ -357,7 +357,7 @@
"dist/human.node-gpu.js.map": {
"imports": [],
"inputs": {},
"bytes": 686589
"bytes": 686404
},
"dist/human.node-gpu.js": {
"imports": [],
@ -367,109 +367,109 @@
"bytesInOutput": 966
},
"src/face/blazeface.js": {
"bytesInOutput": 5307
"bytesInOutput": 5264
},
"src/face/box.js": {
"bytesInOutput": 1638
"bytesInOutput": 1628
},
"src/face/util.js": {
"bytesInOutput": 2434
"bytesInOutput": 2424
},
"src/face/coords.js": {
"bytesInOutput": 30830
"bytesInOutput": 30828
},
"src/face/facepipeline.js": {
"bytesInOutput": 9509
"bytesInOutput": 9447
},
"src/face/facemesh.js": {
"bytesInOutput": 2168
"bytesInOutput": 2153
},
"src/profile.js": {
"bytesInOutput": 860
"bytesInOutput": 854
},
"src/age/age.js": {
"bytesInOutput": 1210
"bytesInOutput": 1192
},
"src/gender/gender.js": {
"bytesInOutput": 1998
"bytesInOutput": 1964
},
"src/emotion/emotion.js": {
"bytesInOutput": 1861
"bytesInOutput": 1835
},
"src/embedding/embedding.js": {
"bytesInOutput": 1398
"bytesInOutput": 1384
},
"src/body/modelBase.js": {
"bytesInOutput": 655
"bytesInOutput": 652
},
"src/body/modelMobileNet.js": {
"bytesInOutput": 421
"bytesInOutput": 418
},
"src/body/heapSort.js": {
"bytesInOutput": 1138
"bytesInOutput": 1139
},
"src/body/buildParts.js": {
"bytesInOutput": 1315
"bytesInOutput": 1295
},
"src/body/keypoints.js": {
"bytesInOutput": 1821
"bytesInOutput": 1819
},
"src/body/vectors.js": {
"bytesInOutput": 1050
"bytesInOutput": 1042
},
"src/body/decodePose.js": {
"bytesInOutput": 3133
"bytesInOutput": 3113
},
"src/body/decodeMultiple.js": {
"bytesInOutput": 1684
"bytesInOutput": 1670
},
"src/body/util.js": {
"bytesInOutput": 1928
"bytesInOutput": 1918
},
"src/body/modelPoseNet.js": {
"bytesInOutput": 1627
"bytesInOutput": 1622
},
"src/body/posenet.js": {
"bytesInOutput": 848
"bytesInOutput": 846
},
"src/hand/handdetector.js": {
"bytesInOutput": 2924
"bytesInOutput": 2903
},
"src/hand/handpipeline.js": {
"bytesInOutput": 4772
"bytesInOutput": 4735
},
"src/hand/anchors.js": {
"bytesInOutput": 127034
},
"src/hand/handpose.js": {
"bytesInOutput": 1973
"bytesInOutput": 1958
},
"src/gesture/gesture.js": {
"bytesInOutput": 2463
"bytesInOutput": 2431
},
"src/imagefx.js": {
"bytesInOutput": 13620
"bytesInOutput": 13558
},
"src/image.js": {
"bytesInOutput": 4107
"bytesInOutput": 4077
},
"src/human.js": {
"bytesInOutput": 10686
"bytesInOutput": 10636
},
"src/hand/box.js": {
"bytesInOutput": 1917
"bytesInOutput": 1905
},
"src/hand/util.js": {
"bytesInOutput": 1802
"bytesInOutput": 1790
},
"config.js": {
"bytesInOutput": 1368
"bytesInOutput": 1364
},
"package.json": {
"bytesInOutput": 21
"bytesInOutput": 20
}
},
"bytes": 250443
"bytes": 249843
}
}
}

372
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

2688
dist/tfjs.esm.json vendored

File diff suppressed because it is too large Load Diff

75
package-lock.json generated
View File

@ -323,9 +323,9 @@
"dev": true
},
"@types/node": {
"version": "14.14.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz",
"integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==",
"version": "14.14.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.10.tgz",
"integrity": "sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ==",
"dev": true
},
"@types/node-fetch": {
@ -363,14 +363,10 @@
"dev": true
},
"@vladmandic/pilogger": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@vladmandic/pilogger/-/pilogger-0.2.7.tgz",
"integrity": "sha512-rcmBW0KQKvbI7dir6u7DIPaRmrYbupzcWtWhxnYxNpW9q8v1kBhg6lY4sWVY4xCDzAXOnmEV5m0KdUJBEsZ86g==",
"dev": true,
"requires": {
"chalk": "^4.1.0",
"dayjs": "^1.9.4"
}
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/@vladmandic/pilogger/-/pilogger-0.2.9.tgz",
"integrity": "sha512-UaDAFoEJwPw8248u9WQjVexP24wMiglHMWWd4X0gwukZuDw+CkoLddVF8335OYa+pXbP+t/rwx+E50f5rd5IhQ==",
"dev": true
},
"abbrev": {
"version": "1.1.1",
@ -474,35 +470,16 @@
}
},
"array-includes": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz",
"integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==",
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.2.tgz",
"integrity": "sha512-w2GspexNQpx+PutG3QpT437/BenZBj0M/MZGn5mzv/MofYqo0xmRHzn4lFsoDlWJ+THYsGJmFlW68WlDFx7VRw==",
"dev": true,
"requires": {
"call-bind": "^1.0.0",
"define-properties": "^1.1.3",
"es-abstract": "^1.17.0",
"es-abstract": "^1.18.0-next.1",
"get-intrinsic": "^1.0.1",
"is-string": "^1.0.5"
},
"dependencies": {
"es-abstract": {
"version": "1.17.7",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
"integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
"dev": true,
"requires": {
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
"is-regex": "^1.1.1",
"object-inspect": "^1.8.0",
"object-keys": "^1.1.1",
"object.assign": "^4.1.1",
"string.prototype.trimend": "^1.0.1",
"string.prototype.trimstart": "^1.0.1"
}
}
}
},
"array.prototype.flat": {
@ -829,9 +806,9 @@
}
},
"esbuild": {
"version": "0.8.12",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.12.tgz",
"integrity": "sha512-SWCUodYFOkKcu2Jbum12NbD98MoQq2EWWvHfQtpR2C9RkPzRr1BE4cavYjQpQV01hBR19UAftXl0TVLjka/i3Q==",
"version": "0.8.15",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.15.tgz",
"integrity": "sha512-mSaLo9t/oYtQE6FRUEdO47Pr8PisSPzHtgr+LcihIcjBEhbYwjT6WLCQ7noDoTBfIatBCw229rtmIwl9u9UQwg==",
"dev": true
},
"escalade": {
@ -2428,23 +2405,23 @@
}
},
"string.prototype.trimend": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz",
"integrity": "sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw==",
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz",
"integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.18.0-next.1"
"call-bind": "^1.0.0",
"define-properties": "^1.1.3"
}
},
"string.prototype.trimstart": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz",
"integrity": "sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg==",
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz",
"integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.18.0-next.1"
"call-bind": "^1.0.0",
"define-properties": "^1.1.3"
}
},
"string_decoder": {

View File

@ -32,10 +32,10 @@
"@tensorflow/tfjs-layers": "^2.7.0",
"@tensorflow/tfjs-node": "^2.7.0",
"@tensorflow/tfjs-node-gpu": "^2.7.0",
"@vladmandic/pilogger": "^0.2.7",
"@vladmandic/pilogger": "^0.2.9",
"chokidar": "^3.4.3",
"dayjs": "^1.9.6",
"esbuild": "^0.8.12",
"esbuild": "^0.8.15",
"eslint": "^7.14.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1",

View File

@ -155,21 +155,21 @@ async function build(f, msg) {
for (const [targetGroupName, targetGroup] of Object.entries(targets)) {
for (const [targetName, targetOptions] of Object.entries(targetGroup)) {
// if triggered from watch mode, rebuild only browser bundle
if (module.parent && targetGroupName !== 'browserBundle') continue;
if ((require.main !== module) && (targetGroupName !== 'browserBundle')) continue;
await es.build({ ...common, ...targetOptions });
const stats = await getStats(targetOptions.metafile, targetName);
log.state(`Build for: ${targetGroupName} type: ${targetName}:`, stats);
}
}
if (!module.parent) process.exit(0);
if (require.main === module) process.exit(0);
} catch (err) {
// catch errors and print where it occured
log.error('Build error', JSON.stringify(err.errors || err, null, 2));
if (!module.parent) process.exit(1);
if (require.main === module) process.exit(1);
}
}
if (!module.parent) {
if (require.main === module) {
log.header();
build('all', 'startup');
} else {

View File

@ -44,6 +44,10 @@ async function update(f) {
exports.update = update;
if (!module.parent) {
update('../wiki/Change-Log.md');
try {
if (require.main === module) {
update('../wiki/Change-Log.md');
}
} catch {
//
}

View File

@ -4,7 +4,7 @@
// { modules: 1061, moduleBytes: 3772720, outputBytes: 1531035 }
export * from '@tensorflow/tfjs/dist/index.js';
export * from '@tensorflow/tfjs-backend-wasm/dist/index.js';
export * from '@tensorflow/tfjs-backend-wasm';
// modular
// { modules: 1064, moduleBytes: 3793219, outputBytes: 1535600 }