From 17c9440fd93539207c7ccbf487c0ae174f00a8b8 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 3 Jan 2025 09:15:57 -0800 Subject: [PATCH] videoanalysis: fix package detection area --- plugins/objectdetector/package-lock.json | 4 ++-- plugins/objectdetector/package.json | 2 +- plugins/objectdetector/src/main.ts | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/objectdetector/package-lock.json b/plugins/objectdetector/package-lock.json index ba628a95d..4e4fb78fd 100644 --- a/plugins/objectdetector/package-lock.json +++ b/plugins/objectdetector/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/objectdetector", - "version": "0.1.61", + "version": "0.1.62", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/objectdetector", - "version": "0.1.61", + "version": "0.1.62", "license": "Apache-2.0", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/objectdetector/package.json b/plugins/objectdetector/package.json index 5af1569a3..6da9ed668 100644 --- a/plugins/objectdetector/package.json +++ b/plugins/objectdetector/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/objectdetector", - "version": "0.1.61", + "version": "0.1.62", "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 a1f0332b9..3db3c2de0 100644 --- a/plugins/objectdetector/src/main.ts +++ b/plugins/objectdetector/src/main.ts @@ -868,8 +868,10 @@ class ObjectDetectionMixin extends SettingsMixinDeviceBase s.key === key)?.multiple) { - vs = JSON.stringify(value); + if (value) { + const found = this.model.settings?.find(s => s.key === key); + if (found?.multiple || found?.type === 'clippath') + vs = JSON.stringify(value); } if (key === 'analyzeButton') {