Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

dont run inf when no active alerts

roryclearf915f06e90ba
diff --git a/clearcam.py b/clearcam.py
index 313e813..1342424 100644
--- a/clearcam.py
+++ b/clearcam.py
@@ -560,6 +560,9 @@ class VideoCapture:
def inference_loop(self):
prev_time = time.time()
while self.running:
+ if not any(counter.is_active() for _, counter in self.alert_counters.items()): # don't run inference when no active scheds
+ time.sleep(1)
+ continue
with self.lock:
frame = self.raw_frame.copy() if self.raw_frame is not None else None
if frame is not None: