How Far Can Synthetic Data Take Thai OCR? Inside the Recipe That Reached 1.24% Median CER
Based on: How Far Can Synthetic Data Take Thai OCR? — Kunat Pipatanakul
Here is a puzzle that should bother anyone training document vision models: take public English documents, erase their text, translate most of the labels into Thai, render them back into the original regions, and train an OCR recognizer. Then, take genuine Thai documents, erase their text, render their Thai OCR labels back into those native layouts, and train the same model architecture.
Which model performs better on real Thai documents?
If you guessed the native Thai documents, you would be right if your model reads entire pages at once. If your model processes cropped regions, you would be wrong in this experiment. Under crop-level training, the model fed reconstructed English sources beat the model trained on reconstructed Thai sources, posting a 5.52% median character error rate against 15.59% on held-out printed pages.
That inversion is one of the surprising findings in How Far Can Synthetic Data Take Thai OCR?, a technical report by Kunat Pipatanakul from Wayu Research and Paxa Labs. Instead of treating synthetic “realism” as a single ingredient, the paper separates typography, spatial layout, non-text context, and glyph variation, then tests how their contributions change with the training setup.
The practical outcome is Wayu-Paxa-OCR-Zero, a 0.9-billion-parameter model adapted from PaddleOCR-VL-1.6 using 45,723 synthetic pages. In the reported evaluations, the adaptation drops median character error rate on printed pages from 6.64% to 1.24%, slashes handwriting error from 74.87% to 20.55%, and beats Typhoon OCR v1 7B across all five evaluation sets.
The “synthetic-only” description needs a precise boundary: the adaptation uses no real Thai document pages as source images and no page-level OCR supervision from those documents. It does use real handwriting glyphs and iApp handwriting crops. It also builds on an existing pretrained checkpoint.
Let us dig into what makes this synthetic recipe work, where its gains stop, and what the findings suggest for document-processing pipelines.

