From 664889d4879a7caca39d78a447e7aa44e03a38f8 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 11 Apr 2025 07:48:16 -0500 Subject: [PATCH] Small tweaks (#17651) * clarify lpr * add license plate icon and correctly format string --- docs/docs/configuration/license_plate_recognition.md | 10 ++++++---- frigate/data_processing/common/license_plate/mixin.py | 2 +- .../components/overlay/detail/ReviewDetailDialog.tsx | 5 +++-- web/src/utils/iconUtil.tsx | 2 ++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/docs/configuration/license_plate_recognition.md b/docs/docs/configuration/license_plate_recognition.md index 87c2978ae..4e3a53553 100644 --- a/docs/docs/configuration/license_plate_recognition.md +++ b/docs/docs/configuration/license_plate_recognition.md @@ -56,7 +56,7 @@ Like the other real-time processors in Frigate, license plate recognition runs o ## Advanced Configuration -Fine-tune the LPR feature using these optional parameters: +Fine-tune the LPR feature using these optional parameters at the global level of your config. The only optional parameters that should be set at the camera level are `enabled`, `min_area`, and `enhancement`. ### Detection @@ -158,13 +158,15 @@ cameras: Dedicated LPR cameras are single-purpose cameras with powerful optical zoom to capture license plates on distant vehicles, often with fine-tuned settings to capture plates at night. -Users can configure Frigate's LPR in two different ways depending on whether they are using a Frigate+ model: +To mark a camera as a dedicated LPR camera, add `type: "lpr"` the camera configuration. -### Using a Frigate+ Model +Users can configure Frigate's dedicated LPR mode in two different ways depending on whether a Frigate+ (or native `license_plate` detecting) model is used: + +### Using a Frigate+ (or Native `license_plate` Detecting) Model Users running a Frigate+ model (or any model that natively detects `license_plate`) can take advantage of `license_plate` detection. This allows license plates to be treated as standard objects in dedicated LPR mode, meaning that alerts, detections, snapshots, zones, and other Frigate features work as usual, and plates are detected efficiently through your configured object detector. -An example configuration for a dedicated LPR camera using a Frigate+ model: +An example configuration for a dedicated LPR camera using a `license_plate`-detecting model: ```yaml # LPR global configuration diff --git a/frigate/data_processing/common/license_plate/mixin.py b/frigate/data_processing/common/license_plate/mixin.py index 76229a077..8d514b197 100644 --- a/frigate/data_processing/common/license_plate/mixin.py +++ b/frigate/data_processing/common/license_plate/mixin.py @@ -1336,7 +1336,7 @@ class LicensePlateProcessingMixin: # Check against minimum confidence threshold if avg_confidence < self.lpr_config.recognition_threshold: logger.debug( - f"{camera}: Average confidence {avg_confidence} is less than threshold ({self.lpr_config.recognition_threshold})" + f"{camera}: Average character confidence {avg_confidence} is less than recognition_threshold ({self.lpr_config.recognition_threshold})" ) return diff --git a/web/src/components/overlay/detail/ReviewDetailDialog.tsx b/web/src/components/overlay/detail/ReviewDetailDialog.tsx index 1f7f7d3e3..ab2bc6a8e 100644 --- a/web/src/components/overlay/detail/ReviewDetailDialog.tsx +++ b/web/src/components/overlay/detail/ReviewDetailDialog.tsx @@ -260,8 +260,9 @@ export default function ReviewDetailDialog({ event.label, "size-3 text-primary", )} - {event.sub_label ?? event.label} ( - {Math.round(event.data.top_score * 100)}%) + {event.sub_label ?? + event.label.replaceAll("_", " ")}{" "} + ({Math.round(event.data.top_score * 100)}%)
; case "horse": return ; + case "license_plate": + return ; case "motorcycle": return ; case "mouse":