From 75c5718c067f72945c5ebee03e30eebf5053cb26 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 21 Sep 2022 07:47:20 -0600 Subject: [PATCH] Ignore source of error The error is occurring due to a detections bounding box starting beyond the frame, this should be immediately ignored --- frigate/video.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frigate/video.py b/frigate/video.py index 4b0fb3342..bd813f16f 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -459,14 +459,14 @@ def detect( y_min = int(max(0, (box[0] * size) + region[1])) x_max = int(min(detect_config.width - 1, (box[3] * size) + region[0])) y_max = int(min(detect_config.height - 1, (box[2] * size) + region[1])) + + # ignore objects that were detected outside the frame + if y_min >= detect_config.height - 1: + continue + 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],