From 50247d758ffd791ed870e06cd38ad4b9fdb1d5b2 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 5 Jul 2023 14:24:21 -0600 Subject: [PATCH] Simplify half calculation --- frigate/video.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frigate/video.py b/frigate/video.py index 2b2efc5b9..2ba82a577 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -102,11 +102,7 @@ def get_min_region_size(model_config: ModelConfig) -> int: if half % 4 == 0: return half - while True: - half += 1 - - if half % 4 == 0: - return half + return int((half + 3) / 4) * 4 def create_tensor_input(frame, model_config: ModelConfig, region):