mirror of https://github.com/vladmandic/human
added humangl custom backend
parent
807343a518
commit
e4324e07ab
|
@ -3,10 +3,11 @@ import draw from './draw.js';
|
||||||
import Menu from './menu.js';
|
import Menu from './menu.js';
|
||||||
import GLBench from './gl-bench.js';
|
import GLBench from './gl-bench.js';
|
||||||
|
|
||||||
const userConfig = {}; // add any user configuration overrides
|
const userConfig = { backend: 'humangl' }; // add any user configuration overrides
|
||||||
|
|
||||||
/*
|
/*
|
||||||
const userConfig = {
|
const userConfig = {
|
||||||
|
backend: 'humangl',
|
||||||
face: { enabled: false, iris: { enabled: false } },
|
face: { enabled: false, iris: { enabled: false } },
|
||||||
body: { enabled: false },
|
body: { enabled: false },
|
||||||
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": 1906494,
|
"bytes": 1357448,
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"demo/draw.js": {
|
"demo/draw.js": {
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"demo/browser.js": {
|
"demo/browser.js": {
|
||||||
"bytes": 25549,
|
"bytes": 25591,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "dist/human.esm.js"
|
"path": "dist/human.esm.js"
|
||||||
|
@ -38,29 +38,29 @@
|
||||||
"dist/demo-browser-index.js.map": {
|
"dist/demo-browser-index.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 2027240
|
"bytes": 2032322
|
||||||
},
|
},
|
||||||
"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": 1899123
|
"bytesInOutput": 1348914
|
||||||
},
|
},
|
||||||
"demo/draw.js": {
|
"demo/draw.js": {
|
||||||
"bytesInOutput": 7736
|
"bytesInOutput": 6175
|
||||||
},
|
},
|
||||||
"demo/menu.js": {
|
"demo/menu.js": {
|
||||||
"bytesInOutput": 11792
|
"bytesInOutput": 10696
|
||||||
},
|
},
|
||||||
"demo/gl-bench.js": {
|
"demo/gl-bench.js": {
|
||||||
"bytesInOutput": 7367
|
"bytesInOutput": 6759
|
||||||
},
|
},
|
||||||
"demo/browser.js": {
|
"demo/browser.js": {
|
||||||
"bytesInOutput": 19492
|
"bytesInOutput": 16832
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 1952895
|
"bytes": 1396761
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
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
|
@ -5,12 +5,15 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"dist/tfjs.esm.js": {
|
"dist/tfjs.esm.js": {
|
||||||
"bytes": 1592080,
|
"bytes": 1082102,
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/tfjs/backend.js": {
|
"src/tfjs/backend.js": {
|
||||||
"bytes": 1376,
|
"bytes": 2171,
|
||||||
"imports": [
|
"imports": [
|
||||||
|
{
|
||||||
|
"path": "src/log.js"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "dist/tfjs.esm.js"
|
"path": "dist/tfjs.esm.js"
|
||||||
}
|
}
|
||||||
|
@ -362,7 +365,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 18179,
|
"bytes": 18229,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/log.js"
|
"path": "src/log.js"
|
||||||
|
@ -419,7 +422,7 @@
|
||||||
"dist/human.esm.js.map": {
|
"dist/human.esm.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 1931767
|
"bytes": 1936405
|
||||||
},
|
},
|
||||||
"dist/human.esm.js": {
|
"dist/human.esm.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
|
@ -428,121 +431,121 @@
|
||||||
],
|
],
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"src/blazeface/blazeface.js": {
|
"src/blazeface/blazeface.js": {
|
||||||
"bytesInOutput": 5039
|
"bytesInOutput": 2915
|
||||||
},
|
},
|
||||||
"src/blazeface/box.js": {
|
"src/blazeface/box.js": {
|
||||||
"bytesInOutput": 1567
|
"bytesInOutput": 987
|
||||||
},
|
},
|
||||||
"src/blazeface/util.js": {
|
"src/blazeface/util.js": {
|
||||||
"bytesInOutput": 2418
|
"bytesInOutput": 1197
|
||||||
},
|
},
|
||||||
"src/blazeface/coords.js": {
|
"src/blazeface/coords.js": {
|
||||||
"bytesInOutput": 30718
|
"bytesInOutput": 30534
|
||||||
},
|
},
|
||||||
"src/blazeface/facepipeline.js": {
|
"src/blazeface/facepipeline.js": {
|
||||||
"bytesInOutput": 9386
|
"bytesInOutput": 5598
|
||||||
},
|
},
|
||||||
"src/blazeface/facemesh.js": {
|
"src/blazeface/facemesh.js": {
|
||||||
"bytesInOutput": 2322
|
"bytesInOutput": 1518
|
||||||
},
|
},
|
||||||
"src/profile.js": {
|
"src/profile.js": {
|
||||||
"bytesInOutput": 851
|
"bytesInOutput": 637
|
||||||
},
|
},
|
||||||
"src/age/age.js": {
|
"src/age/age.js": {
|
||||||
"bytesInOutput": 1186
|
"bytesInOutput": 813
|
||||||
},
|
},
|
||||||
"src/gender/gender.js": {
|
"src/gender/gender.js": {
|
||||||
"bytesInOutput": 1914
|
"bytesInOutput": 1283
|
||||||
},
|
},
|
||||||
"src/emotion/emotion.js": {
|
"src/emotion/emotion.js": {
|
||||||
"bytesInOutput": 1813
|
"bytesInOutput": 1247
|
||||||
},
|
},
|
||||||
"src/embedding/embedding.js": {
|
"src/embedding/embedding.js": {
|
||||||
"bytesInOutput": 1323
|
"bytesInOutput": 870
|
||||||
},
|
},
|
||||||
"src/posenet/modelBase.js": {
|
"src/posenet/modelBase.js": {
|
||||||
"bytesInOutput": 1055
|
"bytesInOutput": 679
|
||||||
},
|
},
|
||||||
"src/posenet/heapSort.js": {
|
"src/posenet/heapSort.js": {
|
||||||
"bytesInOutput": 1144
|
"bytesInOutput": 1048
|
||||||
},
|
},
|
||||||
"src/posenet/buildParts.js": {
|
"src/posenet/buildParts.js": {
|
||||||
"bytesInOutput": 1287
|
"bytesInOutput": 529
|
||||||
},
|
},
|
||||||
"src/posenet/keypoints.js": {
|
"src/posenet/keypoints.js": {
|
||||||
"bytesInOutput": 1813
|
"bytesInOutput": 1638
|
||||||
},
|
},
|
||||||
"src/posenet/vectors.js": {
|
"src/posenet/vectors.js": {
|
||||||
"bytesInOutput": 1055
|
|
||||||
},
|
|
||||||
"src/posenet/decoders.js": {
|
|
||||||
"bytesInOutput": 1709
|
|
||||||
},
|
|
||||||
"src/posenet/decodePose.js": {
|
|
||||||
"bytesInOutput": 4098
|
|
||||||
},
|
|
||||||
"src/posenet/decodeMultiple.js": {
|
|
||||||
"bytesInOutput": 1643
|
|
||||||
},
|
|
||||||
"src/posenet/util.js": {
|
|
||||||
"bytesInOutput": 1892
|
|
||||||
},
|
|
||||||
"src/posenet/modelPoseNet.js": {
|
|
||||||
"bytesInOutput": 1997
|
|
||||||
},
|
|
||||||
"src/posenet/posenet.js": {
|
|
||||||
"bytesInOutput": 627
|
"bytesInOutput": 627
|
||||||
},
|
},
|
||||||
|
"src/posenet/decoders.js": {
|
||||||
|
"bytesInOutput": 875
|
||||||
|
},
|
||||||
|
"src/posenet/decodePose.js": {
|
||||||
|
"bytesInOutput": 1482
|
||||||
|
},
|
||||||
|
"src/posenet/decodeMultiple.js": {
|
||||||
|
"bytesInOutput": 704
|
||||||
|
},
|
||||||
|
"src/posenet/util.js": {
|
||||||
|
"bytesInOutput": 1065
|
||||||
|
},
|
||||||
|
"src/posenet/modelPoseNet.js": {
|
||||||
|
"bytesInOutput": 1167
|
||||||
|
},
|
||||||
|
"src/posenet/posenet.js": {
|
||||||
|
"bytesInOutput": 401
|
||||||
|
},
|
||||||
"src/handpose/handdetector.js": {
|
"src/handpose/handdetector.js": {
|
||||||
"bytesInOutput": 2747
|
"bytesInOutput": 1704
|
||||||
},
|
},
|
||||||
"src/handpose/handpipeline.js": {
|
"src/handpose/handpipeline.js": {
|
||||||
"bytesInOutput": 4484
|
"bytesInOutput": 2485
|
||||||
},
|
},
|
||||||
"src/handpose/anchors.js": {
|
"src/handpose/anchors.js": {
|
||||||
"bytesInOutput": 127037
|
"bytesInOutput": 127006
|
||||||
},
|
},
|
||||||
"src/handpose/handpose.js": {
|
"src/handpose/handpose.js": {
|
||||||
"bytesInOutput": 2023
|
"bytesInOutput": 1331
|
||||||
},
|
},
|
||||||
"src/gesture/gesture.js": {
|
"src/gesture/gesture.js": {
|
||||||
"bytesInOutput": 3162
|
"bytesInOutput": 2424
|
||||||
},
|
},
|
||||||
"src/imagefx.js": {
|
"src/imagefx.js": {
|
||||||
"bytesInOutput": 13630
|
"bytesInOutput": 11004
|
||||||
},
|
},
|
||||||
"src/image.js": {
|
"src/image.js": {
|
||||||
"bytesInOutput": 3652
|
"bytesInOutput": 2479
|
||||||
},
|
},
|
||||||
"src/log.js": {
|
"src/log.js": {
|
||||||
"bytesInOutput": 266
|
"bytesInOutput": 252
|
||||||
},
|
},
|
||||||
"dist/tfjs.esm.js": {
|
"dist/tfjs.esm.js": {
|
||||||
"bytesInOutput": 1591040
|
"bytesInOutput": 1073222
|
||||||
},
|
},
|
||||||
"src/tfjs/backend.js": {
|
"src/tfjs/backend.js": {
|
||||||
"bytesInOutput": 918
|
"bytesInOutput": 1205
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 12177
|
"bytesInOutput": 9982
|
||||||
},
|
},
|
||||||
"src/handpose/box.js": {
|
"src/handpose/box.js": {
|
||||||
"bytesInOutput": 1420
|
"bytesInOutput": 938
|
||||||
},
|
},
|
||||||
"src/handpose/util.js": {
|
"src/handpose/util.js": {
|
||||||
"bytesInOutput": 1796
|
"bytesInOutput": 816
|
||||||
},
|
},
|
||||||
"config.js": {
|
"config.js": {
|
||||||
"bytesInOutput": 1514
|
"bytesInOutput": 1460
|
||||||
},
|
},
|
||||||
"src/sample.js": {
|
"src/sample.js": {
|
||||||
"bytesInOutput": 55299
|
"bytesInOutput": 55295
|
||||||
},
|
},
|
||||||
"package.json": {
|
"package.json": {
|
||||||
"bytesInOutput": 23
|
"bytesInOutput": 16
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 1906494
|
"bytes": 1357448
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -5,12 +5,15 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"dist/tfjs.esm.js": {
|
"dist/tfjs.esm.js": {
|
||||||
"bytes": 1592080,
|
"bytes": 1082102,
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/tfjs/backend.js": {
|
"src/tfjs/backend.js": {
|
||||||
"bytes": 1376,
|
"bytes": 2171,
|
||||||
"imports": [
|
"imports": [
|
||||||
|
{
|
||||||
|
"path": "src/log.js"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "dist/tfjs.esm.js"
|
"path": "dist/tfjs.esm.js"
|
||||||
}
|
}
|
||||||
|
@ -362,7 +365,7 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 18179,
|
"bytes": 18229,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/log.js"
|
"path": "src/log.js"
|
||||||
|
@ -419,128 +422,128 @@
|
||||||
"dist/human.js.map": {
|
"dist/human.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 1931784
|
"bytes": 1936422
|
||||||
},
|
},
|
||||||
"dist/human.js": {
|
"dist/human.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"exports": [],
|
"exports": [],
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"src/blazeface/blazeface.js": {
|
"src/blazeface/blazeface.js": {
|
||||||
"bytesInOutput": 5039
|
"bytesInOutput": 2915
|
||||||
},
|
},
|
||||||
"src/blazeface/box.js": {
|
"src/blazeface/box.js": {
|
||||||
"bytesInOutput": 1567
|
"bytesInOutput": 987
|
||||||
},
|
},
|
||||||
"src/blazeface/util.js": {
|
"src/blazeface/util.js": {
|
||||||
"bytesInOutput": 2418
|
"bytesInOutput": 1197
|
||||||
},
|
},
|
||||||
"src/blazeface/coords.js": {
|
"src/blazeface/coords.js": {
|
||||||
"bytesInOutput": 30718
|
"bytesInOutput": 30534
|
||||||
},
|
},
|
||||||
"src/blazeface/facepipeline.js": {
|
"src/blazeface/facepipeline.js": {
|
||||||
"bytesInOutput": 9386
|
"bytesInOutput": 5598
|
||||||
},
|
},
|
||||||
"src/blazeface/facemesh.js": {
|
"src/blazeface/facemesh.js": {
|
||||||
"bytesInOutput": 2322
|
"bytesInOutput": 1518
|
||||||
},
|
},
|
||||||
"src/profile.js": {
|
"src/profile.js": {
|
||||||
"bytesInOutput": 851
|
"bytesInOutput": 637
|
||||||
},
|
},
|
||||||
"src/age/age.js": {
|
"src/age/age.js": {
|
||||||
"bytesInOutput": 1186
|
"bytesInOutput": 813
|
||||||
},
|
},
|
||||||
"src/gender/gender.js": {
|
"src/gender/gender.js": {
|
||||||
"bytesInOutput": 1914
|
"bytesInOutput": 1283
|
||||||
},
|
},
|
||||||
"src/emotion/emotion.js": {
|
"src/emotion/emotion.js": {
|
||||||
"bytesInOutput": 1813
|
"bytesInOutput": 1247
|
||||||
},
|
},
|
||||||
"src/embedding/embedding.js": {
|
"src/embedding/embedding.js": {
|
||||||
"bytesInOutput": 1323
|
"bytesInOutput": 870
|
||||||
},
|
},
|
||||||
"src/posenet/modelBase.js": {
|
"src/posenet/modelBase.js": {
|
||||||
"bytesInOutput": 1055
|
"bytesInOutput": 679
|
||||||
},
|
},
|
||||||
"src/posenet/heapSort.js": {
|
"src/posenet/heapSort.js": {
|
||||||
"bytesInOutput": 1144
|
"bytesInOutput": 1048
|
||||||
},
|
},
|
||||||
"src/posenet/buildParts.js": {
|
"src/posenet/buildParts.js": {
|
||||||
"bytesInOutput": 1287
|
"bytesInOutput": 529
|
||||||
},
|
},
|
||||||
"src/posenet/keypoints.js": {
|
"src/posenet/keypoints.js": {
|
||||||
"bytesInOutput": 1813
|
"bytesInOutput": 1638
|
||||||
},
|
},
|
||||||
"src/posenet/vectors.js": {
|
"src/posenet/vectors.js": {
|
||||||
"bytesInOutput": 1055
|
|
||||||
},
|
|
||||||
"src/posenet/decoders.js": {
|
|
||||||
"bytesInOutput": 1709
|
|
||||||
},
|
|
||||||
"src/posenet/decodePose.js": {
|
|
||||||
"bytesInOutput": 4098
|
|
||||||
},
|
|
||||||
"src/posenet/decodeMultiple.js": {
|
|
||||||
"bytesInOutput": 1643
|
|
||||||
},
|
|
||||||
"src/posenet/util.js": {
|
|
||||||
"bytesInOutput": 1892
|
|
||||||
},
|
|
||||||
"src/posenet/modelPoseNet.js": {
|
|
||||||
"bytesInOutput": 1997
|
|
||||||
},
|
|
||||||
"src/posenet/posenet.js": {
|
|
||||||
"bytesInOutput": 627
|
"bytesInOutput": 627
|
||||||
},
|
},
|
||||||
|
"src/posenet/decoders.js": {
|
||||||
|
"bytesInOutput": 875
|
||||||
|
},
|
||||||
|
"src/posenet/decodePose.js": {
|
||||||
|
"bytesInOutput": 1482
|
||||||
|
},
|
||||||
|
"src/posenet/decodeMultiple.js": {
|
||||||
|
"bytesInOutput": 704
|
||||||
|
},
|
||||||
|
"src/posenet/util.js": {
|
||||||
|
"bytesInOutput": 1065
|
||||||
|
},
|
||||||
|
"src/posenet/modelPoseNet.js": {
|
||||||
|
"bytesInOutput": 1167
|
||||||
|
},
|
||||||
|
"src/posenet/posenet.js": {
|
||||||
|
"bytesInOutput": 401
|
||||||
|
},
|
||||||
"src/handpose/handdetector.js": {
|
"src/handpose/handdetector.js": {
|
||||||
"bytesInOutput": 2747
|
"bytesInOutput": 1704
|
||||||
},
|
},
|
||||||
"src/handpose/handpipeline.js": {
|
"src/handpose/handpipeline.js": {
|
||||||
"bytesInOutput": 4484
|
"bytesInOutput": 2485
|
||||||
},
|
},
|
||||||
"src/handpose/anchors.js": {
|
"src/handpose/anchors.js": {
|
||||||
"bytesInOutput": 127037
|
"bytesInOutput": 127006
|
||||||
},
|
},
|
||||||
"src/handpose/handpose.js": {
|
"src/handpose/handpose.js": {
|
||||||
"bytesInOutput": 2023
|
"bytesInOutput": 1331
|
||||||
},
|
},
|
||||||
"src/gesture/gesture.js": {
|
"src/gesture/gesture.js": {
|
||||||
"bytesInOutput": 3162
|
"bytesInOutput": 2424
|
||||||
},
|
},
|
||||||
"src/imagefx.js": {
|
"src/imagefx.js": {
|
||||||
"bytesInOutput": 13630
|
"bytesInOutput": 11004
|
||||||
},
|
},
|
||||||
"src/image.js": {
|
"src/image.js": {
|
||||||
"bytesInOutput": 3652
|
"bytesInOutput": 2479
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 12242
|
"bytesInOutput": 10018
|
||||||
},
|
},
|
||||||
"src/log.js": {
|
"src/log.js": {
|
||||||
"bytesInOutput": 266
|
"bytesInOutput": 252
|
||||||
},
|
},
|
||||||
"dist/tfjs.esm.js": {
|
"dist/tfjs.esm.js": {
|
||||||
"bytesInOutput": 1591040
|
"bytesInOutput": 1073222
|
||||||
},
|
},
|
||||||
"src/tfjs/backend.js": {
|
"src/tfjs/backend.js": {
|
||||||
"bytesInOutput": 918
|
"bytesInOutput": 1205
|
||||||
},
|
},
|
||||||
"src/handpose/box.js": {
|
"src/handpose/box.js": {
|
||||||
"bytesInOutput": 1420
|
"bytesInOutput": 938
|
||||||
},
|
},
|
||||||
"src/handpose/util.js": {
|
"src/handpose/util.js": {
|
||||||
"bytesInOutput": 1796
|
"bytesInOutput": 816
|
||||||
},
|
},
|
||||||
"config.js": {
|
"config.js": {
|
||||||
"bytesInOutput": 1514
|
"bytesInOutput": 1460
|
||||||
},
|
},
|
||||||
"src/sample.js": {
|
"src/sample.js": {
|
||||||
"bytesInOutput": 55299
|
"bytesInOutput": 55295
|
||||||
},
|
},
|
||||||
"package.json": {
|
"package.json": {
|
||||||
"bytesInOutput": 23
|
"bytesInOutput": 16
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 1906572
|
"bytes": 1357490
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
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
|
@ -9,8 +9,11 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/tfjs/backend.js": {
|
"src/tfjs/backend.js": {
|
||||||
"bytes": 1376,
|
"bytes": 2171,
|
||||||
"imports": [
|
"imports": [
|
||||||
|
{
|
||||||
|
"path": "src/log.js"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "dist/tfjs.esm.js"
|
"path": "dist/tfjs.esm.js"
|
||||||
}
|
}
|
||||||
|
@ -358,11 +361,11 @@
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"package.json": {
|
"package.json": {
|
||||||
"bytes": 2325,
|
"bytes": 2336,
|
||||||
"imports": []
|
"imports": []
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytes": 18179,
|
"bytes": 18229,
|
||||||
"imports": [
|
"imports": [
|
||||||
{
|
{
|
||||||
"path": "src/log.js"
|
"path": "src/log.js"
|
||||||
|
@ -419,7 +422,7 @@
|
||||||
"dist/human.node-gpu.js.map": {
|
"dist/human.node-gpu.js.map": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
"bytes": 708268
|
"bytes": 709451
|
||||||
},
|
},
|
||||||
"dist/human.node-gpu.js": {
|
"dist/human.node-gpu.js": {
|
||||||
"imports": [],
|
"imports": [],
|
||||||
|
@ -492,7 +495,7 @@
|
||||||
"bytesInOutput": 1180
|
"bytesInOutput": 1180
|
||||||
},
|
},
|
||||||
"src/posenet/posenet.js": {
|
"src/posenet/posenet.js": {
|
||||||
"bytesInOutput": 379
|
"bytesInOutput": 385
|
||||||
},
|
},
|
||||||
"src/handpose/handdetector.js": {
|
"src/handpose/handdetector.js": {
|
||||||
"bytesInOutput": 1844
|
"bytesInOutput": 1844
|
||||||
|
@ -516,13 +519,13 @@
|
||||||
"bytesInOutput": 2478
|
"bytesInOutput": 2478
|
||||||
},
|
},
|
||||||
"src/human.js": {
|
"src/human.js": {
|
||||||
"bytesInOutput": 10086
|
"bytesInOutput": 10118
|
||||||
},
|
},
|
||||||
"src/log.js": {
|
"src/log.js": {
|
||||||
"bytesInOutput": 251
|
"bytesInOutput": 251
|
||||||
},
|
},
|
||||||
"src/tfjs/backend.js": {
|
"src/tfjs/backend.js": {
|
||||||
"bytesInOutput": 844
|
"bytesInOutput": 1304
|
||||||
},
|
},
|
||||||
"src/handpose/box.js": {
|
"src/handpose/box.js": {
|
||||||
"bytesInOutput": 958
|
"bytesInOutput": 958
|
||||||
|
@ -540,7 +543,7 @@
|
||||||
"bytesInOutput": 16
|
"bytesInOutput": 16
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bytes": 277817
|
"bytes": 278315
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
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 it is too large
Load Diff
|
@ -553,6 +553,7 @@
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
||||||
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"function-bind": "^1.1.1",
|
"function-bind": "^1.1.1",
|
||||||
"get-intrinsic": "^1.0.2"
|
"get-intrinsic": "^1.0.2"
|
||||||
|
@ -1280,7 +1281,8 @@
|
||||||
"function-bind": {
|
"function-bind": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"functional-red-black-tree": {
|
"functional-red-black-tree": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
@ -1351,6 +1353,7 @@
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz",
|
||||||
"integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==",
|
"integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"function-bind": "^1.1.1",
|
"function-bind": "^1.1.1",
|
||||||
"has": "^1.0.3",
|
"has": "^1.0.3",
|
||||||
|
@ -1405,6 +1408,7 @@
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"function-bind": "^1.1.1"
|
"function-bind": "^1.1.1"
|
||||||
}
|
}
|
||||||
|
@ -1418,7 +1422,8 @@
|
||||||
"has-symbols": {
|
"has-symbols": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
|
||||||
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
|
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"has-unicode": {
|
"has-unicode": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
|
|
10
src/human.js
10
src/human.js
|
@ -182,12 +182,12 @@ class Human {
|
||||||
if (!simd) log('warning: wasm simd support is not enabled');
|
if (!simd) log('warning: wasm simd support is not enabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.config.backend === 'humangl') {
|
if (this.config.backend === 'humangl') backend.register();
|
||||||
log('registering humangl backend');
|
try {
|
||||||
backend.register();
|
|
||||||
}
|
|
||||||
|
|
||||||
await tf.setBackend(this.config.backend);
|
await tf.setBackend(this.config.backend);
|
||||||
|
} catch (err) {
|
||||||
|
log('error: cannot set backend:', this.config.backend, err);
|
||||||
|
}
|
||||||
tf.enableProdMode();
|
tf.enableProdMode();
|
||||||
/* debug mode is really too mcuh
|
/* debug mode is really too mcuh
|
||||||
tf.enableDebugMode();
|
tf.enableDebugMode();
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
import { log } from '../log.js';
|
||||||
import * as tf from '../../dist/tfjs.esm.js';
|
import * as tf from '../../dist/tfjs.esm.js';
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
name: 'humangl',
|
name: 'humangl',
|
||||||
priority: 99,
|
priority: 99,
|
||||||
canvas: null,
|
canvas: null,
|
||||||
|
gl: null,
|
||||||
width: 1024,
|
width: 1024,
|
||||||
height: 1024,
|
height: 1024,
|
||||||
webGLattr: { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2
|
webGLattr: { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2
|
||||||
|
@ -20,21 +22,51 @@ export const config = {
|
||||||
|
|
||||||
export function register() {
|
export function register() {
|
||||||
if (!tf.findBackend(config.name)) {
|
if (!tf.findBackend(config.name)) {
|
||||||
// @ts-ignore
|
log('backend registration:', config.name);
|
||||||
|
try {
|
||||||
config.canvas = (typeof OffscreenCanvas !== 'undefined') ? new OffscreenCanvas(config.width, config.height) : document.createElement('canvas');
|
config.canvas = (typeof OffscreenCanvas !== 'undefined') ? new OffscreenCanvas(config.width, config.height) : document.createElement('canvas');
|
||||||
// @ts-ignore
|
} catch (err) {
|
||||||
const gl = config.canvas.getContext('webgl2', config.webGLattr);
|
log('error: cannot create canvas:', err);
|
||||||
tf.setWebGLContext(2, gl);
|
return;
|
||||||
const ctx = new tf.GPGPUContext(gl);
|
}
|
||||||
|
try {
|
||||||
|
config.gl = config.canvas.getContext('webgl2', config.webGLattr);
|
||||||
|
} catch (err) {
|
||||||
|
log('error: cannot get WebGL2 context:', err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
tf.setWebGLContext(2, config.gl);
|
||||||
|
} catch (err) {
|
||||||
|
log('error: cannot set WebGL2 context:', err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const ctx = new tf.GPGPUContext(config.gl);
|
||||||
tf.registerBackend(config.name, () => new tf.MathBackendWebGL(ctx), config.priority);
|
tf.registerBackend(config.name, () => new tf.MathBackendWebGL(ctx), config.priority);
|
||||||
|
} catch (err) {
|
||||||
|
log('error: cannot register WebGL backend:', err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
const kernels = tf.getKernelsForBackend('webgl');
|
const kernels = tf.getKernelsForBackend('webgl');
|
||||||
kernels.forEach((kernelConfig) => {
|
kernels.forEach((kernelConfig) => {
|
||||||
const newKernelConfig = { ...kernelConfig, backendName: config.name };
|
const newKernelConfig = { ...kernelConfig, backendName: config.name };
|
||||||
tf.registerKernel(newKernelConfig);
|
tf.registerKernel(newKernelConfig);
|
||||||
});
|
});
|
||||||
|
} catch (err) {
|
||||||
|
log('error: cannot update WebGL backend registration:', err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
tf.ENV.set('WEBGL_VERSION', 2);
|
tf.ENV.set('WEBGL_VERSION', 2);
|
||||||
tf.ENV.set('WEBGL_MAX_TEXTURE_SIZE', gl.getParameter(gl.MAX_TEXTURE_SIZE));
|
tf.ENV.set('WEBGL_MAX_TEXTURE_SIZE', config.gl.getParameter(config.gl.MAX_TEXTURE_SIZE));
|
||||||
tf.ENV.set('WEBGL_FORCE_F16_TEXTURES', true);
|
tf.ENV.set('WEBGL_FORCE_F16_TEXTURES', true);
|
||||||
tf.ENV.set('WEBGL_PACK_DEPTHWISECONV', true);
|
tf.ENV.set('WEBGL_PACK_DEPTHWISECONV', true);
|
||||||
|
} catch (err) {
|
||||||
|
log('error: cannot set WebGL backend flags:', err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
log('backend registered:', config.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
||||||
Subproject commit 0ce580ced2bdf5f2f231dfae6c3d3f90053af6f6
|
Subproject commit c83eeeb158f2183d963500d9a767f04851497d2f
|
Loading…
Reference in New Issue