diff --git a/bodypix-background/__main__.py b/bodypix-background/__main__.py index 8b61513..6f8dc3f 100644 --- a/bodypix-background/__main__.py +++ b/bodypix-background/__main__.py @@ -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() diff --git a/server.js b/server.js index 0b0314a..06a694e 100644 --- a/server.js +++ b/server.js @@ -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); diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..5bb19e0 --- /dev/null +++ b/start.sh @@ -0,0 +1,8 @@ +#!/bin/bash +trap "exit" INT TERM ERR +trap "kill 0" EXIT + +node server.js & +python -m bodypix-background "$@" & + +wait \ No newline at end of file