From 0dc4b7afd20f353d73ef8569f1f112b945e23a97 Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 5 Apr 2020 16:13:52 -0700 Subject: [PATCH 1/3] add inference time to yolo plugin --- plugins/yolo/shinobi-yolo.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/yolo/shinobi-yolo.js b/plugins/yolo/shinobi-yolo.js index e04f67d9..fb50798b 100644 --- a/plugins/yolo/shinobi-yolo.js +++ b/plugins/yolo/shinobi-yolo.js @@ -27,6 +27,7 @@ var yolo = require('node-yolo-shinobi');//this is @vapi/node-yolo@1.2.4 without // var yolo = require('@vapi/node-yolo'); var detector = new yolo(__dirname + "/models", "cfg/coco.data", "cfg/yolov3.cfg", "yolov3.weights"); s.detectObject=function(buffer,d,tx,frameLocation){ + var timeStart = new Date() var detectStuff = function(frame,callback){ detector.detect(frame) .then(detections => { @@ -52,7 +53,8 @@ s.detectObject=function(buffer,d,tx,frameLocation){ reason:'object', matrices:matrices, imgHeight:parseFloat(d.mon.detector_scale_y), - imgWidth:parseFloat(d.mon.detector_scale_x) + imgWidth:parseFloat(d.mon.detector_scale_x), + time: (new Date()) - timeStart } }) } From 82528862726b9a8a9ccb338a676175d851ab8c0a Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 5 Apr 2020 16:14:31 -0700 Subject: [PATCH 2/3] prepare more P2P pathing --- web/libs/js/dash2.socketio.js | 1 + web/pages/admin.ejs | 12 +++++++++--- web/pages/super.ejs | 12 +++++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/web/libs/js/dash2.socketio.js b/web/libs/js/dash2.socketio.js index 7028c9de..e2ca5f7b 100644 --- a/web/libs/js/dash2.socketio.js +++ b/web/libs/js/dash2.socketio.js @@ -301,6 +301,7 @@ $.ccio.globalWebsocket=function(d,user){ uid: user.uid, ke: d.ke, id: d.id, + subscriptionId: subscriptionId, // channel: channel }) if(!$.ccio.mon[d.ke+d.id+user.auth_token].ctx||$.ccio.mon[d.ke+d.id+user.auth_token].ctx.length===0){ diff --git a/web/pages/admin.ejs b/web/pages/admin.ejs index 5298e019..92e1d9f7 100644 --- a/web/pages/admin.ejs +++ b/web/pages/admin.ejs @@ -102,9 +102,15 @@