Send motion to correct funs

This commit is contained in:
Nick Mowen 2022-04-17 15:33:31 -06:00
parent cc6551b570
commit a973605e2e
2 changed files with 5 additions and 0 deletions

View File

@ -515,6 +515,9 @@ def process_frames(
logger.info(f"{camera_name}: frame {frame_time} is not in memory store.") logger.info(f"{camera_name}: frame {frame_time} is not in memory store.")
continue continue
if not motion_enabled:
continue
# look for motion # look for motion
motion_boxes = motion_detector.detect(frame) motion_boxes = motion_detector.detect(frame)

View File

@ -115,6 +115,7 @@ class ProcessClip:
} }
detection_enabled = mp.Value("d", 1) detection_enabled = mp.Value("d", 1)
motion_enabled = mp.Value("d", True)
stop_event = mp.Event() stop_event = mp.Event()
model_shape = (self.config.model.height, self.config.model.width) model_shape = (self.config.model.height, self.config.model.width)
@ -133,6 +134,7 @@ class ProcessClip:
objects_to_track, objects_to_track,
object_filters, object_filters,
detection_enabled, detection_enabled,
motion_enabled,
stop_event, stop_event,
exit_on_empty=True, exit_on_empty=True,
) )