---
title: 'IFHCDB: Farsi Handwritten Character Database'
url: https://www.emergentmind.com/topics/ifhcdb
type: topic
---

# IFHCDB: Farsi Handwritten Character Database

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 [2509.05019].

## 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 [2509.05019].

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 **\(77 \times 95\)** pixels, and the content is described as **isolated characters and digits**. The license is reported as **non-commercial use** [2509.05019].

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 [2509.05019].

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 | \(77 \times 95\) 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 [2509.05019].

## 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 [2509.05019].

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 **\(32 \times 32\)** 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 [2509.05019].

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 [2509.05019].

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** [2509.05019].

The input images, originally sized **\(77 \times 95\)**, are resized to the input dimensions required by the selected MbNet backbone. The paper describes the loaded dataset generically as
\[
\mathcal{D} = \{(x_i, y_i)\}_{i=1}^N,
\]
where \(x_i\) denotes images resized to \(H \times W \times C\), and \(y_i\) the corresponding labels. The description also notes conversion to **three channels** as needed by the network input configuration [2509.05019].

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
\[
x'_i = \mathcal{T}(x_i),
\]
with \(\mathcal{T}\) a stochastic augmentation operator. No dataset-specific augmentation parameters are reported, and no rotation range or transform magnitude is specified [2509.05019].

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 \(\mathcal{D}_{\text{train}}\) 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 [2509.05019].

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 [2509.05019].

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 \times 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 [2509.05019].

Three transfer learning strategies are compared on IFHCDB.

**TFS – Training From Scratch** uses random initialization,
\[
\theta_{\text{init}} \sim \mathcal{N}(0,\sigma^2),
\]
with all layers trainable.

**TFE – Training as Fixed Feature Extractor** loads ImageNet-pretrained weights \(\theta_{\text{pre}}\), freezes the feature extractor so that
\[
\nabla_{\theta_f}\mathcal{L}=0,
\]
and trains only the classifier head, for which
\[
\nabla_{\theta_c}\mathcal{L}\neq 0.
\]

**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
\[
\nabla_{\theta}\mathcal{L}\neq 0.
\]

All strategies use the same overall loss and optimization framework. The loss is categorical cross-entropy,
\[
\mathcal{L} = -\frac{1}{N}\sum_{i=1}^N \sum_{k=1}^K y_{i,k}\log(p_{i,k}),
\]
with \(K=28\), and parameter updates follow gradient descent,
\[
\theta_{t+1}=\theta_t-\eta\nabla_\theta\mathcal{L},
\]
with a **Cosine Annealing LR scheduler** controlling \(\eta\) [2509.05019].

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\times10^{-4}\)**, **starting LR 0.01**, and **best LR approximately \(2\times10^{-4}\)**. For **MnasNet** under **TWI**, it reports **batch size 32**, **Adam**, **starting LR 0.001**, and **best LR \(2.45\times10^{-5}\)** [2509.05019].

ImageNet pretraining is beneficial on IFHCDB, but the measured gains are modest relative to from-scratch training. The paper quantifies this as **97.5% \(\rightarrow\) 98.0%** for MobileNet and **97.9% \(\rightarrow\) 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 [2509.05019].

## 5. Recognition performance and robustness

The paper evaluates IFHCDB using **accuracy**, **precision**, **recall**, and **F1-score**. Accuracy is defined as
\[
\text{Accuracy}=\frac{\sum_{i=1}^N \mathbb{I}(\hat{y}_i=y_i)}{N},
\]
and precision, recall, and F1-score are reported in the conventional TP/FP/FN form [2509.05019].

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 [2509.05019].

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 [2509.05019].

The analysis extends beyond headline accuracy to calibration and perturbation robustness. The study uses **Expected Calibration Error (ECE)**,
\[
\text{ECE}=\sum_{m=1}^M \frac{|B_m|}{N}\left|\text{acc}(B_m)-\text{conf}(B_m)\right|,
\]
and a sensitivity measure based on repeated Gaussian perturbations,
\[
x'_i = x_i + \epsilon, \qquad \epsilon \sim \mathcal{N}(0,\sigma^2),
\]
with sensitivity defined as
\[
\text{Sensitivity}=\frac{1}{N}\sum_{i=1}^N \text{Var}(\hat{y}_i \mid x'_i).
\]
Two perturbation regimes are reported: **100 perturbations at noise level 0.01** and **200 perturbations at noise level 0.1** [2509.05019].

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 [2509.05019].

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 [2509.05019].

## 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)** [2509.05019].

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 [2509.05019].

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 [2509.05019].

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 [2509.05019].

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 [2509.05019].

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 [2509.05019].

Source: https://www.emergentmind.com/topics/ifhcdb