changing the first convolution to grayscale input: Conv2d(1, 64, 7, 2, 3)
changing later ResNet strides from (2,2) to (2,1) in layers 3 and 4
preserving horizontal resolution so CTC has enough time steps for Khmer text
Training
Epochs: 25
Batch size: 256
Image height: 64
Optimizer: AdamW
Loss: CTC loss, blank index 0
Augmentation: random rotation, brightness/contrast jitter, Gaussian blur, random erasing
Loading
The 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.
Limitations
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.
Credits
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.