Skip to content

fix(desktop): fix corrupted Rewind OCR that breaks screen search (#8130) - #8131

Closed
kodjima33 wants to merge 4 commits into
mainfrom
watchdog/issue-8130-ocr-accurate-langcorrection
Closed

kodjima33 wants to merge 4 commits into
mainfrom
watchdog/issue-8130-ocr-accurate-langcorrection

Conversation

@kodjima33

@kodjima33 kodjima33 commented Jun 23, 2026 •

Copy link
Copy Markdown
Collaborator

Bug (#8130)

Desktop Rewind's local screenshot OCR produces heavily corrupted text for readable macOS screenshots (omi CLI → ¢%miCLP, you → w)u, Omi Stability → OmSStalxllty), which also breaks local screen search/recall — exact visible phrases return no results because the indexed OCR text is mangled.

Root cause

RewindOCRService.extractTextWithBounds is configured for maximum speed at the expense of fidelity:

  • recognitionLevel = .fast by default (rewindOCRFast defaults to true). Vision's .fast path is character-detection based and produces exactly the reported o/0, m/rn, l/i, $/s substitution soup.
  • usesLanguageCorrection = false — this overrides Vision's own framework default of true, removing the language-model post-processing that fixes those substitution errors.

Together they give the worst-possible OCR fidelity for the dominant Rewind content (UI/chat/prose), and the garbled text is what gets indexed for search and embeddings.

Fix

  • Re-enable usesLanguageCorrection = true (restores Vision's default; directly reduces substitution errors).
  • Default the OCR Quality setting to Accurate (rewindOCRFast default true → false) across the three sites that read it (RewindOCRService, RewindModels settings model, RewindOnlyView picker). The existing Settings → OCR Quality: Fast / Accurate picker still lets users choose Fast ("less CPU") if they prefer.

Perf is bounded: OCR is already throttled (every-Nth-frame + perceptual dedup), runs at .utility/.background priority off the main thread, and is paused on battery by default (pauseOCROnBattery), so accurate OCR mostly runs on AC power. This is a different subsystem from the VideoChunkEncoder/memory cluster in #8127.

Verification

  • xcrun swift build -c debug — build complete, no new warnings/errors.
  • Runtime OCR-quality comparison on live screenshots: UNVERIFIED (no signed-in capture session exercised in this run).

Note for reviewers

The .fast → .accurate default flip is a deliberate CPU/battery-vs-accuracy tradeoff. Given screen search is currently non-functional for visible text, defaulting to Accurate seems right, but the tradeoff is your call — the language-correction line alone is a safe, isolated subset if you'd rather not flip the default.

🤖 automated by hourly watchdog; opened for review, not merged.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

@Git-on-my-level

Copy link
Copy Markdown
Member

Superseded by #8134, which merged the OCR accuracy fix for #8130 and goes further by forcing accurate Vision OCR + language correction, removing the user-facing OCR quality downgrade path, adding the battery cadence behavior, and covering the OCR policy with tests.

I compared the diffs: the code changes in this PR are covered/replaced by #8134. The only remaining unique change here is an unreleased changelog entry, which does not seem worth a follow-up/cherry-pick PR by itself.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @kodjima33 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our roadmap and vision

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community! 💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants