Skip to content

Commit

Permalink
videoanalysis: correctly pass motion zones to object detector
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed May 28, 2023
1 parent f1eb2f9 commit 6f5244e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 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.140",
"version": "0.0.141",
"description": "Scrypted Video Analysis Plugin. Installed alongside a detection service like OpenCV or TensorFlow.",
"author": "Scrypted",
"license": "Apache-2.0",
Expand Down
10 changes: 5 additions & 5 deletions plugins/objectdetector/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,15 +414,15 @@ class ObjectDetectionMixin extends SettingsMixinDeviceBase<VideoCamera & Camera
for (const mixin of detectorMixin.currentMixins.values()) {
if (mixin.id !== this.id)
continue;
for (const [key, zi] of Object.entries(mixin.zoneInfos)) {
const zone = mixin.zones[key];
for (const [key, zone] of Object.entries(mixin.zones)) {
const zi = mixin.zoneInfos[key];
if (!zone?.length || zone?.length < 3)
continue;
const odz: ObjectDetectionZone = {
classes: mixin.hasMotionType ? ['motion'] : zi.classes,
exclusion: zi.exclusion,
classes: mixin.hasMotionType ? ['motion'] : zi?.classes,
exclusion: zi?.exclusion,
path: zone,
type: zi.type,
type: zi?.type,
}
zones.push(odz);
}
Expand Down

0 comments on commit 6f5244e

Please sign in to comment.