Conversation
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
FRLG 日版使用低分辨率像素字体。通用 Tesseract 在实机采集画面上经常会把假名、浊点和数字识别成外观相近的字符;即使原始候选中已经出现正确内容,通用置信度判定也可能拒绝输出。
本 PR 将已经过 FRLG 样本回归的场景化 OCR 接入 EasyCon,但仍沿用现有标签编辑器和现有 ECS
OCR(x, y, width, height, "scene")调用,不引入第二套独立工具界面。改动范围
OCR 运行时
FRLG 场景 OCR搜索方式,并支持以下 13 个场景键:FRLG_JPN_TID、FRLG_EN_TIDFRLG_JPN_NAME、FRLG_JPN_WILD_LEVELFRLG_JPN_SUMMARY_NAME、FRLG_JPN_NATURE、FRLG_JPN_LEVELFRLG_JPN_HP、FRLG_JPN_ATTACK、FRLG_JPN_DEFENSEFRLG_JPN_SP_ATTACK、FRLG_JPN_SP_DEFENSE、FRLG_JPN_SPEEDFRLG_JPN_NAME:ミニリュウ|ハクリュー缩小候选集,但候选不会强制制造结果。原标签编辑器接入
FRLG 场景 OCR后,可以:OCR(...)调用。明确不包含的内容
模型与资源
数字模板和词典体积较小,作为嵌入资源随程序集发布。约 120 MB 的
rec.onnx与jpn.traineddata没有提交到 Git;需要文本场景时执行:程序也支持通过
EASYCON_FRLG_MODELS指定模型目录。docs/frlg-ocr-resources.lock.json固定了全部 53 个资源的来源、大小和 SHA-256;许可证与来源说明位于docs/licenses/和docs/FRLG-OCR-SOURCES.md。使用示例
验证
python tools/FrlgOcr/fetch_resources.py --verifydotnet format EasyCon2.slnx --verify-no-changes --no-restoredotnet build src/EasyCon2.Avalonia/EasyCon2.Avalonia.csproj -c Release --no-restoreEasyCon.Tests: 737 passed / 16 skipped / 0 failedEasyCon.Lsp.Tests: 66 passed / 0 failedWinInput.Tests: 11 passed / 0 failed完整、不加过滤的
dotnet test EasyCon2.slnx -c Release仍有 1 个与本 PR 无关的既有失败:PipelineUnificationTests.CsvTestExample_AutoLoadAndShadowUntilFfi在 Windows 上仍断言msvcrt.dllFFI 应失败;该测试自身注释说明预期失败条件是 non-Windows,本 PR 没有修改该测试或其执行路径。建议审查重点