SPB Git

Repository Public

REPORT.md 10.6 KB

# spider-ocr benchmark

Generated by benchmarks/ocr/run_benchmark.py on 2026-12-04 21:39 UTC. Every number below was measured by that run; rerun the script to reproduce.

The corpus is synthetic. Every image is clean text rendered by Pillow in a system font on a flat background: no JPEG artefacts, no photographs behind the text, no sub-pixel colour fringes, no icons, no overlapping elements. Error rates on real-world screenshots will be higher: read these results as an upper bound on accuracy, not as an expectation.

# Environment

Machine Mac17,6, Apple M5 Max, 18 cores (6 performance), 48.0 GB
macOS 27.3 (26C5056a), arm64
OCR engine Apple Vision VNRecognizeTextRequest revision 3
Worker spider-ocr 1.0.0 (commit bacea84), Apple Swift version 6.4.2 (swiftlang-6.4.2.1.9 clang-2100.4.1.1)
Client Python 3.13.13, Pillow 13.0.0 (corpus rendering)
Languages requested fr-CA, en-US -> given to Vision: fr-FR, en-US

# Corpus

42 PNG images, 13.5 megapixels, 808 ground-truth lines, 34974 reference characters (21 French images, 21 English images). Generated by benchmarks/ocr/make_corpus.py (seed 20261204); fonts: Helvetica, Arial, Times New Roman, Menlo, Georgia, Verdana.

Kind Images Content
paragraph 24 8 (or 6) lines, one column; sizes 11, 13, 16, 20, 24, 32 px; two fonts per size and language
prices_dates 4 prices (1 250,00 $, $1,250.00) and dates, 18 px, light and dark
multi_column 2 two columns of 8 aligned rows, 17 px
table 2 6 x 4 table with rules, 16 px
mixed_sizes 4 32 px title, 20 px subtitle, 14 px body, 11 px footer; light and dark
monospace 2 Menlo 12 px listing
rotated 1 page rotated by 90 degrees, recognised with detect_orientation
long_page 1 30 lines, about 920 px high (also used by the tile tests)
tall 2 216 numbered lines, more than 6000 px high (processed in bands)

French text carries é è à ç œ ù ï ê î ô û ü and the $ after the amount; English text has a few accented loan words. Themes: white, warm paper, dark grey, navy.

# Accuracy

CER = character edits / reference characters; WER = word edits / reference words; micro-averaged. Normalisation: Unicode NFC and whitespace collapsed; case, accents and punctuation must match.

# Overall

Level Group Images Ref. chars CER WER CER (case-insensitive) Lines found / expected Images with 0 error
accurate all 42 34974 0.27 % 1.10 % 0.27 % 831 / 808 22
fast all 42 34974 9.88 % 24.47 % 9.49 % 812 / 808 1

# By language

Level Group Images Ref. chars CER WER CER (case-insensitive) Lines found / expected Images with 0 error
accurate en 21 17427 0.25 % 0.72 % 0.25 % 409 / 393 14
accurate fr 21 17547 0.30 % 1.43 % 0.30 % 422 / 415 8
fast en 21 17427 6.54 % 15.21 % 6.34 % 387 / 393 1
fast fr 21 17547 13.20 % 32.40 % 12.62 % 425 / 415 0

# By kind of image

