mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-07 11:21:11 +03:00
Miscellaneous fixes (#22780)
* fix mobile export crash by removing stale iOS non-modal drawer workaround * Remove titlecase to avoid Gemma4 handling plain labels as proper nouns * Improve titling: * Make directions more clear * Properly capitalize delivery services * update dispatcher config reference on save * subscribe to review topic so ReviewDescriptionProcessor knows genai is enabled * auto-send ON genai review WS message when enabled_in_config transitions to true * remove unused object level * update docs to clarify pre/post capture settings * add ui docs links * improve known_plates field in settings UI * only show save all when multiple sections are changed or if the section being changed is not currently being viewed * fix docs --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
co-authored by
Nicolas Mowen
parent
49c3732726
commit
dfe365cd28
@@ -694,6 +694,9 @@ def config_set(request: Request, body: AppConfigSetBody):
|
||||
if request.app.stats_emitter is not None:
|
||||
request.app.stats_emitter.config = config
|
||||
|
||||
if request.app.dispatcher is not None:
|
||||
request.app.dispatcher.config = config
|
||||
|
||||
if body.update_topic:
|
||||
if body.update_topic.startswith("config/cameras/"):
|
||||
_, _, camera, field = body.update_topic.split("/")
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
@@ -556,10 +561,11 @@ def run_analysis(
|
||||
if "-verified" in label:
|
||||
continue
|
||||
elif label in labelmap_objects:
|
||||
object_type = titlecase(label.replace("_", " "))
|
||||
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)
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ class EmbeddingMaintainer(threading.Thread):
|
||||
CameraConfigUpdateEnum.add,
|
||||
CameraConfigUpdateEnum.remove,
|
||||
CameraConfigUpdateEnum.object_genai,
|
||||
CameraConfigUpdateEnum.review,
|
||||
CameraConfigUpdateEnum.review_genai,
|
||||
CameraConfigUpdateEnum.semantic_search,
|
||||
],
|
||||
|
||||
@@ -106,8 +106,8 @@ When forming your description:
|
||||
## Response Field Guidelines
|
||||
|
||||
Respond with a JSON object matching the provided schema. Field-specific guidance:
|
||||
- `scene`: Describe how the sequence begins, then the progression of events — all significant movements and actions in order. For example, if a vehicle arrives and then a person exits, describe both sequentially. Always use subject names from "Objects in Scene" — do not replace named subjects with generic terms like "a person" or "the individual". Your description should align with and support the threat level you assign.
|
||||
- `title`: Characterize **what took place and where** — interpret the overall purpose or outcome, do not simply compress the scene description into fewer words. Include the relevant location (zone, area, or entry point). Always include subject names from "Objects in Scene" — do not replace named subjects with generic terms. No editorial qualifiers like "routine" or "suspicious."
|
||||
- `scene`: Describe how the sequence begins, then the progression of events — all significant movements and actions in order. For example, if a vehicle arrives and then a person exits, describe both sequentially. For named subjects (those with a `←` separator in "Objects in Scene"), always use their name — do not replace them with generic terms. For unnamed objects (e.g., "person", "car"), refer to them naturally with articles (e.g., "a person", "the car"). Your description should align with and support the threat level you assign.
|
||||
- `title`: Characterize **what took place and where** — interpret the overall purpose or outcome, do not simply compress the scene description into fewer words. Include the relevant location (zone, area, or entry point). For named subjects, always use their name. For unnamed objects, refer to them naturally with articles. No editorial qualifiers like "routine" or "suspicious."
|
||||
- `potential_threat_level`: Must be consistent with your scene description and the activity patterns above.
|
||||
{get_concern_prompt()}
|
||||
|
||||
@@ -190,6 +190,7 @@ Each line represents a detection state, not necessarily unique individuals. The
|
||||
if any("←" in obj for obj in review_data["unified_objects"]):
|
||||
metadata.potential_threat_level = 0
|
||||
|
||||
metadata.title = metadata.title[0].upper() + metadata.title[1:]
|
||||
metadata.time = review_data["start"]
|
||||
return metadata
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user