diff --git a/frigate/const.py b/frigate/const.py index 6b1e227d5..51e06e4ad 100644 --- a/frigate/const.py +++ b/frigate/const.py @@ -44,6 +44,22 @@ DEFAULT_ATTRIBUTE_LABEL_MAP = { ], "motorcycle": ["license_plate"], } +ATTRIBUTE_LABEL_DISPLAY_MAP = { + "amazon": "Amazon", + "an_post": "An Post", + "canada_post": "Canada Post", + "dhl": "DHL", + "dpd": "DPD", + "fedex": "FedEx", + "gls": "GLS", + "nzpost": "NZ Post", + "postnl": "PostNL", + "postnord": "PostNord", + "purolator": "Purolator", + "royal_mail": "Royal Mail", + "ups": "UPS", + "usps": "USPS", +} LABEL_CONSOLIDATION_MAP = { "car": 0.8, "face": 0.5, diff --git a/frigate/data_processing/post/review_descriptions.py b/frigate/data_processing/post/review_descriptions.py index aebf1d6a5..536b57f3c 100644 --- a/frigate/data_processing/post/review_descriptions.py +++ b/frigate/data_processing/post/review_descriptions.py @@ -19,7 +19,12 @@ from frigate.comms.inter_process import InterProcessRequestor from frigate.config import FrigateConfig from frigate.config.camera import CameraConfig from frigate.config.camera.review import GenAIReviewConfig, ImageSourceEnum -from frigate.const import CACHE_DIR, CLIPS_DIR, UPDATE_REVIEW_DESCRIPTION +from frigate.const import ( + ATTRIBUTE_LABEL_DISPLAY_MAP, + CACHE_DIR, + CLIPS_DIR, + UPDATE_REVIEW_DESCRIPTION, +) from frigate.data_processing.types import PostProcessDataEnum from frigate.genai import GenAIClient from frigate.genai.manager import GenAIClientManager @@ -559,7 +564,8 @@ def run_analysis( object_type = label.replace("_", " ") if label in attribute_labels: - unified_objects.append(f"{object_type} (delivery/service)") + display_name = ATTRIBUTE_LABEL_DISPLAY_MAP.get(label, object_type) + unified_objects.append(f"{display_name} (delivery/service)") else: unified_objects.append(object_type)