fix(vision): dernier seuil distance hardcodé (150px→500px) + nettoyage commentaires
Some checks failed
security-audit / Bandit (scan statique) (push) Successful in 11s
security-audit / pip-audit (CVE dépendances) (push) Successful in 10s
security-audit / Scan secrets (grep) (push) Successful in 8s
tests / Lint (ruff + black) (push) Successful in 14s
tests / Tests unitaires (sans GPU) (push) Failing after 15s
tests / Tests sécurité (critique) (push) Has been skipped
Some checks failed
security-audit / Bandit (scan statique) (push) Successful in 11s
security-audit / pip-audit (CVE dépendances) (push) Successful in 10s
security-audit / Scan secrets (grep) (push) Successful in 8s
tests / Lint (ruff + black) (push) Successful in 14s
tests / Tests unitaires (sans GPU) (push) Failing after 15s
tests / Tests sécurité (critique) (push) Has been skipped
MAX_TEMPLATE_DISTANCE dans zoned_template_match était encore à 150px. Tous les seuils de distance sont maintenant alignés à 500px : - MAX_DISTANCE_PX (CLIP) : 500 - MAX_GLOBAL_DISTANCE (template global) : 500 - MAX_SEECLICK_DISTANCE : 500 - MAX_TEMPLATE_DISTANCE (template zonée) : 500 Commentaires périmés corrigés (plus de références aux anciennes valeurs). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -219,9 +219,9 @@ class IntelligentExecutor:
|
||||
Combine le score sémantique avec la proximité à la position originale.
|
||||
|
||||
SEUILS STRICTS pour éviter les faux positifs:
|
||||
- MAX_DISTANCE_PX: Distance maximale absolue (80px)
|
||||
- MIN_CLIP_SCORE: Score CLIP minimum (0.65)
|
||||
- MIN_COMBINED_SCORE: Score combiné minimum (0.6)
|
||||
- MAX_DISTANCE_PX: Distance maximale absolue (500px)
|
||||
- MIN_CLIP_SCORE: Score CLIP minimum (0.50)
|
||||
- MIN_COMBINED_SCORE: Score combiné minimum (0.45)
|
||||
"""
|
||||
# === SEUILS ÉQUILIBRÉS ===
|
||||
# VWB workflows manuels : l'ancre peut être loin de la position d'origine
|
||||
@@ -615,7 +615,7 @@ def zoned_template_match(
|
||||
|
||||
# === VÉRIFICATION DISTANCE MAXIMALE ===
|
||||
# Rejeter tout match trop loin de la position originale
|
||||
MAX_TEMPLATE_DISTANCE = 150 # Limite absolue en pixels
|
||||
MAX_TEMPLATE_DISTANCE = 500
|
||||
final_distance = math.sqrt((center_x - orig_center_x)**2 + (center_y - orig_center_y)**2)
|
||||
|
||||
if final_distance > MAX_TEMPLATE_DISTANCE:
|
||||
@@ -704,8 +704,7 @@ def find_and_click(
|
||||
method='clip'
|
||||
)
|
||||
|
||||
# clip_result.found est déjà conditionné par MIN_COMBINED_SCORE (0.6)
|
||||
# et les seuils stricts (MAX_DISTANCE_PX=80, MIN_CLIP_SCORE=0.65)
|
||||
# clip_result.found est conditionné par les seuils dans find_anchor_in_screen
|
||||
if clip_result.found:
|
||||
print(f"✅ [Vision] UI-DETR-1+CLIP réussi! Confiance: {clip_result.confidence:.2f}")
|
||||
return {
|
||||
@@ -717,8 +716,7 @@ def find_and_click(
|
||||
'search_time_ms': (_time.time() - start_time) * 1000
|
||||
}
|
||||
else:
|
||||
# Seuils stricts: MAX_DISTANCE=80px, MIN_CLIP=0.65, MIN_COMBINED=0.6
|
||||
print(f"⚠️ [Vision] UI-DETR-1+CLIP: rejeté (confiance: {clip_result.confidence:.2f} < 0.6 ou distance > 80px)")
|
||||
print(f"⚠️ [Vision] UI-DETR-1+CLIP: rejeté (confiance: {clip_result.confidence:.2f})")
|
||||
except Exception as clip_err:
|
||||
print(f"⚠️ [Vision] Erreur UI-DETR-1+CLIP: {clip_err}")
|
||||
import traceback
|
||||
|
||||
Reference in New Issue
Block a user