5 Commits
Author SHA1 Message Date
OLmatter 35ef7f87b3 fix(gui): print recognition summary (prompt/pred/conf/timing) to stdout
The pipeline refactor dropped the per-recognition log line, so the GUI log
box (which tails backend stdout) showed nothing useful - no prompt, no result,
no timing. Add a concise [captcha] line after each result is assembled:
  [captcha] 畅倍标 -> 畅倍标 | conf=0.99 total=162ms yolo=103ms ocr=59ms | req=1
Also bump _http_get_json timeout 1s -> 3s for safety under load.
2026-06-23 04:06:18 +08:00
OLmatter 905b6e6651 v23.3: upgrade OCR to PP-OCRv6_tiny + fix click-no-captcha 15s wait
Backend:
- Default OCR model PP-OCRv5_server_rec -> PP-OCRv6_tiny_rec (~14x faster,
  83ms/img vs 1189ms on 379 real captchas, accuracy still 100%)
- Configurable via config.json ocr_model or env CNCAPTCHA_CPU_OCR_MODEL/GLM_OCR_MODEL
- GUI OCR model choices updated to v6 (tiny/medium) + v5 server fallback
- worker.py: split 3 crops into independent OCR tasks for parallel recognition
- ppocr_worker.py: batch forward (predict_batch_*) + single-crop path
- server.py: partial results aggregation + OCR_MODEL env passthrough
- requirements: paddleocr>=3.7.0 / paddlex>=3.7.0 (v6 requires)

Userscript v23.3:
- Fix: auto-click subscribe then wait 15s when click didn't trigger captcha.
  Synthetic click sometimes gets swallowed by Zhipu frontend (button DOM ready
  but component state machine not ready), no captcha pops up, main loop stuck in
  WAITING until MODAL_WAIT=15000 timeout.
- Fix: use 'iframe got new prompt+bg image' as the signal. iframe increments GM
  counter glm_captcha_seen_seq each time it sees a new captcha (prompt or bg
  changed); main loop records baseline at click time, compares in WAITING -
  counter increased = captcha popped, wait patiently; no increase after 1.5s =
  click didn't trigger captcha, immediately retry subscribe. Counter is
  monotonic, no residue, no timestamp race.
2026-06-23 00:07:51 +08:00
Kang 6c39344c60 fix(backend): prevent macOS worker crashes on shutdown 2026-06-20 18:00:06 +08:00
Kang 3186d5b8de feat(macos): add backend setup and launch support 2026-06-20 14:27:31 +08:00
OLmatterandClaude Opus 4.7 66a9ea559e feat(backend): pipeline GUI launcher + 精简启动器
新增 backend/gui.py Tk 监控窗口:
- 拉起 backend.server 子进程并接管 stdout
- 顶部状态栏(启动中/运行中、YOLO/OCR worker 数、监听地址)
- 中间识别列表(最近 20 条 prompt/pred_text/confidence/耗时)
- 底部日志框(stdout 实时滚动,高亮 worker ready / 错误)
- 关闭窗口自动 terminate 后端

后端新增 /recent?limit=20 端口(GUI 拉取最近识别结果),
/health 同步返回 n_yolo / n_ocr / port 字段。

精简根目录启动器(7 → 2):
- 删 start-backend.cmd / start-backend-pipeline.cmd /
      install-env.cmd / 启动后端.cmd / 首次安装环境.cmd
- 留 one-click-start.cmd(首次装环境)
- 留 start-backend-pipeline-gui.cmd(日常启动 + GUI)
- start-backend-pipeline.ps1 → start-backend-pipeline-gui.ps1

打包脚本 build_portable.ps1 / build_release_zips.ps1 同步
更新入口列表和错误提示。

补 .gitignore: official_models/(81M OCR 模型权重,不入库)

补 scripts/tools/evaluate_pipeline_compare.py(PR #10 评估
脚本,cherry-pick 时漏了)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 22:53:36 +08:00