From 68d5bb7dd12e9c9aa572c439d3fd702a613ee8cd Mon Sep 17 00:00:00 2001 From: Dom Date: Tue, 31 Mar 2026 15:38:38 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20som=5Fanchor=5Fmatch=20d=C3=A9clench?= =?UTF-8?q?=C3=A9=20quand=20by=5Ftext=20vide=20(ic=C3=B4nes=20sans=20texte?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La condition vérifiait anchor_label (du SomEngine) au lieu de by_text. Pour les icônes (disquette, loupe), by_text est vide même si anchor_label contient du bavardage VLM. Maintenant le template matching anchor vs YOLO se déclenche correctement. Co-Authored-By: Claude Opus 4.6 (1M context) --- agent_v0/server_v1/api_stream.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agent_v0/server_v1/api_stream.py b/agent_v0/server_v1/api_stream.py index 49e22ec98..b0bf983bf 100644 --- a/agent_v0/server_v1/api_stream.py +++ b/agent_v0/server_v1/api_stream.py @@ -3532,7 +3532,8 @@ def _resolve_by_som( # Pour les icônes sans texte : comparer le crop de référence contre # chaque région YOLO détectée par SomEngine. anchor_b64 = target_spec.get("anchor_image_base64", "") - if anchor_b64 and not anchor_label: + by_text = target_spec.get("by_text", "").strip() + if anchor_b64 and (not anchor_label or not by_text): try: import cv2 import numpy as np