mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-26 19:41:29 +08:00
Dedicated LPR fixes (#17325)
* docs fps recommendation * add detection_threshold to example * send uncoverted yuv frame * copy and convert * ensure thumbnail is encoded as webp * keep as jpeg
This commit is contained in:
@@ -133,8 +133,8 @@ Users with a dedicated LPR camera can run Frigate's LPR by specifying a camera t
|
|||||||
# LPR global configuration
|
# LPR global configuration
|
||||||
lpr:
|
lpr:
|
||||||
enabled: True
|
enabled: True
|
||||||
min_area: 2000
|
|
||||||
min_plate_length: 4
|
min_plate_length: 4
|
||||||
|
detection_threshold: 0.7 # change if necessary
|
||||||
|
|
||||||
# Dedicated LPR camera configuration
|
# Dedicated LPR camera configuration
|
||||||
cameras:
|
cameras:
|
||||||
@@ -146,7 +146,7 @@ cameras:
|
|||||||
ffmpeg: ...
|
ffmpeg: ...
|
||||||
detect:
|
detect:
|
||||||
enabled: False # optional, disable Frigate's standard object detection pipeline
|
enabled: False # optional, disable Frigate's standard object detection pipeline
|
||||||
fps: 5
|
fps: 5 # keep this at 5, higher values are unnecessary for dedicated LPR mode and could overwhelm the detector
|
||||||
width: 1920
|
width: 1920
|
||||||
height: 1080
|
height: 1080
|
||||||
motion:
|
motion:
|
||||||
|
@@ -1279,10 +1279,9 @@ class LicensePlateProcessingMixin:
|
|||||||
# save the best snapshot
|
# save the best snapshot
|
||||||
logger.debug(f"Writing snapshot for {id}, {top_plate}, {current_time}")
|
logger.debug(f"Writing snapshot for {id}, {top_plate}, {current_time}")
|
||||||
frame_bgr = cv2.cvtColor(frame, cv2.COLOR_YUV2BGR_I420)
|
frame_bgr = cv2.cvtColor(frame, cv2.COLOR_YUV2BGR_I420)
|
||||||
_, buffer = cv2.imencode(".jpg", frame_bgr)
|
|
||||||
self.sub_label_publisher.publish(
|
self.sub_label_publisher.publish(
|
||||||
EventMetadataTypeEnum.save_lpr_snapshot,
|
EventMetadataTypeEnum.save_lpr_snapshot,
|
||||||
(base64.b64encode(buffer).decode("ASCII"), id, camera),
|
(base64.b64encode(frame_bgr).decode("ASCII"), id, camera),
|
||||||
)
|
)
|
||||||
|
|
||||||
self.detected_license_plates[id] = {
|
self.detected_license_plates[id] = {
|
||||||
|
Reference in New Issue
Block a user