mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-22 05:23:01 +03:00
LPR improvements (#17716)
* add support for multi-line plates * config for model size * default to small model * add license plate as attribute to motorcycle * use model size * docs * attribute map * i18n key fix
This commit is contained in:
@@ -109,7 +109,9 @@ class EmbeddingMaintainer(threading.Thread):
|
||||
# model runners to share between realtime and post processors
|
||||
if self.config.lpr.enabled:
|
||||
lpr_model_runner = LicensePlateModelRunner(
|
||||
self.requestor, device=self.config.lpr.device
|
||||
self.requestor,
|
||||
device=self.config.lpr.device,
|
||||
model_size=self.config.lpr.model_size,
|
||||
)
|
||||
|
||||
# realtime processors
|
||||
|
||||
@@ -31,11 +31,14 @@ class PaddleOCRDetection(BaseEmbedding):
|
||||
requestor: InterProcessRequestor,
|
||||
device: str = "AUTO",
|
||||
):
|
||||
model_file = (
|
||||
"detection-large.onnx" if model_size == "large" else "detection-small.onnx"
|
||||
)
|
||||
super().__init__(
|
||||
model_name="paddleocr-onnx",
|
||||
model_file="detection.onnx",
|
||||
model_file=model_file,
|
||||
download_urls={
|
||||
"detection.onnx": "https://github.com/hawkeye217/paddleocr-onnx/raw/refs/heads/master/models/detection.onnx"
|
||||
model_file: f"https://github.com/hawkeye217/paddleocr-onnx/raw/refs/heads/master/models/{model_file}"
|
||||
},
|
||||
)
|
||||
self.requestor = requestor
|
||||
|
||||
Reference in New Issue
Block a user