diff --git a/frigate/genai/ollama.py b/frigate/genai/ollama.py index 5e51de085..4649e83c5 100644 --- a/frigate/genai/ollama.py +++ b/frigate/genai/ollama.py @@ -20,8 +20,8 @@ class OllamaClient(GenAIClient): LOCAL_OPTIMIZED_OPTIONS = { "options": { "temperature": 0.5, - "repeat_penalty": 1.15, - "presence_penalty": 0.1, + "repeat_penalty": 1.05, + "presence_penalty": 0.3, }, } diff --git a/web/src/components/card/ClassificationCard.tsx b/web/src/components/card/ClassificationCard.tsx index 15404db1b..21f498fe4 100644 --- a/web/src/components/card/ClassificationCard.tsx +++ b/web/src/components/card/ClassificationCard.tsx @@ -214,7 +214,9 @@ export function GroupedClassificationCard({ }); if (!best) { - return group.at(-1); + // select an item from the middle of the time series as this usually correlates + // to a more representative image than the first or last + return group.at(Math.floor(group.length / 2)); } const bestTyped: ClassificationItemData = best;