A DenseNet121-Transformer Architecture with Constrained Synthetic Line Generation
This repository contains the source code, trained models, and vocabularies for Kurdish handwritten line recognition, with cross-dataset generalization to Arabic (KHATT) and Urdu (PUCIT) handwritten datasets.
Repository Structure
KHLR/
├── Kurdish-HLR-Model/ # Best Kurdish model (safetensors + config)
├── Arabic-HLR-Model/ # Fine-tuned on KHATT Arabic dataset
├── Urdu-HLR-Model/ # Fine-tuned on PUCIT Urdu dataset
├── Scripts/
│ ├── train.py # Main training script
│ ├── synthetic_line_generator.py # Recipe-based synthetic line generation
│ └── inference.py # Single image / batch inference
├── Sample/
│ ├── sample_image.tif # Example handwritten line image
│ └── sample_image.txt # Corresponding ground truth
├── requirements.txt
└── README.md
The Arabic and Urdu models use a triple unified vocabulary (Kurdish + Arabic + Urdu) enabling cross-script transfer learning.
Dataset
The models were trained using the following subsets of the DASTNUS Kurdish handwritten dataset:
Data Source
Training
Validation
Testing
Unique handwritten lines
3,575
655
649
Synthetic handwritten lines
3,762
-
-
Fixed-content lines (50 writers)
512
-
-
Total
7,849
655
649
The data used in this research is available upon request for non-commercial scientific research purposes only.
Citation
bibtex
1[Hamad, K. A. and Shareef, S. M. (2026) “Kurdish Handwritten Text Recognition:
2A DenseNet121-Transformer Architecture with Constrained Synthetic Line Generation”,
3ARO-THE SCIENTIFIC JOURNAL OF KOYA UNIVERSITY, 14(1), pp. 404–415. doi: 10.14500/aro.12820.]
License
This repository is released for non-commercial scientific research purposes only.