Level Group Images Ref. chars CER WER CER (case-insensitive) Lines found / expected Images with 0 error
accurate long_page 1 1290 0.31 % 1.59 % 0.31 % 30 / 30 0
accurate mixed_sizes 4 1523 0.07 % 0.74 % 0.07 % 36 / 36 3
accurate monospace 2 729 0.69 % 2.22 % 0.69 % 24 / 16 1
accurate multi_column 2 634 0.16 % 0.97 % 0.16 % 32 / 32 1
accurate paragraph 24 7796 0.65 % 1.93 % 0.65 % 187 / 176 13
accurate prices_dates 4 946 0.11 % 0.56 % 0.11 % 33 / 32 3
accurate rotated 1 353 0.28 % 1.64 % 0.28 % 8 / 8 0
accurate table 2 329 2.74 % 10.77 % 2.74 % 44 / 46 0
accurate tall 2 21374 0.11 % 0.62 % 0.11 % 437 / 432 1
fast long_page 1 1290 5.81 % 22.31 % 5.81 % 41 / 30 0
fast mixed_sizes 4 1523 15.50 % 40.59 % 15.04 % 38 / 36 0
fast monospace 2 729 12.76 % 39.26 % 12.07 % 19 / 16 0
fast multi_column 2 634 11.20 % 31.07 % 10.25 % 31 / 32 0
fast paragraph 24 7796 21.00 % 40.19 % 20.27 % 171 / 176 0
fast prices_dates 4 946 8.56 % 19.44 % 8.25 % 32 / 32 1
fast rotated 1 353 6.23 % 21.31 % 6.23 % 8 / 8 0
fast table 2 329 14.29 % 49.23 % 13.98 % 40 / 46 0
fast tall 2 21374 5.58 % 17.01 % 5.32 % 432 / 432 0

# By font size (single-column paragraphs)

Level Group Images Ref. chars CER WER CER (case-insensitive) Lines found / expected Images with 0 error
accurate 11 4 1430 0.84 % 3.98 % 0.84 % 32 / 32 1
accurate 13 4 1452 2.41 % 4.78 % 2.41 % 43 / 32 0
accurate 16 4 1402 0.07 % 0.40 % 0.07 % 32 / 32 3
accurate 20 4 1404 0.07 % 0.40 % 0.07 % 32 / 32 3
accurate 24 4 1036 0.10 % 0.53 % 0.10 % 24 / 24 3
accurate 32 4 1072 0.09 % 0.52 % 0.09 % 24 / 24 3
fast 11 4 1430 68.67 % 96.81 % 67.20 % 23 / 32 0
fast 13 4 1452 27.00 % 59.19 % 25.69 % 36 / 32 0
fast 16 4 1402 8.06 % 24.80 % 6.99 % 32 / 32 0
fast 20 4 1404 5.63 % 21.05 % 5.63 % 32 / 32 0
fast 24 4 1036 5.31 % 15.96 % 5.12 % 24 / 24 0
fast 32 4 1072 1.49 % 7.77 % 1.49 % 24 / 24 0

# By theme

Level Group Images Ref. chars CER WER CER (case-insensitive) Lines found / expected Images with 0 error
accurate dark 20 17034 0.26 % 0.71 % 0.26 % 409 / 385 11
accurate light 22 17940 0.28 % 1.44 % 0.28 % 422 / 423 11
fast dark 20 17034 4.53 % 12.84 % 4.37 % 391 / 385 1
fast light 22 17940 14.96 % 34.61 % 14.36 % 421 / 423 0

# By font

Level Group Images Ref. chars CER WER CER (case-insensitive) Lines found / expected Images with 0 error
accurate Arial 6 1809 0.72 % 3.01 % 0.72 % 62 / 63 3
accurate Georgia 7 12283 0.21 % 1.14 % 0.21 % 269 / 269 3
accurate Helvetica 6 1826 0.55 % 2.70 % 0.55 % 62 / 63 2
accurate Menlo 9 3868 1.06 % 2.35 % 1.06 % 111 / 91 5
accurate Times New Roman 7 2216 0.23 % 1.25 % 0.23 % 53 / 53 3
accurate Verdana 7 12972 0.01 % 0.09 % 0.01 % 274 / 269 6
fast Arial 6 1809 24.77 % 46.39 % 23.88 % 58 / 63 0
fast Georgia 7 12283 10.45 % 30.02 % 9.83 % 268 / 269 0
fast Helvetica 6 1826 37.68 % 57.96 % 37.35 % 53 / 63 0
fast Menlo 9 3868 6.72 % 23.37 % 6.46 % 111 / 91 1
fast Times New Roman 7 2216 25.14 % 53.87 % 23.96 % 53 / 53 0
fast Verdana 7 12972 1.69 % 5.21 % 1.67 % 269 / 269 0

