Skip to content

NVR with realtime local object detection for IP cameras

Catch case where detected object has a height of 0 (#7425)

Nicolas Mowen3921a7faa21f
diff --git a/frigate/video.py b/frigate/video.py
index 075e53a0c4..f2a49fee3d 100755
--- a/frigate/video.py
+++ b/frigate/video.py
@@ -593,7 +593,7 @@ def detect(
width = x_max - x_min
height = y_max - y_min
area = width * height
- ratio = width / height
+ ratio = width / max(1, height)
det = (
d[0],
d[1],