mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-27 17:17:40 +03:00
Adjust prompt
This commit is contained in:
parent
9a667f18ba
commit
8cf292a9c2
@ -95,6 +95,7 @@ class ReviewDescriptionProcessor(PostProcessorApi):
|
||||
"objects": final_data["data"]["objects"],
|
||||
"recognized_objects": final_data["data"]["sub_labels"],
|
||||
"zones": final_data["data"]["zones"],
|
||||
"timestamp": final_data["end_time"],
|
||||
},
|
||||
[r[1] for r in self.tracked_review_items[id]],
|
||||
)
|
||||
|
||||
@ -39,15 +39,16 @@ class GenAIClient:
|
||||
) -> None:
|
||||
"""Generate a description for the review item activity."""
|
||||
context_prompt = f"""
|
||||
Here is additional context about the scene from a security camera:
|
||||
The following objects were detected: {review_data['objects']}
|
||||
The following recognized objects were detected: {review_data['recognized_objects']}
|
||||
The activity happened in the following zones: {review_data['zones']}
|
||||
|
||||
Please analyze the image(s), which are in chronological order, strictly from the perspective of the {review_data["camera"].replace("_", " ")} security camera.
|
||||
Your task is to provide a **neutral, factual, and objective description** of the scene.
|
||||
Your task is to provide a **neutral, factual, and objective description** of the scene and the objects interacting with it.
|
||||
Focus solely on observable actions, visible entities, and the environment.
|
||||
|
||||
Here is some information we already know:
|
||||
- the following activity occurred at {review_data['timestamp'].strftime('%I:%M %p')}
|
||||
- the following objects were detected: {review_data['objects']}
|
||||
- the following recognized objects were detected: {review_data['recognized_objects']}
|
||||
- the activity happened in the following zones: {review_data['zones']}
|
||||
|
||||
Your response **MUST** be a flat JSON object with the following fields:
|
||||
- `scene` (string): A single, comprehensive description of the entire visual scene.
|
||||
- `action` (string): A single description of any key actions or movements.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user