Skip to main content

Lipika — Indic Font Recognizer

लिपिका · Identify the font in an image of Indic-script text.

Upload a crop of text in any of 13 Indic scripts and Lipika returns the font family, weight, italic flag, and a hosted WOFF2 URL you can use immediately — plus visually-nearest alternatives from a retrieval index.

What it does

Families 563 (Google Fonts, Fontsource, SMC, CDAC/SALRC, legacy freeware)
Scripts Devanagari, Bengali, Tamil, Telugu, Kannada, Malayalam, Gujarati, Gurmukhi, Odia, Ol Chiki, Meetei Mayek, Arabic (Urdu), Latin
Outputs family (top-k), weight (100–900), italic, script, WOFF2 URL
Backbone ConvNeXt-V2-Tiny (28M params), multi-head + ArcFace, patch-voting inference
Accuracy 0.86 val top-1 · 0.90 real-photo R@1 · 0.88 retrieval R@1

Quick start

pip install lipika
from PIL import Image
from fontrecog.infer.predictor import Predictor  # package installs as `lipika`, imports as `fontrecog`

p = Predictor.from_pretrained("loopdesk-ai/lipika")
result = p.predict(Image.open("hindi_text.png"))

top = result["predictions"][0]
print(result["script"], top["family"], top["confidence"], top["woff2_url"])
# devanagari Tiro Devanagari Hindi 0.30 https://cdn.jsdelivr.net/...

The result dict also contains grouped_predictions (per-family, weights merged), retrieval (visually nearest families with cosine similarity), and calibrated uncertain / match_quality flags for open-set inputs.

Run the demo locally

pip install "lipika[demo]"
python -m fontrecog.demo --repo loopdesk-ai/lipika   # Gradio on :7861

How it was built

Everything is synthetic-first: training crops are rendered on the fly from font files (HarfBuzz shaping via a Pillow/raqm stack), augmented with real- photo-style degradations, and mixed with a small real-crop set. The corpus pipeline, training loop (Modal.com L4 GPUs), retrieval index build, and calibration are all in this repo:

src/fontrecog/
  data/        corpus manifest, font fetching, WOFF2 self-hosting
  dataset/     synthetic rendering, augmentation, val shard freezing
  train/       multi-head loop (family + script + weight + italic, ArcFace)
  index/       prototype retrieval index build + open-set calibration
  infer/       Predictor (patch voting, TTA, hedging), HF export
  eval/        frozen-shard + real-photo eval harnesses
  demo.py      Gradio app

See plan.md for the full build log (12 phases, v1 → v2.4).

License

Code: Apache-2.0. Model weights: Apache-2.0 (model card). Fonts referenced by the recognizer remain under their own licenses (OFL and similar); the model repo hosts only redistributable font files.


Developed & maintained by Loopdesk.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lipika-2.4.0.tar.gz (95.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lipika-2.4.0-py3-none-any.whl (117.0 kB view details)

Uploaded Python 3

File details

Details for the file lipika-2.4.0.tar.gz.

File metadata

  • Download URL: lipika-2.4.0.tar.gz
  • Upload date:
  • Size: 95.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for lipika-2.4.0.tar.gz
Algorithm Hash digest
SHA256 7d8e7d427dc7808724346f6c10bcdacfdb7c5d25533452699a924148e75cf1b5
MD5 6ed60b7e08cebf0b83b1009cfd95cead
BLAKE2b-256 dacd853b0156ed4fa9a74c21fb865542cd9ae04c075ebc8ca77b470a50f0564b

See more details on using hashes here.

File details

Details for the file lipika-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: lipika-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 117.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for lipika-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a09ecd92e1f45cf8c0437f818a08535ebedd71b72d3ae8d1f10eee1aa282057
MD5 a5abaee4fb94d9b058d7af422c0876ef
BLAKE2b-256 14d446b139510d8f194a22d353379133a86caa19c8bfe9eea75733dc1835e415

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page