Tools,

ICR OCR, tested on 24 hand printed forms

40 to 157

docTR fields right: lines in, then ink boxes

Get the free ICR recipe

ICR reads one letter a box

ICR, intelligent character recognition, reads hand printed capitals on forms.

The last name box row of form e01, HUANG hand printed in the first 5 of 16 boxes. With the box lines in, the readers printed HLIAIA|G (Tesseract, whole page), FUANGITITD (docTR) and Hwangco 2000 (TrOCR), in red. Below, only the 5 boxes with ink, walls cut away: docTR printed HUANG and TrOCR huang.
Form e01, last name. Red: wrong readings.

I made 24 boxed forms of 8 fields, in 3 sets:

Tesseract, docTR and Apple Vision got the whole page, then each field cut out alone.

Box lines are the trap

To Tesseract, a row of empty boxes looks like a word made of I's. On the whole page (psm 3) it found 5 of 192 fields, two by luck.

Clean crops lift every reader

Fields right of 192, each field cut out
Reader Box lines in Lines out, ink boxes only
Tesseract, psm 7 10 50
TrOCR base 48 116
docTR 40 157
Apple Vision 122 160

Real hand print is harder than fonts

Fields right
Way EMNIST, of 64 Fonts, of 128
Apple Vision, ink boxes 41 119
docTR, ink boxes 35 122
TrOCR, ink boxes 29 87
docTR, whole page, found in text 27 96

EMNIST is real hand print from NIST Special Database 19 (Cohen et al. 2017). I cropped, scaled, turned and boxed each character.

Some capitals look lowercase: e01's state MT came back "m7" from docTR and Apple Vision. Fonts are renders: one glyph per letter.

Our Actor, with no setup: 88 of 192

PDF OCR to Markdown, our Apify Actor, reads the whole page. Build 0.1.145, run on this Mac:

Fields found, by the reader it picked
Reader Forms Found
RapidOCR 15 83 of 120
Tesseract 9 5 of 72

Our Actor, hand printed digits: 2 of 24

Fields found by kind
Kind EMNIST Fonts
Letters 14 of 32 37 of 64
Digits 2 of 24 28 of 48
ID, letters and digits 0 of 8 7 of 16

Its worst fields: date of birth and ID, 7 of 24 each.

With the gaps between boxes left in, it found 67 fields, not 88.

Do it yourself: the zonal recipe

  1. Register: find the 4 corner marks, then warp the scan onto the template.
  2. Crop each field's box row by the template.
  3. Remove the walls: keep each box's inside, 6 px in from the center of the wall line.
  4. Skip empty boxes: under 40 pixels darker than 160 means no character.
  5. Read the strip, then drop characters outside the field's set: letters, digits or both.

Registration was off by 0.98 px at most.

Step 5 took TrOCR from 116 to 155 fields: it prints dots and words.

The bench code (45 lines)
import cv2
import numpy as np


IN = 6  # inside of a box: this many px in from the center of the wall line
EMPTY_DARK, EMPTY_MIN = 160, 40


def register(g):
    """Template-to-scan affine from the 4 corner marks, least squares."""
    _, _, stats, cent = cv2.connectedComponentsWithStats(
        (g < 100).astype(np.uint8), connectivity=8
    )
    src, dst = [], []
    for x0, y0, x1, y1 in LAY["marks"]:
        e = np.array([(x0 + x1) / 2, (y0 + y1) / 2])
        ok = [
            i
            for i, (x, y, w, h, a) in enumerate(stats)
            if i and 30 <= w <= 52 and 30 <= h <= 52 and a > 0.8 * w * h
        ]
        i = min(ok, key=lambda i: np.hypot(*(cent[i] - e)))
        assert np.hypot(*(cent[i] - e)) < 150
        src.append(e)
        dst.append(cent[i])
    X = np.hstack([np.array(src), np.ones((4, 1))])
    A = np.linalg.lstsq(X, np.array(dst), rcond=None)[0].T  # 2x3
    W, H = LAY["size"]
    return A, cv2.warpAffine(
        g, A, (W, H), flags=cv2.INTER_LINEAR | cv2.WARP_INVERSE_MAP, borderValue=255
    )


def inside(a, b):
    x0, y0, x1, y1 = b
    return a[y0 + IN : y1 - IN, x0 + IN : x1 - IN]


def strip(ins):
    """Box insides side by side on white: 10 px gap, 20 px margin."""
    h, w = ins[0].shape
    s = np.full((h + 40, 20 + len(ins) * (w + 10) + 10), 255, np.uint8)
    for i, im in enumerate(ins):
        s[20 : 20 + h, 20 + i * (w + 10) : 20 + i * (w + 10) + w] = im
    return s

LAY is the form template: the page size, the corner marks and each field's boxes, in pixels. The ink test is one line in cut(): (im < EMPTY_DARK).sum() >= EMPTY_MIN.

What this test does not show

How I tested
  • Forms: US Letter at 300 dpi, one character a box.
  • Boxes 70 x 90 px, black walls 3 px wide.
  • Fields: last name, first name, date of birth, city, state, ZIP code, phone, and an ID of 2 letters and 7 digits.
  • Values: made up from lists of common first names and surnames, not real people.
  • Each character scaled to 55 to 66 px high, and turned up to 6 degrees.
  • Scan: a simulated gray flatbed scan, saved as JPEG.
  • Whole page: Tesseract 5.5.4 (psm 3 and psm 11), Apple Vision, docTR defaults, and our Actor's own page code.
  • Each field: Tesseract psm 7 with a whitelist, TrOCR base handwritten, docTR crnn_vgg16_bn, Apple Vision.
  • Score: a field is right when the reading equals the value in capitals, spaces removed. On the whole page, when the value shows up anywhere in the text, with | also removed, so those are upper bounds.
  • Speed, median a page: docTR on ink boxes 0.221 s, plus 0.082 s to register.
  • TrOCR on ink boxes 12.357 s, our Actor 13.0 s.
  • Tesseract, TrOCR and docTR on CPU, 2 threads (the Actor 1). Apple Vision ran as macOS chose. Apple M5 Max, macOS 26.6.
  • Python 3.12, torch 2.15.0 and transformers 5.24.1.
  • python-doctr 1.2.0 and OpenCV 5.1.0.
  • Scripts and results stay in our private repo, in research/bench/icr-ocr-2026-11-26/.
Sources and credits

Questions people ask

What is ICR OCR?

ICR, intelligent character recognition, reads hand printed capitals on forms, one letter a box. The ICR way adds a form template: crop each field, remove the box lines, skip empty boxes, and keep only the field's characters.

Can Tesseract read hand printed forms?

Not on the whole page: it found 5 of 192 fields in our test, and read the box lines as I, L and |. Clean crops of each field helped, but docTR and Apple Vision did far better.

Which free reader did best?

Apple Vision, built into macOS, and docTR, free under Apache-2.0, both on clean crops of the boxes with ink. They read 160 and 157 of 192 fields.