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.
- 🤗 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
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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d8e7d427dc7808724346f6c10bcdacfdb7c5d25533452699a924148e75cf1b5
|
|
| MD5 |
6ed60b7e08cebf0b83b1009cfd95cead
|
|
| BLAKE2b-256 |
dacd853b0156ed4fa9a74c21fb865542cd9ae04c075ebc8ca77b470a50f0564b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a09ecd92e1f45cf8c0437f818a08535ebedd71b72d3ae8d1f10eee1aa282057
|
|
| MD5 |
a5abaee4fb94d9b058d7af422c0876ef
|
|
| BLAKE2b-256 |
14d446b139510d8f194a22d353379133a86caa19c8bfe9eea75733dc1835e415
|