Machine LearningChinese Character Number Recognition

Jan - May 2022

character img
Introduction

This machine learning project entails the development of a Convolutional Neural Network (CNN) model for handwritten digit recognition. This model represents a classic example in the field of machine learning and is a common starting point for many aspiring machine learning practitioners. However, instead of utilizing the covnentional numerical digits, the model is trained to recognize Chinese characters. The complexity of recognizing Chinese characters, with its written strokes and various styles, aims to provide a challenge for myself.

The image depicts a set of sample characters utilized for training the model. Unlike typical handwritten digit recognition models that rely on the MNIST dataset, this project utilized a customized dataset created by myself. THe dataset included characters one through nine, each with approximately 15 images in diverse font styles to account for variations in the same character. Each image is annotated with its corresponding classification.

Neural Network Model Architecture

Simple Convolution Neural Network Model

The chart represents a basic Convolutional Neural Network model. The input i mage is processed through a 2D convolutional layer, followed by a pooling layer, then another convolutional layer and finally another pooling layer. The output of the final pooling layer is flattened and then fed into a fully-connected layer before being outputted by the final dense layer with nine potential classifications.

The code above is the simple convolutional neural network.

Complex and Conclusion of Convolutional Neural Network Model

The code above showcases a customized version of the VGG16 model architecture. The architecture closely resembles the VGG16 model used for ImageNet, however, it has been adapted to match the dimensions of the curated dadtaset. The model is more sophisticated than the previous m odel, featuring larger kernels, additional nodes, and an altered arrangement of convolutional and pooling layers. The enhanced inputs and additional convolutiona layers allow for the moddel to extract more features from the images it processes. These added convolutional and pooling lyaers significantly improve the model's ability to identify complex images, such as landscapes.

Comparison of Models

The results of the model evaluation indicate that a simpler convolutional neural network model outperforms a modified VGG16 architecture in terms of accuracy in validating the dataset. The precision and recall scores support the fact that the simpler model has superior performance in image classification compared to the more complex VGG16 model. The reason behind this discrepancy may be attributed to the fact that the advanced model overfits the data by capturing minor variations in font style, leading to incorrect predictions.