mirror of https://github.com/vladmandic/human
refresh
parent
0f35f6bf3e
commit
7c6a9e64f5
|
@ -121,7 +121,7 @@ export default {
|
|||
body: {
|
||||
enabled: true,
|
||||
modelPath: '../models/posenet.json',
|
||||
inputResolution: 257, // fixed value
|
||||
inputSize: 257, // fixed value
|
||||
maxDetections: 10, // maximum number of people detected in the input
|
||||
// should be set to the minimum number for performance
|
||||
scoreThreshold: 0.8, // threshold for deciding when to remove boxes based on score
|
||||
|
|
|
@ -154,7 +154,7 @@ async function setupCamera() {
|
|||
else return null;
|
||||
const track = stream.getVideoTracks()[0];
|
||||
const settings = track.getSettings();
|
||||
log('camera constraints:', constraints, 'window:', { width: window.innerWidth, height: window.innerHeight }, 'settings:', settings, 'track:', track);
|
||||
// log('camera constraints:', constraints, 'window:', { width: window.innerWidth, height: window.innerHeight }, 'settings:', settings, 'track:', track);
|
||||
ui.camera = { name: track.label, width: settings.width, height: settings.height, facing: settings.facingMode === 'user' ? 'front' : 'back' };
|
||||
return new Promise((resolve) => {
|
||||
video.onloadeddata = async () => {
|
||||
|
|
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": {
|
||||
"demo/browser.js": {
|
||||
"bytes": 18361,
|
||||
"bytes": 18364,
|
||||
"imports": [
|
||||
{
|
||||
"path": "dist/human.esm.js"
|
||||
|
@ -23,7 +23,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"dist/human.esm.js": {
|
||||
"bytes": 3196296,
|
||||
"bytes": 1278203,
|
||||
"imports": []
|
||||
}
|
||||
},
|
||||
|
@ -31,25 +31,28 @@
|
|||
"dist/demo-browser-index.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 5559698
|
||||
"bytes": 5530444
|
||||
},
|
||||
"dist/demo-browser-index.js": {
|
||||
"imports": [],
|
||||
"inputs": {
|
||||
"dist/human.esm.js": {
|
||||
"bytesInOutput": 3194159
|
||||
"bytesInOutput": 1664585
|
||||
},
|
||||
"dist/human.esm.js": {
|
||||
"bytesInOutput": 8716
|
||||
},
|
||||
"demo/draw.js": {
|
||||
"bytesInOutput": 7453
|
||||
"bytesInOutput": 7451
|
||||
},
|
||||
"demo/menu.js": {
|
||||
"bytesInOutput": 12727
|
||||
},
|
||||
"demo/browser.js": {
|
||||
"bytesInOutput": 16301
|
||||
"bytesInOutput": 16132
|
||||
}
|
||||
},
|
||||
"bytes": 3230762
|
||||
"bytes": 1709733
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
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": {
|
||||
"config.js": {
|
||||
"bytes": 7664,
|
||||
"bytes": 8366,
|
||||
"imports": []
|
||||
},
|
||||
"package.json": {
|
||||
|
@ -58,7 +58,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/body/modelBase.js": {
|
||||
"bytes": 1512,
|
||||
"bytes": 883,
|
||||
"imports": []
|
||||
},
|
||||
"src/body/modelMobileNet.js": {
|
||||
|
@ -70,7 +70,7 @@
|
|||
]
|
||||
},
|
||||
"src/body/modelPoseNet.js": {
|
||||
"bytes": 3658,
|
||||
"bytes": 1922,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/body/modelMobileNet.js"
|
||||
|
@ -104,7 +104,7 @@
|
|||
]
|
||||
},
|
||||
"src/body/util.js": {
|
||||
"bytes": 2260,
|
||||
"bytes": 2262,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/body/keypoints.js"
|
||||
|
@ -128,7 +128,7 @@
|
|||
]
|
||||
},
|
||||
"src/face/blazeface.js": {
|
||||
"bytes": 7226,
|
||||
"bytes": 7058,
|
||||
"imports": []
|
||||
},
|
||||
"src/face/box.js": {
|
||||
|
@ -156,7 +156,7 @@
|
|||
]
|
||||
},
|
||||
"src/face/facepipeline.js": {
|
||||
"bytes": 14774,
|
||||
"bytes": 14752,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/face/box.js"
|
||||
|
@ -202,11 +202,11 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/hand/box.js": {
|
||||
"bytes": 3192,
|
||||
"bytes": 3220,
|
||||
"imports": []
|
||||
},
|
||||
"src/hand/handdetector.js": {
|
||||
"bytes": 4220,
|
||||
"bytes": 4230,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/hand/box.js"
|
||||
|
@ -214,7 +214,7 @@
|
|||
]
|
||||
},
|
||||
"src/hand/handpipeline.js": {
|
||||
"bytes": 8214,
|
||||
"bytes": 7445,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/hand/box.js"
|
||||
|
@ -225,7 +225,7 @@
|
|||
]
|
||||
},
|
||||
"src/hand/handpose.js": {
|
||||
"bytes": 3095,
|
||||
"bytes": 3029,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/hand/handdetector.js"
|
||||
|
@ -243,7 +243,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytes": 13727,
|
||||
"bytes": 13707,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/face/facemesh.js"
|
||||
|
@ -293,7 +293,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/profile.js": {
|
||||
"bytes": 1004,
|
||||
"bytes": 1061,
|
||||
"imports": []
|
||||
}
|
||||
},
|
||||
|
@ -301,13 +301,13 @@
|
|||
"dist/human.esm-nobundle.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 622741
|
||||
"bytes": 620057
|
||||
},
|
||||
"dist/human.esm-nobundle.js": {
|
||||
"imports": [],
|
||||
"inputs": {
|
||||
"src/face/blazeface.js": {
|
||||
"bytesInOutput": 3082
|
||||
"bytesInOutput": 3093
|
||||
},
|
||||
"src/face/keypoints.js": {
|
||||
"bytesInOutput": 1945
|
||||
|
@ -319,7 +319,7 @@
|
|||
"bytesInOutput": 1171
|
||||
},
|
||||
"src/face/facepipeline.js": {
|
||||
"bytesInOutput": 5664
|
||||
"bytesInOutput": 5647
|
||||
},
|
||||
"src/face/uvcoords.js": {
|
||||
"bytesInOutput": 16785
|
||||
|
@ -331,7 +331,7 @@
|
|||
"bytesInOutput": 1303
|
||||
},
|
||||
"src/profile.js": {
|
||||
"bytesInOutput": 619
|
||||
"bytesInOutput": 642
|
||||
},
|
||||
"src/age/age.js": {
|
||||
"bytesInOutput": 994
|
||||
|
@ -370,28 +370,28 @@
|
|||
"bytesInOutput": 1053
|
||||
},
|
||||
"src/body/modelPoseNet.js": {
|
||||
"bytesInOutput": 938
|
||||
"bytesInOutput": 994
|
||||
},
|
||||
"src/body/posenet.js": {
|
||||
"bytesInOutput": 459
|
||||
},
|
||||
"src/hand/box.js": {
|
||||
"bytesInOutput": 1420
|
||||
"bytesInOutput": 1444
|
||||
},
|
||||
"src/hand/handdetector.js": {
|
||||
"bytesInOutput": 1748
|
||||
"bytesInOutput": 1876
|
||||
},
|
||||
"src/hand/util.js": {
|
||||
"bytesInOutput": 997
|
||||
},
|
||||
"src/hand/handpipeline.js": {
|
||||
"bytesInOutput": 2878
|
||||
"bytesInOutput": 2741
|
||||
},
|
||||
"src/hand/anchors.js": {
|
||||
"bytesInOutput": 127000
|
||||
},
|
||||
"src/hand/handpose.js": {
|
||||
"bytesInOutput": 1285
|
||||
"bytesInOutput": 1219
|
||||
},
|
||||
"src/gesture.js": {
|
||||
"bytesInOutput": 1219
|
||||
|
@ -403,19 +403,19 @@
|
|||
"bytesInOutput": 2349
|
||||
},
|
||||
"config.js": {
|
||||
"bytesInOutput": 1325
|
||||
"bytesInOutput": 1279
|
||||
},
|
||||
"package.json": {
|
||||
"bytesInOutput": 3047
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytesInOutput": 7201
|
||||
"bytesInOutput": 7181
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytesInOutput": 0
|
||||
}
|
||||
},
|
||||
"bytes": 216573
|
||||
"bytes": 216529
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -205,7 +205,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/body/modelBase.js": {
|
||||
"bytes": 1512,
|
||||
"bytes": 883,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||
|
@ -224,7 +224,7 @@
|
|||
]
|
||||
},
|
||||
"src/body/modelPoseNet.js": {
|
||||
"bytes": 1946,
|
||||
"bytes": 1922,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||
|
@ -513,178 +513,178 @@
|
|||
"dist/human.esm.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 5608490
|
||||
"bytes": 5416042
|
||||
},
|
||||
"dist/human.esm.js": {
|
||||
"imports": [],
|
||||
"inputs": {
|
||||
"empty:/home/vlado/dev/human/node_modules/node-fetch/browser.js": {
|
||||
"bytesInOutput": 45
|
||||
"bytesInOutput": 13
|
||||
},
|
||||
"empty:util": {
|
||||
"bytesInOutput": 42
|
||||
"bytesInOutput": 13
|
||||
},
|
||||
"empty:crypto": {
|
||||
"bytesInOutput": 44
|
||||
"bytesInOutput": 13
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-core/dist/tf-core.node.js": {
|
||||
"bytesInOutput": 1010341
|
||||
"bytesInOutput": 295162
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-layers/dist/tf-layers.node.js": {
|
||||
"bytesInOutput": 514491
|
||||
"bytesInOutput": 238778
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-converter/dist/tf-converter.node.js": {
|
||||
"bytesInOutput": 258962
|
||||
"bytesInOutput": 115231
|
||||
},
|
||||
"empty:/home/vlado/dev/human/node_modules/string_decoder/lib/string_decoder.js": {
|
||||
"bytesInOutput": 52
|
||||
"bytesInOutput": 13
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-data/dist/tf-data.node.js": {
|
||||
"bytesInOutput": 129585
|
||||
"bytesInOutput": 52364
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/alea.js": {
|
||||
"bytesInOutput": 2112
|
||||
"bytesInOutput": 990
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor128.js": {
|
||||
"bytesInOutput": 1699
|
||||
"bytesInOutput": 755
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorwow.js": {
|
||||
"bytesInOutput": 1897
|
||||
"bytesInOutput": 845
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xorshift7.js": {
|
||||
"bytesInOutput": 2307
|
||||
"bytesInOutput": 1001
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/xor4096.js": {
|
||||
"bytesInOutput": 2742
|
||||
"bytesInOutput": 1164
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/lib/tychei.js": {
|
||||
"bytesInOutput": 1940
|
||||
"bytesInOutput": 880
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/seedrandom.js": {
|
||||
"bytesInOutput": 4019
|
||||
"bytesInOutput": 1614
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/node_modules/seedrandom/index.js": {
|
||||
"bytesInOutput": 458
|
||||
"bytesInOutput": 171
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/tf-backend-cpu.node.js": {
|
||||
"bytesInOutput": 272412
|
||||
"bytesInOutput": 82512
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-webgl/dist/tf-backend-webgl.node.js": {
|
||||
"bytesInOutput": 561667
|
||||
"bytesInOutput": 261415
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs/dist/tf.node.js": {
|
||||
"bytesInOutput": 3025
|
||||
"bytesInOutput": 760
|
||||
},
|
||||
"src/face/blazeface.js": {
|
||||
"bytesInOutput": 7112
|
||||
"bytesInOutput": 3103
|
||||
},
|
||||
"src/face/keypoints.js": {
|
||||
"bytesInOutput": 2768
|
||||
"bytesInOutput": 1946
|
||||
},
|
||||
"src/face/box.js": {
|
||||
"bytesInOutput": 2070
|
||||
"bytesInOutput": 1006
|
||||
},
|
||||
"src/face/util.js": {
|
||||
"bytesInOutput": 3017
|
||||
"bytesInOutput": 1190
|
||||
},
|
||||
"src/face/facepipeline.js": {
|
||||
"bytesInOutput": 13545
|
||||
"bytesInOutput": 5639
|
||||
},
|
||||
"src/face/uvcoords.js": {
|
||||
"bytesInOutput": 20584
|
||||
"bytesInOutput": 16786
|
||||
},
|
||||
"src/face/triangulation.js": {
|
||||
"bytesInOutput": 23309
|
||||
"bytesInOutput": 9991
|
||||
},
|
||||
"src/face/facemesh.js": {
|
||||
"bytesInOutput": 2590
|
||||
"bytesInOutput": 1286
|
||||
},
|
||||
"src/profile.js": {
|
||||
"bytesInOutput": 1108
|
||||
"bytesInOutput": 643
|
||||
},
|
||||
"src/age/age.js": {
|
||||
"bytesInOutput": 1843
|
||||
"bytesInOutput": 972
|
||||
},
|
||||
"src/gender/gender.js": {
|
||||
"bytesInOutput": 2996
|
||||
"bytesInOutput": 1471
|
||||
},
|
||||
"src/emotion/emotion.js": {
|
||||
"bytesInOutput": 2715
|
||||
"bytesInOutput": 1428
|
||||
},
|
||||
"src/body/modelBase.js": {
|
||||
"bytesInOutput": 900
|
||||
"bytesInOutput": 433
|
||||
},
|
||||
"src/body/modelMobileNet.js": {
|
||||
"bytesInOutput": 494
|
||||
"bytesInOutput": 245
|
||||
},
|
||||
"src/body/heapSort.js": {
|
||||
"bytesInOutput": 1637
|
||||
"bytesInOutput": 1042
|
||||
},
|
||||
"src/body/buildParts.js": {
|
||||
"bytesInOutput": 1752
|
||||
"bytesInOutput": 547
|
||||
},
|
||||
"src/body/keypoints.js": {
|
||||
"bytesInOutput": 2277
|
||||
"bytesInOutput": 1633
|
||||
},
|
||||
"src/body/vectors.js": {
|
||||
"bytesInOutput": 1408
|
||||
"bytesInOutput": 616
|
||||
},
|
||||
"src/body/decodePose.js": {
|
||||
"bytesInOutput": 3773
|
||||
"bytesInOutput": 1024
|
||||
},
|
||||
"src/body/decodeMultiple.js": {
|
||||
"bytesInOutput": 1990
|
||||
"bytesInOutput": 604
|
||||
},
|
||||
"src/body/util.js": {
|
||||
"bytesInOutput": 2398
|
||||
"bytesInOutput": 1062
|
||||
},
|
||||
"src/body/modelPoseNet.js": {
|
||||
"bytesInOutput": 2026
|
||||
"bytesInOutput": 972
|
||||
},
|
||||
"src/body/posenet.js": {
|
||||
"bytesInOutput": 903
|
||||
"bytesInOutput": 474
|
||||
},
|
||||
"src/hand/box.js": {
|
||||
"bytesInOutput": 3583
|
||||
"bytesInOutput": 1422
|
||||
},
|
||||
"src/hand/handdetector.js": {
|
||||
"bytesInOutput": 4485
|
||||
"bytesInOutput": 1882
|
||||
},
|
||||
"src/hand/util.js": {
|
||||
"bytesInOutput": 3419
|
||||
"bytesInOutput": 1005
|
||||
},
|
||||
"src/hand/handpipeline.js": {
|
||||
"bytesInOutput": 7278
|
||||
"bytesInOutput": 2742
|
||||
},
|
||||
"src/hand/anchors.js": {
|
||||
"bytesInOutput": 256590
|
||||
"bytesInOutput": 127001
|
||||
},
|
||||
"src/hand/handpose.js": {
|
||||
"bytesInOutput": 3058
|
||||
"bytesInOutput": 1197
|
||||
},
|
||||
"src/gesture.js": {
|
||||
"bytesInOutput": 2270
|
||||
"bytesInOutput": 1220
|
||||
},
|
||||
"src/imagefx.js": {
|
||||
"bytesInOutput": 20097
|
||||
"bytesInOutput": 11014
|
||||
},
|
||||
"src/image.js": {
|
||||
"bytesInOutput": 4482
|
||||
"bytesInOutput": 2365
|
||||
},
|
||||
"config.js": {
|
||||
"bytesInOutput": 2220
|
||||
"bytesInOutput": 1280
|
||||
},
|
||||
"package.json": {
|
||||
"bytesInOutput": 3561
|
||||
"bytesInOutput": 3048
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytesInOutput": 11555
|
||||
"bytesInOutput": 7199
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytesInOutput": 0
|
||||
}
|
||||
},
|
||||
"bytes": 3196296
|
||||
"bytes": 1278203
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
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": {
|
||||
"config.js": {
|
||||
"bytes": 7664,
|
||||
"bytes": 8366,
|
||||
"imports": []
|
||||
},
|
||||
"node_modules/@tensorflow/tfjs-backend-cpu/dist/tf-backend-cpu.node.js": {
|
||||
|
@ -205,7 +205,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/body/modelBase.js": {
|
||||
"bytes": 1512,
|
||||
"bytes": 883,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||
|
@ -224,7 +224,7 @@
|
|||
]
|
||||
},
|
||||
"src/body/modelPoseNet.js": {
|
||||
"bytes": 3658,
|
||||
"bytes": 1922,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||
|
@ -261,7 +261,7 @@
|
|||
]
|
||||
},
|
||||
"src/body/util.js": {
|
||||
"bytes": 2260,
|
||||
"bytes": 2262,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/body/keypoints.js"
|
||||
|
@ -288,7 +288,7 @@
|
|||
]
|
||||
},
|
||||
"src/face/blazeface.js": {
|
||||
"bytes": 7226,
|
||||
"bytes": 7058,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||
|
@ -327,7 +327,7 @@
|
|||
]
|
||||
},
|
||||
"src/face/facepipeline.js": {
|
||||
"bytes": 14774,
|
||||
"bytes": 14752,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||
|
@ -379,7 +379,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/hand/box.js": {
|
||||
"bytes": 3192,
|
||||
"bytes": 3220,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||
|
@ -387,7 +387,7 @@
|
|||
]
|
||||
},
|
||||
"src/hand/handdetector.js": {
|
||||
"bytes": 4220,
|
||||
"bytes": 4230,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||
|
@ -398,7 +398,7 @@
|
|||
]
|
||||
},
|
||||
"src/hand/handpipeline.js": {
|
||||
"bytes": 8214,
|
||||
"bytes": 7445,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||
|
@ -412,7 +412,7 @@
|
|||
]
|
||||
},
|
||||
"src/hand/handpose.js": {
|
||||
"bytes": 3095,
|
||||
"bytes": 3029,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||
|
@ -433,7 +433,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytes": 13727,
|
||||
"bytes": 13707,
|
||||
"imports": [
|
||||
{
|
||||
"path": "node_modules/@tensorflow/tfjs/dist/tf.node.js"
|
||||
|
@ -489,7 +489,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/profile.js": {
|
||||
"bytes": 1004,
|
||||
"bytes": 1061,
|
||||
"imports": []
|
||||
},
|
||||
"empty:/home/vlado/dev/human/node_modules/node-fetch/browser.js": {
|
||||
|
@ -513,7 +513,7 @@
|
|||
"dist/human.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 5418722
|
||||
"bytes": 5416038
|
||||
},
|
||||
"dist/human.js": {
|
||||
"imports": [],
|
||||
|
@ -576,7 +576,7 @@
|
|||
"bytesInOutput": 760
|
||||
},
|
||||
"src/face/blazeface.js": {
|
||||
"bytesInOutput": 3091
|
||||
"bytesInOutput": 3103
|
||||
},
|
||||
"src/face/keypoints.js": {
|
||||
"bytesInOutput": 1946
|
||||
|
@ -588,7 +588,7 @@
|
|||
"bytesInOutput": 1190
|
||||
},
|
||||
"src/face/facepipeline.js": {
|
||||
"bytesInOutput": 5656
|
||||
"bytesInOutput": 5639
|
||||
},
|
||||
"src/face/uvcoords.js": {
|
||||
"bytesInOutput": 16786
|
||||
|
@ -600,7 +600,7 @@
|
|||
"bytesInOutput": 1286
|
||||
},
|
||||
"src/profile.js": {
|
||||
"bytesInOutput": 620
|
||||
"bytesInOutput": 643
|
||||
},
|
||||
"src/age/age.js": {
|
||||
"bytesInOutput": 972
|
||||
|
@ -639,28 +639,28 @@
|
|||
"bytesInOutput": 1062
|
||||
},
|
||||
"src/body/modelPoseNet.js": {
|
||||
"bytesInOutput": 916
|
||||
"bytesInOutput": 972
|
||||
},
|
||||
"src/body/posenet.js": {
|
||||
"bytesInOutput": 474
|
||||
},
|
||||
"src/hand/box.js": {
|
||||
"bytesInOutput": 1398
|
||||
"bytesInOutput": 1422
|
||||
},
|
||||
"src/hand/handdetector.js": {
|
||||
"bytesInOutput": 1754
|
||||
"bytesInOutput": 1882
|
||||
},
|
||||
"src/hand/util.js": {
|
||||
"bytesInOutput": 1005
|
||||
},
|
||||
"src/hand/handpipeline.js": {
|
||||
"bytesInOutput": 2876
|
||||
"bytesInOutput": 2742
|
||||
},
|
||||
"src/hand/anchors.js": {
|
||||
"bytesInOutput": 127001
|
||||
},
|
||||
"src/hand/handpose.js": {
|
||||
"bytesInOutput": 1263
|
||||
"bytesInOutput": 1197
|
||||
},
|
||||
"src/gesture.js": {
|
||||
"bytesInOutput": 1220
|
||||
|
@ -672,16 +672,16 @@
|
|||
"bytesInOutput": 2365
|
||||
},
|
||||
"config.js": {
|
||||
"bytesInOutput": 1326
|
||||
"bytesInOutput": 1280
|
||||
},
|
||||
"package.json": {
|
||||
"bytesInOutput": 3047
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytesInOutput": 7257
|
||||
"bytesInOutput": 7237
|
||||
}
|
||||
},
|
||||
"bytes": 1278288
|
||||
"bytes": 1278248
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
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
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"inputs": {
|
||||
"config.js": {
|
||||
"bytes": 7664,
|
||||
"bytes": 8366,
|
||||
"imports": []
|
||||
},
|
||||
"package.json": {
|
||||
|
@ -58,7 +58,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/body/modelBase.js": {
|
||||
"bytes": 1512,
|
||||
"bytes": 883,
|
||||
"imports": []
|
||||
},
|
||||
"src/body/modelMobileNet.js": {
|
||||
|
@ -70,7 +70,7 @@
|
|||
]
|
||||
},
|
||||
"src/body/modelPoseNet.js": {
|
||||
"bytes": 3658,
|
||||
"bytes": 1922,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/body/modelMobileNet.js"
|
||||
|
@ -104,7 +104,7 @@
|
|||
]
|
||||
},
|
||||
"src/body/util.js": {
|
||||
"bytes": 2260,
|
||||
"bytes": 2262,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/body/keypoints.js"
|
||||
|
@ -128,7 +128,7 @@
|
|||
]
|
||||
},
|
||||
"src/face/blazeface.js": {
|
||||
"bytes": 7226,
|
||||
"bytes": 7058,
|
||||
"imports": []
|
||||
},
|
||||
"src/face/box.js": {
|
||||
|
@ -156,7 +156,7 @@
|
|||
]
|
||||
},
|
||||
"src/face/facepipeline.js": {
|
||||
"bytes": 14774,
|
||||
"bytes": 14752,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/face/box.js"
|
||||
|
@ -202,11 +202,11 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/hand/box.js": {
|
||||
"bytes": 3192,
|
||||
"bytes": 3220,
|
||||
"imports": []
|
||||
},
|
||||
"src/hand/handdetector.js": {
|
||||
"bytes": 4220,
|
||||
"bytes": 4230,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/hand/box.js"
|
||||
|
@ -214,7 +214,7 @@
|
|||
]
|
||||
},
|
||||
"src/hand/handpipeline.js": {
|
||||
"bytes": 8214,
|
||||
"bytes": 7445,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/hand/box.js"
|
||||
|
@ -225,7 +225,7 @@
|
|||
]
|
||||
},
|
||||
"src/hand/handpose.js": {
|
||||
"bytes": 3095,
|
||||
"bytes": 3029,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/hand/handdetector.js"
|
||||
|
@ -243,7 +243,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytes": 13727,
|
||||
"bytes": 13707,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/face/facemesh.js"
|
||||
|
@ -293,7 +293,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/profile.js": {
|
||||
"bytes": 1004,
|
||||
"bytes": 1061,
|
||||
"imports": []
|
||||
}
|
||||
},
|
||||
|
@ -301,13 +301,13 @@
|
|||
"dist/human.node-nobundle.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 636874
|
||||
"bytes": 634170
|
||||
},
|
||||
"dist/human.node-nobundle.js": {
|
||||
"imports": [],
|
||||
"inputs": {
|
||||
"src/face/blazeface.js": {
|
||||
"bytesInOutput": 3082
|
||||
"bytesInOutput": 3093
|
||||
},
|
||||
"src/face/keypoints.js": {
|
||||
"bytesInOutput": 1945
|
||||
|
@ -319,7 +319,7 @@
|
|||
"bytesInOutput": 1171
|
||||
},
|
||||
"src/face/facepipeline.js": {
|
||||
"bytesInOutput": 5664
|
||||
"bytesInOutput": 5647
|
||||
},
|
||||
"src/face/uvcoords.js": {
|
||||
"bytesInOutput": 16785
|
||||
|
@ -331,7 +331,7 @@
|
|||
"bytesInOutput": 1308
|
||||
},
|
||||
"src/profile.js": {
|
||||
"bytesInOutput": 619
|
||||
"bytesInOutput": 642
|
||||
},
|
||||
"src/age/age.js": {
|
||||
"bytesInOutput": 994
|
||||
|
@ -370,28 +370,28 @@
|
|||
"bytesInOutput": 1053
|
||||
},
|
||||
"src/body/modelPoseNet.js": {
|
||||
"bytesInOutput": 938
|
||||
"bytesInOutput": 994
|
||||
},
|
||||
"src/body/posenet.js": {
|
||||
"bytesInOutput": 459
|
||||
},
|
||||
"src/hand/box.js": {
|
||||
"bytesInOutput": 1419
|
||||
"bytesInOutput": 1443
|
||||
},
|
||||
"src/hand/handdetector.js": {
|
||||
"bytesInOutput": 1748
|
||||
"bytesInOutput": 1876
|
||||
},
|
||||
"src/hand/util.js": {
|
||||
"bytesInOutput": 996
|
||||
},
|
||||
"src/hand/handpipeline.js": {
|
||||
"bytesInOutput": 2878
|
||||
"bytesInOutput": 2741
|
||||
},
|
||||
"src/hand/anchors.js": {
|
||||
"bytesInOutput": 127000
|
||||
},
|
||||
"src/hand/handpose.js": {
|
||||
"bytesInOutput": 1285
|
||||
"bytesInOutput": 1219
|
||||
},
|
||||
"src/gesture.js": {
|
||||
"bytesInOutput": 1219
|
||||
|
@ -403,7 +403,7 @@
|
|||
"bytesInOutput": 2349
|
||||
},
|
||||
"config.js": {
|
||||
"bytesInOutput": 1324
|
||||
"bytesInOutput": 1278
|
||||
},
|
||||
"package.json": {
|
||||
"bytesInOutput": 3047
|
||||
|
@ -412,10 +412,10 @@
|
|||
"bytesInOutput": 28
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytesInOutput": 7201
|
||||
"bytesInOutput": 7181
|
||||
}
|
||||
},
|
||||
"bytes": 216580
|
||||
"bytes": 216536
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,19 +6,6 @@ class BaseModel {
|
|||
this.outputStride = outputStride;
|
||||
}
|
||||
|
||||
/**
|
||||
* Predicts intermediate Tensor representations.
|
||||
*
|
||||
* @param input The input RGB image of the base model.
|
||||
* A Tensor of shape: [`inputResolution`, `inputResolution`, 3].
|
||||
*
|
||||
* @return A dictionary of base model's intermediate predictions.
|
||||
* The returned dictionary should contains the following elements:
|
||||
* heatmapScores: A Tensor3D that represents the heatmapScores.
|
||||
* offsets: A Tensor3D that represents the offsets.
|
||||
* displacementFwd: A Tensor3D that represents the forward displacement.
|
||||
* displacementBwd: A Tensor3D that represents the backward displacement.
|
||||
*/
|
||||
predict(input) {
|
||||
return tf.tidy(() => {
|
||||
const asFloat = this.preprocessInput(input.toFloat());
|
||||
|
|
|
@ -13,7 +13,7 @@ class PoseNet {
|
|||
return new Promise(async (resolve) => {
|
||||
const height = input.shape[1];
|
||||
const width = input.shape[2];
|
||||
const resized = util.resizeTo(input, [config.body.inputResolution, config.body.inputResolution]);
|
||||
const resized = util.resizeTo(input, [config.body.inputSize, config.body.inputSize]);
|
||||
const res = this.baseModel.predict(resized);
|
||||
const allTensorBuffers = await util.toTensorBuffers3D([res.heatmapScores, res.offsets, res.displacementFwd, res.displacementBwd]);
|
||||
const scoresBuffer = allTensorBuffers[0];
|
||||
|
@ -21,7 +21,7 @@ class PoseNet {
|
|||
const displacementsFwdBuffer = allTensorBuffers[2];
|
||||
const displacementsBwdBuffer = allTensorBuffers[3];
|
||||
const poses = await decodeMultiple.decodeMultiplePoses(scoresBuffer, offsetsBuffer, displacementsFwdBuffer, displacementsBwdBuffer, this.outputStride, config.body.maxDetections, config.body.scoreThreshold, config.body.nmsRadius);
|
||||
const resultPoses = util.scaleAndFlipPoses(poses, [height, width], [config.body.inputResolution, config.body.inputResolution]);
|
||||
const resultPoses = util.scaleAndFlipPoses(poses, [height, width], [config.body.inputSize, config.body.inputSize]);
|
||||
res.heatmapScores.dispose();
|
||||
res.offsets.dispose();
|
||||
res.displacementFwd.dispose();
|
||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
|||
Subproject commit e73a55ab96efd7d1672d4c71dcef27dd1bee9f1d
|
||||
Subproject commit 3e00e743c311e839d88e4bb6b304c07199d1e6d0
|
Loading…
Reference in New Issue