Skip to content

Added OCR - #1037

Open
dlymonkai wants to merge 4 commits into
mainfrom
feat/MN-848/ocr
Open

dlymonkai wants to merge 4 commits into
mainfrom
feat/MN-848/ocr

Conversation

@dlymonkai

@dlymonkai dlymonkai commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Jira Ticket Reference : MN-848

Checklist before requesting a review

  • I have updated the unit tests based on the changes I made
  • I have updated the docs (TSDoc / README / global doc) to reflect my changes
  • I have updated the local app configs if needed
  • I have performed self-QA of my feature by testing the apps and packages and made sure that :
    • No regression or new bug has occurred
    • The acceptance criteria listed in the ticket are met
    • Self-QA was made on both desktop and mobile

@dlymonkai dlymonkai changed the title OCR Added OCR Sep 14, 2026
@dlymonkai
dlymonkai force-pushed the feat/MN-848/ocr branch 2 times, most recently from f93650c to b425653 Compare September 17, 2026 14:03
dlymonkai and others added 4 commits October 6, 2026 10:20
Add new @monkvision/ml-web package providing a browser-based OCR engine
built on ONNX Runtime Web for VIN and odometer text detection.

- useOcr hook: ONNX model loading, frame inference, text consistency check
- ocr.worker.ts: Web Worker for non-blocking ONNX inference
- ocr.utils.ts: image pre-processing and character post-processing
- Full unit test suite covering the hook and utilities
- Jest, ESLint, and TypeScript build configs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Integrate @monkvision/ml-web into PhotoCapture for real-time OCR scanning
with a confirm/edit/fallback flow.

- PhotoCaptureHUDOcrOverlay: live camera overlay with text detection
- PhotoCaptureHUDOcrConfirmModal: confirm / reject / edit detected text
- usePhotoCaptureOcrConfirm: state machine for the full confirm flow
- ocrTypes.ts: shared types (OcrMode, OcrState, etc.)
- ISO 3779 VIN format validation and retry-limit logic
- Fallback shutter mode when OCR times out (ocrTimeoutMs)
- odometerUnit prop in LiveConfig / PhotoCaptureProps for default unit
- i18n keys (photo.hud.ocr.*) added to all 18 locale JSON files
- Unit tests for all new components, hooks, and utilities

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wire OCR into the demo app and resolve bundle/alias issues introduced
by the new @monkvision/ml-web package.

- vite.config.ts: resolve.alias pointing @monkvision/* to src/ for
  live hot-reload without rebuilding SDK packages
- Exclude JSEP WASM, ml-web, and VideoTutorial/assets.ts from bundler
- Inline env vars as static JSON to fix dynamic process.env access
- Exclude SDK packages from the React compiler to prevent white screen
- local-config.json: add OCR model URLs to demo configuration
- PhotoCapturePage: forward ocrConfig prop to PhotoCapture
- common-ui-web: add IconVerticalPositionVariant to barrel export
- inspection-review: fix useMonkTheme deep-path import to barrel
- .gitignore: add ONNX model cache dirs
- yarn.lock: update

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Show a km/miles dropdown inline with the detected value so the user can
correct the unit before confirming. The selected unit is sent to
onConfirm
instead of the static defaultMileageUnit fallback, and resets to the
sight's default unit when the active sight changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant