mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-20 13:54:36 +01:00
Classification config changes (#17892)
* Only auto-populate some config fields down to the camera level - Don't populate LPR and face global-only settings down to the camera level - Ensure LPR mixin uses camera level min_area - Explicitly forbid extra config values for LPR and face * lpr docs tweak * remove extra text already in i18n key * consistency
This commit is contained in:
@@ -1221,7 +1221,7 @@ class LicensePlateProcessingMixin:
|
||||
license_plate_area = (license_plate[2] - license_plate[0]) * (
|
||||
license_plate[3] - license_plate[1]
|
||||
)
|
||||
if license_plate_area < self.lpr_config.min_area:
|
||||
if license_plate_area < self.config.cameras[camera].lpr.min_area:
|
||||
logger.debug(f"{camera}: License plate area below minimum threshold.")
|
||||
return
|
||||
|
||||
@@ -1315,10 +1315,7 @@ class LicensePlateProcessingMixin:
|
||||
|
||||
# check that license plate is valid
|
||||
# double the value because we've doubled the size of the car
|
||||
if (
|
||||
license_plate_area
|
||||
< self.config.cameras[obj_data["camera"]].lpr.min_area * 2
|
||||
):
|
||||
if license_plate_area < self.config.cameras[camera].lpr.min_area * 2:
|
||||
logger.debug(f"{camera}: License plate is less than min_area")
|
||||
return
|
||||
|
||||
@@ -1362,10 +1359,10 @@ class LicensePlateProcessingMixin:
|
||||
if (
|
||||
not license_plate_box
|
||||
or area(license_plate_box)
|
||||
< self.config.cameras[obj_data["camera"]].lpr.min_area
|
||||
< self.config.cameras[camera].lpr.min_area
|
||||
):
|
||||
logger.debug(
|
||||
f"{camera}: Area for license plate box {area(license_plate_box)} is less than min_area {self.config.cameras[obj_data['camera']].lpr.min_area}"
|
||||
f"{camera}: Area for license plate box {area(license_plate_box)} is less than min_area {self.config.cameras[camera].lpr.min_area}"
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user