The Script That Challenges Document Models
The paper starts from uneven language coverage. Open document models, datasets, and benchmarks center on English and Chinese, while Thai has fewer reliable, openly available document labels.
Three details make the supervision problem especially relevant here:
- Multi-level text placement: Thai vowels and tone marks can occupy several vertical levels. Rendering needs to account for the complete shaped text, including those marks.
- Imperfect extracted labels: PDF text extraction and OCR pseudo-labels can omit characters, reorder combining marks, or corrupt reading order. Manual correction is costly.
- Appearance variation: Printed typefaces and real handwriting expose a recognizer to different character shapes. The experiments test whether font diversity and sampled handwriting glyphs help bridge that gap.
Synthetic reconstruction offers a useful advantage: the renderer knows the text it places and the regions it uses. That gives the training pipeline labels tied directly to the generated content, rather than requiring someone to transcribe each finished page.
But exact generated labels do not guarantee successful transfer. A model can learn from a synthetic page and still struggle with real documents. The paper’s central question is therefore precise: which properties of the generated page actually help?
It also distinguishes two meanings of synthetic supervision. Some controlled experiments reconstruct real Thai pages using their OCR labels. The final Wayu-Paxa-OCR-Zero recipe instead uses public English source documents, with Thai text and handwriting material introduced during generation.
Those are different data conditions, and keeping them separate is essential to understanding the results.
Controlled Reconstruction: Dissecting the Synthetic Page
Pipatanakul introduces an in-place reconstruction pipeline, linked in the paper as docaug. It starts with a source page and annotated text regions, erases or inpaints the original text pixels, and renders the replacement label back into its corresponding region.
This approach gives the experiments control over five properties:
- Source Domain: Reconstructing public English pages from DocLayNet, Crello, and PubTabNet versus real Thai printed pages.
- Non-Text Context: Keeping source backgrounds and non-text elements versus replacing them with white while retaining the text regions.
- Typography Diversity: Sampling from a measured Thai typeface profile versus using a single typeface.
- Two-Dimensional Layout: Preserving the original arrangement versus stacking regions vertically in reading order.
- Handwriting Strokes: Rendering handwriting typefaces versus sampling real character instances from a glyph bank.
The out-of-domain dataset translates most source text into Thai. A remaining 7.61% of pages keep their English labels, approximating the English-language proportion in the real Thai printed collection.
Text fitting is a crucial part of the process. The pipeline shapes each complete region-level label with HarfBuzz, samples a typeface and type size, and shrinks the size until the text fits its original region. If a label still overflows at the minimum acceptable size, the entire page is rejected.
The result is a controlled way to change the appearance of the training pages while retaining known labels and region geometry.
The Surprises: What Matters and What Is Just Noise
Using Qwen3-VL-2B-Instruct as the experimental testbed, the author compares page-level and crop-level training. The source-property ablation progressively removes non-text context, font diversity, and then two-dimensional layout.
That sequence matters: the final row combines all three removals. Its difference from the full reconstruction cannot be attributed to layout alone.
1. Non-Text Context Has Little Consistent Effect Here
When the reconstruction replaces backgrounds, figures, rules, and scan artifacts with a white canvas (White-layout), median performance changes relatively little. Across the three evaluation sets and both training settings, median character error rate shifts by at most 1.62 percentage points.
On printed Heldout pages, removing non-text context changes page-level median CER from 5.07% to 4.78% and crop-level median CER from 5.52% to 4.86%.
The character-weighted mean is less uniform. For page-level printed recognition, it rises from 16.90% to 21.05%, even as the median improves. Under crop-level training, it falls from 19.09% to 16.69%.
The supported conclusion is narrower than “backgrounds do not matter.” Retained non-text context provides little consistent CER benefit in these reconstruction experiments. The study does not separately test every kind of simulated paper damage, lighting effect, or degradation of the text itself.
2. Font Diversity Helps Handwriting Transfer
The author profiles 8,000 public Thai PDF pages and finds a concentrated typeface distribution. Out of 693 observed family names, the top ten account for 80.9% of Thai characters:
- Cordia New: 18.6%
- Angsana New: 15.3%
- TH Sarabun PSK: 14.7%
- TH Sarabun New: 14.2%
- Browallia New: 6.9%
- TH Sarabun IT๙: 4.7%
- DB ThaiText X: 2.4%
- Cordia UPC: 1.9%
- Tahoma: 1.1%
- DB FongNam X: 1.1%
- All other 683 families combined: 19.1%
Replacing this diverse profile with a single typeface, TH Sarabun New, increases printed median CER by 0.56 percentage points under page-level training and 2.15 points under crop-level training, relative to the white-background variant.
The handwriting losses are larger. On the broader Handwriting set, median CER rises from 43.16% to 49.86% under page-level training, a 6.70-point increase. Under crop-level training, it rises from 50.77% to 62.13%, an 11.36-point increase.
Easy Handwriting shows the same direction, with increases of 9.48 and 13.37 points respectively.
The experiment supports a practical finding: typeface diversity helps transfer to handwriting. It does not establish exactly which internal character features the model learns, or that a small selection of the most common fonts would reproduce the full profile’s results.
3. Flattening Layout Further Hurts Handwriting
What happens when the remaining text regions are stacked vertically in reading order? The researchers test this with Linear-white-single-font, building on the white-background, single-font condition.
On Handwriting, crop-level median CER rises from 62.13% to 70.17%. Under page-level training, it rises from 49.86% to 58.40%. Both Easy Handwriting medians also worsen.
Printed recognition behaves differently. Crop-level median CER rises from 7.01% to 9.60%, while the page-level median changes from 5.34% to 5.07%.
The spatial arrangement therefore matters for handwriting transfer in both settings, and for printed recognition in the crop-level comparison. The results do not show universal degradation across every metric or establish the mechanism behind the crop-level effect.
Successive Ablations: Crop-Level Out-of-Domain Training
-------------------------------------------------------------
Training Variant Heldout Med CER Handwriting Med CER
Full Out-of-Domain Synthetic 5.52% 49.15%
Remove non-text context 4.86% 50.77%
Also remove font diversity 7.01% 62.13%
Also remove two-dimensional layout 9.60% 70.17%
The Granularity Inversion: Page-Level vs. Crop-Level
The most intriguing result is how training granularity changes the preferred source data. The paper compares two settings:
- Page-Level: The model receives a complete document image and generates a JSON object containing regions, bounding boxes, categories, and text in reading order.
- Crop-Level: The recognizer trains on individual annotated regions. At inference, a layout detector supplies crops for recognition, so the reported pipeline scores include detection and reading-order errors.
When the author compares reconstructed Thai documents with reconstructed English sources, the winner flips.
Training Granularity Reversal: Median CER on Heldout Print
Page-Level Model (Qwen3-VL-2B-Instruct):
• In-Domain Thai Reconstructions: 1.82% <-- Lower CER
• Out-of-Domain Reconstructions: 5.07%
Crop-Level Model (Qwen3-VL-2B-Instruct):
• In-Domain Thai Reconstructions: 15.59%
• Out-of-Domain Reconstructions: 5.52% <-- Lower CER
The reversal also appears on both handwriting sets. In-domain reconstruction improves the page-level Handwriting median from 43.99% to 36.27%, but worsens the crop-level median from 49.15% to 52.77%.
Why does this happen? The paper explicitly leaves the cause unresolved.
The two systems receive different amounts of document context, but that distinction alone does not establish why one source wins. The study does not demonstrate that English-source crops are more varied, that Thai administrative text blocks are more uniform, or that either property causes the reversal.
What it does establish is enough to change an experimental plan: source-domain matching cannot be assumed to help every recognition architecture. In this comparison, a source that substantially improves page-level recognition substantially worsens crop-level printed recognition.
The Handwriting Problem: Font Outlines vs. Real Glyphs
A handwriting typeface generally repeats the same underlying outline whenever the same character appears. A bank of real handwriting instances lets the renderer introduce variation across those occurrences.
The paper tests whether that difference improves transfer. Its handwriting-typeface variant samples from the full bank of 693 font families rather than the measured profile; 24.0% of pages use a handwriting typeface, and half of those receive per-instance stroke distortion.
The real-glyph variant redraws the same handwriting subset using sampled character images. Labels, region annotations, ink height, and ink color remain fixed.
The glyph bank comes from a multi-stage pipeline:
- Detection: A YOLOv8-based detector produces approximately 5.70 million candidate glyph boxes from iApp handwriting line images and the Real Thai Handwriting training split.
- Alignment & Filtering: Candidates are aligned to shaped line labels, checked with a glyph classifier or commercial OCR, and filtered by size and shape, leaving 534,404 candidates.
- VLM Verification: Gemini 3.5 Flash verifies sampled candidates, confirming 12,090 instances.
- Assembly: The paper reports a final bank of 5,953 glyph instances across 76 character classes, assembled using sampling across writers.
Handwriting Glyph Pipeline:
[5.70M Candidates] -> [534K Filtered] -> [12,090 Verified] -> [5,953 Bank Instances]
During rendering, supported character occurrences are sampled independently. Repeated characters can therefore receive different strokes, although independent sampling does not guarantee a different instance every time. The process does not enforce a consistent writer within a page.
On the redrawn pages, the bank covers 96.3% of Thai character instances. Unsupported characters fall back to the page typeface.
The results in Table 5 show a consistent handwriting benefit:
- Base out-of-domain synthetic data achieves 43.99% median CER on Handwriting under page-level training.
- Adding handwriting typefaces lowers it to 38.65%.
- Using real glyph instances lowers it further to 37.91%, and reaches 30.66% on Easy Handwriting.
Crop-level handwriting medians also improve when real glyphs replace handwriting typefaces.
The gap to real handwriting supervision remains. Training on Real Thai Print plus Handwriting reaches 26.05% median CER on Handwriting and 20.79% on Easy Handwriting. Those real-data labels are constructed through an OCR-and-VLM pseudo-labeling pipeline, rather than described as human transcriptions.
The paper leaves the effect of a larger glyph bank for future study. It does not isolate which remaining handwriting characteristics account for the gap.

