NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Prevent division by zero in lpr confidence checks (#14615)
Josh Hawkinsdbbfc735f000
diff --git a/frigate/embeddings/maintainer.py b/frigate/embeddings/maintainer.pyindex c3b64ac928..a10357fc3a 100644--- a/frigate/embeddings/maintainer.py+++ b/frigate/embeddings/maintainer.py@@ -631,14 +631,20 @@ class EmbeddingMaintainer(threading.Thread):returntop_plate, top_char_confidences = license_plates[0], confidences[0]- avg_confidence = sum(top_char_confidences) / len(top_char_confidences)+ avg_confidence = (+ (sum(top_char_confidences) / len(top_char_confidences))+ if top_char_confidences+ else 0+ )# Check if we have a previously detected plate for this IDif id in self.detected_license_plates:prev_plate = self.detected_license_plates[id]["plate"]prev_char_confidences = self.detected_license_plates[id]["char_confidences"]- prev_avg_confidence = sum(prev_char_confidences) / len(- prev_char_confidences+ prev_avg_confidence = (+ (sum(prev_char_confidences) / len(prev_char_confidences))+ if prev_char_confidences+ else 0)# Define conditions for keeping the previous plate