From cbf26e09a4a64bf67e26b664fa9a0487e5c5aed5 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Mon, 21 Feb 2022 06:32:17 -0600 Subject: [PATCH] fix for opencv changes --- frigate/video.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frigate/video.py b/frigate/video.py index 26b99176f..e38f206aa 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -623,7 +623,8 @@ def process_frames( idxs = cv2.dnn.NMSBoxes(boxes, confidences, 0.5, 0.4) for index in idxs: - obj = group[index[0]] + index = index if isinstance(index, np.int32) else index[0] + obj = group[index] if clipped(obj, frame_shape): box = obj[2] # calculate a new region that will hopefully get the entire object