Wayu-Paxa-OCR-Zero: The Resulting Model
Taking the lessons from the ablations, the author adapts PaddleOCR-VL-1.6 into Wayu-Paxa-OCR-Zero, retaining its 0.9B-parameter architecture.
At inference, PP-DocLayoutV3 supplies regions to the recognizer. For PaddleOCR-VL training, table targets use Optimized Table Structure Language (OTSL); tables whose spans cannot be represented faithfully are removed.
The training collection contains 45,723 synthetic pages:
- 39,534 base synthetic pages from DocLayNet, Crello, and PubTabNet, including both handwriting-typeface renderings and real-glyph copies of 7,131 pages.
- 3,999 handwriting-focused pages: 3,000 disjoint DocLayNet-v1.2 pages rendered with handwriting glyphs and 999 synthetic pages with pasted iApp handwriting crops.
- 2,190 synthetic forms reconstructed from CommonForms templates, with stitched glyphs in field values.
Public English sources provide the source documents and templates. No Real Thai document page from the controlled study is used as a source page for this final recipe.
That does not mean the pipeline has no real Thai handwriting input. Its glyph bank includes material extracted from the Real Thai Handwriting training split, and its additional pages include iApp crops. “Synthetic-only” describes the generated training pages and their supervision, not an absence of real handwriting material anywhere in data construction.
All 0.9B parameters are trained for one epoch, using a learning rate of 3 × 10⁻⁵, a cosine schedule, a 0.03 warmup ratio, and an effective batch size of 16.
Benchmark Head-to-Head
The paper evaluates five sets: Heldout printed Thai pages (301 pages), Handwriting (200 pages), Easy Handwriting (200 pages), ThaiOCRBench, and the 1,148-page clean Thai subset of SEA-DocBench.
ThaiOCRBench results average each aggregate across five audited reading tasks. Easy Handwriting selects pages with low disagreement between two proprietary handwriting recognition systems.
Comparative Performance: CER in Percent; Lower Is Better
Benchmark PaddleOCR-VL-1.6 Wayu-Paxa-OCR-Zero Typhoon OCR 7B Typhoon OCR 1.5 2B Gemini 3.7 Flash
(0.9B Base) (0.9B Adapted)
-----------------------------------------------------------------------------------------------------------------------
Heldout (Print) - Med 6.64% 1.24% 2.54% 0.21% 0.00%
Heldout (Print) - Mean 27.60% 14.75% 18.27% 5.47% 3.56%
-----------------------------------------------------------------------------------------------------------------------
Handwriting - Med 74.87% 20.55% 43.60% 19.36% 11.29%
Handwriting - Mean 67.90% 22.28% 49.36% 21.86% 15.04%
-----------------------------------------------------------------------------------------------------------------------
Easy Handwriting - Med 73.74% 14.18% 34.99% 9.02% 3.89%
Easy Handwriting - Mean 69.41% 17.08% 45.06% 15.74% 7.64%
-----------------------------------------------------------------------------------------------------------------------
ThaiOCRBench - Med 38.0% 15.3% 30.6% 6.2% 0.9%
ThaiOCRBench - Mean 43.3% 25.6% 44.7% 16.8% 3.8%
-----------------------------------------------------------------------------------------------------------------------
SEA-DocBench - Med 8.87% 4.86% 9.22% 5.81% 5.51%
SEA-DocBench - Mean 18.54% 9.99% 17.57% 12.80% 10.62%
The numbers reveal several standout achievements:
- Substantial improvement over the base model: The synthetic recipe reduces both median and mean CER on every evaluation set. Printed median CER falls from 6.64% to 1.24%, and Handwriting median CER falls from 74.87% to 20.55%.
- Outperforming a model nearly eight times its size: Wayu-Paxa-OCR-Zero beats Typhoon OCR 7B on all five sets. Its Handwriting median CER is less than half the 7B model’s 43.60%.
- A strong result on clean Thai SEA-DocBench pages: Its 4.86% median and 9.99% mean CER are lower than all four comparison systems on that subset, including Gemini 3.7 Flash.
The newer Typhoon OCR 1.5 2B still leads Wayu-Paxa-OCR-Zero on the other four evaluation sets. Gemini 3.7 Flash has the lowest CER on the three internal sets and ThaiOCRBench.
These comparisons establish competitiveness under the reported evaluation. They do not establish that synthetic supervision is intrinsically better than the training data used by other systems, which differ in architecture, scale, pretraining, and supervision.
The Metric Trap: Why Median and Mean Tell Different Stories
Look closely at Wayu-Paxa-OCR-Zero’s printed results: median CER is 1.24%, but mean CER is 14.75%.
Why such a large gap?
The two aggregates answer different questions:
- Median CER is the median page error rate. It describes the middle of the evaluated page distribution, without establishing accuracy for any particular document category.
- Mean CER is character-weighted. Longer pages contribute more, and pages with large error rates can contribute disproportionately to the aggregate.
There is also a scoring detail behind every reported number. The paper uses projected CER: predictions are normalized and fuzzily aligned to evaluated text regions before scoring. Text outside claimed spans is discarded, while errors within claimed spans and missing evaluated regions remain chargeable.
The algorithm removes whitespace and specified markup or content during normalization and caps each page’s CER at 100%. The reported mean is the character-weighted average of those capped page scores. These are therefore not unfiltered whole-document transcription scores.
A simple hypothetical example shows why the aggregates can diverge:
Ten Equal-Length Pages:
Nine pages at 1% CER
One page at 85% CER
Median CER: 1%
Mean CER: 9.4%
The actual median–mean gap is consistent with harder pages contributing disproportionately to aggregate error. The table alone does not identify particular failure modes or tell us how many pages suffered them.
The real-supervision comparison makes the limitation concrete. Under matched page-level training, In-Domain Synthetic reaches 1.82% median CER against 1.31% for Real Thai Print. But its mean is 16.20%, compared with 9.79% for real printed supervision.
Those real-data labels come from Azure OCR followed by VLM normalization. The internal evaluation references are also pseudo-labels, produced using Azure OCR and Gemini 2.5 Flash.
Reconstruction approaches real supervision on the typical printed page in this experiment, while leaving a larger gap in the character-weighted aggregate.
Why it matters: A Pragmatic Blueprint for Document AI Teams
For teams working on Thai or other languages with limited document annotations, the paper offers a useful experimental playbook. Its strongest lessons concern what to measure and compare, rather than universal rules for production.
1. Test the Value of Non-Text Context
The retained backgrounds and non-text elements bring little consistent CER benefit here. A white-background reconstruction is therefore a useful comparison before investing heavily in source-page context. The results do not justify discarding every form of degradation modeling without testing it.
2. Preserve and Evaluate Font Diversity
The measured profile provides a grounded starting point for rendering Thai documents. Replacing it with one typeface harms handwriting transfer. The study supports diversity over that single-font baseline; it does not show that retaining only the top ten or twenty fonts is sufficient.
3. Match Data Experiments to Model Architecture
Evaluate candidate source datasets using the training granularity you intend to use. In-domain reconstruction wins for page-level printed recognition here, while out-of-domain reconstruction wins for crop-level recognition. Neither result establishes a universal requirement to use one source domain.
4. Test Real-Glyph Banks for Handwriting
Handwriting typefaces already improve handwriting recognition in these experiments. Real glyph instances add further gains. A verified glyph bank is therefore a promising complement, with evaluation sources kept separate from the material used to build it. The study does not establish an optimal bank size or eliminate the gap to real handwriting supervision.
5. Evaluate Beyond the Typical Page
The low median is only part of the result. The larger character-weighted error makes difficult pages an important part of any follow-up evaluation. The paper does not report production acceptance rates, confidence calibration, or a validated routing system, so its benchmark scores cannot establish those deployment properties.
The Horizon for Synthetic Document Parsing
Wayu-Paxa-OCR-Zero shows that synthetic document reconstruction can support competitive Thai OCR adaptation. A sub-billion-parameter model substantially improves its base checkpoint and surpasses Typhoon OCR 7B across five evaluation sets, without using real Thai pages as source documents for that adaptation.
The result is strongest when its boundaries stay visible: real handwriting material contributes to the synthetic pages, newer comparison systems retain substantial advantages on several sets, and severe errors remain important.
The open questions point toward concrete next experiments:
- Broader Handwriting Variation: Real glyphs help, but the controlled models still trail training with real handwriting pages. The effect of a larger glyph bank remains untested.
- Explaining the Crop vs. Page Inversion: The source-domain reversal is substantial, but its cause is unresolved. Understanding it could help explain which reconstruction properties transfer at each training granularity.
- Closing the Aggregate Error Gap: Synthetic reconstruction approaches real printed supervision on median CER while trailing more clearly on character-weighted mean CER. Broader layout, typography, and handwriting coverage remain directions for improving generalization.
For document AI, this paper gives “data quality” a more testable meaning. Typeface diversity, two-dimensional structure, glyph variation, and training granularity can be varied and evaluated separately. That is the recipe’s most useful contribution: a way to investigate which synthetic ingredients earn their place.