thesimonharms/svtr-javanese-synthetic-v7
SVTR Javanese Aksara (v7, long synthetic lines)
CTC line recognizer for printed Javanese Aksara on wide strips (height 48, width up to 1600). Fine-tuned from OpenOCR RepSVTR (mobile SVTRv2) with a new Javanese CTC head.
This is not TrOCR. The short-line square specialist remains `thesimonharms/trocr-javanese-synthetic-v6` (384×384, ≤12 aksara). Use v6 for short crops; use this checkpoint for longer printed lines.
Model description
SVTRv2 exists because encoder–decoder STR models collapse on long text; CTC does not (Du et al., ICCV 2025).
Results
Held-out javanese-synthetic-long validation, greedy CTC decode.
Intended use
Use for
- Cropped printed Aksara lines up to ~80 characters
- Research after an external line detector has produced strips
Do not use for
- Full manuscript pages, PDFs, or book openings
- Palm-leaf / stained / faded handwriting
- TrOCR 384×384 square inputs (that is v6)
- Production archival digitization without a human in the loop
How to use
Resize a cropped line to height 48, keep aspect ratio, cap width at 1600. Do not pad to a square.
import sys
from huggingface_hub import snapshot_download
from PIL import Image
root = snapshot_download("thesimonharms/svtr-javanese-synthetic-v7")
sys.path.insert(0, root)
from infer import load_recognizer, recognize
model, codec, device = load_recognizer(root)
print(recognize(model, codec, Image.open("line.png"), device))Training data
Private `thesimonharms/javanese-synthetic-long`: 80k train / 2.5k val, 2–80 aksara, 15% short / 20% mid / 30% long / 35% xlong, HarfBuzz-shaped Unicode Regular families, cream or white paper, light JPEG/blur only. No manuscript backgrounds. Hash holdout on text is the same scheme as v6.
Limitations
- Synthetic printed domain only
- Width cap 1600 / ~80 aksara
- CTC blank/collapse errors on tight or repeated glyphs
- No page detector; one cropped line per image
- Exact match on 80-character lines is a different statistic than v6’s 12-character gate; report CER and near-match by length bucket
Citation
OpenOCR / SVTRv2: Du et al., SVTRv2: CTC Beats Encoder-Decoder Models in Scene Text Recognition, ICCV 2025.
