Upload a form or label image (PNG/JPG), draw rectangles over text regions, and OCR fills a 6-field data grid. All recognition runs in your browser; images are not sent to a server for OCR.
STA.PP3, BT24).| Mode | Behavior |
|---|---|
| Continuous text | Each ROI appends into the active field. Multi-line boxes may be joined with spaces when line detect splits them. |
| Separate word/number | Each text line gets its own row in the active field. Tall boxes can span several lines; use Line detect or automatic row splitting. |
| Setting | Behavior |
|---|---|
| Auto OCR: ON | After you draw a new box, OCR runs automatically (one box at a time, queued). |
| Auto OCR: OFF | Draw boxes, then use the → control on each box to run OCR. |
| Task | Suggested settings |
|---|---|
| Typed instrument codes | Printed, Instrument code constraint, TTA ON if misreads persist |
| Numbers only | Numeric constraint |
| Mixed codes | Alphanumeric constraint |
| Free notes | Free text constraint + Text cleanup ON |
| Handwritten labels | Handwriting (TrOCR, ~63 MB on first use) |
| Tall box, several printed lines | Line detect ON + Separate mode |
CSV and XLSX export the grid: one row per line index, columns F1–F6.
Toolbar controls and grid options available in the live app.
| Tool | Purpose |
|---|---|
| Draw mode | ON: draw and edit ROI boxes. OFF: pan/zoom without creating boxes. |
| Auto OCR | Run recognition when a new ROI is created. |
| Continuous / Separate | How results map to grid rows (see User manual). |
| Printed | PP-OCRv4 English — typed and printed text. |
| Handwriting | TrOCR small handwritten model (lazy-loaded). |
| Line detect | PP-OCR DB splits multi-line ROIs before recognition. Disabled if det model is missing. |
| TTA vote | Multiple preprocess variants per box; picks best by confidence. Slower, often more accurate. |
| Text cleanup | Spacing and light corrections for free-text fields only. |
| Export CSV / XLSX | Download grid data. |
| Field constraint (grid dropdown) | Limits allowed characters during decode and post-process. |
| → on ROI | Manual OCR when Auto OCR is OFF. |
| Upload / Clear image | Workspace image controls. |
The toolbar hint line shows the active field (F1–F6), its constraint, OCR engine, and whether Line detect / TTA are active.
OCR engines, preprocessing, and accuracy techniques used under the hood (all client-side).
| Engine | Model | Best for |
|---|---|---|
| Printed | en_PP-OCRv4_rec.onnx + dictionary | English printed text, forms, instrument codes |
| Handwriting | TrOCR small handwritten ONNX | Handwritten English |
| Line detect | en_PP-OCRv3_det.onnx | Finding text lines inside a large ROI |
With Line detect ON, the DB detector finds text boxes in the ROI, sorts them, and crops each line. If detection fails, ink projection fallback splits lines. Each line is recognized separately; results merge according to text mode.
| Constraint | Typical use |
|---|---|
| Instrument code | Letters, digits, ., -, space — e.g. STA.PP3, PZ 62 |
| Alphanumeric | Letters and digits |
| Numeric | Digits and decimal separators |
| Free text | Full dictionary; pair with Text cleanup |
When enabled, ~4 image variants are recognized per box; the worker selects the best result by confidence and agreement.
How data moves from image upload to grid export.
ROI rectangles live in canvas space and are mapped to native image pixels before cropping. Snips always use the original upload resolution, not the zoomed display size.
New boxes are processed one at a time in a promise queue so the worker stays stable and row order stays predictable.
| Message | Role |
|---|---|
INIT | Load PP-OCR recognition (+ optional detection) models |
INIT_TROCR | Lazy-load TrOCR encoder and decoder |
DETECT_LINES | Run DB detector on a snip |
RUN_OCR | Recognize one patch (printed or handwriting, optional TTA + constraint) |