CoolFace
Modelpublic

thesimonharms/svtr-javanese-synthetic-v7

sourceHugging Facemitupdated 1mo agoView on Hugging Face
0likes20downloads
Model Card

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

PartDetail
EncoderOpenOCR RepSVTR (RepViT / mobile SVTRv2), unfrozen
HeadNew CTC head, Javanese block U+A980–U+A9DF + blank (~97 classes)
InputOne RGB line crop, resize height 48, keep aspect, cap width 1600. No pad-to-square.
OutputGreedy CTC decode (collapse repeats, drop blank)
Labels2–80 aksara

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.

BucketnExactCERNear (edit ≤2)
Short (≤12)22593.33%1.04%99.56%
Mid (13–24)30091.67%0.67%98.67%
Long (25–40)45093.56%0.30%99.11%
XLong (41+)52579.62%0.51%97.71%
All150088.27%0.56%98.60%

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.

python
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.