mirror of https://github.com/vladmandic/human
update
parent
7a968fcdc6
commit
a472540b36
|
@ -26,7 +26,7 @@ const ui = {
|
|||
busy: false,
|
||||
facing: true,
|
||||
useWorker: false,
|
||||
worker: 'demo/worker.js',
|
||||
worker: 'worker.js',
|
||||
samples: ['../assets/sample6.jpg', '../assets/sample1.jpg', '../assets/sample4.jpg', '../assets/sample5.jpg', '../assets/sample3.jpg', '../assets/sample2.jpg'],
|
||||
compare: '../assets/sample-me.jpg',
|
||||
drawBoxes: true,
|
||||
|
@ -252,6 +252,7 @@ function webWorker(input, image, canvas, timestamp) {
|
|||
// create new webworker and add event handler only once
|
||||
log('creating worker thread');
|
||||
worker = new Worker(ui.worker, { type: 'module' });
|
||||
console.log('worker', worker);
|
||||
// after receiving message from webworker, parse&draw results and send new frame for processing
|
||||
worker.addEventListener('message', (msg) => {
|
||||
if (msg.data.result.performance && msg.data.result.performance.total) ui.detectFPS.push(1000 / msg.data.result.performance.total);
|
||||
|
|
20
package.json
20
package.json
|
@ -22,16 +22,16 @@
|
|||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"devDependencies": {
|
||||
"@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",
|
||||
"@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",
|
||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
|||
Subproject commit 489063ec16cf35ff3c91e3f90d44fa8351210aea
|
||||
Subproject commit 70b1aadc1b00fe59c454bc73baf413289961f28b
|
Loading…
Reference in New Issue