A Modular CNN-Based Framework for Real-Time Handwritten Digit Classification
DOI:
https://doi.org/10.63746/njtd.v22i4.3840Keywords:
Handwritten digit recognition, Convolutional Neural Networks, EMNIST, USPS, GUI Usability, Real-Time ClassificationAbstract
Handwritten digit classification is a core task in computer vision with applications in postal automation, banking, education, and digital governance. Although Convolutional Neural Network (CNN) models have demonstrated strong performance on benchmark datasets, their effectiveness in noisy real-world settings and interactive deployment remains constrained. This study introduces a modular CNN-based framework designed for robustness, scalability, and real-time execution. Three datasets: EMNIST, USPS, and a custom noisy collection were employed to capture handwriting variability, distortions, and inconsistent illumination. A preprocessing pipeline integrating adaptive thresholding, Gaussian filtering, and contour-based segmentation enhanced digit clarity and ensured consistent isolation, while dropout and batch normalization improved generalization and efficiency. The framework achieved accuracies exceeding 99% on EMNIST and USPS and 97.9% on the noisy dataset, outperforming several state-of-the-art approaches while retaining architectural simplicity. Deployment feasibility was demonstrated through a lightweight Tkinter-based graphical user interface (GUI), which supported real-time interaction. Usability testing with ten participants confirmed low-latency predictions, with most responses completed in under 50 ms, and high satisfaction ratings averaging above 4.5 on a five-point Likert scale across navigation, clarity, responsiveness, and overall experience. These results demonstrate that the proposed framework combines high accuracy with deployability in interactive environments. GUI integration serves as a supporting validation of real-time responsiveness and accessibility, while the CNN architecture remains the central contribution. Overall, the framework provides a scalable and efficient solution for handwritten digit recognition, suitable for operational use in domains such as banking, education, and digital governance.
References
Ahlawat, A., Chaudhury, S., & Choudhury, A. (2020). Handwritten digit recognition using deep learning. Procedia Computer Science, 173, 182–187. https://doi.org/10.1016/j.procs.2020.06.021
Al-Azawi, H. A., Al-Khafaji, R. T., & Al-Abdullah, T. A. (2024). Optimizing CNN for handwriting digit recognition. Journal of Intelligent Computing, 16(2), 102–113. https://doi.org/10.1016/j.jic.2024.01.008
Alshamrani, A., Alzahrani, A., & Alqahtani, H. (2024). Edge-based segmentation for digit recognition in smart devices. Computers, 13(2), 55. https://doi.org/10.3390/computers13020055
Babatunde, A. N., Kadri A. F., Isiaka O. S., Shuaib B. M., Abdulrahman, T. A., Balogun B. F., Ajiboye, R. A. & Oke, A. A. (2025). Sentiment Analysis in Domain-Specific X-Tweets Using Support Vector Machine and Long Short-Term Memory with TF-IDF Vectorizer. FUW Trends in Science & Technology Journal, 10(1), 308 – 320, https://www.ftstjournal.com/uploads/docs/101Article%2048%20pp%20308-320.pdf. 101Article 48 pp 308-320.pdf. e-ISSN: 2408-5162; p-ISSN: 20485170
Basak, S., Saha, A., & Ghosh, S. (2024). Transfer learning-based handwritten digit recognition for regional scripts. Neural Computing and Applications, 36(7), 5281–5292. https://doi.org/10.1007/s00521-023-08607-4
Chen, Y., & Wang, X. (2023). Benchmarking CNN performance for digit recognition under noise. Pattern Recognition Letters, 169, 13–21. https://doi.org/10.1016/j.patrec.2023.06.009
Das, R., Roy, P., & Bandyopadhyay, S. (2023). Deep learning approaches for handwritten character recognition: A review. Computer Vision and Image Understanding, 229, 103713. https://doi.org/10.1016/j.cviu.2023.103713
Elshorbagy, M., Farag, R., & Gad, R. (2024). CNN-SVM hybrid model for enhanced digit recognition. Journal of Applied Soft Computing, 146, 110843. https://doi.org/10.1016/j.asoc.2023.110843
Fadhel, M. A., Al-Khafaji, R., & Hadi, M. (2023). Real-time segmentation for multi-digit inputs using edge detection. Computers & Electrical Engineering, 108, 108759. https://doi.org/10.1016/j.compeleceng.2023.108759
Gao, J., Yang, L., & Zhao, H. (2023). Optimized CNNs for MNIST digit recognition. International Journal of Machine Learning and Cybernetics, 14(5), 1229–1242. https://doi.org/10.1007/s13042-023-01619-9
Hassan, R., Abbas, K., & Shafiq, M. (2023). Improving user interaction with CNN-based digit classifiers using GUIs. Journal of Ambient Intelligence and Humanized Computing. Advance online publication. https://doi.org/10.1007/s12652-023-04219-5
He, T., Lin, H., & Chen, L. (2023). Hierarchical CNN architectures for digit recognition tasks. Expert Systems with Applications, 215, 119444. https://doi.org/10.1016/j.eswa.2023.119444
Huang, Y., & Lee, C. (2024). Efficient data normalization for CNN training on handwritten digits. Signal Processing: Image Communication, 127, 107019. https://doi.org/10.1016/j.image.2023.107019
Iqbal, S., Khan, M. A., & Ghafoor, H. (2023). Deep learning-based handwritten digit recognition across scripts using transfer learning. Computers, Materials & Continua, 77(2), 2567–2586. https://doi.org/10.32604/cmc.2023.040032
Jiang, W., Zhao, M., & Sun, H. (2023). Fast convergence of CNN for digit recognition. Engineering Applications of Artificial Intelligence, 122, 106102. https://doi.org/10.1016/j.engappai.2023.106102
Kaur, R., & Yadav, M. (2024). Evaluating GUI-based digit recognition in smart classrooms. Education and Information Technologies. Advance online publication. https://doi.org/10.1007/s10639-024-12322-1
Kottakota, S., Reddy, V., & Singh, R. (2023). Lightweight CNNs with dropout regularization for digit recognition. Procedia Computer Science, 218, 1212–1218. https://doi.org/10.1016/j.procs.2023.09.181
Kumar, V., Sharma, R., & Verma, A. (2024). Softmax optimization for CNN classification tasks. Applied Intelligence. Advance online publication. https://doi.org/10.1007/s10489-024-05017-2
MDPI. (2023). MNIST dataset benchmark studies. Algorithms, 16(3), 135. https://doi.org/10.3390/a16030135
Mohammed, S., Bala, A., & Usman, S. (2024). Evaluating CNN GUI latency for handwritten input systems. Sensors, 24(1), 246. https://doi.org/10.3390/s24010246
Nasiri, M., & Karami, A. (2024). Digit segmentation using adaptive contour methods for real-world images. Pattern Analysis and Applications. Advance online publication. https://doi.org/10.1007/s10044-024-01119-0
Nasrallah, N., Ali, T., & Hamad, H. (2023). Transfer learning for multilingual digit classification. Expert Systems, 40(3), e13355. https://doi.org/10.1111/exsy.13355
Pradhan, S., Sahoo, P., & Mohanty, S. (2023). Deploying CNN classifiers on edge devices for digit recognition. Computers & Electrical Engineering, 109, 108780. https://doi.org/10.1016/j.compeleceng.2023.108780
Rani, S., & Sharma, A. (2024). Adaptive digit recognition systems under noise and distortion. Journal of Intelligent Systems, 33(1), 278–290. https://doi.org/10.1515/jisys-2023-0101
Roy, S., Das, S., & Dutta, A. (2023). Impact of preprocessing in handwritten digit recognition. Journal of Imaging, 9(2), 21. https://doi.org/10.3390/jimaging9020021
Sarker, I. H. (2023). Deep learning techniques for computer vision: A comprehensive review. Journal of Big Data, 10, 5. https://doi.org/10.1186/s40537-023-00702-5
Shahid, S., Mehmood, T., & Ali, R. (2023). Adaptive thresholding in preprocessing pipelines. Journal of Imaging Science, 67(3), 109–118. https://doi.org/10.1016/j.image.2023.107019
Siddique, N., Adeli, H., & Khaleghi, A. (2019). Neural networks for handwriting recognition. International Journal of Neural Systems, 29(8), 1850031. https://doi.org/10.1142/S0129065718500316
Ullah, S., Zafar, A., & Ahmad, K. (2025). Robust CNN classifiers for noisy handwritten digits. Future Generation Computer Systems, 150, 99–110. https://doi.org/10.1016/j.future.2024.11.012
Wang, U., Liu, Y., & Tang, L. (2023). Edge-preserving segmentation for digit isolation. Computers, 12(6), 121. https://doi.org/10.3390/computers12060121
Xiao, Y., Liu, F., & Zhang, Y. (2024). Data transformation techniques for CNN input standardization. Multimedia Tools and Applications. https://doi.org/10.1007/s11042-024-17491-2
Zhang, Q., Li, H., & Zhao, X. (2023). CNN-LSTM hybrid models for digit sequence recognition. Pattern Recognition Letters, 174, 1–8. https://doi.org/10.1016/j.patrec.2023.09.006
Zhang, Y., Kumar, S., & Patel, R. (2024). Efficient CNN classifier design with softmax layer tuning. Information Sciences, 656, 118992. https://doi.org/10.1016/j.ins.2024.118992
Zhou, J., & Lin, C. (2024). Preprocessing effects on CNN performance for handwritten digit tasks. Applied Soft Computing, 146, 110794. https://doi.org/10.1016/j.asoc.2023.110794

Downloads
Published
Issue
Section
License
Copyright (c) 2025 Nigerian Journal of Technological Development

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
In accordance with the Copyright Act of 1976, which became effective January 1, 1978, the following statement signed by each author must accompany the manuscript submitted: "I, the undersigned author, transfer all copyright ownership of the manuscript referenced above to the Nigerian Journal of Technological Development, in the event the work is published. I warrant that the article is original, does not infringe upon any copyright or other proprietary right of any third party, is not under consideration by another journal, and has not been published previously. I have reviewed and approved the submitted version of the manuscript and agree to its publication in the Nigerian Journal of Technological Development." A copyright transfer form can be downloaded from the NJTD Website (http://njtd.com.ng/index.php/njtd). Author(s) will be consulted, whenever possible, regarding republication of material. All authors must have access to the data presented, and the authors and sponsor (if applicable) must agree to share original data with the editor if requested.