From aea4dc87240241d3ff26218c64e9d3cf0c6596cd Mon Sep 17 00:00:00 2001 From: blakeblackshear Date: Sat, 13 Jul 2019 11:31:18 -0500 Subject: [PATCH] a few fixes --- frigate/video.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frigate/video.py b/frigate/video.py index 79271762e..91963d564 100644 --- a/frigate/video.py +++ b/frigate/video.py @@ -206,6 +206,8 @@ class Camera: # load in the mask for person detection if 'mask' in self.config: self.mask = cv2.imread("/config/{}".format(self.config['mask']), cv2.IMREAD_GRAYSCALE) + else: + self.mask = None if self.mask is None: self.mask = np.zeros((self.frame_shape[0], self.frame_shape[1], 1), np.uint8) @@ -264,7 +266,7 @@ class Camera: # if the min person area is larger than the # detected person, don't add it to detected objects - if region and region['min_person_area'] > obj['area']: + if region and 'min_person_area' in region and region['min_person_area'] > obj['area']: continue # compute the coordinates of the person and make sure