PP-OCRv6 Small recognition, tuned on engraved US government headstones

A fine-tune of the PP-OCRv6 Small text-recognition model on line crops from Arlington National Cemetery headstones. The stock model often reads an engraved zero as the letter O and runs dates together (APR 1O 2019, JUL11921). This model reads those lines correctly without a repair step afterwards.

It is the recognition model only. Use it with the stock PP-OCRv6 Small detection model and the stock dictionary, both included here unchanged so the directory loads as it is.

Files

File What
rec.onnx the tuned recognition model (ONNX opset 11, input x [N,3,48,W], 21 MB)
det.onnx stock PP-OCRv6 Small detection (PaddlePaddle/PP-OCRv6_small_det, Apache-2.0), unchanged
dict.txt stock PP-OCRv6 dictionary, unchanged

Results

Exact line match on 7,047 held-out lines from 1,098 stones. No grave is on both the training and the held-out side.

Lines Count Stock This model
All 7,047 96.2% 99.6%
Lines the stock model read wrong 237 18.6% 97.5%
Lines the stock model read right 6,810 98.9% 99.6%
Dates 1,880 91.8% 99.7%
Names 2,099 98.5% 99.7%
Rank and branch 1,135 94.4% 99.6%
Wars, medals, family lines, states 1,933 99.0% 99.3%

On a separate set of 52 stones checked against the cemetery's records, the birth and death dates are both read correctly on 42 stones, against 32 for the stock model. The stock model reaches 42 only with a rule-based repair of its output; this model needs none.

Limits

  • Government stones only. The training lines are capital letters and digits on upright white marble stones, photographed front on. On one private family marker in the test set the model read worse than the stock model.
  • Full stops and dashes are dropped. No training label contains them. 1870β€”1957 comes out as 1870 1957.
  • The emblem at the top of a stone is read as a stray character or not at all.
  • Labels are weak. A line was used for training only when the stock model's reading agreed with the cemetery's catalogue (name, rank, dates) or with a fixed list of wars, medals, family lines and states, allowing for look-alike characters and lost spaces. A line the stock model and the catalogue both got wrong the same way is not in the set.
  • Labels longer than 25 characters were left out.

Training

  • Base: PP-OCRv6_small_rec pretrained weights, PaddleOCR config configs/rec/PP-OCRv6/PP-OCRv6_small_rec.yml.
  • Data: 12,000 line crops from 19,677 stones: the 4,704 lines the stock model read wrong or that contain &, and 1,824 correctly read lines of each of the four kinds.
  • Two passes, batch 64, learning rate 1e-4, CPU, about 10 hours on an Apple M4 Pro.
  • Exported with paddle2onnx.

The training photos are not part of this repository.

Use

Any runtime that loads PP-OCRv6 ONNX models can use the directory in place of the stock Small model. With RustO:

OCR_MODELS=small=/path/to/stock-small,stones=/path/to/this-directory

Credit

Tac Tacelosky, Museado Foundation. Built on PP-OCRv6 by the PaddleOCR authors (Apache-2.0).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for museado/arlington-graves

Quantized
(2)
this model