feat(ocr): mobile on-device TrOCR-handwritten — Spike-#77-Pivot mit Handwriting-Modell #421 #422
Closed
admin-mrrm
wants to merge 2 commits from
feat/421-ocr-handwritten-mobile into main
pull from: feat/421-ocr-handwritten-mobile
merge into: admin-mrrm:main
admin-mrrm:main
admin-mrrm:chore/roadmap-rc32-done
admin-mrrm:feat/rc32-fdroid-nightly
admin-mrrm:feat/rc31-auto-index-on-mutation
admin-mrrm:feat/rc30-auto-index
admin-mrrm:chore/roadmap-rc28-done
admin-mrrm:feat/360-projects-source
admin-mrrm:chore/roadmap-rc27-done
admin-mrrm:feat/habits-ui
admin-mrrm:chore/roadmap-rc26-done
admin-mrrm:feat/planner-v1-depends-on
admin-mrrm:chore/roadmap-rc25-done
admin-mrrm:feat/calendar-settings-ui
admin-mrrm:chore/roadmap-rc24-done
admin-mrrm:feat/candidate-mark-done
admin-mrrm:chore/roadmap-rc23-done
admin-mrrm:fix/shared-schema-todo
admin-mrrm:chore/roadmap-rc22-done
admin-mrrm:chore/release-rc22
admin-mrrm:feat/todo-candidate-writer
admin-mrrm:chore/roadmap-rc21-done
admin-mrrm:chore/roadmap-rc21-json-fix
admin-mrrm:chore/release-v0.6.6-rc21
admin-mrrm:feat/day-planner-empty-state-ctas
admin-mrrm:chore/roadmap-rc17-rc18-done
admin-mrrm:chore/phase2-smoke-manual-trigger
admin-mrrm:chore/roadmap-rc19-done
admin-mrrm:fix/list-screens-scrollable
admin-mrrm:feat/dev-user-header-env-gate
admin-mrrm:wireup/ai-foundation-phase1
admin-mrrm:feat/443-search-ui
admin-mrrm:feat/442-background-indexer
admin-mrrm:feat/441-data-source-interface
admin-mrrm:feat/440-sqlite-vec
admin-mrrm:feat/439-embedding-service
admin-mrrm:feat/425-mlkit-image-preview-integration
admin-mrrm:archive/spike-77-ocr-mobile
admin-mrrm:fix/gitea-release-shell-scope
admin-mrrm:feat/396-version-sync
admin-mrrm:feat/376-e2e-drone-integration
admin-mrrm:feat/374-e2e-playwright-setup
admin-mrrm:feat/372-planner-v1
admin-mrrm:feat/370-calendar-read
admin-mrrm:feat/368-planner-v0
admin-mrrm:feat/366-habit-source
admin-mrrm:feat/178-mail-candidate-writer
admin-mrrm:feat/253-nli-template-ab
admin-mrrm:fix/348-settings-nav-hijack-v2
admin-mrrm:fix/347-web-side-drawer
admin-mrrm:fix/349-profile-menu-close
admin-mrrm:feat-297-sender-memory-ui
admin-mrrm:feat-296-web-classifier-sender-memory
admin-mrrm:feat/294-sender-label-memory
admin-mrrm:chore/268-analyze-script-dynamic-labels
admin-mrrm:fix/268-nli-threshold-025
admin-mrrm:fix/266-imap-getmessage-timeout
admin-mrrm:fix-imap-unhandled-error
admin-mrrm:fix-175-onnxruntime-anchor
admin-mrrm:fix-175-onnxruntime-mainapp
admin-mrrm:ci-release-gate-apk
admin-mrrm:ci-mobile-bundle-check
admin-mrrm:fix-175-native-startup
admin-mrrm:fix-175-stub-onnxruntime-web
admin-mrrm:fix-175-import-meta-hermes
admin-mrrm:feat-web-parcel-scan-toggle
admin-mrrm:feat-tracking-manual-sync
admin-mrrm:fix-track17-carrier-ids
admin-mrrm:feat-232-mail-scanner
admin-mrrm:feat-233-trackings-post
admin-mrrm:feat-aftership-provider
admin-mrrm:feat-195-loading-skeletons
admin-mrrm:feat-197-error-boundary
admin-mrrm:feat-194-toast-system
admin-mrrm:chore/add-claude-md
admin-mrrm:155-auth-callback-route
admin-mrrm:feat/fdroid-deploy
admin-mrrm:fix/mail-messages-pagination-types
admin-mrrm:feat/ocr-correction-review
admin-mrrm:fix/ocr-inference-oom
admin-mrrm:fix/ocr-oom-and-finetune-training
admin-mrrm:feat/ocr-easyocr-and-training-data
admin-mrrm:feat/ocr-image-rotate-preview
admin-mrrm:feat/mobile-image-picker-57
admin-mrrm:feat/ocr-parse-image-endpoint
admin-mrrm:feat/lists-notes-e2e
admin-mrrm:fix/web-show-auth-error-body
admin-mrrm:fix/deploy-envfile
admin-mrrm:fix/deploy-ssh-port
admin-mrrm:feat/drone-deploy
admin-mrrm:fix/drone-secret-names
admin-mrrm:fix/dockerfile-deploy-flag
admin-mrrm:feat/drone-ci
admin-mrrm:feat/apps-web
admin-mrrm:feat/shopping-list-crud
No reviewers
Labels
Clear labels
Document & email archive (Paperless-ngx integration)
arch-question wurde vom Architekten beantwortet und vom PM in Produkt-Entscheidung übersetzt
Anfrage an Software-Architekt — Tech-/Architektur-Entscheidung gebraucht (PM hat sie nicht selbst getroffen)
NestJS backend
Keycloak / OIDC
Monorepo / CI / tooling
Expo React Native app
Shared packages
Tamagui UI package
Vite web app
Wöchentlicher CEO-Portfolio-Status
High priority
Low priority
Medium priority
In der public Roadmap der App sichtbar (roadmap.json kuratiert)
2-3 days
About 1 day
Half a day
More than 3 days — should be split
Less than 1 hour
Waiting on something
Open questions before work can continue
Something is broken
Infra / tooling / maintenance
Documentation
New user-facing functionality
Code refactor without behavior change
app/archiv
Document & email archive (Paperless-ngx integration)
app/einkaufslisten
app/imap-client
app/wissensbasis
arch-answered
arch-question wurde vom Architekten beantwortet und vom PM in Produkt-Entscheidung übersetzt
arch-question
Anfrage an Software-Architekt — Tech-/Architektur-Entscheidung gebraucht (PM hat sie nicht selbst getroffen)
area/api
NestJS backend
area/auth
Keycloak / OIDC
area/infra
Monorepo / CI / tooling
area/mobile
Expo React Native app
area/shared
Shared packages
area/ui
Tamagui UI package
area/web
Vite web app
portfolio-status
Wöchentlicher CEO-Portfolio-Status
prio/high
High priority
prio/low
Low priority
prio/medium
Medium priority
roadmap/public
In der public Roadmap der App sichtbar (roadmap.json kuratiert)
size/l
2-3 days
size/m
About 1 day
size/s
Half a day
size/xl
More than 3 days — should be split
size/xs
Less than 1 hour
status/blocked
Waiting on something
status/needs-info
Open questions before work can continue
type/bug
Something is broken
type/chore
Infra / tooling / maintenance
type/docs
Documentation
type/feature
New user-facing functionality
type/idea
type/refactor
Code refactor without behavior change
No labels
app/archiv
app/einkaufslisten
app/imap-client
app/wissensbasis
arch-answered
arch-question
area/api
area/auth
area/infra
area/mobile
area/shared
area/ui
area/web
portfolio-status
prio/high
prio/low
prio/medium
roadmap/public
size/l
size/m
size/s
size/xl
size/xs
status/blocked
status/needs-info
type/bug
type/chore
type/docs
type/feature
type/idea
type/refactor
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
admin-mrrm/mrrmlabapp!422
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/421-ocr-handwritten-mobile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #421
Was geändert wird
Spike-#77-Mechanik bleibt — nur das Modell tauscht.
Xenova/trocr-small-printed(CER 0.51 auf Real-Daten, #416) →Xenova/trocr-small-handwritten. Konfig-Werte verifiziert identisch: 6 decoder layers, 384x384 input, decoder_start_token_id=2, eos=2.Restoration
Files aus
archive/spike-77-ocr-mobile:apps/mobile/src/services/ocr-service.ts— Singleton mit ORT-RN + KV-cache Greedy-Decodeapps/mobile/src/services/ocr-service.spec.ts— 10 Specs (alle grün)apps/mobile/src/services/ocr-model-assets.ts— Metro asset-handle wrapperapps/mobile/app/ocr-spike.tsx— Debug-Screen (Route:/ocr-spike)apps/mobile/assets/ocr-model/—.gitignorefür.onnx, README, Sample-JPGapps/mobile/metro.config.js—.onnxals asset-ext registriertapps/mobile/app/_layout.tsx— Stack.Screen für/ocr-spikeexpo-asset@~12.0.13,jpeg-js@^0.4.4ONNX-Weights
Int8-quantisierte Files aus
Xenova/trocr-small-handwritten/onnx/:encoder_model.onnx(~22 MB)decoder_model.onnx(~38 MB)decoder_with_past_model.onnx(~37 MB)Bundle-Total: ~98 MB. Bleiben
.gitignored — Repro-Workflow inapps/mobile/assets/ocr-model/README.mddokumentiert.Test plan
pnpm --filter @mrrmlab/mobile typecheckcleanpnpm --filter @mrrmlab/mobile test— 71/71 grün (inkl. 10 ocr-service Specs)/ocr-spike-Route liefert nicht-leeres OCR-Ergebnis auf Pixel mit Sample-JPGWas DIESER PR NICHT macht
image-preview.tsx/parseImage-Flow (kommt nach Device-Test-Validierung)Risk-Note
small-handwrittenist auf IAM-Datensatz finetuned. Real-Einkaufszettel-Performance unbekannt — wenn CER > 0.3, eskaliert zubase-handwritten(~280 MB Bundle). Decision-Point nach Device-Eval.PR on hold — siehe #423. ML-Kit-Spike läuft, EAS-Build queued (
de0beabb). Wenn ML Kit das „Oregano"-Sample sauber liest, wird dieser PR geschlossen. Falls ML Kit ebenfalls failt, kommen wir hierauf zurück.Geschlossen — superseded by #424. ML Kit liefert auf demselben „Oregano"-Sample „Oreg amo" (CER ≈ 0.28) statt TrOCRs „consequences" (CER ≈ 1.0).
Pull request closed