Explorar el Código

dont trigger zones for false positives

Blake Blackshear hace 4 años
padre
commit
6a8d8bf53d
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      detect_objects.py
  2. 1 1
      frigate/object_processing.py

+ 1 - 1
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)

+ 1 - 1
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: