Combined into main due to async ordering errors
This commit is contained in:
parent
8817c68d87
commit
74ac5a903d
1 changed files with 3 additions and 9 deletions
12
server.js
12
server.js
|
@ -3,18 +3,13 @@ const tf = require('@tensorflow/tfjs-node');
|
|||
const bodyPix = require('@tensorflow-models/body-pix');
|
||||
const {decodeJpeg} = require('./decode_image');
|
||||
|
||||
let net = null;
|
||||
|
||||
async function load() {
|
||||
net = await bodyPix.load({
|
||||
async function main() {
|
||||
const net = await bodyPix.load({
|
||||
architecture: 'MobileNetV1',
|
||||
outputStride: 16,
|
||||
multiplier: 0.5,
|
||||
quantBytes: 2
|
||||
});
|
||||
}
|
||||
|
||||
async function run() {
|
||||
const sock = new zmq.Reply;
|
||||
|
||||
await sock.bind('ipc:///tmp/bodypix');
|
||||
|
@ -28,5 +23,4 @@ async function run() {
|
|||
}
|
||||
}
|
||||
|
||||
load();
|
||||
run();
|
||||
main();
|
||||
|
|
Loading…
Reference in a new issue