Skip to content

NVR with realtime local object detection for IP cameras

Fixes (#14480)

Nicolas Mowen560dc68120aa
diff --git a/frigate/object_processing.py b/frigate/object_processing.py
index 7ba3270f1e..fab7bbc6ca 100644
--- a/frigate/object_processing.py
+++ b/frigate/object_processing.py
@@ -344,6 +344,7 @@ class CameraState:
# if the object's thumbnail is not from the current frame, skip
if (
current_frame is None
+ or obj.thumbnail_data is None
or obj.false_positive
or obj.thumbnail_data["frame_time"] != frame_time
):
diff --git a/frigate/util/services.py b/frigate/util/services.py
index 925ca6be84..3f8ecf32c8 100644
--- a/frigate/util/services.py
+++ b/frigate/util/services.py
@@ -279,7 +279,11 @@ def get_intel_gpu_stats() -> dict[str, str]:
logger.error(f"Unable to poll intel GPU stats: {p.stderr}")
return None
else:
- data = json.loads(f'[{"".join(p.stdout.split())}]')
+ try:
+ data = json.loads(f'[{"".join(p.stdout.split())}]')
+ except json.JSONDecodeError:
+ return {"gpu": "-%", "mem": "-%"}
+
results: dict[str, str] = {}
render = {"global": []}
video = {"global": []}
@@ -328,7 +332,7 @@ def get_intel_gpu_stats() -> dict[str, str]:
results["clients"] = {}
for key in render.keys():
- if key == "global":
+ if key == "global" or not render[key] or not video[key]:
continue
results["clients"][key] = (