Handwritten character classification in the Bengali script is a significant challenge due to the complexity and variability of the characters. The models commonly used for classification are often computationally expensive and data-hungry, making them unsuitable for resource-limited languages such as Bengali. In this experiment, we propose a novel, efficient, and lightweight Vision Transformer model that effectively classifies Bengali handwritten basic characters and digits, addressing several shortcomings of traditional methods. The proposed solution utilizes a deep convolutional neural network (DCNN) in a more simplified manner compared to traditional DCNN architectures, with the aim of reducing computational burden. With only 0.65 million parameters, a model size of 0.62 MB, and 0.16 GFLOPs, our model, BornoViT, is significantly lighter than current state-of-the-art models, making it more suitable for resource-limited environments, which is essential for Bengali handwritten character classification. BornoViT was evaluated on the BanglaLekha Isolated dataset, achieving an accuracy of 95.77%, and demonstrating superior efficiency compared to existing state-of-the-art approaches. Furthermore, the model was evaluated on our self-collected dataset, Bornomala, consisting of approximately 222 samples from different age groups, where it achieved an accuracy of 91.51%.
Figures & tables
Fig. 1: Sample of our Dataset
Fig. 2: Sample of BanglaLekha-Isolated Dataset
Fig. 3: Sample of augmentation techniques
Layer
Description
Input Shape
Output Shape
Parameters
PatchEmbedding
Conv2D layer to split image into patches and project them to embedding dimension
(B, 3, 224, 224)
(B, 196, 128)
98,432
Positional Embedding
Learnable positional embedding added to the input patches
(B, 197, 128)
(B, 197, 128)
25,216
CLS Token
Learnable CLS token for classification
(1, 1, 128)
(B, 1, 128)
128
Dropout
Dropout applied to the patch and position embeddings
(B, 197, 128)
(B, 197, 128)
0
Transformer Blocks (x4)
Sequence of 4 Transformer blocks
(B, 197, 128)
(B, 197, 128)
4x132,096 (Table III )
LayerNorm
Normalize embeddings
(B, 197, 128)
(B, 197, 128)
256
TABLE II: Layer-wise Breakdown of Custom Vision Transformer
Sub-layer
Description
Input Shape
Output Shape
Parameters
LayerNorm 1
Layer normalization
(B, 197, 128)
(B, 197, 128)
256
Multi-Head Attention
Self-attention mechanism with 2 attention heads
(B, 197, 128)
(B, 197, 128)
49,152 (QKV), 16,384 (O)
LayerNorm 2
Layer normalization
(B, 197, 128)
(B, 197, 128)
256
MLP
Two linear layers with GELU and dropout
(B, 197, 128)
(B, 197, 128)
33,024 (fc1), 33,024 (fc2)
Total
132,096
TABLE III: Transformer Block Breakdown
Fig. 4: GradCam samples of correctly classified inputs of BanglaLekha-Isolated
Fig. 5: GradCam samples of correctly classified inputs of Bornomala
Fig. 6: Misclassified samples that are visually similar to the predicted class.
Deep learning models have proven to be highly effective in computer vision, with deep convolutional neural networks achieving impressive results across various computer vision tasks. However, these models rely heavily on large datasets to avoid overfitting. When a model learns features with either low or high variance, it can lead to underfitting or overfitting on the training data. Unfortunately, large-scale datasets may not be available in many domains, particularly for resource-limited languages such as Bengali. In this experiment, a series of tests were conducted in the field of image data augmentation as an approach to addressing the limited data problem for Bengali handwritten characters. The study also provides an in-depth analysis of the performance of different augmentation techniques. Data augmentation refers to a set of techniques applied to data to increase its size and diversity, making it more suitable for training deep learning models. The image augmentation techniques evaluated in this study include CLAHE, Random Rotation, Random Affine, Color Jitter, and their combinations. The study further explores the use of augmentation methods with a lightweight model such as EfficientViT. Among the different augmentation strategies, the combination of Random Affine and Color Jitter produced the best accuracy on the Ekush [1] and AIBangla [2] datasets, achieving accuracies of 97.48% and 97.57%, respectively. This combination outperformed all other individual and combined augmentation techniques. Overall, this analysis presents a thorough examination of the impact of image data augmentation in resource-scarce languages, particularly in the context of Bengali handwritten character recognition using lightweight models.
Rafi Hassan Chowdhury, Naimul Haque, Kaniz Fatiha
Department of Computer Science and Engineering, Islamic University of Technology, Gazipur 1704, Bangladesh
Character recognition is the fundamental part of an optical character recognition (OCR) system. Word recognition, sentence transcription, document digitization, and language processing are some of the higher-order activities that can be done accurately through character recognition. Nonetheless, recognizing handwritten Bangla characters is not an easy task because they are written in different styles with inconsistent stroke patterns and a high degree of visual character resemblance. The datasets available are usually limited in intra-class and inequitable in class distribution. We have constructed a new balanced dataset of Bangla written characters to overcome those problems. This consists of 78 classes and each class has approximately 650 samples. It contains the basic characters, composite (Juktobarno) characters and numerals. The samples were a diverse group comprising a large age range and socioeconomic groups. Elementary and high school students, university students, and professionals are the contributing factors. The sample also has right and left-handed writers. We have further proposed an interaction-aware hybrid deep learning architecture that integrates EfficientNetB3, Vision Transformer, and Conformer modules in parallel. A multi-head cross-attention fusion mechanism enables effective feature interaction across these components. The proposed model achieves 98.84% accuracy on the constructed dataset and 96.49% on the external CHBCR benchmark, demonstrating strong generalization capability. Grad-CAM visualizations further provide interpretability by highlighting discriminative regions. The dataset and source code of this research is publicly available at: https://huggingface.co/MIRZARAQUIB/Bangla_Handwritten_Character_Recognition.
Department of Computer and Communication Engineering, International Islamic University Chittagong, Bangladesh. · mPower Social Enterprise. · Department of Information and Communication Engineering, Noakhali Science and Technology University, Bangladesh. +2
Recognition of handwritten Bangla compound characters remains a challenging problem due to complex character structures, large intra-class variation, and limited availability of high-quality annotated data. Existing Bangla handwritten character recognition systems often struggle to generalize across diverse writing styles, particularly for compound characters containing intricate ligatures and diacritical variations. In this work, we propose a confidence-guided diffusion augmentation framework for low-resolution Bangla compound character recognition. Our framework combines class-conditional diffusion modeling with classifier guidance to synthesize high-quality handwritten compound character samples. To further improve generation quality, we introduce Squeeze-and-Excitation enhanced residual blocks within the diffusion model's U-Net backbone. We additionally propose a confidence-based filtering mechanism where pre-trained classifiers act as quality gates to retain only highly class-consistent synthetic samples. The filtered synthetic images are fused with the original training data and used to retrain multiple classification architectures. Experiments conducted on the AIBangla compound character dataset demonstrate consistent performance improvements across ResNet50, DenseNet121, VGG16, and Vision Transformer architectures. Our best-performing model achieves 89.2% classification accuracy, surpassing the previously published AIBangla benchmark by a substantial margin. The results demonstrate that quality-aware diffusion augmentation can effectively enhance handwritten character recognition performance in low-resource script domains.
Md. Sultan Al Rayhan
Department of Computer Science and Engineering East West University, Dhaka, Bangladesh