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.
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:
| Architecture | Strength | Limitation |
|---|---|---|
| CNN | Strong feature extraction for basic shapes and stroke patterns | Struggles with complex, sequential dependencies in some characters |
| RNN (LSTM) | Captures temporal structure in strokes and curves well | Can lose accuracy on characters with intricate, overlapping strokes |
| Vision Transformer | Effective at modeling global, contextual relationships across a character | Data-hungry and computationally intensive to train well |
| ResNet | Mitigates vanishing-gradient issues, aiding convergence on deeper nets | Greater depth means longer training times and more tuning |
| CapsNet | Captures part-whole relationships and varying character orientations | Sensitive to hyperparameter choices; needs careful tuning |
| Attention-based | Selectively focuses on the relevant region of a character | Performance 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:
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