Downloads · 30 days
0
KimkosalYon/siemreap-arial-khmer-ocr
siemreap-arial-khmer-ocr is a machine learning model from KimkosalYon. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This repository contains Khmer OCR text-line recognition checkpoints trained on the 200k synthetic Siemreap/Arial OCR dataset.
Downloads · 30 days
0
Access
Public
Updated Jul 5, 2026
Repo size
245 MB
Likes
0
Public
Click a slice to open those files.
.safetensors245 MB · 100%
From the Hugging Face model README
This repository contains Khmer OCR text-line recognition checkpoints trained on the 200k synthetic Siemreap/Arial OCR dataset.
The models recognize rendered Khmer text-line images using a CRNN pipeline:
Input image -> Modified ResNet CNN -> vertical mean pooling -> 2-layer BiGRU -> linear classifier -> CTC decoding
| File | Architecture | Validation Loss | Validation CER | Exact Match Accuracy | Test CER |
|---|---|---|---|---|---|
siemreap_arial_ocr_bs256_epoch_25.safetensors | ResNet34 + BiGRU + CTC | 0.0085 | 0.1635% | 95.695% | ~0.18% |
resnet18_bigru_epoch_25.safetensors | ResNet18 + BiGRU + CTC | 0.0189 | 0.4325% | 90.245% | 0.4509% |
The models were trained on a generated 200,000-image Khmer OCR text-line dataset using:
Text sources:
seanghay/khmer-hanuman-100k. Credit to the original uploader/owner seanghay.Dataset repo:
KimkosalYon/khmer-ocr-200k-siemreap-arial
Both models use the same OCR head and training pipeline. The only main difference is the ResNet backbone depth.
Input Image: (B, 1, H, W)
↓
Modified ResNet18/34 backbone
↓
Feature Map: (B, 512, H', W')
↓
Vertical Mean Pooling: (B, 512, W')
↓
Sequence Formatting: (T, B, 512)
↓
2-layer BiGRU, hidden size 256, dropout 0.2
↓
Linear classifier: 193 logits
↓
CTC decoding / loss
The ResNet backbone is adapted for OCR by:
Conv2d(1, 64, 7, 2, 3)(2,2) to (2,1) in layers 3 and 4The checkpoint metadata contains the character vocabulary mapping c2i. The vocab.json file is also uploaded for convenience.
For ResNet34, use the KhmerCRNN_BiGRU model class from the project source.
For ResNet18, use the same architecture pattern but initialize the CNN backbone with torchvision.models.resnet18(weights=None) instead of ResNet34.
These models were trained on synthetic rendered text-line images. Real scanned documents, photographed text, handwriting, unusual fonts, heavy blur, and severe perspective distortion may require additional fine-tuning.
Dataset construction uses text derived partly from seanghay/khmer-hanuman-100k. Please credit the original owner/uploader seanghay when referencing the Hanuman-derived source text.