Add object detection, tracking, mobile notifications, and search to any security camera.
dont sleep
roryclear793de79fb319
diff --git a/clearcam.py b/clearcam.pyindex 94e870c..bf26e7b 100644--- a/clearcam.py+++ b/clearcam.py@@ -26,6 +26,7 @@ import structimport picklefrom urllib.parse import unquotefrom urllib.parse import quote+import platformdef preprocess(image, new_shape=1280, auto=True, scaleFill=False, scaleup=True, stride=32) -> Tensor:@@ -2338,6 +2339,10 @@ class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):super().server_close()if __name__ == "__main__":+ if platform.system() == 'Darwin': subprocess.Popen(['caffeinate', '-dimsu'])+ elif platform.system() == 'Windows': ctypes.windll.kernel32.SetThreadExecutionState(0x80000002 | 0x00000001)+ elif platform.system() == 'Linux': subprocess.Popen(['systemd-inhibit', '--why=Running script', '--mode=block', 'sleep', '999999'])+if os.path.exists("cams.pkl"):with open("cams.pkl", 'rb') as f:cams = pickle.load(f)