NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Db fixes (#14364)
Nicolas Mowen0eccb6a61023
diff --git a/frigate/api/auth.py b/frigate/api/auth.pyindex 5276eb71eb..8976469f5f 100644--- a/frigate/api/auth.py+++ b/frigate/api/auth.py@@ -357,6 +357,7 @@ def create_user(request: Request, body: AppPostUsersBody):{User.username: body.username,User.password_hash: password_hash,+ User.notification_tokens: [],}).execute()return JSONResponse(content={"username": body.username})diff --git a/frigate/embeddings/embeddings.py b/frigate/embeddings/embeddings.pyindex cb0626f7b2..e4937f9555 100644--- a/frigate/embeddings/embeddings.py+++ b/frigate/embeddings/embeddings.py@@ -6,6 +6,7 @@ import loggingimport osimport time+import onnxruntime as ortfrom numpy import ndarrayfrom PIL import Imagefrom playhouse.shortcuts import model_to_dict@@ -174,7 +175,16 @@ class Embeddings:return embeddingdef batch_upsert_description(self, event_descriptions: dict[str, str]) -> ndarray:- embeddings = self.text_embedding(list(event_descriptions.values()))+ descs = list(event_descriptions.values())++ try:+ embeddings = self.text_embedding(descs)+ except ort.RuntimeException:+ half_size = len(descs) / 2+ embeddings = []+ embeddings.extend(self.text_embedding(descs[0:half_size]))+ embeddings.extend(self.text_embedding(descs[half_size:]))+ids = list(event_descriptions.keys())items = []