Skip to content

NVR with realtime local object detection for IP cameras

Fix region when no data in grid (#8415)

Nicolas Mowen8b6e3a0d3751
diff --git a/frigate/util/object.py b/frigate/util/object.py
index 69d2c6b321..9605e8ab4c 100644
--- a/frigate/util/object.py
+++ b/frigate/util/object.py
@@ -174,9 +174,9 @@ def get_region_from_grid(
cell = region_grid[grid_x][grid_y]
- # if there is no known data, get standard region for motion box
+ # if there is no known data, use original region calculation
if not cell or not cell["sizes"]:
- return calculate_region(frame_shape, box[0], box[1], box[2], box[3], min_region)
+ return box
# convert the calculated region size to relative
calc_size = (box[2] - box[0]) / frame_shape[1]