revert: remove enable_detection and return_word_box options

按需求移除两个开关:
- enable_detection:跳过检测直接识别,实测只对单行图有效,多行文档会返回空结果
- return_word_box:字/词级坐标,默认即关闭且开销在噪声内,无实际收益
恢复正常的两段式链路:文本检测 → 文本识别。

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
zimoyin
2026-10-13 19:16:21 +08:00
parent 932f1a8b13
commit cf7088a13d
10 changed files with 31 additions and 366 deletions
-2
View File
@@ -21,7 +21,5 @@ if __name__ == "__main__":
text_recognition_batch_size=settings.text_recognition_batch_size,
cpu_threads=settings.cpu_threads_resolved,
enable_mkldnn=settings.enable_mkldnn,
enable_detection=settings.enable_detection,
return_word_box=settings.return_word_box,
).prepare()
print(f"Models are ready in: {settings.model_dir.resolve()}")