Handwritten Bangla Character Recognition: A Comparative Study of Neural Network Architectures

Share:
Handwritten Bangla Character Recognition research cover

CSE 498R — Directed Research · Department of Electrical and Computer Engineering, North South University · Spring 2023
Co-authored with Zannatul Islam Proma, supervised by Dr. Mohammad Ashrafuzzaman Khan.

Why Bangla Handwriting Is a Hard OCR Problem

Digitizing handwritten documents is a foundational step for document search, text entry, and accessibility tools — but the Bangla script makes this unusually difficult. Bangla characters carry a wide diversity of personal writing styles, context-dependent shapes that change based on a character's position within a word, and a chronic shortage of large, well-annotated public datasets to train on. This directed research project set out to systematically compare how different families of neural network architectures cope with those three challenges.

Objective and Dataset

The goal was not to build a single production OCR model, but to run a controlled comparative study: implement multiple architecture families under identical preprocessing and evaluation conditions, then analyze where each one's strengths and failure modes actually come from.

The dataset, curated under the name databanglaisolated and hosted on Google Drive, spans 84 distinct Bangla character classes — alphabets and the numerals 0–9 — with filenames encoding sample attributes such as writer origin, gender, and age to keep the collection diverse and traceable. All training and evaluation ran in Google Colab against TensorFlow/Keras and PyTorch, using free GPU access to keep iteration fast.

Raw handwritten sample84 character classes, varied writing styles
PreprocessingGrayscale conversion → resize to 64×64 → pixel normalization (0–1)
Architecture under testCNN · RNN (LSTM/GRU) · ViT · ResNet · CapsNet · Attention
EvaluationAccuracy, Precision, Recall, F1 Score

Six Architectures, Six Different Trade-offs

Rather than crowning a single "best" model, the study's real contribution is mapping each architecture's characteristic strengths and limitations against the specific quirks of Bangla script:

ArchitectureStrengthLimitation
CNNStrong feature extraction for basic shapes and stroke patternsStruggles with complex, sequential dependencies in some characters
RNN (LSTM)Captures temporal structure in strokes and curves wellCan lose accuracy on characters with intricate, overlapping strokes
Vision TransformerEffective at modeling global, contextual relationships across a characterData-hungry and computationally intensive to train well
ResNetMitigates vanishing-gradient issues, aiding convergence on deeper netsGreater depth means longer training times and more tuning
CapsNetCaptures part-whole relationships and varying character orientationsSensitive to hyperparameter choices; needs careful tuning
Attention-basedSelectively focuses on the relevant region of a characterPerformance dips on characters with distracting visual clutter

Evaluation Snapshot: CNN vs. RNN

Using a shared evaluation harness (accuracy, precision, recall, and F1 score via scikit-learn), the CNN and RNN implementations were run against a held-out sample of the test set:

CNN — F1 Score
1.00
RNN (LSTM) — F1 Score
0.83

On these numbers: this snapshot reflects the project's evaluation harness run on a sample batch from the test set, not a full 84-class benchmark run to convergence — the CNN's perfect score in particular should be read as a promising early signal on that sample rather than a claim of solved performance across the entire character set. The qualitative architecture comparison above carries the study's real conclusions.

Challenges and Future Directions

The results analysis surfaced three consistent themes for future work:

  • Complex characters: Bangla characters with intricate details and overlapping strokes remained the hardest cases across every architecture.
  • Data augmentation: augmenting the dataset with more writing-style and condition variation is a likely path to more robust models.
  • Ensemble approaches: combining predictions across architectures — e.g. a CNN for local features with an attention layer for global context — could outperform any single model.

Larger datasets and careful hyperparameter tuning had a bigger effect on performance than the choice of architecture family alone.

Conclusion

The project successfully implemented and evaluated six distinct neural network families — CNN, RNN/LSTM, Vision Transformer, ResNet, CapsNet, and attention-based models — under a single, standardized preprocessing and evaluation pipeline built on Google Colab, TensorFlow/Keras, and PyTorch. Beyond the specific numbers, the comparative framework itself is the reusable contribution: a consistent way to evaluate future OCR architectures against the specific demands of Bangla script, with clear next steps in hybrid and ensemble modeling.

Working on Bangla NLP or OCR?

I'm always glad to discuss handwritten character recognition, low-resource language NLP, or applied deep learning for Bangla. Let's talk.

Contact Me
Raihan Khan

Raihan Khan

AI & Systems Architect, Entrepreneur, e-GP Specialist & Writer

A versatile AI & systems architect and entrepreneur with 10+ years of experience across e-Government systems, software architecture, and project management. Founder of ABCL TECH, Chakri Bangla, Visa Bangla, and e-GP Bangla — alongside writing on technology, society, and personal reflection.