diff --git a/sbin/ctl.sh b/sbin/ctl.sh index 4bcdb33c2..798ef65f3 100755 --- a/sbin/ctl.sh +++ b/sbin/ctl.sh @@ -19,22 +19,66 @@ # from Dispension Industries Limited. # +# OK just so were clear, this is a pretty complicated lib. This is due +# to all the various tools we are obliged to use due to various tech +# we've been asked to implement, some of which is proprietary, most +# of which is experimental and ALL of which is huge. +# See doc for more details. HERE=$PWD DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" cd $DIR/.. +# Read in UKDI and determine basic PATHs etc +function f_read_ukdi(){ +cat /etc/ukdi.json |\ + tr -d '",'|\ + awk '{ if (NF>1){print "export UKDI_"$1"=\""$2"\"" } }' |\ + sed 's/://' > var/gen.ukdi +chmod +x var/gen.ukdi +. var/gen.ukdi + +export ZZZ=5 +export UKDIHOST=`echo $UKDI_ukdi|tr '/:,' ' '| awk '{print $2}'` +export UKDIPORT=`echo $UKDI_ukdi|tr '/:,' ' '| awk '{print $3}'` +export CORE=$PWD/../core +export UKDI=$PWD/../ukdi +export YOLO=$PWD/../yoloserv + +cat< var/yoloserv.pid + echo PPPPPPPPPPPp + echo $PYTHONPATH + echo $$ > var/yoloserv.pid while [ -e var/yoloserv.pid ] do - python3 src/yoloserv.py $PORT $IMGDIR $OUTDIR $WEIGHTS + python3 src/yoloserv.py $PORT $UKDI_yolo_indir $UKDI_yolo_outdir $WEIGHTS sleep $ZZZ done } @@ -162,4 +206,4 @@ esac -cd $HERE \ No newline at end of file +cd $HERE diff --git a/src/yoloserv.py b/src/yoloserv.py index 09080307c..648345c54 100644 --- a/src/yoloserv.py +++ b/src/yoloserv.py @@ -88,8 +88,8 @@ class yoloserv(object): # Object matching if "paravision" in self.device_list: print("Loading paravision...") - from paravision import Paravision - self.facematcher = Paravision() + from paravisionx import Paravisionx + self.facematcher = Paravisionx() self.facematcher.init() if "facematch" in self.device_list: print("Loading facematch...") @@ -143,4 +143,4 @@ if __name__ == '__main__': cherrypy.config.update({'server.socket_host': '0.0.0.0', 'server.socket_port': servport}) cherrypy.quickstart(s, '/') - \ No newline at end of file +