Revert "Merge branch 'always_record_on_motion' into dev"
This reverts commitbuild-default-monitor-config-from-definitions5f804ce396
, reversing changes made to184bc2fa69
.
parent
5f804ce396
commit
a6b78c0a4e
|
@ -2985,25 +2985,6 @@ module.exports = function(s,config,lang){
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "detail=detector_always_record",
|
||||
"field": lang['Start recording on motion'],
|
||||
"description": "",
|
||||
"default": "0",
|
||||
"example": "",
|
||||
"selector": "h_det_alwy_rec",
|
||||
"fieldType": "select",
|
||||
"possible": [
|
||||
{
|
||||
"name": lang.No,
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"name": lang.Yes,
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
hidden: true,
|
||||
"name": "detail=detector_fps_object",
|
||||
|
|
|
@ -969,6 +969,5 @@
|
|||
"There are no monitors that you can view with this account.":"There are no monitors that you can view with this account.",
|
||||
"Delete Monitors and Files": "Delete Monitors and Files",
|
||||
"Select atleast one monitor to delete": "Select atleast one monitor to delete.",
|
||||
"Use Built-In":"Use Built-In",
|
||||
"Start recording on motion":"Start recording on motion"
|
||||
"Use Built-In":"Use Built-In"
|
||||
}
|
||||
|
|
|
@ -63,25 +63,7 @@ s.detectObject=function(buffer,d,tx,frameLocation){
|
|||
time: resp.time
|
||||
}
|
||||
})
|
||||
} else if (d.mon.detector_pam === '1' && d.mon.detector_always_record === '1' ) {
|
||||
var width = parseFloat(d.mon.detector_scale_y)
|
||||
var height = parseFloat(d.mon.detector_scale_x)
|
||||
tx({
|
||||
f:'trigger',
|
||||
id:d.id,
|
||||
ke:d.ke,
|
||||
details:{
|
||||
plug:config.plug,
|
||||
name:'motion_before_tensorflow',
|
||||
reason:'motion',
|
||||
imgHeight:width,
|
||||
imgWidth:height
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error)
|
||||
}
|
||||
})
|
||||
// var detectStuff = function(frame,callback){
|
||||
// detector.detect(frame)
|
||||
|
|
|
@ -27,7 +27,6 @@ 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 => {
|
||||
|
@ -53,24 +52,10 @@ 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),
|
||||
time: (new Date()) - timeStart
|
||||
imgWidth:parseFloat(d.mon.detector_scale_x)
|
||||
}
|
||||
})
|
||||
}else if (d.mon.detector_pam === '1' && d.mon.detector_always_record === '1' ) {
|
||||
tx({
|
||||
f:'trigger',
|
||||
id:d.id,
|
||||
ke:d.ke,
|
||||
details:{
|
||||
plug:config.plug,
|
||||
name:'motion_before_yolo',
|
||||
reason:'motion',
|
||||
imgHeight:parseFloat(d.mon.detector_scale_y),
|
||||
imgWidth:parseFloat(d.mon.detector_scale_x)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
fs.unlink(frame,function(){
|
||||
|
||||
})
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3571,7 +3571,6 @@ $.aM.generateDefaultMonitorSettings=function(){
|
|||
"detector_scale_x": "640",
|
||||
"detector_scale_y": "480",
|
||||
"detector_use_motion": "1",
|
||||
"detector_always_record":"0",
|
||||
"detector_use_detect_object": "0",
|
||||
"detector_frame": "0",
|
||||
"detector_sensitivity": "",
|
||||
|
|
Loading…
Reference in New Issue