This commit is contained in:
HuangHai
2026-01-12 20:11:18 +08:00
parent f4b398227e
commit ac79e44282
18 changed files with 155 additions and 85 deletions

View File

@@ -74,11 +74,11 @@ async def get_station_list(d, service, max_scrolls=MAX_SCROLLS):
logger.info("正在执行图形学切片分析...")
json_data = Kit.crop_cards_from_image(screenshot_path)
# 3. 调用 VL 模型识别并保存数据
stations = await service.process_station_list_vl(screenshot_path, device_info=device_info)
# 3. 调用混合模式识别 (图形学切片 + 本地 OCR)
stations = await service.process_station_list_hybrid(screenshot_path, device_info=device_info)
logger.info(f"本页识别到 {len(stations)} 个场站")
# 4. 匹配几何卡片与 VL 识别结果
# 4. 匹配几何卡片与识别结果 (混合模式下已经包含在 stations 中,但为了兼容旧逻辑进行填充)
if json_data and json_data.get("cards") and stations:
for card in json_data["cards"]:
card_rect = card["rect"] # [x1, y1, x2, y2]