From 64b3d77073292be79dae53defcbf4a58f5be4f80 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 13 May 2025 05:26:49 +0200 Subject: [PATCH] Fix typing for various frame_shape members Frame shapes are most likely defined by height and width, so a single int cannot express that. --- frigate/util/object.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frigate/util/object.py b/frigate/util/object.py index 8e7744036..d9a8c2f71 100644 --- a/frigate/util/object.py +++ b/frigate/util/object.py @@ -164,7 +164,7 @@ def get_cluster_region_from_grid(frame_shape, min_region, cluster, boxes, region def get_region_from_grid( - frame_shape: tuple[int], + frame_shape: tuple[int, int], cluster: list[int], min_region: int, region_grid: list[list[dict[str, Any]]], @@ -447,7 +447,7 @@ def get_cluster_region(frame_shape, min_region, cluster, boxes): def get_startup_regions( - frame_shape: tuple[int], + frame_shape: tuple[int, int], region_min_size: int, region_grid: list[list[dict[str, Any]]], ) -> list[list[int]]: @@ -481,7 +481,7 @@ def get_startup_regions( def reduce_detections( - frame_shape: tuple[int], + frame_shape: tuple[int, int], all_detections: list[tuple[Any]], ) -> list[tuple[Any]]: """Take a list of detections and reduce overlaps to create a list of confident detections."""