SVTR Javanese Aksara (v11, mixed printed fonts)
CTC line recognizer for printed Javanese Aksara on wide strips (height 48, width up to 1600). Continue-finetuned from thesimonharms/svtr-javanese-synthetic-v7 (recook) on two synthetic domains: the original v2 long-line set and a native-height-48 render with 11 Unicode Regular families.
Drop-in for v7: same geometry, same greedy CTC decode, same alphabet (U+A980–U+A9DF, no Latin spaces). v6 remains the short-line square specialist: thesimonharms/trocr-javanese-synthetic-v6 (384×384, ≤12 aksara).
Model description
| Part | Detail |
|---|---|
| Encoder | OpenOCR RepSVTR (RepViT / mobile SVTRv2), unfrozen |
| Head | CTC, Javanese block U+A980–U+A9DF + blank (~97 classes) |
| Input | One RGB line crop, resize height 48, keep aspect, cap width 1600. No pad-to-square. |
| Output | Greedy CTC decode (collapse repeats, drop blank) |
| Labels | 2–80 aksara, scriptio continua (no spaces) |
| Base | v7 recook, 8 epochs at LR 1e-5, mix 20/20/25/35 short/mid/long/xlong. Hub weights are epoch 7 (best mixed CER). |
Results
Greedy CTC, native height 48, 1500-line held-out splits. Score the two domains separately — they are different fonts/renders, not a single mixed headline.
v2 val (v7’s domain)
| Bucket | n | Exact | CER | Near (edit ≤2) |
|---|---|---|---|---|
| Short (≤12) | 225 | 93.33% | 1.16% | 99.56% |
| Mid (13–24) | 300 | 93.33% | 0.53% | 99.67% |
| Long (25–40) | 450 | 93.33% | 0.28% | 99.78% |
| XLong (41–80) | 525 | 80.57% | 0.52% | 97.33% |
| All | 1500 | 88.87% | 0.55% | 98.87% |
v7 recook on this split: 88.27% exact / 0.56% CER / 79.62% xlong.
h48 val (11-font native 48)
| Bucket | n | Exact | CER | Near (edit ≤2) |
|---|---|---|---|---|
| Short (≤12) | 300 | 93.33% | 1.21% | 99.67% |
| Mid (13–24) | 300 | 88.67% | 1.05% | 98.33% |
| Long (25–40) | 375 | 82.67% | 1.11% | 95.47% |
| XLong (41–80) | 525 | 69.71% | 1.64% | 89.90% |
| All | 1500 | 81.47% | 1.30% | 94.93% |
v7 recook is 0% exact on this split. v11 is the first public checkpoint that reads both.
A real written Aksara line is usually ≤40 characters (short/mid/long). Xlong is stitched overflow (41–80), not a typical page line.
Intended use
Use for
- Cropped printed Aksara lines up to ~80 characters
- Research after an external line detector has produced strips
- Broader printed-font coverage than v7, without giving up v7’s v2 score
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
- Beam+LM decode (greedy is the gate; beam+LM was much worse on this stack)
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-v11")
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 v2 parquet plus a native height-48 11-font render of the same labels (80k+80k train). Mix 20% short / 20% mid / 25% long / 35% xlong. Cream or white paper, light JPEG/blur only. No manuscript backgrounds. Labels are aksara-only (no Latin spaces). Hash holdout on text follows v6.
Limitations
- Synthetic printed domain only
- Width cap 1600 / ~80 aksara
- Xlong exact match is the weak bucket, especially on new fonts
- CTC blank/collapse errors on tight or repeated glyphs; pangkon/pasangan is a one-character exact-match death
- No page detector; one cropped line per image
Citation
OpenOCR / SVTRv2: Du et al., SVTRv2: CTC Beats Encoder-Decoder Models in Scene Text Recognition, ICCV 2025.