Model reference · open weights
crnn-fa is an open-weight language model from hezarai. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | hezarai |
|---|---|
| Type | Language models |
| Task | Image→text |
| Runs with | hezar |
| Released | 2023-11-27 |
| Popularity | 3k downloads / month |
| Licence | Open weights |
About
A CRNN model for Persian OCR. This model is based on a simple CNN + LSTM architecture inspired by this paper.
This is a successor model to our previous model hezarai/crnn-base-fa-v1. The improvements include:
model_config.yaml)Note that this model is only optimized for printed/scanned documents and works best on texts with a length of up to 50-ish characters. (For an end-to-end OCR pipeline, use a text detector model first like https://huggingface.co/hezarai/CRAFT to extract text boxes preferrably in word-level and then use this model), but it can be used to be fine-tuned on other domains like license plate or handwritten texts.
pip install hezar
from hezar.models import Model
crnn = Model.load("hezarai/crnn-base-fa-v2")
texts = crnn.predict(["sample_image.jpg"])
print(texts)
From the published model card. Full card on the HuggingFace links in the sidebar.
How it works
Using it via the API
Once AxForge deploys crnn-fa for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (crnn-fa below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"crnn-fa","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.