diff --git a/frigate/data_processing/common/license_plate/mixin.py b/frigate/data_processing/common/license_plate/mixin.py index c67f11956..e471aa304 100644 --- a/frigate/data_processing/common/license_plate/mixin.py +++ b/frigate/data_processing/common/license_plate/mixin.py @@ -1221,10 +1221,7 @@ class LicensePlateProcessingMixin: license_plate_area = (license_plate[2] - license_plate[0]) * ( license_plate[3] - license_plate[1] ) - if ( - license_plate_area - < self.config.cameras[obj_data["camera"]].lpr.min_area - ): + if license_plate_area < self.config.cameras[camera].lpr.min_area: logger.debug(f"{camera}: License plate area below minimum threshold.") return @@ -1318,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 @@ -1365,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