# Images with the highest CER

  • accurate: para-en-13-1.png 8.22 %; table-fr.png 4.09 %; para-en-11-1.png 2.20 %; mono-fr.png 1.38 %; table-en.png 1.27 %; para-fr-11-1.png 0.88 %
  • fast: para-fr-11-0.png 86.00 %; para-en-11-0.png 76.80 %; para-fr-11-1.png 66.37 %; para-fr-13-0.png 51.82 %; para-en-11-1.png 45.73 %; para-en-13-0.png 38.38 %

# Speed and memory

One --serve worker; 3 passes over the corpus after one warm-up request. Latency = client-side round trip with one request in flight. The rotated image includes its orientation probe; the tall images are processed in bands.

Level In flight Images/s Megapixels/s p50 latency p95 latency Mean Max Cold start Peak worker RSS
accurate 1 13.91 4.48 48.7 ms 101.5 ms 70.1 ms 533.5 ms 142.6 ms 329.8 MB
accurate 2 16.16 5.21 351.3 MB
fast 1 16.98 5.47 24.9 ms 92.2 ms 55.7 ms 714.0 ms 86.7 ms 336.1 MB
fast 2 17.14 5.53 367.2 MB

Text was identical across passes: accurate yes, fast yes. Worker restarts during the run: accurate 0, fast 0.

# Tall pages and banding (accurate level)

Image Size Configuration Bands Lines found / expected CER WER Median time
tall-fr.png 529x6320 one piece (max_band_aspect=0) 1 0 / 216 100.00 % 100.00 % 43.5 ms
tall-fr.png 529x6320 default (max_band_aspect=4) 4 216 / 216 0.22 % 1.19 % 494.7 ms
tall-fr.png 529x6320 max_pixels=1 000 000 4 216 / 216 0.12 % 0.59 % 488.9 ms
tall-fr.png 529x6320 max_pixels=400 000 12 216 / 216 0.11 % 0.59 % 863.8 ms
tall-en.png 597x6322 one piece (max_band_aspect=0) 1 1 / 216 99.88 % 100.00 % 51.1 ms
tall-en.png 597x6322 default (max_band_aspect=4) 3 221 / 216 0.00 % 0.00 % 436.0 ms
tall-en.png 597x6322 max_pixels=1 000 000 5 216 / 216 0.02 % 0.16 % 569.0 ms
tall-en.png 597x6322 max_pixels=400 000 14 216 / 216 0.00 % 0.00 % 1078.9 ms

Recognised in one piece, a very tall page loses most or all of its text: Vision scales the image to its working size and the text becomes unreadable. This is why the worker cuts a page that is more than four times longer than wide, whatever its pixel count.

# Reading the results

  • Synthetic rendered text: an upper bound on accuracy (see the note at the top).
  • fr-CA is not in this Vision revision's language list; the worker substitutes fr-FR and says so in warnings.
  • Fast versus accurate on this corpus: 1.22 times the images per second (one request in flight), CER 9.88 % against 0.27 %; in French 13.20 % against 0.30 %. The accurate level is the default.
  • Vision returns its own line segmentation. On the monospace font (Menlo) it often splits one printed line into several fragments (111 lines found for 91 printed), and Menlo accounts for 41 of the accurate level's 96 character errors with 11 % of the reference characters. In the tables a lone digit in a cell can be missed. The worker reports the fragments as they are, in reading order; it does not glue them together.
  • Latencies include process pipes and JSON, not image capture. Timings vary with thermal state and with whatever else the machine is doing; this run was not made on an idle, dedicated machine.
  • Full per-image data: benchmarks/ocr/results.json.
Files main
Menu

Theme