forked from Rockachopa/Timmy-time-dashboard
Compare commits
1 Commits
main
...
kimi/issue
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6948f0454 |
@@ -455,6 +455,10 @@ class Settings(BaseSettings):
|
||||
# Background meditation interval in seconds (0 = disabled).
|
||||
scripture_meditation_interval: int = 0
|
||||
|
||||
# ── Perception Cache ───────────────────────────────────────────────
|
||||
# Minimum confidence threshold for template matching in perception cache.
|
||||
perception_confidence_threshold: float = 0.85
|
||||
|
||||
def _compute_repo_root(self) -> str:
|
||||
"""Auto-detect repo root if not set."""
|
||||
if self.repo_root:
|
||||
|
||||
@@ -8,6 +8,8 @@ from typing import Any
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
from config import settings
|
||||
|
||||
|
||||
@dataclass
|
||||
class Template:
|
||||
@@ -43,7 +45,7 @@ class PerceptionCache:
|
||||
best_match_confidence = max_val
|
||||
best_match_name = template.name
|
||||
|
||||
if best_match_confidence > 0.85: # TODO: Make this configurable per template
|
||||
if best_match_confidence > settings.perception_confidence_threshold:
|
||||
return CacheResult(
|
||||
confidence=best_match_confidence, state={"template_name": best_match_name}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user