Skip to content

Models & parity

sceptre uses one CRAFT detector shared across languages, plus one gen2 CRNN recognizer per language group:

LanguageModelConfig value
— (detector)craft_mlt_25k
Englishenglish_g2english
Latin-scriptlatin_g2latin
Chinese (simplified)zh_sim_g2chinese_simplified
Japanesejapanese_g2japanese
Koreankorean_g2korean
Cyrillic-scriptcyrillic_g2cyrillic
Telugutelugu_g2telugu
Kannadakannada_g2kannada

All eight of EasyOCR’s gen2 (*_g2) recognizers are supported — the complete gen2 family — see ADR 0002.

Every ONNX artifact is a first-party export — built from EasyOCR’s weights by the sceptre export pipeline and hosted on the sceptre-ocr org on Hugging Face (Apache-2.0, dynamic-width — no letterbox distortion). Each model’s SHA-256 is pinned in the registry and verified against the downloaded bytes.

Downloads land in Hugging Face’s standard hub cache (<root>/models--<owner>--<name>/snapshots/<rev>/<file>), so the library, the CLI, and any other Hugging Face tooling on the machine share one store. The cache root resolves, in order: HF_HUB_CACHEHUGGINGFACE_HUB_CACHE$HF_HOME/hub~/.cache/huggingface/hub, or the ModelConfig::cache_dir override.

The registry owner (sceptre-ocr by default) can be overridden per config (ModelConfig::registry_owner) to point at a mirror without any code change — the owner is validated to a safe form before it reaches the cache path.

sceptre’s test suite compares its output against two goldens for every image in the parity corpus:

  • EasyOCR reference (fuzzy) — the authoritative Python EasyOCR output, compared with bag-of-words F1 (word/char) plus per-line box-IoU (≥ 0.5). This is the actual parity claim: what EasyOCR reads, sceptre reads.
  • sceptre self-snapshot (exact) — a previously committed sceptre run, compared for byte-exact text equality, catching regressions in sceptre’s own output between changes.

Real-model parity tests are opt-in, gated on SCEPTRE_REQUIRE_MODELS: unset (or the models absent) skips the test; set and the models are missing, the test panics so CI surfaces a misconfigured cache rather than silently passing. See ADR 0016.

The same corpus and parity signal (char/word-F1, box-IoU) back the head-to-head performance benchmark — see Benchmarks.