'commit'
This commit is contained in:
@@ -133,9 +133,14 @@ class ReadImageKit:
|
||||
if result.get("has_ad") and result.get("close_point"):
|
||||
if result.get("ad_type") == "rabbit":
|
||||
logger.info("大模型找到了兔子广告!")
|
||||
# 强制使用固定坐标 (94, 830) - 归一化 0-1000
|
||||
# 根据多次 CV 测试结果 (94, 828) 和 (93, 830) 的综合评估
|
||||
logger.info(">>> 采用强制固定坐标策略 (94, 830) 以确保点击准确性")
|
||||
norm_point = [94, 830]
|
||||
else:
|
||||
norm_point = result["close_point"]
|
||||
|
||||
# 转换坐标
|
||||
norm_point = result["close_point"]
|
||||
if len(norm_point) == 2:
|
||||
if not device_info:
|
||||
device_info = cls._FALLBACK_DEVICE_INFO
|
||||
@@ -147,7 +152,11 @@ class ReadImageKit:
|
||||
x = int(norm_point[0] / 1000 * w)
|
||||
y = int(norm_point[1] / 1000 * h)
|
||||
|
||||
return {"x": x, "y": y}
|
||||
return {
|
||||
"x": x,
|
||||
"y": y,
|
||||
"ad_type": result.get("ad_type", "unknown")
|
||||
}
|
||||
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user