mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-27 18:48:22 +03:00
Print out mask file read failure
Added print statement when mask file could not be read.
This commit is contained in:
parent
53ccc903da
commit
9e0601c090
@ -190,6 +190,8 @@ def track_camera(name, config, global_objects_config, frame_queue, frame_shape,
|
|||||||
# load in the mask for object detection
|
# load in the mask for object detection
|
||||||
if 'mask' in config:
|
if 'mask' in config:
|
||||||
mask = cv2.imread("/config/{}".format(config['mask']), cv2.IMREAD_GRAYSCALE)
|
mask = cv2.imread("/config/{}".format(config['mask']), cv2.IMREAD_GRAYSCALE)
|
||||||
|
if img.size == 0:
|
||||||
|
print(f"Failed to read mask file")
|
||||||
else:
|
else:
|
||||||
mask = None
|
mask = None
|
||||||
|
|
||||||
@ -370,4 +372,4 @@ def track_camera(name, config, global_objects_config, frame_queue, frame_shape,
|
|||||||
# add to the queue
|
# add to the queue
|
||||||
detected_objects_queue.put((name, frame_time, object_tracker.tracked_objects))
|
detected_objects_queue.put((name, frame_time, object_tracker.tracked_objects))
|
||||||
|
|
||||||
print(f"{name}: exiting subprocess")
|
print(f"{name}: exiting subprocess")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user