Skip to content

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

fix prog at 100%

roryclear6bf39e278a35
diff --git a/clearcam.py b/clearcam.py
index d785290..f48ff5e 100644
--- a/clearcam.py
+++ b/clearcam.py
@@ -345,8 +345,9 @@ class VideoCapture:
self.running = False
database.run_put("analysis_prog", cam_name, {"Tracking":100})
os._exit(0)
- self.last_preds, _ = self.run_inference(frame)
- database.run_put("analysis_prog", cam_name, {"Tracking":self.cap.get(cv2.CAP_PROP_POS_FRAMES)/self.cap.get(cv2.CAP_PROP_FRAME_COUNT)*100})
+ else:
+ self.last_preds, _ = self.run_inference(frame)
+ database.run_put("analysis_prog", cam_name, {"Tracking":self.cap.get(cv2.CAP_PROP_POS_FRAMES)/self.cap.get(cv2.CAP_PROP_FRAME_COUNT)*100})
else:
raw_bytes = self.proc.stdout.read(frame_size)
if len(raw_bytes) != frame_size: