Devanagari Handwritten Character Recognition Using TrOCR: A Transformer-Based Model with Real-Time Web Deployment
Amrit Baskota, Samyam Budhathoki, Shubham Ghimire, Abiskar Ghimire, Sarwesh Phuyal, Baskaran P
Abstract
Devnagari is a one of the ancient language of the Indian subcontinent consisting of 36 vowels, 14 consonants and 10 numerals. The accurate recognition of handwritten Devnagari characters is challenging due to high complexity of Devnagari scripts. This paper presents a method to fine tune the pre trained TrOCR model to accurately recognize Devanagari handwritten characters. The Methodology consists of a preprocessing mechanism where input images are standardized into RGB format, tokenized in batches and integrated with Hugging Face Dataset. The pre-trained microsoft/trocr-base-handwritten model is fine-tuned over a dataset of nearly 5000 character images that are uniformly partitioned in the ratio 8:1:1 for training, evaluation and testing. Further optimization is done is the training process through mixed precision training, gradient checkpointing, and early stopping mechanism. The model achieves a character error rate (CER) of 3.95% and a character-level accuracy of 96.05%, outperforming the previous CNN based models. A scalable web application is developed using Vite.js, Golang, and FastAPI which practically deploys the OCR model and serves character recognition task with a latency less than 5 seconds per request. This study demonstrates the use of TrOCR model to build a scalable handwritten Devnagari character recognition system and also a foundation to future research on Devnagari Script Recognition using Transformers.
Create a lesson
Metadata
- Comments
- Presented and accepted at the 16th International Conference on Computing, Communication and Networking Technologies (ICCCNT), 2025
Related papers
LuxAvatar: Real-Time Relightable Head Avatars via Causal Neural Shading of 3D Intrinsic Proxies
Shared title terminologycs.CVYipengjing Sun, Chenyang Wang, Boyao Zhou et al.
You Only Look Multiple Times: YoloMT, a Real-Time Streaming Model on a T4
Shared title terminologycs.CVNessim Ben Abbes, Duc Han Le, Sabri Mtibaa et al.
Learned Parametric Emotion Editing: Real-Time Affective Filtering for On-Device Social Media Video
Shared title terminologycs.CVMusa Rochi, Marcel Schubert, Christoph Gebhardt
Astronex-World 1.0: Real-Time Interactive World Model Foundation
Shared title terminologycs.CVXin Zhou, Cong Miao
Zing-0.5: Toward Playable Worlds with Real-Time Joint Action and Text Control
Shared title terminologycs.CVMingyang Chen, Shengdong Chen, Xiaoxiao Fu et al.
Accuracy- and Real-Time-Aware 4D Radar Preprocessing for Autonomous Driving Perception Systems
Shared title terminologycs.CVWoo-Jin Jung, Dong-Hee Paek, Jeong-Su Park et al.