mirror of https://github.com/vladmandic/human
republish due to tfjs 2.8.0 issues
parent
739aa5db03
commit
bbebaccd3b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"inputs": {
|
||||
"dist/human.esm.js": {
|
||||
"bytes": 1908134,
|
||||
"bytes": 1836264,
|
||||
"imports": []
|
||||
},
|
||||
"demo/draw.js": {
|
||||
|
@ -38,14 +38,14 @@
|
|||
"dist/demo-browser-index.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 2269904
|
||||
"bytes": 2198146
|
||||
},
|
||||
"dist/demo-browser-index.js": {
|
||||
"imports": [],
|
||||
"exports": [],
|
||||
"inputs": {
|
||||
"dist/human.esm.js": {
|
||||
"bytesInOutput": 1900894
|
||||
"bytesInOutput": 1829024
|
||||
},
|
||||
"demo/draw.js": {
|
||||
"bytesInOutput": 7816
|
||||
|
@ -60,7 +60,7 @@
|
|||
"bytesInOutput": 19539
|
||||
}
|
||||
},
|
||||
"bytes": 1954820
|
||||
"bytes": 1882950
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
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,7 +5,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytes": 1598678,
|
||||
"bytes": 1526803,
|
||||
"imports": []
|
||||
},
|
||||
"src/tfjs/backend.js": {
|
||||
|
@ -354,7 +354,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/sample.js": {
|
||||
"bytes": 55374,
|
||||
"bytes": 55382,
|
||||
"imports": []
|
||||
},
|
||||
"package.json": {
|
||||
|
@ -362,7 +362,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytes": 17068,
|
||||
"bytes": 16644,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/log.js"
|
||||
|
@ -419,7 +419,7 @@
|
|||
"dist/human.esm.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 2176478
|
||||
"bytes": 2104843
|
||||
},
|
||||
"dist/human.esm.js": {
|
||||
"imports": [],
|
||||
|
@ -518,13 +518,13 @@
|
|||
"bytesInOutput": 266
|
||||
},
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytesInOutput": 1596966
|
||||
"bytesInOutput": 1525301
|
||||
},
|
||||
"src/tfjs/backend.js": {
|
||||
"bytesInOutput": 938
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytesInOutput": 11155
|
||||
"bytesInOutput": 10996
|
||||
},
|
||||
"src/hand/box.js": {
|
||||
"bytesInOutput": 1473
|
||||
|
@ -536,13 +536,13 @@
|
|||
"bytesInOutput": 1454
|
||||
},
|
||||
"src/sample.js": {
|
||||
"bytesInOutput": 55341
|
||||
"bytesInOutput": 55295
|
||||
},
|
||||
"package.json": {
|
||||
"bytesInOutput": 21
|
||||
}
|
||||
},
|
||||
"bytes": 1908134
|
||||
"bytes": 1836264
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -5,7 +5,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytes": 1598678,
|
||||
"bytes": 1526803,
|
||||
"imports": []
|
||||
},
|
||||
"src/tfjs/backend.js": {
|
||||
|
@ -354,7 +354,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/sample.js": {
|
||||
"bytes": 55374,
|
||||
"bytes": 55382,
|
||||
"imports": []
|
||||
},
|
||||
"package.json": {
|
||||
|
@ -362,7 +362,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytes": 17068,
|
||||
"bytes": 16644,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/log.js"
|
||||
|
@ -419,7 +419,7 @@
|
|||
"dist/human.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 2194043
|
||||
"bytes": 2121966
|
||||
},
|
||||
"dist/human.js": {
|
||||
"imports": [],
|
||||
|
@ -513,13 +513,13 @@
|
|||
"bytesInOutput": 4040
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytesInOutput": 11216
|
||||
"bytesInOutput": 11057
|
||||
},
|
||||
"src/log.js": {
|
||||
"bytesInOutput": 266
|
||||
},
|
||||
"dist/tfjs.esm.js": {
|
||||
"bytesInOutput": 1596966
|
||||
"bytesInOutput": 1525301
|
||||
},
|
||||
"src/tfjs/backend.js": {
|
||||
"bytesInOutput": 938
|
||||
|
@ -534,13 +534,13 @@
|
|||
"bytesInOutput": 1454
|
||||
},
|
||||
"src/sample.js": {
|
||||
"bytesInOutput": 55341
|
||||
"bytesInOutput": 55295
|
||||
},
|
||||
"package.json": {
|
||||
"bytesInOutput": 21
|
||||
}
|
||||
},
|
||||
"bytes": 1908208
|
||||
"bytes": 1836338
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
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
|
@ -354,7 +354,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/sample.js": {
|
||||
"bytes": 55374,
|
||||
"bytes": 55382,
|
||||
"imports": []
|
||||
},
|
||||
"package.json": {
|
||||
|
@ -362,7 +362,7 @@
|
|||
"imports": []
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytes": 17068,
|
||||
"bytes": 16644,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/log.js"
|
||||
|
@ -419,7 +419,7 @@
|
|||
"dist/human.node-gpu.js.map": {
|
||||
"imports": [],
|
||||
"inputs": {},
|
||||
"bytes": 780897
|
||||
"bytes": 778529
|
||||
},
|
||||
"dist/human.node-gpu.js": {
|
||||
"imports": [],
|
||||
|
@ -516,7 +516,7 @@
|
|||
"bytesInOutput": 4069
|
||||
},
|
||||
"src/human.js": {
|
||||
"bytesInOutput": 11243
|
||||
"bytesInOutput": 11084
|
||||
},
|
||||
"src/log.js": {
|
||||
"bytesInOutput": 266
|
||||
|
@ -534,13 +534,13 @@
|
|||
"bytesInOutput": 1454
|
||||
},
|
||||
"src/sample.js": {
|
||||
"bytesInOutput": 55341
|
||||
"bytesInOutput": 55295
|
||||
},
|
||||
"package.json": {
|
||||
"bytesInOutput": 20
|
||||
}
|
||||
},
|
||||
"bytes": 306776
|
||||
"bytes": 306571
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
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
|
@ -144,28 +144,71 @@
|
|||
"dev": true
|
||||
},
|
||||
"@tensorflow/tfjs": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs/-/tfjs-2.8.0.tgz",
|
||||
"integrity": "sha512-jIG+WqaBq3NsTU5SnJuxqfgkKLpjVPlU2dbVepKgEqVY7XdffiJEoLBslOSgEJQc0j3GskOmZRw4F9u3NqgB1g==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs/-/tfjs-2.7.0.tgz",
|
||||
"integrity": "sha512-LTYK6+emFweYa3zn/o511JUR6s14/yGZpoXvFSUtdwolYHI+J50r/CyYeFpvtoTD7uwcNFQhbBAtp4L4e3Hsaw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@tensorflow/tfjs-backend-cpu": "2.8.0",
|
||||
"@tensorflow/tfjs-backend-webgl": "2.8.0",
|
||||
"@tensorflow/tfjs-converter": "2.8.0",
|
||||
"@tensorflow/tfjs-core": "2.8.0",
|
||||
"@tensorflow/tfjs-data": "2.8.0",
|
||||
"@tensorflow/tfjs-layers": "2.8.0",
|
||||
"@tensorflow/tfjs-backend-cpu": "2.7.0",
|
||||
"@tensorflow/tfjs-backend-webgl": "2.7.0",
|
||||
"@tensorflow/tfjs-converter": "2.7.0",
|
||||
"@tensorflow/tfjs-core": "2.7.0",
|
||||
"@tensorflow/tfjs-data": "2.7.0",
|
||||
"@tensorflow/tfjs-layers": "2.7.0",
|
||||
"argparse": "^1.0.10",
|
||||
"chalk": "^4.1.0",
|
||||
"core-js": "3",
|
||||
"regenerator-runtime": "^0.13.5",
|
||||
"yargs": "^16.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tensorflow/tfjs-converter": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-2.7.0.tgz",
|
||||
"integrity": "sha512-SBpKYn/MkN8US7DeTcnvqHpvp/WKcwzpdgkQF+eHMHEbS1lXSlt4BHhOFgRdLPzy1gEC9+6P0VdTE8NQ737t/Q==",
|
||||
"dev": true
|
||||
},
|
||||
"@tensorflow/tfjs-core": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-2.7.0.tgz",
|
||||
"integrity": "sha512-4w5zjK6C5nkLatHpzARVQNd5QKtIocJRwjZIwWcScT9z2z1dX4rVmDoUpYg1cdD4H+yRRdI0awRaI3SL34yy8Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/offscreencanvas": "~2019.3.0",
|
||||
"@types/seedrandom": "2.4.27",
|
||||
"@types/webgl-ext": "0.0.30",
|
||||
"node-fetch": "~2.6.1",
|
||||
"seedrandom": "2.4.3"
|
||||
}
|
||||
},
|
||||
"@tensorflow/tfjs-data": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-data/-/tfjs-data-2.7.0.tgz",
|
||||
"integrity": "sha512-gsVklCwqqlxhykI7U2Uy5c2hjommQCAi+3y2/LER4TNtzQTzWaGKyIXvuLuL0tE896yuzXILIMZhkUjDmUiGxA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node-fetch": "^2.1.2",
|
||||
"node-fetch": "~2.6.1"
|
||||
}
|
||||
},
|
||||
"@tensorflow/tfjs-layers": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-layers/-/tfjs-layers-2.7.0.tgz",
|
||||
"integrity": "sha512-78zsD2LLrHQuDYv0EeV83LiF0M69lKsBfuTB3FIBgS85gapZPyHh4wooKda2Y4H9EtLogU+C6bArZuDo8PaX+g==",
|
||||
"dev": true
|
||||
},
|
||||
"seedrandom": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.3.tgz",
|
||||
"integrity": "sha1-JDhQTa0zkXMUv/GKxNeU8W1qrsw=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@tensorflow/tfjs-backend-cpu": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-2.8.0.tgz",
|
||||
"integrity": "sha512-RmseKyCWJR0Jz7HyRXm6VVjpaM9Rbql9Vr7Jrx4SCpYX8BzrRVxDYq9aMZqYh93qBj4xX5upoQ5y5zoaFjpbTw==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-2.7.0.tgz",
|
||||
"integrity": "sha512-R6ORcWq3ub81ABvBZEZ8Ok5OOT59B4AsRe66ds7B/NK0nN+k6y37bR3ZDVjgkEKNWNvzB7ydODikge3GNmgQIQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/seedrandom": "2.4.27",
|
||||
|
@ -181,22 +224,21 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs-backend-wasm": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-2.8.0.tgz",
|
||||
"integrity": "sha512-gBu0Td7CA5ufyIolwb/YAlE5cTCEa9RcfzRsIxt5zSjt0D2VWVVw7wh1rsYS81OLhKl+Zm9m9eOe8QTJL6A8Xw==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-2.7.0.tgz",
|
||||
"integrity": "sha512-q1p6vR99kvxNjPMH4SMzg5R43g2ACmp3GRMoS2JVCruMyBWroD3KrmgXX2f94t0bl8BysW0JBkGXihajifjd6Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@tensorflow/tfjs-backend-cpu": "2.8.0",
|
||||
"@types/emscripten": "~0.0.34"
|
||||
}
|
||||
},
|
||||
"@tensorflow/tfjs-backend-webgl": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-2.8.0.tgz",
|
||||
"integrity": "sha512-GZNpRyXQBHe3Tkt5m63HjgGyklfvU5kAoIuZe+jyfznzxkn3dhmiiLyMByQkxuc0LMZD1987riv0ALMSAXvVbQ==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-2.7.0.tgz",
|
||||
"integrity": "sha512-K7Rk5YTSWOZ969EZvh3w786daPn2ub4mA2JsX7mXKhBPUaOP9dKbBdLj9buCuMcu4zVq2pAp0QwpHSa4PHm3xg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@tensorflow/tfjs-backend-cpu": "2.8.0",
|
||||
"@tensorflow/tfjs-backend-cpu": "2.7.0",
|
||||
"@types/offscreencanvas": "~2019.3.0",
|
||||
"@types/seedrandom": "2.4.27",
|
||||
"@types/webgl-ext": "0.0.30",
|
||||
|
@ -213,15 +255,15 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs-converter": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-2.8.0.tgz",
|
||||
"integrity": "sha512-GvVzPu0+gtgfq0+UAA2mHV7z5TT359TAUUJHOI7/dDSlfCMfLx5bSa0CamW7PIPkzSn9urljXTbocdeNAdpJKQ==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-2.7.0.tgz",
|
||||
"integrity": "sha512-SBpKYn/MkN8US7DeTcnvqHpvp/WKcwzpdgkQF+eHMHEbS1lXSlt4BHhOFgRdLPzy1gEC9+6P0VdTE8NQ737t/Q==",
|
||||
"dev": true
|
||||
},
|
||||
"@tensorflow/tfjs-core": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-2.8.0.tgz",
|
||||
"integrity": "sha512-MMU5wG9bRPccFjxfc5vORw8YkjfFrPUtnoPQ/1WOqud5l3z3a318WAGqzSloPUMOMPD0c7x0vPQBsUgteliC2w==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-2.7.0.tgz",
|
||||
"integrity": "sha512-4w5zjK6C5nkLatHpzARVQNd5QKtIocJRwjZIwWcScT9z2z1dX4rVmDoUpYg1cdD4H+yRRdI0awRaI3SL34yy8Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/offscreencanvas": "~2019.3.0",
|
||||
|
@ -240,9 +282,9 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs-data": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-data/-/tfjs-data-2.8.0.tgz",
|
||||
"integrity": "sha512-U0UbL6Hffcq6O6r6Isb6cPM9GxXUcU998gcPSIBeTMaGnBGbm/tl6Nf7f8SbGV4076ojeeFr4+0ly8heyBnfew==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-data/-/tfjs-data-2.7.0.tgz",
|
||||
"integrity": "sha512-gsVklCwqqlxhykI7U2Uy5c2hjommQCAi+3y2/LER4TNtzQTzWaGKyIXvuLuL0tE896yuzXILIMZhkUjDmUiGxA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node-fetch": "^2.1.2",
|
||||
|
@ -250,19 +292,19 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs-layers": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-layers/-/tfjs-layers-2.8.0.tgz",
|
||||
"integrity": "sha512-g7ZEXyo46osVbJAR90KXbwWr82OlcqZOohSEIMXSZ/egnXLQpQqUBmGg8p8Nw2es6jmpSfOBDivv1z59HExVvg==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-layers/-/tfjs-layers-2.7.0.tgz",
|
||||
"integrity": "sha512-78zsD2LLrHQuDYv0EeV83LiF0M69lKsBfuTB3FIBgS85gapZPyHh4wooKda2Y4H9EtLogU+C6bArZuDo8PaX+g==",
|
||||
"dev": true
|
||||
},
|
||||
"@tensorflow/tfjs-node": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node/-/tfjs-node-2.8.0.tgz",
|
||||
"integrity": "sha512-u62AqvIS9jaMrw09Hl/Dy1YKiqEkltQ1c+RoJuW0XE685bjRue7FRmkJy69+EvsnXLY6gvPR1y+LguTPql8ZwA==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node/-/tfjs-node-2.7.0.tgz",
|
||||
"integrity": "sha512-0cWplm7AE40gi2llqoAp+lD/0X3dVJ8kb7Arrqb5lMhShRWUFZpULH+F0fJI6Yax4LBTzBi2SZKGL/O8krZsxg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@tensorflow/tfjs": "2.8.0",
|
||||
"@tensorflow/tfjs-core": "2.8.0",
|
||||
"@tensorflow/tfjs": "2.7.0",
|
||||
"@tensorflow/tfjs-core": "2.7.0",
|
||||
"adm-zip": "^0.4.11",
|
||||
"google-protobuf": "^3.9.2",
|
||||
"https-proxy-agent": "^2.2.1",
|
||||
|
@ -284,13 +326,13 @@
|
|||
}
|
||||
},
|
||||
"@tensorflow/tfjs-node-gpu": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node-gpu/-/tfjs-node-gpu-2.8.0.tgz",
|
||||
"integrity": "sha512-8k2N+OTXSbiwn3vJ0F1ukQHfWiw1Rwy4e/JnJFN6d/9Tp6bkdfx3Il/C/uk0RDAc6Pq5n7pHs9Pthg5gApTj1A==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@tensorflow/tfjs-node-gpu/-/tfjs-node-gpu-2.7.0.tgz",
|
||||
"integrity": "sha512-aL49B/0R7sBJpgeQ3sOeH38UFf78Hr0mi3CLLswGFgt+DALd+1sc4jBpSORycoHjZLiPysW5YsFz9t5BNIw8ig==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@tensorflow/tfjs": "2.8.0",
|
||||
"@tensorflow/tfjs-core": "2.8.0",
|
||||
"@tensorflow/tfjs": "2.7.0",
|
||||
"@tensorflow/tfjs-core": "2.7.0",
|
||||
"adm-zip": "^0.4.11",
|
||||
"google-protobuf": "^3.9.2",
|
||||
"https-proxy-agent": "^2.2.1",
|
||||
|
|
20
package.json
20
package.json
|
@ -22,16 +22,16 @@
|
|||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"devDependencies": {
|
||||
"@tensorflow/tfjs": "^2.8.0",
|
||||
"@tensorflow/tfjs-backend-cpu": "^2.8.0",
|
||||
"@tensorflow/tfjs-backend-wasm": "^2.8.0",
|
||||
"@tensorflow/tfjs-backend-webgl": "^2.8.0",
|
||||
"@tensorflow/tfjs-converter": "^2.8.0",
|
||||
"@tensorflow/tfjs-core": "^2.8.0",
|
||||
"@tensorflow/tfjs-data": "^2.8.0",
|
||||
"@tensorflow/tfjs-layers": "^2.8.0",
|
||||
"@tensorflow/tfjs-node": "^2.8.0",
|
||||
"@tensorflow/tfjs-node-gpu": "^2.8.0",
|
||||
"@tensorflow/tfjs": "^2.7.0",
|
||||
"@tensorflow/tfjs-backend-cpu": "^2.7.0",
|
||||
"@tensorflow/tfjs-backend-wasm": "^2.7.0",
|
||||
"@tensorflow/tfjs-backend-webgl": "^2.7.0",
|
||||
"@tensorflow/tfjs-converter": "^2.7.0",
|
||||
"@tensorflow/tfjs-core": "^2.7.0",
|
||||
"@tensorflow/tfjs-data": "^2.7.0",
|
||||
"@tensorflow/tfjs-layers": "^2.7.0",
|
||||
"@tensorflow/tfjs-node": "^2.7.0",
|
||||
"@tensorflow/tfjs-node-gpu": "^2.7.0",
|
||||
"@vladmandic/pilogger": "^0.2.10",
|
||||
"chokidar": "^3.4.3",
|
||||
"dayjs": "^1.9.7",
|
||||
|
|
56
src/human.js
56
src/human.js
|
@ -423,44 +423,26 @@ class Human {
|
|||
}
|
||||
|
||||
async warmup(userConfig) {
|
||||
const b64toBlob = (base64, type = 'application/octet-stream') => fetch(`data:${type};base64,${base64}`).then((res) => res.blob());
|
||||
|
||||
if (userConfig) this.config = mergeDeep(this.config, userConfig);
|
||||
return new Promise((resolve) => {
|
||||
const video = this.config.videoOptimized;
|
||||
this.config.videoOptimized = false;
|
||||
let src;
|
||||
let size;
|
||||
switch (this.config.warmup) {
|
||||
case 'face':
|
||||
size = 256;
|
||||
src = sample.face;
|
||||
break;
|
||||
case 'full':
|
||||
size = 1200;
|
||||
src = sample.body;
|
||||
break;
|
||||
default:
|
||||
size = 0;
|
||||
src = null;
|
||||
}
|
||||
const img = new Image(size, size);
|
||||
img.onload = () => {
|
||||
const canvas = (typeof OffscreenCanvas !== 'undefined') ? new OffscreenCanvas(size, size) : document.createElement('canvas');
|
||||
canvas.width = size;
|
||||
canvas.height = size;
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(img, 0, 0);
|
||||
const data = ctx.getImageData(0, 0, size, size);
|
||||
const t0 = now();
|
||||
this.detect(data, config).then((warmup) => {
|
||||
const t1 = now();
|
||||
log('Warmup', this.config.warmup, (t1 - t0), warmup);
|
||||
this.config.videoOptimized = video;
|
||||
resolve(warmup);
|
||||
});
|
||||
};
|
||||
if (src) img.src = src;
|
||||
else resolve(null);
|
||||
});
|
||||
const video = this.config.videoOptimized;
|
||||
this.config.videoOptimized = false;
|
||||
let blob;
|
||||
switch (this.config.warmup) {
|
||||
case 'face': blob = await b64toBlob(sample.face); break;
|
||||
case 'full': blob = await b64toBlob(sample.body); break;
|
||||
default: blob = null;
|
||||
}
|
||||
if (!blob) return null;
|
||||
const bitmap = await createImageBitmap(blob);
|
||||
const t0 = now();
|
||||
const warmup = await this.detect(bitmap, config);
|
||||
const t1 = now();
|
||||
bitmap.close();
|
||||
log('Warmup', this.config.warmup, (t1 - t0), warmup);
|
||||
this.config.videoOptimized = video;
|
||||
return warmup;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
export const face = `data:image/jpeg;base64,
|
||||
// data:image/jpeg;base64,
|
||||
export const face = `
|
||||
/9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUA
|
||||
AAABAAAARgEoAAMAAAABAAIAAAExAAIAAAARAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQu
|
||||
bmV0IDQuMi4xMwAA/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxob
|
||||
|
@ -151,7 +152,8 @@ c6oaM5TUJ8EgGsG4kLNUHT0M64OaqMMikSRsuKbnFMRLG3zVehOaGNE445NNlnVFpDMu6uie9Vo1
|
|||
ylFtbdT1xUWNWzU0/Zbwlgfmx8zGsHWtRHmMqE59aAMyNifvHPc1f0gtPdqkY5JosJHeNci2tktY
|
||||
euPnNY+oXWZEVJNrZ9aun8SIq/CzodHuriIokhDIR1ronbKZr0o6o8ipoz//2Q==`;
|
||||
|
||||
export const body = `data:image/jpeg;base64,
|
||||
// data:image/jpeg;base64,
|
||||
export const body = `
|
||||
/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsICAoIBwsKCQoNDAsNERwSEQ8PESIZGhQcKSQrKigk
|
||||
JyctMkA3LTA9MCcnOEw5PUNFSElIKzZPVU5GVEBHSEX/2wBDAQwNDREPESESEiFFLicuRUVFRUVF
|
||||
RUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUX/wAARCASwBLADASIA
|
||||
|
|
Loading…
Reference in New Issue