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.
- 📦 PyPI:
pip install lipika - 🤗 Model: loopdesk-ai/lipika
- 🎨 Demo: anilpai/lipika-demo
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
Why this exists
India's internet has gone decisively Indic — ~98% of its 886M+ internet users consume Indian-language content (IAMAI–Kantar 2024) — and its visual culture is the world's largest: 1,700–2,400 films a year in 20+ languages, 240M+ newspapers in daily circulation. Yet every mainstream font identifier (WhatTheFont, Matcherator, Adobe Match Font) is trained on Latin catalogs and fails outright on Devanagari, Tamil, or Bengali; academic prior art (DeepFont) is Latin-only. Indic type is also genuinely harder: conjunct ligatures reshape glyphs by context, sibling families are near-identical, and government/DTP workflows still run on non-Unicode legacy encodings (Kruti Dev, DevLys) whose documents are unreadable unless you first identify the font from pixels. Full story on the model card.
Why Loopdesk built this
Loopdesk is an agentic video editor — built from India, for the world — and one of the first editors to support practically every free Indic font. Our pipeline analyses millions of video frames every second; when a frame contains Indic text, the editor needs to know which font that is to load the matching free font and keep the design consistent through edits. Nothing could answer that for Indic scripts, so we built Lipika and open-sourced it.
What you could build with it
- A "WhatTheFont for Indic" browser extension — right-click any image (movie poster, meme, news graphic) → family + instant WOFF2 preview; CPU inference takes seconds
- Movie-poster / title-card typography analysis at Indian-cinema scale
- Font-aware OCR & archive digitization — identify legacy families (Kruti Dev/DevLys)
before OCR; the bundled
krutidev → Unicodeconverter makes those bytes recoverable - Design & localization tooling — match a screenshot to the nearest free font via retrieval embeddings
- Brand/typography audits and document forensics for Indic markets
Want to build an Indic font generator? We'd love to help — open a GitHub issue or start a HF discussion.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lipika-2.4.1.tar.gz.
File metadata
- Download URL: lipika-2.4.1.tar.gz
- Upload date:
- Size: 98.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b98e89156f20dba34eb0dddad55a56680d187240f53a4535601e15aea96c947b
|
|
| MD5 |
dd22deeb5ae782b65494a89980a47a5f
|
|
| BLAKE2b-256 |
3be79aa499fc295001fc2485ef2a40c54d186d3f9da9fe83102dc13f3dc64a21
|
File details
Details for the file lipika-2.4.1-py3-none-any.whl.
File metadata
- Download URL: lipika-2.4.1-py3-none-any.whl
- Upload date:
- Size: 118.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2efb57f8f57768e611273db3de8248ace47288ee335405da671a98e142bf60b3
|
|
| MD5 |
8b591f6150c21bf9c121758e03164f7d
|
|
| BLAKE2b-256 |
8913b9dac3e8e8f6065bf3a7d65e7bd1f9a91243dfb651a6bea94b8f003cf3c4
|