






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Name : MD JUBAIR_HOSSAIN ID: 2017521460057
Project Supervisor:Hu Dasha Grading Results:
Comments:
Student : MD JUBAIR HOSSAIN Supervisor: Hu Dasha
Abstract Keywords:
Student name: MD JUBAIR HOSSAIN Student number: 2017521460057
We have used MNIST dataset for our proposed handwritten digits recognition with ANN approach. The dataset contains thousands of labeled images of handwritten digits written by numerous person. We extracted 70, samples to conduct our experiment. It is pre-divided into training, which is 60,000, and test, which is 10, images. These images are low resolution, just 28-by-28 pixels in grayscale, also note they are properly segmented (as shown in Fig. 1).
Fig. That means each image contains exactly one digit. When we are working with images, we used the raw pixels as features. That is because extracting useful features from images, like texture and shapes, is hard and no feature engineering required. Now, a 28-by28 pixels image has 784 pixels, so we have 784 features. Here, we are using the flattened representation of the image. To flatten image means to convert it from a 2D array to 1D array by unstacking the rows and lining them up. That is why we had to reshape the array to display it in Fig. 1.
III. RESEARCH METHODOLOGY
Initialize the Classifier: The Artificial Neural Network can almost mimic the human brain and are a key ingredient in image processing field and is one of the implemental approaches of Deep Learning to solve the problem of digit recognition with high accuracy.
Fig.
Fig
Fig In the above fig’s we have showed the basic scenario that how does ann works on recognition.
Student name: MD JUBAIR HOSSAIN
IV.Construct the model:
Now to construct the model we need to implement the scenario to recognize the digits.in order to do that I can use a platform called googlecolab website and then I need to install the packages and then import the packages into my program.Next, load the da variables train_images (the variable that contains the images to train on) , train_labels (the variable that contains the labels of the images in the training set), test_images that contains the images to test on), and the test_labels (the variable that contains the labels of the images in the test set).The data is loaded into the variables.
nowmanipulate the data to make it easier to train the model. This can be accomplished by first changing the pixel values original range value from [0, 255] to [ secondly flatten the images from 2 dimension 28 x 28 pixels to a 28² = 784 one dimension vector. Then print the new shape of the train and test images.
MD JUBAIR HOSSAIN Student number:
IV.Construct the model:
Now to construct the model we need to implement the scenario to recognize the digits.in order to do that I can use a googlecolab website and then I need to install the packages and import the packages into my load the data set into the (the variable that contains the images to train (the variable that contains the labels of the images in the test_images (the variable that contains the images to test on), and the (the variable that contains the labels of the images in the test set).The data is loaded into the variables.
to make it easier to train the model. This can be accomplished by first changing the pixel values original range value from [0, 255] to [-0.5, 0.5], and secondly flatten the images from 2 dimension 28 x 28 pixels to a 28² = 784 one dimension vector. Then print the new shape
Fig. ann architecture.
Build the model with 3 layers ( 64 neurons and the ReLu function & 1 layer with 10 neurons and the Softmax function).
Here we have used sequential model.
The sequential API allows you to create models layer-by-layer for most problems. It is limited in that it does not allow you to create models that share layers or have multiple inputs or outputs.
We have used dense function which means every inputs are fully connected with the next layers.
THE REASON TO USE RELU:
We have used the relu function in our model the get the good result out of it. Moreover In a neural network, the activation function is responsible for transforming the summed weighted input from the node into the activation of the node or output for that
The rectified linear activation function is a piecewise linear function that will output the input directly if is positive, otherwise, it will output zero. It has become the default activation function for many types of neural networks
tudent number: 2017521460057
with 3 layers (2 layers with 64 neurons and the ReLu function & 1 layer with 10 neurons and the Softmax function).
Here we have used sequential model.
API allows you to create most problems. It is limited in that it does not allow you to that share layers or have
We have used dense function which means every inputs are fully connected with the
We have used the relu function in our model the get the good result out of it. In a neural network, the activation function is responsible for transforming the summed weighted input from the node into the activation of the node or output for that input.
The rectified linear activation function is a piecewise linear function that will output the input directly if is positive, otherwise, it will output zero. It has become the default activation function for many types of neural networks
Student name: MD JUBAIR HOSSAIN
separate probability for each of the ten digits, and the probabilities will all add up to 1.
Fig.Softmax architecture.
Defining the softmax as
σ ( j )=exp(w ⊤ j x)∑ Kk =1exp(
xp( zj )∑ Kk =1exp( zk )
Compile the model using the loss function categorical_crossentropy used for classes that are greater than 2, since we will have 9 classes we will use this function. Those classes being the numbers from 0 to 9 for example: 0,1,2,3,…9. I will also add in a metric to show the accuracy of the model.
Train the model using the train_images and train_labels variables (the variables / data set that contains the training data). I will iterate 5 times over the entire data set to train on, with a number of 32 samples per gradient update for training.
MD JUBAIR HOSSAIN Student number:
separate probability for each of the ten digits, and the probabilities will all
exp(w ⊤ k x)=e
using the loss function categorical_crossentropy which is used for classes that are greater than 2, since we will have 9 classes we will use this function. Those classes being the numbers from 0 to 9 for example: 0,1,2,3,…9. I will also add in a metric to show the accuracy of
train_images , variables (the variables / data set that contains the training data). I will iterate 5 times over the entire data set to train on, with a number of 32 samples per
Fig. training performance
Result: Now it’s time to evaluate the model how well it performs on the testing data set. The model performed well, it is about 96.33% accurate.
Make predictions using the model. I will predict the class of the first 5 test images using this model, as well as the actual labels.
Finally I will print the handwritten images the screen. More specifically I will print the first 5 images of the testing data to the screen as a 28 x 28 pixel that is gray.
tudent number: 2017521460057
Fig. training performance
evaluate the model to see how well it performs on the testing data set. The model performed well, it is about 96.33%
s using the model. I will the first 5 test images using this model, as well as the actual labels.
print the handwritten images to the screen. More specifically I will print the first 5 images of the testing data to the screen as a 28 x 28 pixel that is gray.
Student name: MD JUBAIR HOSSAIN
Looks like my model is working perfect. We can import our model on matlab or android app to further experiment our performance of the model.
V.Discussion on the result of different model:
This proposed method used the image pixels for its features extraction process. ANN carried out the classification, and the overall classification accuracy is 99.60%. P. M. Kamble and R. S. Hegadi.carried out the handwritten character recognition using the rectangular histogram of oriented gradients (R-HOG) features extraction. Researchers obtained 95.64% of classification accuracy with support vector machine (SVM). B. Su, S. Lu, S. Tian, J.-H. Lim, and C. L. Tan also investigated the character classificati task in the regular environment. Authors used convolutional co-occurrence histogram of oriented gradients (CHOG) as their features extractor and SVM as their classifier and achieved 81.00% of classification accuracy. This was also considerable because researchers used different features extraction method of different classifier. S. Tian, S. Lu, B. Su, and C. L. Tan performed text recognition with
MD JUBAIR HOSSAIN Student number:
Looks like my model is working perfect. We can import our model on matlab or android app to further experiment our performance of the model.
V.Discussion on the result of
This proposed method used the image pixels for its features extraction process. ANN carried out the classification, and the overall classification accuracy is 99.60%. P. M. Kamble and R. S. Hegadi.carried out the handwritten character recognition rectangular histogram of HOG) features extraction. Researchers obtained 95.64% of classification accuracy with support vector machine (SVM). B. Su, S. Lu, S. H. Lim, and C. L. Tan also investigated the character classification task in the regular environment. Authors used convolutional occurrence histogram of oriented gradients (CHOG) as their features extractor and SVM as their classifier and achieved 81.00% of classification accuracy. This was also considerable esearchers used different features extraction method of different classifier. S. Tian, S. Lu, B. Su, and C. L. Tan performed text recognition with
CHOG and SVM as a classifier to obtain their classification accuracy of 83.60%. J. Varagul and T. Ito pointed function object detection using computer vision. Here, the authors used the HOG as their features extraction purpose and ANN as the classifier and achieved an overall classification accuracy of 97.33%. A. Boukharouba and A. Bennia found out the novel features extraction method for handwritten digits classification. Authors have used a different features extraction method called chain code histogram (CCH) with SVM as the classifier to achieve 98.48% of classification accuracy which is almost similar to this present investigation. The difference between their achievement and current investigation is only 1.12% which is consistent. Another group of researchers X. and C. Y. Suen [17] introduced a hybrid method for recognition of handwritten digits. Researchers used convolution neural network (CNN) to extract the image features and fed to a hybrid classifier to classification. Their hybrid classifier contained CNN and SVM and achieved 94.40% of classification accuracy and the difference from the present result is 5.20%. It has been noticed that the presents results have the higher accuracy than the previous researchers as described. From the result discussion part, it can be concluded that the performance of the ANN is more effectively better while corresponded to the classification using SVM. Failure discussion:
Recognition of handwriting digits is a difficult task because of the different
tudent number: 2017521460057
CHOG and SVM as a classifier to obtain their classification accuracy of 83.60%. J. Varagul and T. Ito pointed out the function object detection using computer vision. Here, the authors used the HOG as their features extraction purpose and ANN as the classifier and achieved an overall classification accuracy of 97.33%. A. Boukharouba and A. Bennia found out vel features extraction method for handwritten digits classification. Authors have used a different features extraction method called chain code histogram (CCH) with SVM as the classifier to achieve 98.48% of classification accuracy which is almost to this present investigation. The difference between their achievement and current investigation is only 1.12% which is consistent. Another group of researchers X.-X.Niu and C. Y. Suen [17] introduced a hybrid method for recognition of handwritten
. Researchers used convolution neural network (CNN) to extract the image features and fed to a hybrid classifier to classification. Their hybrid classifier contained CNN and SVM and achieved 94.40% of classification accuracy and the difference from the sent result is 5.20%. It has been noticed that the presents results have the higher accuracy than the previous researchers as described. From the result discussion part, it can be concluded that the performance of the ANN is more effectively better while orresponded to the classification
Recognition of handwriting digits is a difficult task because of the different
Student name: MD JUBAIR HOSSAIN Student number: 2017521460057
VII. FUTURE OF AI: We expect to get the whole world in our hand. Such as:
Telemarketing. Bookkeeping Clerks. Compensation and Benefits Managers. Receptionists. Couriers. Proofreaders. Computer Support Specialists. Market Research Analysts
Fig. future of AI
REFERENCE: [1] M. Nagu, N. V. Shankar, and K. Annapurna, "A novel method for Handwritten Digit Recognition with Neural Networks," 2011. [2] Y. LeCun, B. E. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. E. Hubbard, et al., "Handwritten digit recognition with a backpropagation network," in Advances in neural information processing systems, 1990, pp. 396-404. [3] A. Ashworth, Q. Vuong, B. Rossion, M. Tarr, Q. Vuong, M. Tarr, et al., "Object Recognition in Man, Monkey, and Machine," Visual Cognition, vol. 5, pp. 365-366, 2017. [4] J. Janai, F. Güney, A. Behl, and A. Geiger, "Computer Vision for Autonomous Vehicles: Problems, Datasets and State-of-the-Art," arXiv preprint arXiv:1704.05519,
2017. [5] K. Islam and R. Raj, "Real-Time (Vision-Based) Road Sign Recognition Using an Artificial Neural Network," Sensors, vol. 17, p. 853, 2017. [6] D. Arpit, Y. Zhou, B. Kota, and V. Govindaraju, "Normalization propagation: A parametric technique for removing internal covariate shift in deep networks," in International Conference on Machine Learning, 2016, pp. 1168-1176. [7] I. Patel, V. Jagtap, and O. Kale, "A Survey on Feature Extraction Methods for Handwritten Digits Recognition," International Journal of Computer Applications, vol. 107, 2014. [8] I. H. Witten, E. Frank, M. A. Hall, and C. J. Pal, Data Mining: Practical machine learning tools and techniques: Morgan Kaufmann, 2016. [9] Y. LeCun, C. Cortes, and C. Burges, "MNIST handwritten digit database, 1998," URL http://www.research. att. com/~ yann/ocr/mnist, 2016. [10] K. T. Islam, R. G. Raj, and G. Mujtaba, "Recognition of Traffic Sign Based on Bag-of-Words and Artificial Neural Network," Symmetry, vol. 9, p. 138, 2017. [11] R. Hecht-Nielsen, "Kolmogorov’s mapping neural network existence theorem," in Proceedings of the international conference on Neural Networks, 1987, pp. 11-13. [12] P. M. Kamble and R. S. Hegadi, "Handwritten Marathi character recognition using R-HOG Feature," Procedia Computer Science, vol. 45, pp. 266-274, 2015.[13] B. Su, S. Lu, S. Tian, J.-H. Lim, and C. L. Tan, "Character Recognition in Natural Scenes Using Convolutional Co-occurrence HOG," in ICPR, 2014, pp. 2926-2931. [14] S. Tian, S. Lu, B. Su, and C. L. Tan, "Scene text recognition using cooccurrence of histogram of oriented gradients," in 2013 12th International Conference on Document Analysis and Recognition, 2013, pp. 912-916. [15] J. Varagul and T. Ito, "Simulation of Detecting Function object for AGV Using Computer Vision with Neural Network," Procedia Computer Science, vol. 96, pp. 159-168, 2016.[16] A. Boukharouba and A. Bennia, "Novel feature extraction technique for the recognition of handwritten digits," Applied Computing and Informatics. [17] X.-X. Niu and C. Y. Suen, "A novel hybrid CNN–SVM classifier for recognizing handwritten digits," Pattern Recognition, vol. 45, pp. 13181325, 4// 2012. [18] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng, "Reading digits in natural images with unsupervised feature learning," in NIPS workshop on deep learning and unsupervised feature learning, 2011,p.5.