OPTIMIZING CNN HYPERPARAMETERS FOR ENHANCED HANDWRITTEN DIGIT RECOGNITION ON CUSTOM DATASET: A SYSTEMATIC STUDY
Handwritten Digit Recognition is still an essential issue in artificial intelligence and pattern recognition. Convolutional Neural Networks (CNNs) have shown outstanding accuracy on standardized datasets such as MNIST. Still, overfitting and incorrect hyperparameter tuning can cause CNNs to perform worse when applied to noisy real-world data. For example, handwritten digits taken from realistic Sudoku boards provide variation and noise that are not present in benchmark datasets, making it difficult to generalize CNN models to these datasets. The present study gives a systematic approach to improve handwritten digit recognition on custom datasets by improving CNN hyperparameters. The primary dataset derived from Kaggle’s “Sudoku Digit Classification” comprises 70,000 grayscale images of the digits 1 through 9, including zero representing empty cells. we use 10,000 images for this study, 7000 for training, 1500 for validation, and 1500 for testing. A personal handwritten digit dataset is a custom dataset that has only 2 images per class, and 9 classes represent the real world with small data. It is artificially extended using various kinds of data augmentation techniques, including rotation, scaling, flipping, shear transformation, brightness and contrast correction, and noise addition. Data augmentation increases each class to 100 images. These techniques enhance the model’s performance on unknown data and help it to become more generalizable. Training occurs using an Adam optimizer, a batch size of 32, and an initial learning rate of 0.001. To optimize the model’s performance, these hyperparameters are properly tuned. The Kaggle dataset is used to train, validate, and test the model on unseen data, and the custom unseen dataset is used for testing. The proposed model indicated great potential for accurate handwritten digit recognition with a training accuracy of approximately 95% and a validation accuracy of up to 99% after 30 epochs. Strong generalization over unseen handwritten digits is determined by testing accuracy of 97% on the Sudoku dataset. Testing accuracy on the personal dataset is 94.44%, and testing accuracy on the augmented personal dataset is 77.85%.
Authors
- Nasir Khan (ORCID: https://orcid.org/0000-0001-8683-8004)
- Md. Sohel Rana (ORCID: https://orcid.org/0000-0001-5999-9435)
- Muhammad Majid Hussain (ORCID: https://orcid.org/0000-0002-6255-6966)
- Muhammad Ibrar (ORCID: https://orcid.org/0000-0002-6813-5003)
- M Jabeen
Publication Details
- Published
- 2025-09-01
- DOI
- https://doi.org/10.71284/asc.2025151
- Primary Topic
- Handwritten Text Recognition Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00