NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Quick fix (#12153)
Nicolas Mowenbfbacee7b513
diff --git a/frigate/review/maintainer.py b/frigate/review/maintainer.pyindex 5a54475b5b..28bc226102 100644--- a/frigate/review/maintainer.py+++ b/frigate/review/maintainer.py@@ -53,7 +53,7 @@ class PendingReviewSegment:severity: SeverityEnum,detections: dict[str, str],sub_labels: set[str],- zones: set[str],+ zones: list[str],audio: set[str],):rand_id = "".join(random.choices(string.ascii_lowercase + string.digits, k=6))@@ -137,7 +137,7 @@ class PendingReviewSegment:"detections": list(set(self.detections.keys())),"objects": list(set(self.detections.values())),"sub_labels": list(self.sub_labels),- "zones": list(self.zones),+ "zones": self.zones,"audio": list(self.audio),},}.copy()@@ -279,7 +279,9 @@ class ReviewSegmentMaintainer(threading.Thread):# keep zones up to dateif len(object["current_zones"]) > 0:- segment.zones.update(object["current_zones"])+ for zone in object["current_zones"]:+ if zone not in segment.zones:+ segment.zones.append(zone)if len(active_objects) > segment.frame_active_count:should_update = True@@ -329,7 +331,7 @@ class ReviewSegmentMaintainer(threading.Thread):if len(active_objects) > 0:detections: dict[str, str] = {}sub_labels = set()- zones: set = set()+ zones: list[str] = []severity = Nonefor object in active_objects:@@ -379,7 +381,9 @@ class ReviewSegmentMaintainer(threading.Thread):):severity = SeverityEnum.detection- zones.update(object["current_zones"])+ for zone in object["current_zones"]:+ if zone not in zones:+ zones.append(zone)if severity:self.active_review_segments[camera] = PendingReviewSegment(@@ -534,7 +538,7 @@ class ReviewSegmentMaintainer(threading.Thread):severity,{},set(),- set(),+ [],detections,)elif topic == DetectionTypeEnum.api:@@ -544,7 +548,7 @@ class ReviewSegmentMaintainer(threading.Thread):SeverityEnum.alert,{manual_info["event_id"]: manual_info["label"]},set(),- set(),+ [],set(),)diff --git a/web/src/components/player/HlsVideoPlayer.tsx b/web/src/components/player/HlsVideoPlayer.tsxindex cec8165af7..2086402cd3 100644--- a/web/src/components/player/HlsVideoPlayer.tsx+++ b/web/src/components/player/HlsVideoPlayer.tsx@@ -202,7 +202,7 @@ export default function HlsVideoPlayer({videoRef.current.currentTime = Math.max(0, currentTime + diff);}}onSetPlaybackRate={(rate) => {- setPlaybackRate(rate);+ setPlaybackRate(rate, true);if (videoRef.current) {videoRef.current.playbackRate = rate;