Skip to content

Commit

Permalink
Simplify half calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 authored Jul 5, 2023
1 parent 693e152 commit 50247d7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions frigate/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 50247d7

Please sign in to comment.