Skip to content

Commit

Permalink
videoanalysis: settings tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Jun 30, 2023
1 parent e9f999b commit 6a41261
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/objectdetector/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/objectdetector/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/objectdetector",
"version": "0.0.148",
"version": "0.0.149",
"description": "Scrypted Video Analysis Plugin. Installed alongside a detection service like OpenCV or TensorFlow.",
"author": "Scrypted",
"license": "Apache-2.0",
Expand Down
10 changes: 9 additions & 1 deletion plugins/objectdetector/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,14 @@ class ObjectDetectionPlugin extends AutoenableMixinProvider implements Settings,
title: 'Max Concurrent Detections',
description: `The max number concurrent cameras that will perform object detection while their motion sensor is triggered. Older sessions will be terminated when the limit is reached. The default value is ${getMaxConcurrentObjectDetectionSessions()}.`,
defaultValue: 'Default',
combobox: true,
choices: [
'Default',
...[2, 3, 4, 5, 6, 7, 8, 9, 10].map(i => i.toString()),
],
mapPut: (o, v) => {
return parseInt(v) || 'Default';
}
},
activeMotionDetections: {
title: 'Active Motion Detection Sessions',
Expand Down Expand Up @@ -1017,7 +1025,7 @@ class ObjectDetectionPlugin extends AutoenableMixinProvider implements Settings,
this.statsSnapshotConcurrent++;

let maxConcurrent = this.storageSettings.values.maxConcurrentDetections || 'Default';
maxConcurrent = parseInt(maxConcurrent) || getMaxConcurrentObjectDetectionSessions();
maxConcurrent = Math.max(parseInt(maxConcurrent)) || getMaxConcurrentObjectDetectionSessions();

const objectDetections = [...this.currentMixins.values()]
.map(d => [...d.currentMixins.values()].filter(dd => !dd.hasMotionType)).flat()
Expand Down

0 comments on commit 6a41261

Please sign in to comment.