diff --git a/plugins/objectdetector/package-lock.json b/plugins/objectdetector/package-lock.json index 477c8ee1a..33a457d57 100644 --- a/plugins/objectdetector/package-lock.json +++ b/plugins/objectdetector/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/objectdetector", - "version": "0.0.40", + "version": "0.0.41", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/objectdetector", - "version": "0.0.40", + "version": "0.0.41", "license": "Apache-2.0", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/objectdetector/package.json b/plugins/objectdetector/package.json index b312ee250..de7532051 100644 --- a/plugins/objectdetector/package.json +++ b/plugins/objectdetector/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/objectdetector", - "version": "0.0.40", + "version": "0.0.41", "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 a67ae1d6e..236915e29 100644 --- a/plugins/objectdetector/src/main.ts +++ b/plugins/objectdetector/src/main.ts @@ -236,6 +236,7 @@ class ObjectDetectionMixin extends SettingsMixinDeviceBase 30: + print('detection session has not received a sample in 30 seconds, terminating', detection_session.id) + ending = True + if ending: if detection_session: self.end_session(detection_session) @@ -303,6 +308,8 @@ class DetectPlugin(scrypted_sdk.ScryptedDeviceBase, ObjectDetection): first_frame = True def user_callback(gst_sample, src_size, convert_to_src_size): try: + detection_session.last_sample = time.time() + nonlocal first_frame if first_frame: first_frame = False