IFHCDB: Farsi Handwritten Character Database
- IFHCDB is a comprehensive dataset containing isolated Arabic characters derived from Farsi handwritten samples.
- The dataset comprises 70,120 images with a large-scale yet relatively clean benchmark ideal for testing mobile-enabled CNNs.
- Lightweight models like MnasNet achieve up to 99% accuracy on IFHCDB, highlighting its value for transfer learning in real-time OCR.
IFHCDB, the Isolated Farsi Handwritten Character Database, is a benchmark dataset for handwritten character recognition that has been used directly for Arabic Handwritten Character Recognition (AHCR) because it includes all 28 Arabic characters and consists of approximately 97% Arabic characters, with the remainder being digits. In the comparative study of transfer learning with mobile-enabled convolutional neural networks (MbNets), IFHCDB is treated as a large-scale, relatively clean benchmark for isolated Arabic characters, and it is the dataset on which the evaluated lightweight models achieve their strongest results, including 99% accuracy with MnasNet under full fine-tuning (Khayati et al., 5 Sep 2025).
1. Dataset identity and composition
IFHCDB was originally introduced by Mozaffari et al. as a database for isolated Farsi handwritten characters, but its script basis makes it directly usable for Arabic character recognition. The study explicitly states that the dataset includes all 28 Arabic characters, which is the basis for its use in AHCR experiments (Khayati et al., 5 Sep 2025).
As reported in the study, IFHCDB contains 70,120 images in total. Its reported split is 36,017 images (75%) for training and 12,440 images (25%) for testing, with the split predefined by the dataset authors through separate train and test folders and preserved unchanged in the experiments. The images have size pixels, and the content is described as isolated characters and digits. The license is reported as non-commercial use (Khayati et al., 5 Sep 2025).
Within the full collection, the paper reports approximately 52,380 isolated character samples and 17,740 digit samples. For the AHCR experiments, only the 28 Arabic characters are used; digits are excluded. The dataset is therefore used as a large-scale, character-level dataset rather than a mixed alphanumeric benchmark (Khayati et al., 5 Sep 2025).
A concise summary of the reported properties is given below.
| Property | Reported value |
|---|---|
| Full name | Isolated Farsi Handwritten Character Database (IFHCDB) |
| Total size | 70,120 images |
| Training set | 36,017 images (75%) |
| Test set | 12,440 images (25%) |
| Image size | pixels |
| Content | Isolated characters and digits |
| Arabic-character subset | About 52,380 samples |
| Digit subset | About 17,740 samples |
| License | Non-commercial use |
The paper characterizes IFHCDB as the largest Arabic-character dataset among the three benchmarks studied, alongside AHCD and HIJJA. Relative to AHCD, which has 16,800 samples and balanced 28 classes, and HIJJA, which has 47,434 samples and is reduced from 108 classes to 28 classes in the experiments, IFHCDB provides more data, larger images, and a comparatively favorable setting for isolated character recognition, although class imbalance is explicitly noted (Khayati et al., 5 Sep 2025).
2. Role in Arabic handwritten character recognition
Within the AHCR study, IFHCDB functions as a benchmark for evaluating how effectively lightweight, mobile-oriented CNNs can recognize isolated Arabic characters under different transfer learning regimes. The study treats it as a dataset that is particularly suitable for measuring the upper range of achievable accuracy when model capacity is constrained by mobile deployment considerations (Khayati et al., 5 Sep 2025).
The comparative role of IFHCDB becomes clearer when set against the two other datasets used in the same study. AHCD is described as an adult-writer dataset with images and balanced class counts, while HIJJA is a children’s handwriting dataset with greater variability and originally distinct positional forms. IFHCDB, by contrast, is described as having more data and relatively clean character samples, even though its class distribution is imbalanced. This combination makes it especially useful for testing whether compact architectures can obtain strong accuracy without heavy preprocessing or large classical backbones (Khayati et al., 5 Sep 2025).
The study explicitly identifies IFHCDB as the dataset on which the models achieve the highest accuracies, and as a benchmark where models converge quickly and generalize well. It also describes IFHCDB as “the most extensive dataset for Arabic characters to date,” specifically in terms of the Arabic-character content contained in the broader Farsi/Arabic collection (Khayati et al., 5 Sep 2025).
A plausible implication is that IFHCDB occupies a distinctive niche among character-level Arabic-script benchmarks: it is not merely a dataset for isolated character classification, but also a testbed for evaluating the interaction among dataset scale, transfer learning, and lightweight model design under resource constraints.
3. Preprocessing and experimental pipeline
The study keeps preprocessing intentionally minimal across all datasets, including IFHCDB, in order to preserve comparability and isolate the effect of model architecture and transfer learning strategy. For IFHCDB, the original grayscale or bitmap images are used as is, except for resizing. The paper states that there is no explicit binarization, denoising, deskewing, or morphological cleaning (Khayati et al., 5 Sep 2025).
The input images, originally sized , are resized to the input dimensions required by the selected MbNet backbone. The paper describes the loaded dataset generically as
where denotes images resized to , and the corresponding labels. The description also notes conversion to three channels as needed by the network input configuration (Khayati et al., 5 Sep 2025).
Data augmentation is applied only to the training set and is shared across AHCD, HIJJA, and IFHCDB. The paper explicitly mentions rotation and flipping as representative transforms, using the notation
with a stochastic augmentation operator. No dataset-specific augmentation parameters are reported, and no rotation range or transform magnitude is specified (Khayati et al., 5 Sep 2025).
The train/validation/test organization preserves the original non-overlapping train and test folders provided with IFHCDB. Within the reported training portion, the study applies 5-fold cross-validation. The procedure is described as follows: split 0 into five folds; in each fold, use 4 folds (80%) for training and 1 fold (20%) for validation; train the model and select the epoch with the best validation accuracy; then choose the fold-model instance with the highest validation accuracy and evaluate it on the held-out test set (Khayati et al., 5 Sep 2025).
This pipeline is significant because it couples minimal preprocessing with rigorous selection on validation accuracy. The study’s design therefore attributes strong results on IFHCDB primarily to the interaction of model architecture, pretraining, and fine-tuning strategy rather than to aggressive handcrafted normalization or document cleanup.
4. Mobile-enabled CNNs and transfer learning strategies
Four lightweight architectures are evaluated on IFHCDB: MobileNetV3_small, ShuffleNetV2_X0_5, MnasNet0_5, and SqueezeNet1_1. Their reported representative complexity is 2.5M parameters and 0.02 GFLOPs for MobileNetV3_small, 1.4M parameters and 0.013 GFLOPs for ShuffleNetV2_X0_5, 2.2M parameters and 0.31 GFLOPs for MnasNet0_5, and 1.2M parameters and 0.36 GFLOPs for SqueezeNet1_1 (Khayati et al., 5 Sep 2025).
The study summarizes the architectural rationale of each backbone. MobileNet is associated with depthwise separable convolution and inverted residuals; ShuffleNet with group convolutions and channel shuffle; MnasNet with platform-aware neural architecture search for the trade-off between ImageNet accuracy and mobile latency; and SqueezeNet with Fire modules based on 1 squeeze and expand layers. These models are selected specifically because they are much smaller in parameter count and GFLOPs than classical AHCR backbones such as AlexNet, VGG, or ResNet (Khayati et al., 5 Sep 2025).
Three transfer learning strategies are compared on IFHCDB.
TFS – Training From Scratch uses random initialization,
2
with all layers trainable.
TFE – Training as Fixed Feature Extractor loads ImageNet-pretrained weights 3, freezes the feature extractor so that
4
and trains only the classifier head, for which
5
TWI – Training as Weight Initializer, corresponding to full fine-tuning, also loads ImageNet-pretrained weights and adapts the final classification layer to 28 output classes, but fine-tunes all layers so that
6
All strategies use the same overall loss and optimization framework. The loss is categorical cross-entropy,
7
with 8, and parameter updates follow gradient descent,
9
with a Cosine Annealing LR scheduler controlling 0 (Khayati et al., 5 Sep 2025).
The paper also reports example hyperparameters for IFHCDB. For MobileNet under TWI, the configuration includes batch size 32, SGD, momentum 0.7, weight decay 1, starting LR 0.01, and best LR approximately 2. For MnasNet under TWI, it reports batch size 32, Adam, starting LR 0.001, and best LR 3 (Khayati et al., 5 Sep 2025).
ImageNet pretraining is beneficial on IFHCDB, but the measured gains are modest relative to from-scratch training. The paper quantifies this as 97.5% 4 98.0% for MobileNet and 97.9% 5 98.3% for ShuffleNet when moving from training from scratch to full fine-tuning. This suggests that the scale of IFHCDB is already sufficient for learning strong task-specific features directly, while pretraining still improves the initialization (Khayati et al., 5 Sep 2025).
5. Recognition performance and robustness
The paper evaluates IFHCDB using accuracy, precision, recall, and F1-score. Accuracy is defined as
6
and precision, recall, and F1-score are reported in the conventional TP/FP/FN form (Khayati et al., 5 Sep 2025).
The test results on IFHCDB show a strong dependence on transfer learning strategy. Under TFE, performance varies widely: MobileNet reaches 0.91 accuracy, precision, recall, and F1; ShuffleNet reaches 0.89 across the same metrics; SqueezeNet reaches 0.95; while MnasNet performs very poorly, with 0.38 accuracy, 0.45 precision, 0.38 recall, and 0.27 F1. Under TFS, all four models are near the top of the benchmark, with 0.98 accuracy for MobileNet, MnasNet, ShuffleNet, and SqueezeNet, and F1 equal to 0.98 for all except ShuffleNet, whose F1 is 0.97. Under TWI, MnasNet achieves the best overall result on IFHCDB with 0.99 accuracy, 0.99 precision, 0.99 recall, and 0.99 F1, while the remaining models obtain 0.98 across the principal metrics (Khayati et al., 5 Sep 2025).
These results make IFHCDB the strongest-performing dataset among the three considered. The study reports an average accuracy of approximately 0.92 for IFHCDB across models and strategies, compared with approximately 0.83 for AHCD and approximately 0.76 for HIJJA. The best result on AHCD is approximately 0.97, while the best result on HIJJA is approximately 0.92. The paper therefore interprets IFHCDB as the easiest of the three datasets for the tested models, with cleaner imagery and lower effective intra-class variability (Khayati et al., 5 Sep 2025).
The analysis extends beyond headline accuracy to calibration and perturbation robustness. The study uses Expected Calibration Error (ECE),
7
and a sensitivity measure based on repeated Gaussian perturbations,
8
with sensitivity defined as
9
Two perturbation regimes are reported: 100 perturbations at noise level 0.01 and 200 perturbations at noise level 0.1 (Khayati et al., 5 Sep 2025).
For IFHCDB, models trained with TFS and TWI show very low mean entropy, ECE around 0.18–0.24, and near-zero sensitivity under low noise, with only small non-zero sensitivity under higher noise. By contrast, TFE degrades both performance and robustness; the paper gives MnasNet TFE on IFHCDB as an example, with mean entropy 2.11, ECE 0.19, and sensitivity 0.0298 under high noise (Khayati et al., 5 Sep 2025).
The confusion-matrix analysis is summarized qualitatively rather than by individual class errors. The paper states that IFHCDB exhibits “the highest separability between classes, with prominent diagonal dominance and minimal cross-class confusion.” It also notes rapid and stable convergence with minimal gaps between training and validation accuracy. This suggests that IFHCDB is not only large but also structurally favorable for isolated-shape discrimination (Khayati et al., 5 Sep 2025).
6. Computational profile, limitations, and research significance
The study emphasizes IFHCDB as a favorable setting for mobile and embedded deployment because it combines very high accuracy with low model complexity. Relative to classical backbones, the evaluated MbNets are far smaller; for example, the paper contrasts them with AlexNet (61M parameters, 0.72 GFLOPs) and VGG16 (138M parameters, 16 GFLOPs) (Khayati et al., 5 Sep 2025).
The reported average training time per epoch across datasets is 175 s for SqueezeNet, 177 s for MobileNet, 201 s for ShuffleNet, and 252 s for MnasNet. Average inference time per batch of 32 images is 0.003 s for SqueezeNet, 0.005 s for MnasNet, 0.006 s for MobileNet, and 0.008 s for ShuffleNet. By transfer learning regime, TWI has the shortest training time, at approximately 97 s/epoch, while TFS and TFE require approximately 248–255 s/epoch. By dataset, IFHCDB has the longest training time per epoch, approximately 316 s, due to its larger size, but inference remains approximately 0.005–0.006 s per 32 images, which the paper describes as within real-time mobile constraints (Khayati et al., 5 Sep 2025).
The strongest deployment-oriented configuration is MnasNet under TWI, which combines 99% accuracy with 2.2M parameters and 0.31 GFLOPs. The paper accordingly identifies MnasNet, MobileNet, and ShuffleNet as especially suitable for mobile OCR, embedded systems, and edge devices processing isolated Arabic character input (Khayati et al., 5 Sep 2025).
The study also identifies limitations of IFHCDB. First, it has class imbalance, with some characters heavily represented and others sparse. Second, although it includes Arabic letters, it remains rooted in a Farsi context, so writer demographics, handwriting style, and acquisition conditions may not represent all Arabic-writing populations. Third, it contains only isolated forms, not initial, medial, or final positional forms, so it tests character shape discrimination rather than contextual variability in connected script. Fourth, the paper notes a pretraining mismatch between ImageNet and handwritten Arabic features; the large size of IFHCDB mitigates this, but does not eliminate the potential value of domain-specific pretraining (Khayati et al., 5 Sep 2025).
Future work proposed in the study includes architectural modifications to depthwise layers, kernel sizes, batch normalization, and dropout; advanced data augmentation beyond rotation and flipping, including distortions, stroke-thickness variation, noise, and blur; and in-depth feature analysis and sensitivity analysis aimed at identifying the learned contributions of strokes and diacritics. The paper also notes that character recognizers trained in this setting are already used in a prototype word-level pipeline with another dataset, suggesting a path from IFHCDB-based isolated character models toward larger Arabic text-recognition systems (Khayati et al., 5 Sep 2025).
Taken together, IFHCDB is presented as a large, non-commercial, isolated-character benchmark that is unusually favorable for rigorous experiments on compact neural architectures. Its main significance in the cited study lies not only in its scale, but in the fact that it supports near-perfect recognition with lightweight networks, exposes the limits of fixed-feature transfer from ImageNet, and provides a stable platform for studying calibration, robustness, and deployment efficiency in Arabic handwritten character recognition (Khayati et al., 5 Sep 2025).