Review improvements (#11879)

* Update segment even when number of active objects is the same

* add score to frigate+ chip

* Add support for selecting zones

* Add api support for filtering on zones

* Adjust UI

* Update filtering logic

* Clean up
This commit is contained in:
Nicolas Mowen
2024-06-11 09:19:17 -05:00
committed by GitHub
parent b3eab17f2c
commit c9d253a320
11 changed files with 200 additions and 17 deletions

View File

@@ -242,6 +242,8 @@ class ReviewSegmentMaintainer(threading.Thread):
active_objects = get_active_objects(frame_time, camera_config, objects)
if len(active_objects) > 0:
should_update = False
if frame_time > segment.last_update:
segment.last_update = frame_time
@@ -270,12 +272,16 @@ class ReviewSegmentMaintainer(threading.Thread):
)
):
segment.severity = SeverityEnum.alert
should_update = True
# keep zones up to date
if len(object["current_zones"]) > 0:
segment.zones.update(object["current_zones"])
if len(active_objects) > segment.frame_active_count:
should_update = True
if should_update:
try:
frame_id = f"{camera_config.name}{frame_time}"
yuv_frame = self.frame_manager.get(