Set the min region size as the model size (#8486)

This commit is contained in:
Nicolas Mowen
2023-11-06 05:45:37 -07:00
committed by GitHub
parent 08777100b5
commit 2b2c831253
3 changed files with 12 additions and 4 deletions

View File

@@ -30,7 +30,9 @@ GRID_SIZE = 8
def get_camera_regions_grid(
name: str, detect: DetectConfig
name: str,
detect: DetectConfig,
min_region_size: int,
) -> list[list[dict[str, any]]]:
"""Build a grid of expected region sizes for a camera."""
# get grid from db if available
@@ -99,7 +101,7 @@ def get_camera_regions_grid(
box[1] * height,
(box[0] + box[2]) * width,
(box[1] + box[3]) * height,
320,
min_region_size,
1.35,
)
# save width of region to grid as relative