Provided convinient start script
This commit is contained in:
parent
9042afd82d
commit
ea173b922a
3 changed files with 10 additions and 3 deletions
|
@ -2,7 +2,7 @@ import zmq
|
|||
import cv2
|
||||
from pyfakewebcam import FakeWebcam
|
||||
import numpy as np
|
||||
from camera import Camera
|
||||
from .camera import Camera
|
||||
from argparse import ArgumentParser
|
||||
from signal import signal, SIGINT
|
||||
|
||||
|
@ -69,7 +69,7 @@ if __name__ == "__main__":
|
|||
fake = FakeWebcam('/dev/video20', height, width)
|
||||
|
||||
running = True
|
||||
print("Running...")
|
||||
print("Running camera at /dev/video20 ...")
|
||||
|
||||
while running:
|
||||
frame = camera.read()
|
||||
|
|
|
@ -21,7 +21,6 @@ async function run() {
|
|||
console.log("Bounded to ipc:///tmp/bodypix");
|
||||
|
||||
for await (const [msg] of sock) {
|
||||
console.log("Received RAW Message");
|
||||
const image = decodeJpeg(msg)
|
||||
const segmentation = await net.segmentPerson(image);
|
||||
await sock.send(segmentation.data);
|
||||
|
|
8
start.sh
Executable file
8
start.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
trap "exit" INT TERM ERR
|
||||
trap "kill 0" EXIT
|
||||
|
||||
node server.js &
|
||||
python -m bodypix-background "$@" &
|
||||
|
||||
wait
|
Loading…
Reference in a new issue