From fef3ca8eb7edf3bb9b0df9b24d37577072b8323e Mon Sep 17 00:00:00 2001 From: Moe Date: Sat, 3 Nov 2018 16:02:45 -0700 Subject: [PATCH] face-recognition-cuda 0.9.3 to 0.9.3a for CUDA 10 + updated opencv plugin for refactor but forgot to mention in last commit --- plugins/dlib/package.json | 2 +- plugins/opencv/shinobi-opencv.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/dlib/package.json b/plugins/dlib/package.json index 3fd5717c..682e7a52 100644 --- a/plugins/dlib/package.json +++ b/plugins/dlib/package.json @@ -8,7 +8,7 @@ "express": "^4.16.2", "moment": "^2.19.2", "socket.io": "^2.0.4", - "face-recognition-cuda": "0.9.3" + "face-recognition-cuda": "^0.9.3a" }, "devDependencies": {}, "scripts": { diff --git a/plugins/opencv/shinobi-opencv.js b/plugins/opencv/shinobi-opencv.js index 551e3406..53c7c6de 100644 --- a/plugins/opencv/shinobi-opencv.js +++ b/plugins/opencv/shinobi-opencv.js @@ -62,7 +62,7 @@ s.onPluginEventExtender(function(d,cn,tx){ } }) // OpenCV Init />> -s.detectObject=function(buffer,d,tx,frameLocation){ +s.detectObject = function(buffer,d,tx,frameLocation){ var detectStuff = function(frameBuffer,callback){ if(d.mon.detector_lisence_plate==="1"){ s.detectLicensePlate(buffer,d,tx,frameLocation) @@ -113,7 +113,9 @@ s.detectObject=function(buffer,d,tx,frameLocation){ } if(frameLocation){ fs.readFile(frameLocation,function(err,buffer){ - detectStuff(buffer) + if(!err){ + detectStuff(buffer) + } fs.unlink(frameLocation,function(){ })