From 45bda4ae47f9028fca3f48ea7cf650cf078b7677 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 21 Sep 2022 07:29:01 -0600 Subject: [PATCH] Catch case of zero division --- frigate/video.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frigate/video.py b/frigate/video.py index 05246e788..ed466026c 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -462,6 +462,11 @@ def detect( width = x_max - x_min height = y_max - y_min area = width * height + + # ignore objects that were detected outside the frame + if height == 0: + continue + ratio = width / height det = ( d[0],