diff --git a/plugins/objectdetector/package-lock.json b/plugins/objectdetector/package-lock.json index 29ccaba35..d216953a6 100644 --- a/plugins/objectdetector/package-lock.json +++ b/plugins/objectdetector/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/objectdetector", - "version": "0.0.141", + "version": "0.0.142", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/objectdetector", - "version": "0.0.141", + "version": "0.0.142", "license": "Apache-2.0", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/objectdetector/package.json b/plugins/objectdetector/package.json index f46beb08d..0feae1240 100644 --- a/plugins/objectdetector/package.json +++ b/plugins/objectdetector/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/objectdetector", - "version": "0.0.141", + "version": "0.0.142", "description": "Scrypted Video Analysis Plugin. Installed alongside a detection service like OpenCV or TensorFlow.", "author": "Scrypted", "license": "Apache-2.0", diff --git a/plugins/objectdetector/src/main.ts b/plugins/objectdetector/src/main.ts index 9f131cc84..581911211 100644 --- a/plugins/objectdetector/src/main.ts +++ b/plugins/objectdetector/src/main.ts @@ -991,6 +991,10 @@ class ObjectDetectionPlugin extends AutoenableMixinProvider implements Settings, shouldUseSnapshotPipeline() { this.pruneOldStatistics(); + // never use snapshot mode if its a single camera. + if (this.statsSnapshotConcurrent < 2) + return false; + // find any concurrent cameras with as many or more that had passable results for (const [k, v] of this.objectDetectionStatistics.entries()) { if (v.dps > 2 && k >= this.statsSnapshotConcurrent)