Model reference · open weights
khmer-text-recognition is an open-weight language model from Darayut. 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 | Darayut |
|---|---|
| Type | Language models |
| Task | Image→text |
| Parameters (lead) | 18M |
| Runs with | transformers |
| Released | 2026-01-14 |
| Popularity | 2k downloads / month |
| Licence | Open weights |
About
This repository contains the implementation, datasets, and evaluation results for the Squeeze-and-Excitation Transformer Network, a high-performance Khmer Text Recognition model that utilizes a hybrid architecture combining Squeeze-and-Excitation blocks for feature extraction and BiLSTM smoothing for context smoothing, specifically designed to handle the complexity and length of Khmer script.
Khmer script presents unique challenges for OCR due to its large character set, complex sub-consonant stacking, and variable text line lengths. This project employs an enhanced pipeline that:
The model was trained entirely on synthetic data and evaluated on real-world datasets.
We generated 200,000 synthetic images to ensure robustness against font variations and background noise.
| Dataset Type | Count | Generator / Source | Augmentations |
|---|---|---|---|
| Document Text | 100,000 | Pillow + Khmer Corpus | Erosion, noise, thinning/thickening, perspective distortion. |
| Scene Text | 100,000 | SynthTIGER + Stanford BG | Rotation, blur, noise, realistic backgrounds. |
| Dataset | Type | Size | Description |
|---|---|---|---|
| KHOB | Real | 325 | Standard benchmark, clean backgrounds but compression artifacts. |
| Legal Documents | Real | 227 | High variation in degradation, illumination, and distortion. |
| Printed Words | Synthetic | 1,000 | Short, isolated words in 10 different fonts. |
To handle variable-length text lines without aggressive resizing, we employ a "Chunk-and-Merge" strategy:
Our proposed architecture integrates sequence-aware attention and recurrent smoothing to overcome the limitations of standard chunk-based OCR. The model consists of six key modules:
Squeeze-and-Excitation Network (SE-VGG):
Patch Module:
Transformer Encoder:
Merging Module:
BiLSTM Context Smoother:
Transformer Decoder:
We benchmarked our proposed model against VGG-Transformer, ResNet-Transformer, and Tesseract-OCR.
Character Error Rate (CER %) - Lower is better
TABLE 1: Character Error Rate (CER in %) results on the KHOB, Legal Documents, and Printed Word
| Model | KHOB | Legal Documents | Printed Word |
|---|---|---|---|
| Tesseract-OCR | 6.24 | 24.30 | 8.02 |
| VGG-Transformer | 2.27 | 10.27 | 3.61 |
| ResNet-Transformer | 2.98 | 11.57 | 2.80 |
| Proposed Model | 1.87 | 9.13 | 2.46 |
TABLE 2: Failure cases on KHOB, Legal Documents, and Printed Word
TABLE 3: Example of our proposed model against all baseline compared with the ground truth. Errors in the predictions are highlighted in red.
Key Findings:
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 khmer-text-recognition for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (khmer-text-recognition 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":"khmer-text-recognition","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.