mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-20 13:54:36 +01:00
Add face and lpr to tracked object update topic (#17940)
* Send tracked object updates for face and license_plate objects * Update docs * Add to type enum * Add camera to object description update * Formatting * Consolidate yue-Hant * Add missing
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import base64
|
||||
import datetime
|
||||
import json
|
||||
import logging
|
||||
import math
|
||||
import os
|
||||
@@ -23,6 +24,7 @@ from frigate.comms.event_metadata_updater import (
|
||||
)
|
||||
from frigate.const import CLIPS_DIR
|
||||
from frigate.embeddings.onnx.lpr_embedding import LPR_EMBEDDING_SIZE
|
||||
from frigate.types import TrackedObjectUpdateTypesEnum
|
||||
from frigate.util.builtin import EventsPerSecond
|
||||
from frigate.util.image import area
|
||||
|
||||
@@ -1510,6 +1512,20 @@ class LicensePlateProcessingMixin:
|
||||
)
|
||||
|
||||
# always publish to recognized_license_plate field
|
||||
self.requestor.send_data(
|
||||
"tracked_object_update",
|
||||
json.dumps(
|
||||
{
|
||||
"type": TrackedObjectUpdateTypesEnum.lpr,
|
||||
"name": sub_label,
|
||||
"plate": top_plate,
|
||||
"score": avg_confidence,
|
||||
"id": id,
|
||||
"camera": camera,
|
||||
"timestamp": start,
|
||||
}
|
||||
),
|
||||
)
|
||||
self.sub_label_publisher.publish(
|
||||
EventMetadataTypeEnum.recognized_license_plate,
|
||||
(id, top_plate, avg_confidence),
|
||||
|
||||
Reference in New Issue
Block a user