From 6a8d8bf53dc39abf1b0d9630efb0e5c5c6f5dea5 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Tue, 8 Sep 2020 21:13:14 -0500 Subject: [PATCH] dont trigger zones for false positives --- detect_objects.py | 2 +- frigate/object_processing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/detect_objects.py b/detect_objects.py index 931ef01fd..822c27c5c 100644 --- a/detect_objects.py +++ b/detect_objects.py @@ -291,7 +291,7 @@ def main(): event_processor = EventProcessor(CONFIG['cameras'], camera_processes, '/cache', '/clips', event_queue, stop_event) event_processor.start() - object_processor = TrackedObjectProcessor(CONFIG['cameras'], CONFIG.get('zones', {}), client, MQTT_TOPIC_PREFIX, tracked_objects_queue, event_queue,stop_event) + object_processor = TrackedObjectProcessor(CONFIG['cameras'], CONFIG.get('zones', {}), client, MQTT_TOPIC_PREFIX, tracked_objects_queue, event_queue, stop_event) object_processor.start() camera_watchdog = CameraWatchdog(camera_processes, CONFIG['cameras'], tflite_process, tracked_objects_queue, plasma_process, stop_event) diff --git a/frigate/object_processing.py b/frigate/object_processing.py index cb423829a..16596a46e 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -331,7 +331,7 @@ class TrackedObjectProcessor(threading.Thread): # update zone status for each label for zone in camera_state.config['zones'].keys(): # get labels for current camera and all labels in current zone - labels_for_camera = set([obj['label'] for obj in camera_state.tracked_objects.values() if zone in obj['zones']]) + labels_for_camera = set([obj['label'] for obj in camera_state.tracked_objects.values() if zone in obj['zones'] and not obj['false_positive']]) labels_to_check = labels_for_camera | set(self.zone_data[zone].keys()) # for each label in zone for label in labels_to_check: