NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Reset saved search stats on reindex (#14280)
Josh Hawkins2897afce4110
diff --git a/frigate/embeddings/embeddings.py b/frigate/embeddings/embeddings.pyindex 5fe0566f24..85c65b33e7 100644--- a/frigate/embeddings/embeddings.py+++ b/frigate/embeddings/embeddings.py@@ -3,6 +3,7 @@import base64import ioimport logging+import osimport timefrom PIL import Image@@ -10,7 +11,11 @@ from playhouse.shortcuts import model_to_dictfrom frigate.comms.inter_process import InterProcessRequestorfrom frigate.config.semantic_search import SemanticSearchConfig-from frigate.const import UPDATE_EMBEDDINGS_REINDEX_PROGRESS, UPDATE_MODEL_STATE+from frigate.const import (+ CONFIG_DIR,+ UPDATE_EMBEDDINGS_REINDEX_PROGRESS,+ UPDATE_MODEL_STATE,+)from frigate.db.sqlitevecq import SqliteVecQueueDatabasefrom frigate.models import Eventfrom frigate.types import ModelStatusTypesEnum@@ -160,6 +165,10 @@ class Embeddings:self.db.create_embeddings_tables()logger.debug("Created embeddings tables.")+ # Delete the saved stats file+ if os.path.exists(os.path.join(CONFIG_DIR, ".search_stats.json")):+ os.remove(os.path.join(CONFIG_DIR, ".search_stats.json"))+st = time.time()totals = {"thumbnails": 0,