feat: eye filter flag + QA fixes (Gemma4 prompt, YOLO boundary, PaliGemma score, GDINO skip)

This commit is contained in:
Accusys
2026-05-14 12:24:25 +08:00
parent f60a59b280
commit 39888ce3cc
5 changed files with 37 additions and 16 deletions

View File

@@ -32,9 +32,20 @@ def score(frames, prompt):
descriptions.append(desc)
combined = " | ".join(descriptions)
# Simple text-to-score: check if description mentions key terms from prompt
prompt_lower = prompt.lower()
desc_lower = combined.lower()
score = 50 # default
# Boost if prompt elements found in description
for word in prompt_lower.split():
if len(word) > 3 and word in desc_lower:
score += 10
score = min(100, score)
return {
"agent": "PaliGemma",
"score": None, # raw text, scored later by Gemma4
"score": score,
"reasoning": combined,
"details": {"descriptions": descriptions}
}