Repository navigation
feat(onscreen): ONNX local engine, pinned model fetch, provider in QA - #20
Open
anthony-hermes[bot] wants to merge 5 commits into
Open
anthony-hermes[bot] wants to merge 5 commits into
anthony-hermes[bot] wants to merge 5 commits into
Conversation
Lane 10's local engine reads Korean from one frame and says which provider ran. - OnnxOcrEngine runs PP-OCRv5 mobile detection plus korean_PP-OCRv5_mobile_rec behind the OcrEngine protocol; CUDA is used when the runtime lists it and a session loads, CPU otherwise, and the provider is reported for qa.json (OS10.6). A CPU run adds one QA note. - scripts/fetch_models.sh installs the three pinned files into the app data directory, verifies sha256 and size before an atomic move, refuses a mismatch, and serves a verified file from cache on the next run. The manifest pins Hugging Face revisions, not branches, and no model file is in the repository (OS10.7). - Detection and recognition pixels are numpy only: BGR NCHW input at a multiple of 32 with the long side capped at 960, DB threshold and unclip constants from the pinned config, line merging, 48-pixel recognition crops capped at 320 wide, and greedy CTC decode against the config's own character order. A frame with no text returns no fragments. - One committed PPM fixture labelled with its text, read by a slow test only when the models are installed; without them the test skips with the fetch command in the reason. - pyproject declares numpy and onnxruntime; mypy ignores the untyped onnxruntime import.
Contributor
Author
|
Trimmed the ONNX engine tests, on top of #19's merge.
246 tests, |
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.
Lane 10, the local engine: ONNX PP-OCR with the Korean recognizer, plus the model fetch script.
OnnxOcrEnginebehind the protocol: PP-OCRv5 mobile detection pluskorean_PP-OCRv5_mobile_rec, numpy-only preprocessing, CTC decode against the pinned dictionary.OS10.6).scripts/fetch_models.shinstalls three sha256-pinned files into the app data directory, refuses a mismatch, and serves verified files from cache. No model file is committed (OS10.7).slowtest reads a committed fixture frame and is skipped without the models, so CI stays green without a download.Card:
t_90680d5b. On forge at b5a97e4 the committed Korean fixture reads as구독과 좋아요at 0.9941 on the CPU provider;pytest -q tests/onscreen/test_onnx_engine.py -m "not slow" && make checkexits 0 (35 passed, 2 deselected, then 234 passed).Stacked on #19; merge that first and retarget this to master.