Generative AI Custom Prompts #19649
Replies: 3 comments 4 replies
|
Based on the documentation, Frigate's generative AI supports variable replacements in prompts including You can create custom prompts using these variables. Here's the configuration format from the documentation: genai:
enabled: True
provider: ollama
base_url: http://localhost:11434
model: llava
prompt: "Analyze the {label} in these images from the {camera} security camera. Focus on the actions, behavior, and potential intent of the {label}, rather than just describing its appearance."
object_prompts:
person: "Examine the main person in these images. What are they doing and what might their actions suggest about their intent (e.g., approaching a door, leaving an area, standing still)? Do not describe the surroundings or static details."
car: "Observe the primary vehicle in these images. Focus on its movement, direction, or purpose (e.g., parking, approaching, circling). If it's a delivery vehicle, mention the company."For your specific use case with license plates, you could customize the car prompt to use the The prompt system works by using object-specific prompts when available, or falling back to the default prompt (3). If you have a specific prompt defined for an object type, that prompt is used without combining it with the default prompt (3). For camera-level customization, you can also override prompts at the individual camera level (1): cameras:
front_door:
genai:
use_snapshot: True
prompt: "Analyze the {label} in these images from the {camera} security camera at the front door. Focus on the actions and potential intent of the {label}."
object_prompts:
person: "Examine the person in these images. What are they doing, and how might their actions suggest their purpose (e.g., delivering something, approaching, leaving)? If they are carrying or interacting with a package, include details about its source or destination."The documentation suggests experimenting with prompts using your AI provider's chat interface and downloading thumbnails from Frigate to test different prompt variations before updating your configuration (1). 📚 Sources: Have another question? Just tag @inkeep. |
|
Many Thanks! I will give this a try and see how it goes.
|
|
Reading the logs i have |
Uh oh!
There was an error while loading. Please reload this page.
I have managed to get generative AI working but am trying to get more personalized replies.
For the detection of a car what I would like is, if the license plate is recognized a reply would have the details of the car.
eg. "Dads car is seen parking in the driveway or a particular zone of a particular camera"
I understand we can use variable replacements but what would they be for this. I would not wish to have a reply like "A car, license plate number, dads car" But just "Dads car" with a description of the scene.
With all that said a new discussion category would be nice where people could share the custom prompts they have created helping others fine tune there own configs.
All reactions