Efficient Handwritten Digit Classification using Convolutional Neural Networks: A Robust Approach with Data Augmentation
Eshika Jain, Amanveer Singh · 2024
Categorization of image digits finds very important real-world applications in recognizing postal codes, processing bank checks, and digitizing forms automatically. This paper proposes an effective Convolutional Neural Network model for image digit classification based on the publicly available dataset, where each image is in 28x28 grayscale format. CNNs are also ideal because of their innate capabilities to represent spatial hierarchies in images. The dataset consists of 42,000 training images and 28,000 test images, where the intensity of each pixel ranges between 0 and 255. Preprocessing involved the normalization of data, scaling values of pixels within a range from 0 to 1, and reshaping images to match the shape expected by the CNN input layer. One-hot encoding of labels was also done, which means that after all these processes, the model could predict one class from a possible ten corresponding to the digits 0 through 9. Some of the data augmentation techniques applied are rotation, zoom, and shifts with an aim to improve generalization and prevent overfitting. It contains a CNN architecture of three convolutional layers followed by batch normalization, Leaky ReLU activation, and max-pooling layers. Further, it harnesses the power of dropout layers to prevent network overfitting and trains the network using the Adam optimizer. It finally converged to more than 99% accuracy on the test set, as verified by a confusion matrix and a classification report showing high precision recall for each digit class in view.This work primarily exhibits the ability of CNN in digit classification; hence, it presents a well-optimized model that achieves a balance between performance and complexity.