add separate mapping available to Object Detector, default is global's
parent
cbe0af5273
commit
1d3aba59d6
|
@ -2978,6 +2978,7 @@ module.exports = function(s,config,lang){
|
|||
headerTitle: `${lang['Object Detection']} <small><b class="shinobi-detector_name"></b> <b class="shinobi-detector-invert">${lang['Not Connected']}</b><b class="shinobi-detector" style="display:none">${lang['Connected']}</b></small>`,
|
||||
isFormGroupGroup: true,
|
||||
isSection: true,
|
||||
"input-mapping": "detector_object",
|
||||
"section-class": "h_det_input h_det_1",
|
||||
"info": [
|
||||
{
|
||||
|
@ -3185,7 +3186,7 @@ module.exports = function(s,config,lang){
|
|||
{
|
||||
hidden: true,
|
||||
"name": lang['Traditional Recording'],
|
||||
|
||||
"input-mapping": "detector_sip_buffer",
|
||||
"color": "orange",
|
||||
id: "monSectionDetectorTraditionalRecording",
|
||||
isSection: true,
|
||||
|
|
|
@ -790,6 +790,9 @@ module.exports = function(s,config,lang,onFinish){
|
|||
const addInputMap = () => {
|
||||
if(inputMapsRequired)detectorFlags.push(s.createFFmpegMap(e,e.details.input_map_choices.detector))
|
||||
}
|
||||
const addObjectDetectorInputMap = () => {
|
||||
if(inputMapsRequired)detectorFlags.push(s.createFFmpegMap(e,e.details.input_map_choices.detector_object || e.details.input_map_choices.detector))
|
||||
}
|
||||
const addObjectDetectValues = () => {
|
||||
const objVideoFilters = [objectDetectorFpsFilter]
|
||||
if(e.details.cust_detect_object)detectorFlags.push(e.details.cust_detect_object)
|
||||
|
@ -797,30 +800,29 @@ module.exports = function(s,config,lang,onFinish){
|
|||
detectorFlags.push(objectDetectorDimensionsFlag + ' -vf "' + objVideoFilters.join(',') + '"')
|
||||
}
|
||||
if(sendFramesGlobally){
|
||||
addInputMap()
|
||||
if(builtInMotionDetectorIsEnabled)addInputMap();
|
||||
detectorFlags.push(baseDimensionsFlag)
|
||||
if(isCudaEnabled){
|
||||
videoFilters.push(cudaVideoFilters)
|
||||
}
|
||||
if(isCudaEnabled)videoFilters.push(cudaVideoFilters);
|
||||
videoFilters.push(baseFpsFilter)
|
||||
if(e.details.cust_detect)detectorFlags.push(e.details.cust_detect)
|
||||
addVideoFilters()
|
||||
if(builtInMotionDetectorIsEnabled){
|
||||
detectorFlags.push('-an -c:v pam -pix_fmt gray -f image2pipe pipe:3')
|
||||
if(objectDetectorOutputIsEnabled){
|
||||
addInputMap()
|
||||
addObjectDetectorInputMap()
|
||||
addObjectDetectValues()
|
||||
detectorFlags.push('-an -f singlejpeg pipe:4')
|
||||
}
|
||||
}else if(sendFramesToObjectDetector){
|
||||
addInputMap()
|
||||
addObjectDetectorInputMap()
|
||||
addObjectDetectValues()
|
||||
detectorFlags.push('-an -f singlejpeg pipe:4')
|
||||
}else{
|
||||
addInputMap()
|
||||
detectorFlags.push('-an -f singlejpeg pipe:4')
|
||||
}
|
||||
}else if(sendFramesToObjectDetector){
|
||||
addInputMap()
|
||||
addObjectDetectorInputMap()
|
||||
addObjectDetectValues()
|
||||
detectorFlags.push('-an -f singlejpeg pipe:4')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue