Page Script ID

Identify writing scripts on document pages in milliseconds on CPU — without running OCR. 21 scripts + unknown, multi-label output, ONNX & timm weights.

Document Page
Choose an example below or upload a page to run both ONNX models side-by-side.
p.1/1
Examples CC-BY-4.0 (NVIDIA OCR v2)
Live Decision Thresholds Instant client-side update
Refuse as unknown if highest script probability is below this cut-off.
Report every script above this value (lower to 0.50 to catch mixed pages).
Presets:

MobileNetV4-Small

2.52M params · 10 MB ONNX · Fast default

—

HGNetV2-B0

3.99M params · 16 MB ONNX · Higher accuracy

—
Run locally (ONNX) or via Gradio Client API
pip install onnxruntime pillow numpy huggingface_hub
hf download davanstrien/page-script-id --local-dir ./page-script-id
python ./page-script-id/example.py page.jpg          # full page
python ./page-script-id/example.py --pad crop.jpg    # cropped text block
from gradio_client import Client, handle_file
client = Client("davanstrien/page-script-id-demo")
res = client.predict(file=handle_file("page.jpg"), pad_square=False, pdf_page=1, api_name="/identify_script")
print(res["models"]["mnv4s"]["probs"])