View on GitHub

KannadaNumeralClassifier

Handwritten Numeral Recognition using Convolutional Neural Networks

Kannada Handwritten Digit Recognizer

Alt Text

This project is similar to the MNIST image classification project but with handwritten Kannada numerals. The dataset has been made possible by Vinay Prabhu and can be accessed on Kaggle. This image dataset consists of 70,000 images for the training set and 5000 images for the test set. The model chosen for this multiclass classification is a CNN (convolutional neural network) and the goal is to accurately classify the images into one of ten classes/labels.

Alt Text

Image Credit

Project Description

Handwritten numeral images have proven to be great baseline models for image classification and this project adds to the already rich repertoire of robust image classifiers. The performance of a classifier can be measured using several metrics depending on how the dataset is structured. This dataset is a balanced dataset, meaning, there are equal number of images for all ten labels and hence metrics such as accuracy, precision, recall can be used to measure model performance. The image below provides a high level view of how the model classifies an image into one of ten labels.

Multiclass Classification : High Level View of the Model

Alt Text

Image created using NN-SVG

Data Preprocessing

Model Definition

This CNN model has several layers including Conv2D layers,Dense layers and a Flatten layer. The activation function used between the model layers is ReLu and the output layer has a softmax activation function that generates ten different probabilities of the image belonging to a certain label. Dropout is a regularization method that randomly drops several layer connections to prevent overfitting. Model accuracy is monitored throught model training and a callback is defined to monitor the learning rate. If the validation accuracy does not improve after 3 epochs, the leanring rate is halved.

Model Performance

Accuracy is used as the primary metric since the dataset is fairly balanced. Precision and recall are also computed using the classification report.

GUI : Gradio

Model performance verification using a realtime, interactive interface to make live predictions. The Gradio sketchpad takes in hand drawn numerals and diplays the prediction in a sperate window. A numeral is drawn and the model predicts the label with the accuracy displayed.(Confidence that that label is correct is displayed in %). Model complexity and dataset size have prevented deployment to a website. However, local deployment is available.

This project was an inspiration from the hugely popular MNIST dataset for handwritten digit classification.

Sources